/* ========== SIDEBAR LAYOUT STYLES ========== */

:root {
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 0px;
  --primary-color: #1a4d3a;
  --secondary-color: #27ae60;
  --hover-bg: #ecf0f1;
  --accent-green: #42976a;
  --light-green: #d5f4e6;
  --dark-green: #0e3329;
}

html,
body {
  margin: 0 !important;
  padding: 0 !important;
  height: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
  background: #f8f9fa !important;
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  background: #f8f9fa;
  transition: margin-left 0.3s ease;
  padding-top: 0;
}

/* Sidebar Styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: var(--sidebar-width);
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--dark-green) 100%
  );
  color: white;
  padding: 0;
  overflow: hidden;
  z-index: 1050;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.sidebar-header img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 200px;
  object-fit: contain;
  padding: 0;
  border-radius: 0;
  border: none;
}

.sidebar-header .brand-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: white;
  text-align: center;
}

.sidebar-header .brand-text small {
  display: block;
  font-size: 0.75rem;
  opacity: 0.7;
  font-weight: 400;
}

/* Sidebar Navigation */
.sidebar-nav {
  padding: 15px 0 15px 0;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

/* Hide scrollbar for sidebar nav */
.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.sidebar-nav .nav-item {
  margin: 2px 10px;
}

.sidebar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  padding: 12px 15px;
  display: flex;
  align-items: center;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.sidebar-nav .nav-link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.sidebar-nav .nav-link.active {
  background: var(--accent-green);
  color: white;
}

.sidebar-nav .nav-link i {
  width: 22px;
  margin-right: 10px;
  font-size: 0.95rem;
  text-align: center;
}

.sidebar-nav .nav-link .menu-arrow {
  margin-left: auto;
  transition: transform 0.2s ease;
}

.sidebar-nav .nav-link[aria-expanded="true"] .menu-arrow {
  transform: rotate(90deg);
}

/* Submenu Styles */
.sidebar-submenu {
  padding-left: 15px;
  overflow: hidden;
}

.sidebar-submenu .nav-link {
  padding: 10px 15px 10px 35px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.sidebar-submenu .nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-submenu .nav-link.active {
  background: rgba(46, 204, 113, 0.3);
  color: white;
}

/* Nested Submenu */
.sidebar-submenu .sidebar-submenu {
  padding-left: 10px;
}

.sidebar-submenu .sidebar-submenu .nav-link {
  padding-left: 45px;
  font-size: 0.8rem;
}

/* Submenu Header */
.submenu-header {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 15px 5px 35px;
  margin-top: 5px;
}

/* Sidebar Divider */
.sidebar-divider {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 15px 15px;
}

.main-content.expanded {
  margin-left: 0;
}

/* Top Navbar */
.top-navbar {
  background: white;
  padding: 12px 25px;
  box-shadow: 0 2px 15px rgba(39, 174, 96, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(39, 174, 96, 0.05);
  position: sticky;
  top: 0;
  z-index: 1040;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--primary-color);
  cursor: pointer;
  padding: 5px 10px;
  border-radius: 5px;
  transition: background 0.2s;
}

.sidebar-toggle:hover {
  background: rgba(39, 174, 96, 0.1);
}

/* Content Wrapper */
.content-wrapper {
  padding: 25px;
}

/* Card Styles (matching admin portal) */
.card {
  border: none;
  box-shadow: 0 4px 20px rgba(39, 174, 96, 0.08);
  margin-bottom: 25px;
  border-radius: 12px;
  overflow: hidden;
}

.card-header {
  background: white;
  border-bottom: 2px solid var(--accent-green);
  font-weight: 600;
  color: var(--primary-color);
  padding: 18px 22px;
}

/* Mobile Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1045;
}

.sidebar-overlay.show {
  display: block;
}

/* Badge in Menu */
.menu-badge {
  background: var(--accent-green);
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 10px;
  margin-left: auto;
}

/* Version Badge */
.user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  padding: 10px 15px;
}

.sidebar .user-info {
  margin-top: auto;
  background: linear-gradient(
    135deg,
    var(--primary-color) 0%,
    var(--dark-green) 100%
  );
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

/* Responsive */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }
}

