@import url('https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap');

/* ===== Light & calm theme: white background, blue buttons ===== */
:root {
  --bg-main: #f5f8fc;
  --bg-secondary: #f8fafc;
  --bg-card: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.9);
  --border-color: #e3e9f2;
  --border-highlight: #bfd3fb;

  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;

  --accent-blue: #2b5c94;
  --accent-blue-dark: #234d7d;
  --accent-blue-soft: #eaf0f7;
  --accent-blue-glow: rgba(43, 92, 148, 0.12);

  --accent-emerald: #059669;
  --accent-emerald-glow: #ecfdf5;

  --accent-gold: #d97706;
  --accent-gold-glow: #fff7ed;

  --accent-danger: #dc2626;
  --accent-danger-glow: #fef2f2;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 6px 20px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 45px -12px rgba(15, 23, 42, 0.15);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  background-color: var(--bg-main);
  background-image:
    radial-gradient(circle at 10% 0%, rgba(37, 99, 235, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 90% 100%, rgba(56, 189, 248, 0.07) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-primary);
  direction: rtl;
  text-align: right;
  min-height: 100vh;
  line-height: 1.55;
}

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; max-width: 100%; overflow-x: hidden; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; width: 100%; box-sizing: border-box; }

/* Navbar */
.navbar {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 14px 0;
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand { display: flex; align-items: center; gap: 14px; }

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.brand-text h1 { font-size: 19px; font-weight: 700; color: var(--text-primary); }
.brand-text p { font-size: 12.5px; color: var(--accent-blue); font-weight: 600; }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
}

.user-pill .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* Avatar Circle Button */
.avatar-circle-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: 2px solid #ffffff;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.28);
  transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
  outline: none;
  font-family: inherit;
  user-select: none;
}

.avatar-circle-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
  filter: brightness(1.05);
}

.avatar-circle-btn:active {
  transform: scale(0.96);
}

.avatar-circle-large {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

/* Admin preview banner */
.preview-banner {
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  color: #fff;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
}

/* Login */
.login-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: #ffffff;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  position: relative;
  overflow: visible;
}

.login-card::before {
  display: none;
}

.login-card .form-control {
  background: #f8fafc;
  border: 1px solid #d5deea;
  padding: 13px 16px;
  border-radius: 12px;
}

.login-card .form-control:focus {
  background: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px var(--accent-blue-glow);
}

.login-card .btn-primary {
  padding: 14px;
  border-radius: 12px;
  font-size: 16px;
}

/* Login Tabs & SMS Login */
.login-tabs {
  display: flex;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 22px;
  gap: 4px;
  border: 1px solid #e2e8f0;
}

.login-tab-btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 9px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
}

.login-tab-btn:hover {
  color: #0f172a;
}

.login-tab-btn.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.sms-code-input {
  letter-spacing: 6px;
  font-size: 22px !important;
  font-weight: 700 !important;
  text-align: center !important;
  font-family: 'Rubik', monospace, sans-serif !important;
  height: 52px;
  color: #0f172a !important;
}

.sms-step-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 4px 0;
}

.login-link-btn {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  text-decoration: underline;
  font-family: inherit;
}

.login-link-btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
  text-decoration: none;
}

.login-header { text-align: center; margin-bottom: 32px; }
.login-header h1.company-title-large {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.25;
}
.login-header h2 { font-size: 24px; margin-bottom: 6px; }
.login-header p { color: var(--text-secondary); font-size: 15px; font-weight: 500; }

@media (max-width: 480px) {
  .login-header h1.company-title-large {
    font-size: 28px;
  }
}

.yield-highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-blue-soft);
  border: 1px solid var(--border-highlight);
  color: var(--accent-blue-dark);
  font-size: 13px;
  font-weight: 700;
}

.demo-credentials-box {
  margin-top: 24px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: 1px dashed #cbd5e1;
  font-size: 12.5px;
  color: var(--text-secondary);
}

.demo-credentials-box h4 { color: var(--text-primary); margin-bottom: 8px; font-size: 13px; }

.demo-btn-group { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }

.demo-quick-btn {
  flex: 1;
  background: #fff;
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
  transition: all 0.2s;
}

.demo-quick-btn:hover {
  background: var(--accent-blue-soft);
  border-color: var(--accent-blue);
  color: var(--accent-blue-dark);
}

/* Forms */
.form-group { margin-bottom: 18px; }

.form-group label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #d5deea;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px var(--accent-blue-glow);
}

/* Search input with modern SVG icon */
.search-input-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 270px;
}

.search-icon-box {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--text-secondary);
}

.search-icon-box svg {
  width: 17px;
  height: 17px;
}

.search-input-wrapper .search-input {
  width: 100%;
  padding-right: 36px !important;
  padding-left: 12px !important;
  height: 38px;
  font-size: 13.5px;
  border-radius: 9px;
  background: #f8fafc;
  transition: all 0.2s ease;
}

.search-input-wrapper .search-input:focus {
  background: #ffffff;
  border-color: var(--accent-blue);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

@media (max-width: 640px) {
  .form-row { grid-template-columns: 1fr; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  font-family: inherit;
  text-decoration: none;
}

.btn-block { width: 100%; padding: 13px; font-size: 15.5px; }

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.32);
}

/* Secondary blue (used for withdrawal / extra actions) */
.btn-gold {
  background: var(--accent-blue-soft);
  color: var(--accent-blue-dark);
  border-color: var(--border-highlight);
}

.btn-gold:hover {
  background: #dbe8ff;
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-secondary);
  border-color: #cbd5e1;
}

.btn-danger {
  background: var(--accent-danger-glow);
  border-color: #fecaca;
  color: var(--accent-danger);
}