/* Scrollbar for Sidebar */
.sidebar::-webkit-scrollbar {
  width: 5px;
}

.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ========== END SIDEBAR LAYOUT STYLES ========== */

/* Multi-level dropdown styles */
.dropdown-submenu {
  position: relative;
}

.dropdown-submenu .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: -1px;
}

.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}

.dropdown-item.dropdown-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-item.dropdown-toggle::after {
  content: "›";
  border: none;
  margin-left: 0.5rem;
  flex-shrink: 0;
}

.version-badge {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #27ae60;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-decoration: none;
}

/* Optional: Better mobile support */
@media (max-width: 768px) {
  .dropdown-submenu .dropdown-menu {
    position: static;
    left: 0;
    margin-left: 1rem;
    border-left: 2px solid #dee2e6;
  }
}

/* ========== ADD THESE NEW STYLES BELOW ========== */

/* Fixed Navbar Styles */
body.box {
  padding-top: 70px; /* Adjust this value based on your navbar height */
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030; /* Bootstrap's navbar z-index */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Adjust padding for mobile devices if navbar is taller */
@media (max-width: 991px) {
  body.box {
    padding-top: 60px; /* Slightly less padding for mobile */
  }
}

/* When navbar is expanded on mobile, ensure dropdowns work properly */
@media (max-width: 991px) {
  .navbar-collapse {
    max-height: calc(100vh - 60px);
    overflow-y: auto;
  }
}
/* Navbar Layout Fixes */
.navbar-nav .nav-link {
  white-space: nowrap;
  display: flex;
  align-items: center;
}

/* From Complete_upload_history.html */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  border-radius: 0.375rem;
  display: none;
}

.table-container {
  position: relative;
  min-height: 400px;
}

/* from list.html */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  border-radius: 0.375rem;
}

.spinner-container {
  text-align: center;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
}

.table-container {
  position: relative;
  min-height: 200px;
}

.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.progress-bar-container {
  margin: 20px 0;
  display: none;
}

/* DataTables horizontal scroll wrapper */
.dataTables_wrapper .dataTables_scroll {
  width: 100%;
}

/* Ensure scrollable body doesn't overflow */
.dataTables_wrapper .dataTables_scrollBody {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

/* Table truncation and scrollbar styles */
.text-truncate-column {
  max-width: 150px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.truncate-cell {
  max-width: 150px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* Custom scrollbar for horizontal scroll */
.dataTables_scrollBody::-webkit-scrollbar {
  height: 6px;
}

.dataTables_scrollBody::-webkit-scrollbar-thumb {
  background: #27ae60;
  border-radius: 10px;
}

#uploadHistoryTable_wrapper {
  padding: 0;
}

#uploadHistoryTable {
  width: 100% !important;
}

/* Account closure textarea validation styles */
#account_closed_reason.is-invalid {
  border-color: #dc3545;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) top
    calc(0.375em + 0.1875rem);
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

#account_closed_reason.is-valid {
  border-color: #198754;
  padding-right: calc(1.5em + 0.75rem);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) top
    calc(0.375em + 0.1875rem);
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

/* from upload_status.html */
.status-container {
  max-width: 1000px;
  margin: 0 auto;
}

.card {
  transition: transform 0.2s;
}

/* from Old user list.html */
.old-user-container {
  max-width: 1400px;
  margin: 0 auto;
}

.filter-card {
  background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
  border: 1px solid #c3e6c1;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(25, 135, 84, 0.1);
}