.btn-danger:hover { background: var(--accent-danger); color: #fff; }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }

/* Dashboard */
.dashboard-main { padding: 24px 0 60px; flex: 1; width: 100%; box-sizing: border-box; }

.welcome-banner {
  box-sizing: border-box;
  width: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 55%, #60a5fa 100%);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  color: #fff;
  box-shadow: 0 14px 34px -12px rgba(37, 99, 235, 0.45);
}

.welcome-info h2 { font-size: 24px; margin-bottom: 6px; color: #fff; }
.welcome-info p { color: rgba(255, 255, 255, 0.88); font-size: 14.5px; }
.welcome-info .badge { background: rgba(255, 255, 255, 0.2); color: #fff; border-color: rgba(255, 255, 255, 0.35); }


.welcome-meta-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 13.5px;
  margin-top: 8px;
}
.welcome-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.welcome-meta-sep {
  opacity: 0.6;
}
.panel-header-buttons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chart-scroll-hint {
  display: none;
}

.welcome-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Buttons inside the blue banner */
.welcome-banner .btn-primary {
  background: #fff;
  color: var(--accent-blue-dark);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}
.welcome-banner .btn-primary:hover { background: #f1f6ff; }
.welcome-banner .btn-gold {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.45);
}
.welcome-banner .btn-gold:hover { background: rgba(255, 255, 255, 0.25); }

/* KPI cards - 2x2 grid (2 on top, 2 on bottom) */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 14px;
  margin-bottom: 22px;
}

.kpi-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-icon {
  width: 32px;
  height: 32px;
  font-size: 15px;
  border-radius: 9px;
  flex-shrink: 0;
}

.kpi-value {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.3px;
  margin-bottom: 4px;
  line-height: 1.25;
}

.kpi-sub {
  font-size: 11.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s, box-shadow 0.2s;
}

.kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

.kpi-card.highlight-emerald,
.kpi-card.highlight-gold { border-top: none; }

/* Compact single-row top KPI cards for investors management */
.investors-top-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.investors-top-kpi-grid .kpi-card {
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.investors-top-kpi-grid .kpi-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.investors-top-kpi-grid .kpi-value {
  font-size: 18px;
  font-weight: 800;
  margin: 3px 0 0;
  line-height: 1.2;
}

@media (max-width: 560px) {
  .investors-top-kpi-grid {
    gap: 6px;
    margin-bottom: 12px;
  }
  .investors-top-kpi-grid .kpi-card {
    padding: 8px 6px;
    text-align: center;
  }
  .investors-top-kpi-grid .kpi-label {
    font-size: 10px;
  }
  .investors-top-kpi-grid .kpi-value {
    font-size: 13.5px;
  }
}

/* Investors table mobile optimization */
.btn-text-mobile {
  display: none;
}
.btn-text-desktop {
  display: inline;
}

@media (max-width: 540px) {
  .btn-text-mobile {
    display: inline;
  }
  .btn-text-desktop {
    display: none;
  }
  .table-responsive.no-scroll-mobile {
    overflow-x: hidden;
  }
  .investors-table {
    table-layout: auto;
  }
  .investors-table th,
  .investors-table td {
    padding: 9px 4px !important;
  }
  .investors-table th {
    font-size: 11px !important;
  }
  .investors-table .investor-name {
    font-size: 12.5px !important;
  }
  .investors-table .investor-phone,
  .investors-table .investor-id {
    font-size: 12.5px !important;
  }
  .investors-table .investor-balance {
    font-size: 12.5px !important;
  }
  .investors-table .investor-notes {
    font-size: 11.5px !important;
    max-width: 140px;
  }
  .investors-table .table-view-btn {
    padding: 4px 6px !important;
    font-size: 11px !important;
  }
}

.investors-table .investor-notes {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.35;
  word-break: break-word;
  max-width: 280px;
}

.kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.kpi-label { font-size: 13.5px; font-weight: 600; color: var(--text-secondary); }

.kpi-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--accent-blue-soft) !important;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  direction: ltr;
  text-align: right;
  color: var(--text-primary);
}

.kpi-sub { font-size: 12.5px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.badge-emerald { background: var(--accent-emerald-glow); color: var(--accent-emerald); border-color: #a7f3d0; }
.badge-gold { background: var(--accent-gold-glow); color: #b45309; border-color: #fed7aa; }
.badge-blue { background: var(--accent-blue-soft); color: var(--accent-blue-dark); border-color: var(--border-highlight); }
.badge-danger { background: var(--accent-danger-glow); color: var(--accent-danger); border-color: #fecaca; }

/* Content grid & panels */
.content-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-bottom: 26px;
  width: 100%;
  box-sizing: border-box;
}

.content-grid > div,
.content-grid > .panel-card {
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

@media (max-width: 980px) {
  .content-grid { grid-template-columns: 1fr; }
}

.panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 12px;
  flex-wrap: wrap;
}

.panel-header h3 { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }

/* Yield breakdown */
.yield-breakdown-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 10px 0 6px 0; }

@media (max-width: 560px) {
  .yield-breakdown-grid { grid-template-columns: 1fr; }
}

.yield-box {
  background: var(--accent-blue-soft);
  border: 1px solid #dbe7fb;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  text-align: center;
}

.yield-box .lbl { font-size: 12px; color: var(--text-secondary); margin-bottom: 4px; }
.yield-box .val { font-size: 19px; font-weight: 800; color: var(--accent-blue-dark); direction: ltr; }

/* Chart */
.chart-wrapper {
  margin-top: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 190px;
  gap: 8px;
  padding-top: 24px;
  border-bottom: 1px solid var(--border-color);
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  max-width: 34px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
  border-radius: 8px 8px 0 0;
  transition: height 0.35s ease;
  position: relative;
  cursor: pointer;
}

.chart-bar:hover { filter: brightness(1.1); }

.chart-bar-tooltip {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-blue-dark);
  white-space: nowrap;
  direction: ltr;
}

.chart-lbl { margin-top: 8px; font-size: 11px; color: var(--text-secondary); }
.chart-lbl-mobile { display: none; }
.chart-tooltip-mobile { display: none; }

/* Tables */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; width: 100%; }

.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.data-table th {
  text-align: right;
  padding: 12px 14px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  white-space: nowrap;
}

.data-table th:first-child { border-top-right-radius: 10px; }
.data-table th:last-child { border-top-left-radius: 10px; }

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
  text-align: right;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-primary);
}

.data-table tr:hover td { background: #f8fbff; }

.admin-req-notes-row td {
  background: inherit;
}

.admin-requests-table {
  width: 100%;
  table-layout: fixed;
  min-width: 450px;
}

.admin-requests-table th,
.admin-requests-table td {
  padding: 10px 8px !important;
  text-align: right !important;
}

@media (max-width: 640px) {
  .admin-requests-table th,
  .admin-requests-table td {
    padding: 8px 5px !important;
  }
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover td {
  background: #f1f5f9 !important;
}

/* Tabs */
.tabs-nav {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.tab-btn {
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  transition: all 0.2s;
}

.tab-btn:hover { color: var(--accent-blue); background: var(--accent-blue-soft); }

.tab-btn.active {
  background: var(--accent-blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-box {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.modal-header h3 { font-size: 19px; }

.modal-close {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
}

.modal-close:hover { background: var(--accent-blue-soft); color: var(--accent-blue); }

/* Calculator preview */
.calc-preview {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 18px;
}

.calc-preview-row { display: flex; justify-content: space-between; padding: 4px 0; font-size: 13.5px; }

/* Toast */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #fff;
  border: 1px solid var(--border-color);
  border-right: 4px solid #16a34a;
  color: var(--text-primary);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  font-weight: 600;
  min-width: 280px;
}

.toast.success { border-right-color: #16a34a; }
.toast.error { border-right-color: var(--accent-danger); }

.empty-state { text-align: center; padding: 36px 20px; color: var(--text-secondary); font-size: 14px; }

.ltr-num { direction: ltr; display: inline-block; }

hr { border-color: var(--border-color) !important; }

/* PWA Install Banner */
.pwa-banner {
  position: fixed;
  bottom: 20px;
  right: 20px;
  left: 20px;
  max-width: 480px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid var(--border-highlight);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16);
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  animation: slideUp 0.35s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.pwa-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pwa-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
  flex-shrink: 0;
}

.pwa-banner-text {
  display: flex;
  flex-direction: column;
}

.pwa-banner-text strong {
  font-size: 14px;
  color: var(--text-primary);
}

.pwa-banner-text span {
  font-size: 12px;
  color: var(--text-secondary);
}

.pwa-banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}



/* Hamburger button & Sidebar Drawer */
.menu-toggle-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 7px;
  transition: all 0.2s;
  outline: none;
  font-family: inherit;
  flex-shrink: 0;
}

.menu-toggle-btn:hover {
  background: var(--accent-blue-soft);
  border-color: var(--border-highlight);
}

.hamburger-bar {
  width: 16px;
  height: 1.8px;
  background-color: var(--text-primary);
  border-radius: 2px;
  transition: all 0.2s;
}

.nav-icon {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  flex-shrink: 0;
  transition: stroke 0.2s;
}

.menu-toggle-btn:hover .hamburger-bar {
  background-color: var(--accent-blue);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 120;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

.sidebar-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 86vw;
  background: #ffffff;
  box-shadow: -8px 0 36px rgba(15, 23, 42, 0.18);
  z-index: 130;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  direction: rtl;
  text-align: right;
}

.sidebar-drawer.open {
  transform: translateX(0);
}

.sidebar-header {
  padding: 20px 22px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.sidebar-close-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.sidebar-close-btn:hover {
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
}

.sidebar-body {
  padding: 16px 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-label {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 12px 4px;
}

.sidebar-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-primary);
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  text-align: right;
  font-family: inherit;
}

.sidebar-nav-btn:hover {
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
}

.sidebar-nav-btn.active {
  background: var(--accent-blue);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.sidebar-nav-btn.active .badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.sidebar-nav-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-footer {
  padding: 16px 18px;
  border-top: 1px solid var(--border-color);
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Collapsible accordion sections for investor edit */
details.edit-accordion-section {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  background: var(--card-bg, #ffffff);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

details.edit-accordion-section[open] {
  border-color: #cbd5e1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

details.edit-accordion-section summary.edit-accordion-header {
  list-style: none;
  cursor: pointer;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-primary);
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  transition: background 0.15s ease;
}

details.edit-accordion-section summary.edit-accordion-header::-webkit-details-marker {
  display: none;
}

details.edit-accordion-section summary.edit-accordion-header:hover {
  background: #f1f5f9;
}

details.edit-accordion-section .accordion-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
  transform: rotate(90deg);
}

details.edit-accordion-section[open] .accordion-arrow {
  transform: rotate(0deg);
}

details.edit-accordion-section .edit-accordion-body {
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

.edit-accordions-desktop-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}


/* ===== Enhanced Mobile Responsiveness (Smartphones & Small Tablets) ===== */
@media (max-width: 768px) {
  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .container {
    padding: 0 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .navbar {
    padding: 10px 0;
  }
  .brand {
    gap: 8px;
  }
  .brand-logo {
    width: 36px;
    height: 36px;
    font-size: 13px;
    border-radius: 9px;
  }
  .brand-text h1 {
    font-size: 15.5px;
    line-height: 1.2;
  }
  .brand-text p {
    font-size: 11px;
  }
  .client-nav-name {
    font-size: 13px !important;
    max-width: 105px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
  }
  .avatar-circle-btn {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .preview-banner {
    padding: 10px 12px;
    font-size: 13px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    text-align: center;
  }
  .preview-banner .btn {
    width: 100%;
    justify-content: center;
  }

  .dashboard-main {
    padding: 14px 0 36px;
  }

  .welcome-banner {
    padding: 18px 16px !important;
    border-radius: 16px !important;
    margin-bottom: 16px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 12px;
  }
  .welcome-info h2 {
    font-size: 19px;
    line-height: 1.3;
    margin-bottom: 6px;
  }
  .welcome-meta-items {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    font-size: 12.5px;
    margin-top: 6px;
  }
  .welcome-meta-sep {
    display: none;
  }
  .welcome-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 6px;
  }
  .welcome-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 11px 14px;
    font-size: 14px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px;
    margin-bottom: 14px;
  }
  .kpi-grid .kpi-card,
  .kpi-card {
    padding: 10px 10px;
    border-radius: 12px;
  }
  .kpi-grid .kpi-top,
  .kpi-top {
    margin-bottom: 4px;
  }
  .kpi-grid .kpi-label,
  .kpi-label {
    font-size: 11px;
    line-height: 1.25;
  }
  .kpi-grid .kpi-icon,
  .kpi-icon {
    width: 26px;
    height: 26px;
    font-size: 13px;
    border-radius: 7px;
  }
  .kpi-grid .kpi-value,
  .kpi-value {
    font-size: 16.5px;
    margin-bottom: 3px;
  }
  .kpi-grid .kpi-sub,
  .kpi-sub {
    font-size: 10px;
    line-height: 1.2;
  }
  .kpi-grid .kpi-sub .badge {
    font-size: 9.5px;
    padding: 1px 5px;
  }

  .content-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
    margin-bottom: 16px;
  }

  .panel-card {
    padding: 18px 16px;
    border-radius: 16px;
    width: 100%;
    box-sizing: border-box;
  }
  .panel-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 12px;
  }
  .panel-header h3 {
    font-size: 15.5px;
    line-height: 1.35;
  }
  .panel-header-buttons {
    display: flex;
    width: 100%;
    gap: 6px;
  }
  .panel-header-buttons .btn-sm {
    flex: 1;
    font-size: 12px;
    padding: 8px 6px;
    text-align: center;
    justify-content: center;
    white-space: nowrap;
  }

  .yield-breakdown-grid {
    grid-template-columns: 1fr !important;
    gap: 8px;
    margin: 12px 0;
  }
  .yield-box {
    padding: 10px 8px;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .yield-box .lbl {
    margin-bottom: 5px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    text-align: center !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }
  .yield-box .val {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
    text-align: center !important;
  }

  .chart-wrapper {
    padding: 12px 6px 8px !important;
    margin-top: 10px !important;
    overflow: hidden !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .chart-bars {
    min-width: 0 !important;
    width: 100% !important;
    height: 135px !important;
    gap: 3px !important;
    padding-top: 24px !important;
    box-sizing: border-box !important;
  }
  .chart-col {
    min-width: 0 !important;
    flex: 1 !important;
  }
  .chart-bar {
    max-width: 16px !important;
    border-radius: 4px 4px 0 0 !important;
  }
  .chart-lbl-desktop {
    display: none !important;
  }
  .chart-lbl-mobile {
    display: block !important;
    font-size: 9px !important;
    margin-top: 4px !important;
    color: var(--text-muted) !important;
  }
  .chart-tooltip-desktop {
    display: none !important;
  }
  .chart-tooltip-mobile {
    display: block !important;
    font-size: 9px !important;
    top: -20px !important;
  }
  .chart-scroll-hint {
    display: none !important;
  }

  .calc-preview {
    padding: 10px 12px !important;
    margin-bottom: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .calc-preview-row {
    font-size: 12px !important;
    padding: 4px 0 !important;
    gap: 6px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .calc-preview-row strong {
    font-size: 12.5px !important;
    white-space: nowrap !important;
  }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
  }
  .data-table {
    font-size: 12px;
    width: 100%;
  }
  .data-table th,
  .data-table td {
    padding: 9px 5px;
    font-size: 12px;
  }
  .data-table th {
    font-size: 11.5px;
  }

  .modal-backdrop {
    padding: 10px;
  }
  .modal-box {
    padding: 18px 14px;
    border-radius: 16px;
    max-height: 94vh;
    max-width: 100%;
  }
  .modal-header h3 {
    font-size: 16.5px;
  }

  .pwa-banner {
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 10px 12px;
  }
  .pwa-banner-text strong {
    font-size: 13px;
  }
  .pwa-banner-text span {
    font-size: 11px;
  }
}


.client-nav-name-btn {
  background: transparent;
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text-primary);
  margin-left: 6px;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 999px;
  transition: all 0.18s;
  display: inline-flex;
  align-items: center;
}
.client-nav-name-btn:hover {
  background: var(--accent-blue-soft);
  color: var(--accent-blue);
  border-color: var(--border-highlight);
}


/* Profile hero banner - wide with side margins, right-aligned */
.profile-hero-card {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto 22px auto !important;
  padding: 22px 26px !important;
  border-radius: var(--radius-lg) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: right !important;
  box-sizing: border-box !important;
  box-shadow: 0 14px 34px -10px rgba(37, 99, 235, 0.38) !important;
  direction: rtl !important;
}

.profile-hero-title {
  margin: 0 0 8px 0 !important;
  font-size: 24px !important;
  font-weight: 800 !important;
  color: #ffffff !important;
  letter-spacing: -0.3px !important;
  text-align: right !important;
  width: 100% !important;
  direction: rtl !important;
}

.profile-hero-meta {
  margin-top: 4px !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  gap: 6px !important;
  font-size: 13.5px !important;
  text-align: right !important;
  width: 100% !important;
  direction: rtl !important;
}

@media (max-width: 768px) {
  .profile-hero-card {
    padding: 18px 16px !important;
    margin: 0 auto 16px auto !important;
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 16px !important;
    box-sizing: border-box !important;
    align-items: flex-start !important;
    text-align: right !important;
  }
  .profile-hero-title {
    font-size: 21px !important;
    margin-bottom: 6px !important;
    text-align: right !important;
  }
  .profile-hero-meta {
    font-size: 13px !important;
    gap: 6px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: right !important;
  }
}


/* Profile Page Container - centered, wide, with generous side margins */
.profile-page-container {
  max-width: 900px !important;
  margin: 0 auto !important;
  padding: 24px 20px 60px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.profile-page-container .profile-hero-card {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 20px 0 !important;
  padding: 22px 24px !important;
  border-radius: var(--radius-lg) !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: right !important;
  direction: rtl !important;
  box-sizing: border-box !important;
  box-shadow: 0 14px 34px -10px rgba(37, 99, 235, 0.38) !important;
}

.profile-page-container .content-grid {
  width: 100% !important;
  box-sizing: border-box !important;
}

.profile-page-container .panel-card {
  width: 100% !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .profile-page-container {
    padding: 16px 20px 40px !important;
    max-width: 100% !important;
  }
  .profile-page-container .profile-hero-card {
    padding: 18px 16px !important;
    margin-bottom: 16px !important;
    border-radius: 16px !important;
  }
}


/* KPI cards solid black styling */
.kpi-grid .kpi-card {
  color: #0f172a !important;
}
.kpi-label,
.kpi-grid .kpi-label {
  font-family: inherit !important;
  color: #0f172a !important;
  font-weight: 700 !important;
  letter-spacing: normal !important;
}
.kpi-grid .kpi-value {
  color: #0f172a !important;
  font-weight: 800;
}
.kpi-grid .kpi-sub,
.kpi-grid .kpi-sub span,
.kpi-grid .kpi-sub strong {
  color: #0f172a !important;
}


/* Regular Financial Area/Line Chart Styles (Left-to-Right) */
.regular-chart-container {
  margin-top: 8px !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  box-shadow: none !important;
  direction: ltr !important;
  width: 100%;
  box-sizing: border-box;
}

.chart-axis-header {
  direction: rtl !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 4px !important;
  padding: 0 2px;
}

.chart-svg-wrapper {
  width: 100%;
  position: relative;
  overflow: hidden;
}

.regular-chart-svg {
  width: 100%;
  height: auto;
  display: block;
  user-select: none;
}

.chart-svg-point {
  cursor: pointer;
  transition: r 0.15s ease, fill 0.15s ease;
}

.chart-svg-bar {
  transition: fill 0.15s ease;
}

.chart-svg-group:hover .chart-svg-bar {
  fill: rgba(37, 99, 235, 0.22);
}

.chart-svg-group:hover .chart-svg-point {
  r: 7;
  fill: #1d4ed8;
}

.chart-selection-box {
  margin-top: 8px !important;
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: var(--radius-sm) !important;
  padding: 10px 14px !important;
  font-size: 13.5px !important;
  color: #0f172a !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: right !important;
  gap: 4px !important;
  direction: rtl !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.chart-selection-box .csb-badge {
  background: #2563eb !important;
  color: #ffffff !important;
  padding: 2px 8px !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  display: inline-block !important;
}

.chart-selection-box .csb-sep {
  display: none !important;
}

@media (max-width: 560px) {
  .regular-chart-container {
    padding: 0 !important;
  }
  .chart-axis-header {
    font-size: 11px;
  }
  .chart-selection-box {
    font-size: 12.5px;
    padding: 8px 10px !important;
    gap: 3px !important;
  }
  .chart-selection-box .csb-badge {
    font-size: 11px;
    padding: 2px 7px;
  }
  .yield-breakdown-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    margin: 6px 0 4px 0 !important;
  }
  .yield-box {
    padding: 8px 4px !important;
  }
  .yield-box .lbl {
    font-size: 9.5px !important;
    line-height: 1.2 !important;
  }
  .yield-box .val {
    font-size: 12.5px !important;
  }
}


/* Yield boxes: title on top, number underneath */
.yield-box {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
}

.yield-box .lbl {
  display: block !important;
  margin-bottom: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  text-align: center !important;
}

.yield-box .val {
  display: block !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  text-align: center !important;
  direction: ltr !important;
}

@media (max-width: 768px) {
  .yield-breakdown-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
    margin: 8px 0 4px 0 !important;
  }
  .yield-box {
    padding: 10px 4px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
  }
  .yield-box .lbl {
    font-size: 10.5px !important;
    margin-bottom: 4px !important;
    text-align: center !important;
    line-height: 1.2 !important;
  }
  .yield-box .val {
    font-size: 13.5px !important;
    font-weight: 800 !important;
    text-align: center !important;
  }
}


/* Ensure profile hero cards always have the luxury pastel gradient background and dark text */
.profile-hero-card,
.profile-page-container .profile-hero-card {
  background: linear-gradient(135deg, #d6e6f6 0%, #e4effb 48%, #daf1ee 100%) !important;
  color: #0f172a !important;
  border: none !important;
  box-shadow: 0 6px 18px -4px rgba(15, 23, 42, 0.05) !important;
}


/* Transactions hero card - aligned right */
.transactions-hero-card {
  align-items: flex-start !important;
  text-align: right !important;
}
.transactions-hero-card div,
.transactions-hero-card h2,
.transactions-hero-card p {
  text-align: right !important;
}


/* Right-aligned panel header */
.panel-header-right,
.panel-header.panel-header-right {
  display: block !important;
  width: 100% !important;
  text-align: right !important;
  direction: rtl !important;
}

.panel-header-right h3,
.panel-header.panel-header-right h3 {
  display: block !important;
  width: 100% !important;
  text-align: right !important;
  direction: rtl !important;
  margin: 0 !important;
  font-weight: 700 !important;
}


/* Right-aligned profile hero cards and metadata */
.profile-hero-card,
.profile-page-container .profile-hero-card {
  align-items: flex-start !important;
  justify-content: flex-start !important;
  text-align: right !important;
  direction: rtl !important;
}

.profile-hero-title {
  text-align: right !important;
  width: 100% !important;
  direction: rtl !important;
  color: #0f172a !important;
}

.profile-hero-meta {
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  align-items: flex-start !important;
  text-align: right !important;
  gap: 6px !important;
  width: 100% !important;
  direction: rtl !important;
}

@media (max-width: 768px) {
  .profile-hero-card,
  .profile-page-container .profile-hero-card {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: right !important;
    direction: rtl !important;
  }
  .profile-hero-title {
    text-align: right !important;
    direction: rtl !important;
    color: #0f172a !important;
  }
  .profile-hero-meta {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    gap: 6px !important;
    text-align: right !important;
    direction: rtl !important;
  }
}

/* ===== Luxury Pastel Fintech Design Upgrade ===== */
body,
.app-shell {
  background: #f5f7fa !important;
}

.navbar {
  background: #f5f7fa !important;
  backdrop-filter: none !important;
  border: none !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 12px 0 4px 0 !important;
}

.dashboard-main {
  padding-top: 8px !important;
}

.menu-toggle-btn {
  width: 40px !important;
  height: 40px !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04) !important;
}

.hamburger-bar {
  background: #334155 !important;
  height: 1.8px !important;
  width: 16px !important;
}

.brand-text h1 {
  font-size: 16.5px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  letter-spacing: -0.2px !important;
}

.brand-text p {
  font-size: 11.5px !important;
  color: #64748b !important;
  font-weight: 500 !important;
}

.client-nav-name-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  padding: 4px 6px !important;
}

.avatar-circle-btn {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: #d6e6f7 !important;
  color: #1e3a5f !important;
  border: none !important;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1) !important;
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
}

.avatar-status-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #10b981;
  border: 1.8px solid #eef2f7;
}

/* Pastel Hero Banner */
.welcome-banner {
  background: linear-gradient(135deg, #d6e6f6 0%, #e4effb 48%, #daf1ee 100%) !important;
  border: none !important;
  border-radius: 22px !important;
  box-shadow: 0 6px 18px -4px rgba(15, 23, 42, 0.05) !important;
  color: #0f172a !important;
  padding: 22px 22px !important;
}

.welcome-info {
  width: 100% !important;
  text-align: right !important;
}

.welcome-info h2 {
  color: #0f172a !important;
  font-size: 21px !important;
  font-weight: 800 !important;
  margin-bottom: 10px !important;
  text-align: right !important;
}

.welcome-meta-items {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 6px !important;
  color: #334155 !important;
  font-size: 13.5px !important;
  margin-top: 4px !important;
  width: 100% !important;
}

.welcome-meta-item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  color: #334155 !important;
}

.welcome-meta-item .meta-lbl {
  color: #475569 !important;
  font-weight: 400 !important;
}

.welcome-meta-item strong {
  color: #0f172a !important;
  font-weight: 600 !important;
}

.welcome-info .badge,
.hero-track-pill {
  background: rgba(59, 130, 246, 0.12) !important;
  border: 1px solid rgba(59, 130, 246, 0.3) !important;
  color: #0f172a !important;
  border-radius: 999px !important;
  padding: 3px 12px !important;
  font-weight: 700 !important;
  font-size: 12.5px !important;
}

/* 2x2 KPI Cards */
.kpi-grid {
  gap: 12px !important;
}

.kpi-grid .kpi-card {
  background: #ffffff !important;
  border: none !important;
  border-radius: 20px !important;
  padding: 16px 16px !important;
  box-shadow: 0 6px 16px -3px rgba(15, 23, 42, 0.065), 0 3px 6px -2px rgba(15, 23, 42, 0.04) !important;
  text-align: right !important;
}

.kpi-grid .kpi-label {
  font-family: inherit !important;
  color: #1e293b !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: normal !important;
}

.kpi-grid .kpi-value {
  color: #0f172a !important;
  font-size: 22px !important;
  font-weight: 800 !important;
}

.kpi-grid .kpi-card .kpi-value.kpi-value-emerald {
  color: #159967 !important;
}

.kpi-grid .kpi-sub,
.kpi-grid .kpi-sub span {
  color: #64748b !important;
  font-size: 11.5px !important;
}

.kpi-grid .kpi-sub strong {
  color: #334155 !important;
  font-weight: 700 !important;
}

/* Panel Cards & Forecast Section */
.panel-card {
  background: #ffffff !important;
  border: none !important;
  border-radius: 22px !important;
  box-shadow: 0 7px 18px -3px rgba(15, 23, 42, 0.065), 0 3px 6px -2px rgba(15, 23, 42, 0.04) !important;
}

.forecast-panel-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 12px !important;
  margin-bottom: 10px !important;
  border-bottom: none !important;
  padding-bottom: 0 !important;
}

.forecast-panel-header h3 {
  text-align: right !important;
  width: 100% !important;
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 !important;
}

.forecast-toggle-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
  width: 100% !important;
}

.forecast-pill-btn {
  appearance: none;
  border-radius: 999px !important;
  padding: 10px 14px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center !important;
  background: #f6f8fb !important;
  color: #475569 !important;
  border: 1px solid #d8e1eb !important;
  font-family: inherit;
}

.forecast-pill-btn.active,
.btn-primary,
.welcome-banner .btn-primary {
  background: #2b5c94 !important;
  color: #ffffff !important;
  border: 1px solid #2b5c94 !important;
  border-radius: 999px !important;
  box-shadow: 0 4px 12px rgba(43, 92, 148, 0.2) !important;
  font-weight: 700 !important;
}

.forecast-pill-btn.active:hover,
.btn-primary:hover,
.welcome-banner .btn-primary:hover {
  background: #234d7d !important;
  border-color: #234d7d !important;
  color: #ffffff !important;
}

.btn-secondary {
  border-radius: 999px !important;
}

.sidebar-nav-btn.active {
  background: #2b5c94 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(43, 92, 148, 0.2) !important;
}

.sidebar-nav-btn:hover,
.sidebar-close-btn:hover {
  background: #eaf0f7 !important;
  color: #2b5c94 !important;
}

.badge-blue {
  background: #eaf0f7 !important;
  color: #2b5c94 !important;
  border-color: rgba(43, 92, 148, 0.25) !important;
}

.chart-selection-box .csb-badge {
  background: #2b5c94 !important;
  color: #ffffff !important;
}

.forecast-desc-text {
  font-size: 13.5px !important;
  color: #475569 !important;
  line-height: 1.5 !important;
  text-align: right !important;
  margin-bottom: 12px !important;
}

/* 3 Elevated Yield Breakdown Boxes */
.yield-breakdown-grid {
  gap: 10px !important;
  margin: 10px 0 14px 0 !important;
}

.yield-box {
  background: #ffffff !important;
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 5px 14px -2px rgba(15, 23, 42, 0.065), 0 2px 5px -1px rgba(15, 23, 42, 0.04) !important;
  padding: 12px 6px !important;
}

.yield-box .lbl {
  color: #334155 !important;
  font-weight: 500 !important;
}

.yield-box .val {
  color: #0f172a !important;
  font-weight: 800 !important;
}

/* ===== Chart Bottom Selection Box & Investment Simulator Upgrade ===== */
.chart-axis-header {
  margin-bottom: 8px !important;
}

.chart-selection-box {
  margin-top: 10px !important;
  background: #f3f6fa !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  gap: 5px !important;
}

.chart-selection-box .csb-badge {
  background: #2b5c94 !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  padding: 4px 14px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
}

.chart-selection-box .csb-row {
  font-size: 15px !important;
  color: #1e293b !important;
  text-align: right !important;
  direction: rtl !important;
  line-height: 1.45 !important;
}

.panel-header,
.sim-panel-header {
  border-bottom: none !important;
  padding-bottom: 0 !important;
  margin-bottom: 8px !important;
}

.panel-header h3,
.sim-panel-header h3 {
  font-size: 18px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}

.sim-desc-text {
  font-size: 14px !important;
  color: #1e293b !important;
  line-height: 1.45 !important;
  margin-bottom: 16px !important;
  text-align: right !important;
}

.form-group label,
.sim-input-label {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  margin-bottom: 8px !important;
  text-align: right !important;
}

.sim-input-frame {
  background: #e1ebf5 !important;
  padding: 4px !important;
  border-radius: 16px !important;
}

.sim-input-inner {
  background: #ffffff !important;
  border: 1px solid #c8daee !important;
  border-radius: 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 11px 16px !important;
  direction: rtl !important;
}

.sim-amount-input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  width: 100% !important;
  text-align: right !important;
  direction: ltr !important;
  font-family: inherit !important;
  padding: 0 !important;
}