.old-user-table {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.table th {
  background: linear-gradient(135deg, #d1e7dd 0%, #d1e7dd 100%);
  color: #000000;
  border: none;
  font-weight: 600;
  text-align: center;
  vertical-align: middle;
  position: sticky;
  top: 0;
  z-index: 10;
}

.status-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
}

.status-active {
  background-color: #d1edcf;
  color: #155724;
  border: 1px solid #c3e6c1;
}

.status-inactive {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-migrated {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: #6c757d;
  min-height: 400px;
  max-width: 600px;
  background: linear-gradient(135deg, #f8fff9 0%, #f0f9f0 100%);
  border-radius: 15px;
  border: 2px dashed #c3e6c1;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.empty-state-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem 0;
  width: 100%;
  min-height: 50vh;
}

.empty-state-wrapper .empty-state {
  margin: 0 auto;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  opacity: 0.6;
  color: #198754;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  background: #f8f9fa;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-top: 1rem;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.pagination {
  margin: 0;
}

.page-info {
  color: #6c757d;
  font-size: 0.875rem;
}

.search-input {
  border-radius: 20px;
  border: 2px solid #e8f5e8;
  padding: 0.5rem 1rem;
}

.search-input:focus {
  border-color: #198754;
  box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.excel-columns {
  font-size: 0.75rem;
  color: #6c757d;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.batch-tag {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* from upload_error_rows.html */
.error-row {
  background-color: #f8d7da;
  border-color: #f1aeb5;
}
.error-details {
  background-color: #fff3cd;
  border-left: 4px solid #ffc107;
  padding: 10px;
  margin: 5px 0;
}
.collapse-details {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 15px;
  margin-top: 10px;
}
.table-responsive {
  font-size: 0.9rem;
}
.row-data-table {
  font-size: 0.8rem;
}
.row-data-table th {
  background-color: #e9ecef;
  font-weight: 600;
  font-size: 0.75rem;
}
.row-data-table td {
  padding: 0.3rem 0.5rem;
  vertical-align: top;
}

/* from old user upload_status.html */
.progress-card {
  border: none;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 10px;
}

.status-badge-lg {
  font-size: 1.1rem;
  padding: 8px 16px;
}

.progress {
  height: 25px;
}

.progress-bar {
  font-weight: bold;
  line-height: 25px;
}

.stats-card1 {
  background: linear-gradient(135deg, #0b6efd 0%, #667eea 100%);
  color: white;
  border-radius: 10px;
}

.stats-card2 {
  background: linear-gradient(135deg, #198754 0%, #20c997 100%);
  color: white;
  border-radius: 10px;
}

.stats-card3 {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 10px;
}

.stats-card4 {
  background: linear-gradient(135deg, #11caf0 0%, #667eea 100%);
  color: white;
  border-radius: 10px;
}

.error-details {
  max-height: 400px;
  overflow-y: auto;
  background: #f8f9fa;
  border-radius: 5px;
  padding: 15px;
}

.error-item {
  padding: 8px;
  margin-bottom: 5px;
  background: #fff3cd;
  border-left: 4px solid #ffc107;
  border-radius: 3px;
}

.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

.result-message {
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.result-success {
  background-color: #d1edcf;
  color: #155724;
  border: 1px solid #c3e6c1;
}

.result-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.result-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.batch-info {
  background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* from account_lock_unlock.html */
.spinner-container {
  text-align: center;
}

.spinner-border {
  width: 3rem;
  height: 3rem;
}

/* from customer_information_report_download.html */
.form-control,
.form-select {
  border-color: #198754;
}
.form-control:focus,
.form-select:focus {
  border-color: #198754;
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}
.stats-card {
  transform: translateY(-10px);
  opacity: 0;
  transition: all 0.3s ease;
}
.stats-card.show {
  transform: translateY(0);
  opacity: 1;
}
.preview-stats {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  padding: 15px;
  margin: 10px 0;
  transition: all 0.3s ease;
}
.preview-stats:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* from outstanding_report_download.html */
/* Fix sticky DataTables controls */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  position: sticky;
  top: 0;
  background: white;
  z-index: 10;
  padding: 8px 0;
}

/* from quarterly_statement_summary.html */
.quarter-row {
  transition: all 0.3s ease;
}
.quarter-row:hover {
  background-color: #f8f9fa;
  transform: translateX(5px);
}
.amount-cell {
  font-weight: 600;
  font-family: "Courier New", monospace;
}
.pagination .page-link {
  color: #198754;
}
.pagination .page-item.active .page-link {
  background-color: #198754;
  border-color: #198754;
  color: white;
}

/* from quarterly_statement.html */
.table-responsive {
  max-height: 600px;
  overflow-y: auto;
}
.badge-regular {
  background-color: #28a745;
}
.badge-sma {
  background-color: #ffc107;
}
.badge-ss {
  background-color: #fd7e14;
}
.badge-df {
  background-color: #dc3545;
}
.badge-bl {
  background-color: #6c757d;
}

/* from detail_branding.html */
.detail-card {
  border-left: 4px solid #198754;
}
.change-row {
  background-color: #f8f9fa;
  border-radius: 0.25rem;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
}
/* Default image preview style for all entities */
.img-preview {
  height: 140px;
  width: 320px;
  display: block;
  margin-top: 0.5rem;
  object-fit: contain;
  border: 1px solid #ccc;
  border-radius: 4px;
}
/* Portal branding: larger preview, but constrained to reasonable width */
.branding-portal .img-preview {
  height: 220px;
  width: 420px;
}
/* App branding: smaller preview (mobile focused) */
.branding-app .img-preview {
  height: 120px;
  width: 240px;
}
.doc-link {
  display: block;
  margin-top: 0.25rem;
}
pre.small {
  white-space: pre-wrap;
  word-break: break-word;
}
.old-value,
.new-value {
  font-family: monospace;
  background: #f8f9fa;
  padding: 0.35rem;
  border-radius: 6px;
}
/* from detail.html */
.value-old {
  background-color: #fee;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  color: #721c24;
}
.value-new {
  background-color: #d4edda;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  color: #155724;
}
/* from bank_dashboard.html */
/* Table styling */
.table-bordered th,
.table-bordered td {
  border: 1px solid #dee2e6 !important;
}

.border-end {
  border-right: 1px solid #dee2e6 !important;
}

/* Hover effect for table rows */
.table-hover tbody tr:hover {
  background-color: rgba(0, 123, 255, 0.075);
}

/* Badge styling */
.badge {
  font-size: 0.75em;
}

/* from bank_approval.html */
.checkbox-wrapper {
  background: #e8f5e8;
  border: 1px solid #198754;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.3s ease;
}

.checkbox-wrapper:hover {
  box-shadow: 0 2px 4px rgba(25, 135, 84, 0.1);
}

.form-check-input:checked {
  background-color: #198754;
  border-color: #198754;
}

.form-check-input:focus {
  border-color: #198754;
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

/* from batch_details.html */
.progress {
  height: 25px;
  background-color: #e9ecef;
  border-radius: 0.5rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075);
}

.progress-bar {
  background: linear-gradient(45deg, #198754, #20c997);
  border-radius: 0.5rem;
  transition: width 0.6s ease;
}

.table thead th {
  border: none;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
}

.table-success {
  background-color: rgba(25, 135, 84, 0.1) !important;
}

.auto-refresh-info {
  background: linear-gradient(45deg, #d1ecf1, #bee5eb);
  border: 1px solid #b6d7ff;
  border-radius: 0.5rem;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

/* from create_repayment batch.html */
.file-upload-area {
  border: 2px dashed #198754;
  border-radius: 10px;
  padding: 40px;
  text-align: center;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.file-upload-area:hover {
  background-color: #e9f7ef;
  border-color: #157347;
}

.file-upload-area.dragover {
  background-color: #d1e7dd;
  border-color: #0f5132;
}

.preview-card {
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.preview-card.show {
  transform: translateY(0);
}

.file-input-hidden {
  opacity: 0;
  position: absolute;
  z-index: -1;
  width: 0.1px;
  height: 0.1px;
}

/* from ewa_pivot_report.html */
.table-success {
  --bs-table-bg: #d1e7dd;
}

/* from repayment_batchlist.html */
/* Status badge colors */
.status-draft {
  background-color: #6c757d !important;
}
.status-corporate-pending {
  background-color: #ffc107 !important;
  color: #000 !important;
}
.status-corporate-approved {
  background-color: #198754 !important;
}
.status-bank-pending {
  background-color: #0dcaf0 !important;
}
.status-bank-approved {
  background-color: #0d6efd !important;
}
.status-completed {
  background-color: #198754 !important;
}
.status-rejected {
  background-color: #dc3545 !important;
}

/* from about_portal.html */
.about-card {
  transition: transform 0.2s;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.about-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.about-content {
  line-height: 1.9;
  font-size: 1.08rem;
  color: #2d3436;
}
.about-content h1,
.about-content h2,
.about-content h3,
.about-content h4 {
  color: #28a745;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}
.about-content ul,
.about-content ol {
  padding-left: 1.8rem;
  margin: 1.2rem 0;
}
.about-content li {
  margin-bottom: 0.4rem;
}
.about-content a {
  color: #20c997;
  text-decoration: underline;
  font-weight: 500;
}
.about-content a:hover {
  color: #17a589;
}
.current-logo-preview {
  max-height: 130px;
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 12px;
  background: #f8f9fa;
  text-align: center;
}

/* from app_config_history.html */
.history-container {
  max-width: 1200px;
  margin: 0 auto;
}

.config-info-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

.timeline-item:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  transform: translateX(5px);
}

.timeline-marker {
  position: absolute;
  left: -2.85rem;
  top: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: 4px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 0;
  border-bottom: none;
}

.user-info-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.user-card {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 1rem;
  border-left: 4px solid;
}

.user-card.requester {
  border-left-color: #2196f3;
}

.user-card.approver {
  border-left-color: #4caf50;
}

.user-card-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: #6c757d;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.user-card-value {
  font-size: 1rem;
  font-weight: 600;
  color: #212529;
}

/* Pagination conflict resolution: scope under history-container */
.history-container .pagination-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.history-container .pagination .page-link {
  color: #667eea;
}

.history-container .pagination .page-item.active .page-link {
  background-color: #667eea;
  border-color: #667eea;
  color: white;
}

.timeline-time {
  font-size: 0.9rem;
  color: #6c757d;
}

.timeline-user {
  font-weight: 600;
  color: #495057;
}

.change-type-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
}

.change-type-update {
  background: #e3f2fd;
  color: #1976d2;
}

.change-type-create {
  background: #e8f5e9;
  color: #388e3c;
}

.changes-table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: separate;
  border-spacing: 0 0.75rem;
}

.changes-table thead {
  display: none; /* Hide table headers for card view */
}

.changes-table tbody tr {
  background: #f8f9fa;
  border-radius: 8px;
  display: block;
  padding: 1rem;
  margin-bottom: 0.75rem;
  border: 1px solid #e9ecef;
  transition: all 0.2s ease;
}

.changes-table tbody tr:hover {
  background: #e9ecef;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.changes-table td {
  display: block;
  padding: 0.5rem 0;
  border: none;
}

.changes-table td.field-name {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #6c757d;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: 0.5px;
}

.changes-table td:nth-child(2)::before {
  content: "Old Value: ";
  font-weight: 600;
  color: #495057;
  margin-right: 0.5rem;
}

.changes-table td:nth-child(3)::before {
  content: "New Value: ";
  font-weight: 600;
  color: #495057;
  margin-right: 0.5rem;
}

.old-value,
.new-value {
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  font-family: "Courier New", monospace;
  font-size: 0.95rem;
  display: inline-block;
  margin-top: 0.25rem;
}

.old-value {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

.new-value {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.field-name {
  font-weight: 600;
  color: #495057;
}

.no-history {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
}

.back-button {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
  border-radius: 10px;
  padding: 0.5rem 1.5rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.back-button:hover {
  background: #667eea;
  color: white;
  transform: translateY(-2px);
}

/* from app_config_list.html */
.badge-action {
  font-size: 0.85em;
  padding: 0.4em 0.8em;
}
.version-badge {
  /* font-family: 'Courier New', monospace; */
  font-weight: bold;
}

/* from app_config_update.html */
.update-container {
  max-width: 900px;
  margin: 0 auto;
}

.config-detail {
  display: flex;
  align-items: center;
  margin-bottom: 0.75rem;
}

.config-detail:last-child {
  margin-bottom: 0;
}

.config-label {
  font-weight: 600;
  margin-right: 0.5rem;
  opacity: 0.9;
}

.config-value {
  font-family: "Courier New", monospace;
  background: rgba(25, 135, 84, 0.1);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  color: #198754;
  border: 1px solid rgba(25, 135, 84, 0.2);
}

.update-form-card {
  border: none;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.form-section {
  padding: 2rem;
  background: #f8f9fa;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.section-title {
  color: #495057;
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #dee2e6;
}

.update-container .form-control,
.update-container .form-select {
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 0.75rem;
  transition: all 0.3s ease;
}

.update-container .form-control:focus,
.update-container .form-select:focus {
  border-color: #198754;
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

.update-container .form-check-input:checked {
  background-color: #198754;
  border-color: #198754;
}

.btn-submit {
  background: linear-gradient(45deg, #198754, #157347);
  border: none;
  border-radius: 10px;
  padding: 0.875rem 2.5rem;
  font-weight: 600;
  font-size: 1.1rem;
  color: white;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.btn-submit:hover {
  background: linear-gradient(45deg, #157347, #146c43);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(25, 135, 84, 0.3);
  color: white;
}

.btn-cancel {
  border: 2px solid #6c757d;
  color: #6c757d;
  border-radius: 10px;
  padding: 0.875rem 2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  text-decoration: none;
}

.btn-cancel:hover {
  background-color: #6c757d;
  color: white;
  transform: translateY(-2px);
}

.help-text {
  font-size: 0.875rem;
  color: #6c757d;
  margin-top: 0.5rem;
  font-style: italic;
}

.version-input-group {
  display: flex;
  align-items: center;
}

.version-prefix {
  background: #e9ecef;
  border: 2px solid #e9ecef;
  border-right: none;
  border-radius: 8px 0 0 8px;
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: #495057;
}

.version-input-group .form-control {
  border-radius: 0 8px 8px 0;
}

/* from branding_tabs.html */
.branding-container .branding-card {
  transition: transform 0.2s;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.branding-container .branding-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
.branding-container .form-label {
  font-weight: 600;
  color: #2d3436;
}
.branding-container .config-card {
  transition: all 0.3s ease;
}
.branding-container .config-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.branding-container .section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #067606;
  margin: 2.5rem 0 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e9ecef;
}

.branding-container .preview-wrapper {
  width: 100%;
  height: 200px;
  background: #f8f9fa;
  border: 2px dashed #adb5bd;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' ... %3E%3C/svg%3E");
}

.branding-container .preview-wrapper img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.branding-container .document-row {
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  background: #f8f9fa;
  transition: all 0.2s ease;
}
.branding-container .document-row:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-color: #067606;
}

.branding-container .btn-success {
  background-color: #067606 !important;
  border-color: #067606 !important;
}
.branding-container .btn-success:hover {
  background-color: #055d05 !important;
}

.branding-container .card {
  border: 1px solid #dee2e6;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.branding-container .card-body {
  padding: 1.5rem;
}

.branding-container .form-control,
.branding-container .form-select {
  border-radius: 8px;
  border: 1px solid #ced4da;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

.branding-container .form-control:focus,
.branding-container .form-select:focus {
  border-color: #067606;
  box-shadow: 0 0 0 0.2rem rgba(6, 118, 6, 0.25);
}

.branding-container .text-muted {
  color: #6c757d !important;
}

/* Reason Page Styles */
.reason-list-container .status-badge,
.reason-form-container .status-badge {
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-active {
  background-color: #d4edda;
  color: #155724;
}

.status-inactive {
  background-color: #f8d7da;
  color: #721c24;
}

.btn-action {
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.btn-action:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.reason-form-container .form-section {
  background: white;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.reason-form-container .form-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #e9ecef;
}

/* Common styles for reasons are now handled by standard Bootstrap classes in templates */

.inactive-reason-container .btn-submit,
.ewa-purpose-container .btn-submit,
.listed-bank-container .btn-submit {
  background: linear-gradient(135deg, #198754 0%, #157347 100%);
  border: none;
  color: white;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

/* Remove Lock Reason gradients */

.lock-reason-container .btn-submit {
  background: linear-gradient(135deg, #198754 0%, #157347 100%);
  border: none;
  color: white;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.lock-reason-container .timeline-item {
  border-left: 4px solid #198754;
}

.key-preview {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  padding: 0.75rem;
  margin-top: 0.5rem;
  font-family: "Courier New", monospace;
  color: #495057;
}

/* common buttons for reasons */
.reason-form-container .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
  color: white;
}

.reason-form-container .btn-cancel {
  border: 2px solid #6c757d;
  color: #6c757d;
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.reason-form-container .btn-cancel:hover {
  background: #6c757d;
  color: white;
  transform: translateY(-2px);
}

/* from bank_dashboard.html */
.bg-orange {
  background-color: #fd7e14 !important;
  color: white !important;
}

/* Ensure SweetAlert appears above Bootstrap Modals */
.swal2-container {
  z-index: 2000 !important;
}

/* Dashboard nav-tabs custom colors */
.nav-tabs .nav-link.active {
  color: #198754 !important;
}
.nav-tabs .nav-link {
  color: #212529 !important;
}

/* Accordion Icon Overrides */
.accordion-button:not(.collapsed)::after {
  transform: none !important; /* Keep it pointing down when open */
}

.accordion-button.collapsed::after {
  transform: rotate(-90deg) !important; /* Point right when closed */
}

/* ========== EWA APPLICATION TABLE STYLES ========== */

/* Resizable table columns */
#applicationsTable th {
  position: relative;
  cursor: col-resize;
  user-select: none;
}

#applicationsTable th:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: transparent;
  cursor: col-resize;
  z-index: 1;
}

#applicationsTable th:not(:last-child):hover::after {
  background: #007bff;
}

/* Responsive table adjustments */
.table-responsive {
  transition: max-width 0.3s ease;
}
/* ========== SPLIT AUTH LAYOUT (Login, OTP, Forgot Password, Set Password) ========== */

.auth-split { display: flex; min-height: 100vh; }

/* Left branding panel - background image with dark overlay */
.auth-brand-panel {
  flex: 1;
  background: url('../images/login-bg-new.png') center/cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.auth-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14,51,41,0.78) 0%, rgba(26,77,58,0.68) 0%, rgba(10,35,28,0.82) 80%);
  pointer-events: none;
}
.auth-brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 420px;
}
.auth-brand-content .auth-brand-logo {
  width: 180px; height: 100px;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255,255,255,0.48);
  padding: 8px;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.4);
  overflow: hidden;
}
.auth-brand-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}
.auth-brand-content .auth-brand-divider {
  width: 50px; height: 3px;
  background: rgba(255,255,255,0.4);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}
.auth-brand-content .auth-brand-about {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.85;
}

/* Right form panel */
.auth-form-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3rem 2rem;
  background: #f8f9fa;
}
.auth-form-wrapper {
  width: 100%;
  max-width: 480px;
}
.auth-form-wrapper .auth-heading-sub {
  font-size: 1.05rem;
  color: #6c757d;
  margin-bottom: 0.25rem;
}
.auth-form-wrapper .auth-heading {
  font-size: 1.6rem;
  font-weight: 700;
  color: #212529;
  margin-bottom: 1.75rem;
}
.auth-form-wrapper .form-label {
  font-weight: 500;
  color: #495057;
  font-size: 0.9rem;
}
.auth-form-wrapper .form-control {
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  border: 1.5px solid #dee2e6;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.auth-form-wrapper .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(26, 77, 58, 0.12);
}
.auth-form-wrapper .btn-auth-primary {
  padding: 0.65rem;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-green));
  border: none;
  color: #fff;
  transition: opacity 0.2s, transform 0.1s;
}
.auth-form-wrapper .btn-auth-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  color: #fff;
}
.auth-form-wrapper .btn-auth-primary:active {
  transform: translateY(0);
  color: #fff;
}
.auth-form-wrapper .auth-link {
  color: var(--primary-color);
  font-size: 0.875rem;
}
.auth-form-wrapper .auth-link:hover {
  color: var(--dark-green);
}
.auth-form-wrapper .auth-back-link {
  color: var(--primary-color);
  font-size: 0.9rem;
}
.auth-form-wrapper .auth-back-link:hover {
  color: var(--dark-green);
}

/* Responsive - stacks on mobile */
@media (max-width: 768px) {
  .auth-split { flex-direction: column; }
  .auth-brand-panel {
    padding: 2rem 1.5rem;
    min-height: auto;
  }
  .auth-brand-content .auth-brand-logo { width: 80px; height: 80px; padding: 12px; }
  .auth-brand-content h1 { font-size: 1.5rem; }
  .auth-form-panel { padding: 2rem 1.5rem; }
}