.sim-currency-symbol {
  color: #64748b !important;
  font-size: 17px !important;
  font-weight: 500 !important;
  margin-right: 12px !important;
  flex-shrink: 0 !important;
  user-select: none !important;
}

.form-control {
  border: 1.5px solid #c5d7ec !important;
  box-shadow: 0 0 0 3.5px #e6eff8 !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  padding: 11px 14px !important;
  font-size: 15.5px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
}

.form-control:focus {
  border-color: #2b5c94 !important;
  box-shadow: 0 0 0 4px #dce8f5 !important;
}

.calc-preview {
  background: #f3f6fa !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 16px !important;
  padding: 14px 16px !important;
  margin-bottom: 18px !important;
}

.calc-preview-row {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  padding: 5px 0 !important;
  font-size: 14.5px !important;
  color: #1e293b !important;
}

.calc-preview-divider {
  border-top: 1px solid #e2e8f0 !important;
  margin-top: 6px !important;
  padding-top: 10px !important;
}

.sim-submit-btn {
  border-radius: 999px !important;
  padding: 14px 20px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  background: #2b5c94 !important;
  color: #ffffff !important;
  box-shadow: 0 6px 16px rgba(43, 92, 148, 0.25) !important;
}

/* ===== Modern Transactions Page Design ===== */
.tx-search-bar-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid #d8e2ee;
  border-radius: 14px;
  padding: 10px 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  direction: rtl;
}

.tx-search-input {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  width: 100%;
  font-size: 15px;
  font-weight: 500;
  color: #0f172a;
  text-align: right;
  font-family: inherit;
  padding: 0;
}

.tx-search-input::placeholder {
  color: #64748b;
}

.tx-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  flex-shrink: 0;
}

.tx-filter-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
  direction: rtl;
  scrollbar-width: none;
}

.tx-filter-pills::-webkit-scrollbar {
  display: none;
}

.tx-filter-pill {
  appearance: none;
  border-radius: 999px !important;
  padding: 8px 18px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  cursor: pointer;
  white-space: nowrap;
  background: #e6ecf4 !important;
  color: #0f172a !important;
  border: 1px solid #d5dfec !important;
  font-family: inherit;
  transition: all 0.2s ease;
}

.tx-filter-pill.active {
  background: #2b5c94 !important;
  color: #ffffff !important;
  border-color: #2b5c94 !important;
  box-shadow: 0 4px 12px rgba(43, 92, 148, 0.2) !important;
}

.tx-modern-table {
  width: 100%;
  direction: rtl;
}

.tx-modern-header {
  display: grid;
  grid-template-columns: 1fr 122px;
  align-items: center;
  gap: 22px;
  padding: 2px 4px 10px 4px;
  border-bottom: 1px solid #e8eef5;
  color: #64748b;
  font-size: 13px;
  font-weight: 500;
}

.tx-col-desc-hdr {
  padding-right: 48px;
  text-align: right;
}

.tx-col-amt-hdr {
  text-align: right;
  padding-right: 0;
}

.tx-modern-list {
  display: flex;
  flex-direction: column;
}

.tx-modern-row {
  display: grid;
  grid-template-columns: 1fr 122px;
  align-items: center;
  padding: 15px 2px;
  border-bottom: 1px solid #eef2f6;
  gap: 22px;
}

.tx-modern-row:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.tx-modern-right {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: right;
  min-width: 0;
}

.tx-icon-outer {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tx-icon-deposit {
  background: #d8f5e5;
}

.tx-icon-interest {
  background: #e0eaf6;
}

.tx-icon-withdrawal {
  background: #fdebd0;
}

.tx-icon-inner {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tx-icon-inner-green {
  background: #159967;
}

.tx-icon-inner-orange {
  background: #e07c24;
}

.tx-modern-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  min-width: 0;
}

.tx-modern-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin-bottom: 3px;
}

.tx-modern-date {
  font-size: 12.5px;
  color: #0f172a;
  font-weight: 500;
  line-height: 1.3;
}

.tx-date-main {
  color: #0f172a;
  font-size: 12.5px;
  font-weight: 500;
}

.tx-date-time {
  color: #64748b;
  font-size: 12.5px;
  font-weight: 500;
}

.tx-modern-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: right;
  flex-shrink: 0;
}

.tx-modern-amount {
  font-size: 18.5px;
  font-weight: 800;
  line-height: 1.2;
}

.tx-modern-amount.pos {
  color: #159967;
}

.tx-modern-amount.neg {
  color: #0f172a;
}

.tx-modern-balance {
  font-size: 13px;
  color: #475569;
  font-weight: 500;
  margin-top: 3px;
}

/* 3-column Requests Modern List */
.req-modern-header {
  display: grid;
  grid-template-columns: 1.45fr 1fr 62px;
  align-items: center;
  gap: 20px;
  padding: 2px 4px 10px 4px;
  border-bottom: 1px solid #e8eef5;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 500;
}

.req-col-desc-hdr {
  padding-right: 38px;
  text-align: right;
}

.req-col-status-hdr {
  text-align: right;
}

.req-modern-row {
  display: grid;
  grid-template-columns: 1.45fr 1fr 62px;
  align-items: center;
  padding: 13px 2px;
  border-bottom: 1px solid #eef2f6;
  gap: 20px;
}

.req-modern-row:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.req-modern-row .tx-modern-right {
  gap: 8px;
}

.req-modern-row .tx-icon-outer {
  width: 30px;
  height: 30px;
}

.req-modern-row .tx-icon-inner {
  width: 18px;
  height: 18px;
}

.req-modern-row .tx-icon-inner svg {
  width: 11px;
  height: 11px;
}

.req-modern-row .tx-modern-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  margin-bottom: 2px;
  white-space: nowrap;
}

.req-modern-row .tx-modern-date,
.req-modern-row .tx-date-main,
.req-modern-row .tx-date-time {
  font-size: 11px !important;
  white-space: nowrap;
}

.req-modern-amt {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: right;
}

.req-modern-row .tx-modern-amount {
  font-size: 14px !important;
  font-weight: 800 !important;
  white-space: nowrap;
}

.req-modern-status {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: right;
}

.req-modern-status .badge {
  font-size: 11px !important;
  padding: 3px 8px !important;
  white-space: nowrap;
}

.req-modern-notes {
  grid-column: 1 / -1;
  width: 100%;
  padding-right: 38px;
  margin-top: -6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: right;
  direction: rtl;
  box-sizing: border-box;
}

.req-note-user {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.req-note-admin {
  font-size: 12px;
  color: #2b5c94;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

/* Smooth fast slide animation for sidebar drawer */
.sidebar-overlay {
  transition: opacity 0.24s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.24s !important;
  pointer-events: none;
}

.sidebar-overlay.open {
  pointer-events: auto;
}

.sidebar-drawer {
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1) !important;
  will-change: transform;
}

.sidebar-drawer.open {
  transform: translateX(0);
}

/* Balances Breakdown Table (No Icons, Generous Column Spacing) */
.bal-modern-table {
  width: 100%;
}

.bal-modern-header {
  display: grid;
  grid-template-columns: 1.6fr 1fr 64px;
  align-items: center;
  gap: 16px;
  padding: 4px 4px 8px 4px;
  border-bottom: 1px solid #e8eef5;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.bal-col-desc {
  text-align: right;
}

.bal-col-amt {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: right;
}

.bal-col-status {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: right;
}

.bal-modern-row {
  display: grid;
  grid-template-columns: 1.6fr 1fr 64px;
  align-items: center;
  gap: 16px;
  padding: 11px 4px;
  border-bottom: 1px solid #eef2f6;
}

.bal-modern-row:last-child {
  border-bottom: none;
  padding-bottom: 4px;
}

.bal-title {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #0f172a;
  line-height: 1.35;
  margin-bottom: 2px;
}

.bal-date {
  font-size: 11px !important;
  color: #64748b;
  line-height: 1.35;
}

.bal-date strong {
  font-size: 11px !important;
  color: #0f172a;
  font-weight: 500;
}

.bal-amount {
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #0f172a;
  text-align: right;
  white-space: nowrap;
}

.bal-amount.pos {
  color: #159967;
}

.bal-col-status .badge {
  font-size: 11px !important;
  padding: 2.5px 8px !important;
  border-radius: 999px;
  font-weight: 700;
}

/* Ensure modals always stay above fixed desktop sidebar and navigation elements */
.modal-backdrop {
  z-index: 500 !important;
}

/* ================= DESKTOP ADMIN LAYOUT (>= 1025px) ================= */
/* Mobile/Tablet (< 1025px) remains 100% untouched with its slide-in drawer and mobile styles */
@media (min-width: 1025px) {
  body.admin-view-active {
    background: #f5f7fa;
  }

  /* Fixed Right Sidebar pinned permanently */
  body.admin-view-active .sidebar-overlay {
    display: none !important;
    pointer-events: none !important;
  }

  body.admin-view-active .sidebar-drawer {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    height: 100vh !important;
    width: 280px !important;
    max-width: 280px !important;
    transform: none !important;
    border-left: 1px solid #e2e8f0 !important;
    border-right: none !important;
    box-shadow: -2px 0 16px rgba(15, 23, 42, 0.04) !important;
    z-index: 50 !important;
    transition: none !important;
    background: #ffffff !important;
  }

  /* Close button and hamburger toggle hidden on desktop */
  body.admin-view-active .sidebar-close-btn {
    display: none !important;
  }

  body.admin-view-active .menu-toggle-btn {
    display: none !important;
  }

  /* Main admin shell shifted to the left of the pinned sidebar */
  body.admin-view-active .app-shell {
    margin-right: 280px !important;
    margin-left: 0 !important;
    width: calc(100% - 280px) !important;
    min-height: 100vh !important;
    box-sizing: border-box !important;
  }

  body.admin-view-active .navbar {
    width: 100% !important;
    box-sizing: border-box !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 40 !important;
  }

  /* Wide screen expansion for admin content instead of narrow centered box */
  body.admin-view-active .container {
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 36px !important;
    padding-right: 36px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  body.admin-view-active .navbar-inner {
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 36px !important;
    padding-right: 36px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Overview KPI Grid on Desktop: 4 columns across */
  body.admin-view-active .kpi-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 16px !important;
  }

  /* Investor detail info in 2 clean columns */
  body.admin-view-active .admin-investor-info-list {
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px 32px !important;
  }

  /* Ergonomic max-width for admin forms */
  body.admin-view-active .panel-card form {
    max-width: 860px;
    margin: 0;
  }

  /* Admin Settings card wide desktop layout */
  body.admin-view-active .admin-settings-card {
    max-width: 100% !important;
    margin: 0 0 24px 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  body.admin-view-active .admin-settings-card form {
    max-width: 860px !important;
    margin: 0 !important;
  }

  /* Edit investor form side-by-side 50/50 layout on desktop */
  body.admin-view-active .panel-card form.edit-investor-form {
    max-width: 100% !important;
    width: 100% !important;
  }

  body.admin-view-active .edit-accordions-desktop-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    align-items: start !important;
    width: 100% !important;
  }

  body.admin-view-active .edit-accordions-desktop-row .edit-accordion-section {
    width: 100% !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
  }
}

/* ============================================================
   Action Dropdown and Outline Icon Buttons (Filter & Sort)
   ============================================================ */
.action-dropdown-container {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
}

.btn-icon-action {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-color, #e2e8f0);
  border-radius: 8px;
  color: #64748b;
  cursor: pointer;
  position: relative;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-icon-action:hover {
  background: #f8fafc;
  color: #0284c7;
  border-color: #cbd5e1;
}

.btn-icon-action.is-active {
  background: #f0f9ff;
  border-color: #38bdf8;
  color: #0284c7;
}

.btn-icon-action .action-btn-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: 0 0 0 1.5px #ffffff;
}

.action-dropdown-container.is-open .btn-icon-action {
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

.action-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 5px);
  right: 0;
  min-width: 200px;
  max-width: 90vw;
  width: max-content;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
  padding: 6px;
  z-index: 999;
  text-align: right;
  direction: rtl;
  animation: dropdownFadeIn 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.action-dropdown-container.is-open .action-dropdown-menu {
  display: block;
}

.action-dropdown-title {
  font-size: 11px;
  font-weight: 700;
  color: #94a3b8;
  padding: 4px 8px 6px 8px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.action-dropdown-menu .dropdown-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  text-align: right;
  transition: all 0.12s ease;
  font-family: inherit;
}

.action-dropdown-menu .dropdown-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.action-dropdown-menu .dropdown-item.active {
  background: #f0f9ff;
  color: #0284c7;
  font-weight: 700;
}

.action-dropdown-menu .dropdown-check {
  display: inline-flex;
  align-items: center;
  color: #0284c7;
  margin-right: auto;
}

@media (max-width: 480px) {
  .action-dropdown-menu {
    right: auto;
    left: 0;
  }
}

/* Responsive grid for the 5 investor dashboard KPI cards */
.kpi-grid.investor-kpi-grid {
  grid-template-columns: repeat(5, 1fr) !important;
}

@media (max-width: 1024px) {
  .kpi-grid.investor-kpi-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

@media (max-width: 680px) {
  .kpi-grid.investor-kpi-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .kpi-grid.investor-kpi-grid .kpi-card:last-child {
    grid-column: span 2;
  }
}

/* Excel Export Button */
.btn-excel-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #16a34a;
  color: #15803d;
  background: #f0fdf4;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px rgba(22, 163, 74, 0.08);
  font-family: inherit;
  flex-shrink: 0;
}

.btn-excel-export:hover {
  background: #16a34a;
  color: #ffffff;
  border-color: #15803d;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.25);
}

.btn-excel-export:active {
  transform: scale(0.98);
}

.btn-excel-export svg {
  flex-shrink: 0;
}

/* Bulk Delete Button & Row Selection */
.btn-bulk-delete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  font-size: 12.5px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid #ef4444;
  color: #dc2626;
  background: #fef2f2;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 1px 2px rgba(239, 68, 68, 0.08);
  font-family: inherit;
  flex-shrink: 0;
}

.btn-bulk-delete:hover:not(:disabled) {
  background: #dc2626;
  color: #ffffff;
  border-color: #b91c1c;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.25);
}

.btn-bulk-delete:active:not(:disabled) {
  transform: scale(0.98);
}

.btn-bulk-delete:disabled,
.btn-bulk-delete.is-locked {
  background: #f1f5f9;
  color: #94a3b8;
  border-color: #cbd5e1;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.78;
}

.btn-bulk-delete svg {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}

.bulk-select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  user-select: none;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.bulk-row-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #2563eb;
  margin: 0;
  vertical-align: middle;
}

.data-table tr.row-is-selected td {
  background: #eff6ff !important;
}




