/* ============================================================
   PAYMENT TRACKER - COMPLETE REDESIGN
   Theme: Dark Executive Finance
   Fonts: Playfair Display + DM Sans
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ---- CSS Variables ---- */
:root {
  --bg-base:        #0d0f14;
  --bg-card:        #13161e;
  --bg-card-hover:  #181c27;
  --bg-elevated:    #1e2235;
  --bg-input:       #1a1d28;

  --border:         #262b3d;
  --border-light:   #2e3450;

  --gold:           #c9a84c;
  --gold-light:     #f0c96a;
  --gold-muted:     rgba(201,168,76,0.15);

  --accent:         #4f80ff;
  --accent-light:   rgba(79,128,255,0.15);

  --success:        #22c55e;
  --success-bg:     rgba(34,197,94,0.12);
  --danger:         #f43f5e;
  --danger-bg:      rgba(244,63,94,0.12);
  --warning:        #f59e0b;
  --warning-bg:     rgba(245,158,11,0.12);

  --text-primary:   #eef0f6;
  --text-secondary: #8b93aa;
  --text-muted:     #545c73;

  --radius-sm:      6px;
  --radius-md:      12px;
  --radius-lg:      18px;
  --radius-xl:      24px;

  --shadow-card:    0 4px 24px rgba(0,0,0,0.4);
  --shadow-elevated:0 8px 40px rgba(0,0,0,0.6);

  --transition:     all 0.2s cubic-bezier(0.4,0,0.2,1);
  --font-display:   'Playfair Display', Georgia, serif;
  --font-body:      'DM Sans', system-ui, sans-serif;

  --nav-width:      240px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 14px;
  min-height: 100vh;
}
a { color: var(--gold); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--gold-light); }
img { max-width: 100%; }

/* ---- Layout ---- */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Sidebar ---- */
.sidebar {
  width: var(--nav-width);
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 28px 24px 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-logo .logo-icon {
  width: 36px; height: 36px;
  background: var(--gold);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.sidebar-logo .logo-text {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.sidebar-logo .logo-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-nav {
  padding: 16px 12px;
  flex: 1;
}
.sidebar-nav .nav-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 12px 12px 6px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 2px;
  transition: var(--transition);
  cursor: pointer;
}
.nav-item:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--gold-muted);
  color: var(--gold);
  border-left: 2px solid var(--gold);
}
.nav-item .nav-icon { font-size: 15px; width: 18px; text-align: center; }
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 20px;
  font-weight: 600;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}
.sidebar-user .avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #000;
}
.sidebar-user .user-info { flex: 1; }
.sidebar-user .user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.sidebar-user .user-role { font-size: 11px; color: var(--text-muted); }
.sidebar-user .logout-btn {
  color: var(--text-muted); font-size: 14px; cursor: pointer;
  transition: var(--transition);
}
.sidebar-user .logout-btn:hover { color: var(--danger); }

/* ---- Main Content ---- */
.main-content {
  margin-left: var(--nav-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-header {
  padding: 28px 36px 0;
  margin-bottom: 28px;
}
.page-header .breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.page-header .page-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.page-header .page-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
}
.page-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.page-body {
  padding: 0 36px 36px;
  flex: 1;
}

/* ---- Cards ---- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.card:hover { border-color: var(--border-light); }
.card-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card-title .title-icon {
  width: 28px; height: 28px;
  background: var(--gold-muted);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

/* ---- Stat Cards ---- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--gold);
  opacity: 0;
  transition: var(--transition);
}
.stat-card:hover::before { opacity: 1; }
.stat-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.stat-card.accent-gold::before { opacity: 1; }
.stat-card.accent-blue { --card-accent: var(--accent); }
.stat-card.accent-blue::before { background: var(--accent); opacity: 1; }
.stat-card.accent-success::before { background: var(--success); opacity: 1; }
.stat-card.accent-danger::before { background: var(--danger); opacity: 1; }

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 10px;
}
.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  margin-bottom: 8px;
}
.stat-value.positive { color: var(--success); }
.stat-value.negative { color: var(--danger); }
.stat-value.gold { color: var(--gold); }
.stat-sub {
  font-size: 12px;
  color: var(--text-secondary);
  display: flex; align-items: center; gap: 4px;
}
.stat-sub .up { color: var(--success); }
.stat-sub .down { color: var(--danger); }
.stat-icon {
  position: absolute;
  right: 20px; top: 20px;
  font-size: 28px;
  opacity: 0.08;
}

/* ---- Tables ---- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
table.data-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
table.data-table tbody tr:last-child { border-bottom: none; }
table.data-table tbody tr:hover { background: var(--bg-card-hover); }
table.data-table tbody td {
  padding: 13px 16px;
  color: var(--text-primary);
  vertical-align: middle;
}
table.data-table .td-muted { color: var(--text-secondary); }
table.data-table .td-amount { font-family: var(--font-display); font-weight: 600; }
table.data-table .td-positive { color: var(--success); }
table.data-table .td-negative { color: var(--danger); }
table.data-table .td-gold { color: var(--gold); }

/* ---- Badges ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.badge-success  { background: var(--success-bg); color: var(--success); }
.badge-danger   { background: var(--danger-bg);  color: var(--danger); }
.badge-gold     { background: var(--gold-muted); color: var(--gold); }
.badge-blue     { background: var(--accent-light); color: var(--accent); }
.badge-muted    { background: var(--bg-elevated); color: var(--text-secondary); }
.badge-warning  { background: var(--warning-bg); color: var(--warning); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-gold {
  background: var(--gold);
  color: #0d0f14;
}
.btn-gold:hover { background: var(--gold-light); color: #0d0f14; transform: translateY(-1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #6691ff; transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
}
.btn-outline:hover { border-color: var(--text-secondary); color: var(--text-primary); background: var(--bg-elevated); }
.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid transparent;
}
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid transparent;
}
.btn-success:hover { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 28px; font-size: 15px; }
.btn-icon { padding: 8px; }

/* ---- Forms ---- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-muted);
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-control {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  transition: var(--transition);
  width: 100%;
  outline: none;
  appearance: none;
}
.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-muted);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { opacity: 0.5; cursor: not-allowed; }
select.form-control { cursor: pointer; }
select.form-control option { background: var(--bg-card); color: var(--text-primary); }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.form-error { font-size: 11px; color: var(--danger); margin-top: 3px; }

/* ---- Upload area ---- */
.upload-area {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-input);
}
.upload-area:hover {
  border-color: var(--gold);
  background: var(--gold-muted);
}
.upload-area .upload-icon { font-size: 28px; margin-bottom: 8px; opacity: 0.5; }
.upload-area .upload-text { font-size: 13px; color: var(--text-secondary); }
.upload-area .upload-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ---- Flash messages ---- */
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-weight: 500;
  margin: 0 36px 20px;
  animation: slideIn 0.3s ease;
}
.flash-success { background: var(--success-bg); border: 1px solid var(--success); color: var(--success); }
.flash-error   { background: var(--danger-bg);  border: 1px solid var(--danger);  color: var(--danger); }
.flash-info    { background: var(--accent-light); border: 1px solid var(--accent); color: var(--accent); }
.flash .flash-close {
  margin-left: auto; cursor: pointer; opacity: 0.7;
  font-size: 16px; transition: var(--transition);
}
.flash .flash-close:hover { opacity: 1; }

/* ---- Progress Bar ---- */
.progress-bar {
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 10px;
}
.progress-fill {
  height: 100%;
  border-radius: 20px;
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  background: var(--gold);
}
.progress-fill.blue   { background: var(--accent); }
.progress-fill.green  { background: var(--success); }
.progress-fill.red    { background: var(--danger); }

/* ---- Dividend Summary Card ---- */
.dividend-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 24px;
}
.div-summary-item {
  background: var(--bg-card);
  padding: 20px 24px;
  text-align: center;
}
.div-summary-item .ds-label {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--text-muted);
  font-weight: 600; margin-bottom: 8px;
}
.div-summary-item .ds-value {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700; color: var(--text-primary);
}
.div-summary-item .ds-value.gold { color: var(--gold); }
.div-summary-item .ds-value.green { color: var(--success); }
.div-summary-item .ds-value.red { color: var(--danger); }

/* ---- Partner Card (for dividends) ---- */
.partner-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}
.partner-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: var(--transition);
}
.partner-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-elevated); }
.partner-card .pc-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.partner-card .pc-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--gold);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #000;
  flex-shrink: 0;
}
.partner-card .pc-name { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.partner-card .pc-role { font-size: 12px; color: var(--text-muted); }
.partner-card .pc-amounts { display: flex; flex-direction: column; gap: 8px; }
.partner-card .pc-row {
  display: flex; justify-content: space-between; align-items: center;
}
.partner-card .pc-row .label { font-size: 12px; color: var(--text-secondary); }
.partner-card .pc-row .value { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.partner-card .pc-actions { margin-top: 16px; display: flex; gap: 8px; }

/* ---- Grids ---- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }

/* ---- Section dividers ---- */
.section-gap { margin-bottom: 28px; }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}
.section-sub {
  font-size: 12px; color: var(--text-muted); margin-top: 2px;
}

/* ---- Filters toolbar ---- */
.filters-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 20px;
}
.filters-bar .filter-label {
  font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text-muted);
  font-weight: 600; margin-right: 6px;
}
.filters-bar .form-control {
  flex: 1; min-width: 150px; max-width: 200px;
  padding: 8px 12px; font-size: 13px;
}
.filters-bar .btn { flex-shrink: 0; }

/* ---- Period tabs ---- */
.period-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px;
}
.period-tab {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  transition: var(--transition);
}
.period-tab:hover { border-color: var(--gold); color: var(--gold); }
.period-tab.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #000;
  font-weight: 600;
}
.period-tab .tab-status {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 5px;
  opacity: 0.6;
}

/* ---- Settlement card ---- */
.settlement-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  transition: var(--transition);
}
.settlement-card:hover { border-color: var(--gold); }
.settlement-card .sc-pair {
  display: flex; align-items: center; gap: 10px;
}
.settlement-card .sc-name { font-weight: 600; font-size: 14px; }
.settlement-card .sc-arrow { color: var(--text-muted); font-size: 18px; }
.settlement-card .sc-amount {
  font-family: var(--font-display); font-size: 18px; font-weight: 700;
}
.settlement-card .sc-amount.red { color: var(--danger); }
.settlement-card .sc-amount.green { color: var(--success); }

/* ---- Login Page ---- */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--bg-base);
}
.login-left {
  flex: 1;
  background: linear-gradient(135deg, #0d0f14 0%, #13161e 50%, #1a1527 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 60px;
  position: relative;
  overflow: hidden;
}
.login-left::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(201,168,76,0.07) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.login-left-content { position: relative; z-index: 1; max-width: 400px; }
.login-headline {
  font-family: var(--font-display);
  font-size: 42px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 16px;
}
.login-headline span { color: var(--gold); }
.login-desc { font-size: 15px; color: var(--text-secondary); line-height: 1.7; }
.login-features { margin-top: 36px; display: flex; flex-direction: column; gap: 14px; }
.login-feature {
  display: flex; align-items: center; gap: 12px;
}
.login-feature .feat-icon {
  width: 32px; height: 32px;
  background: var(--gold-muted);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.login-feature .feat-text { font-size: 13.5px; color: var(--text-secondary); }

.login-right {
  width: 440px;
  display: flex; align-items: center; justify-content: center;
  padding: 60px 48px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
}
.login-form-wrap { width: 100%; }
.login-form-title {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.login-form-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 32px; }
.login-form .form-group { margin-bottom: 18px; }
.login-form .btn-gold { width: 100%; justify-content: center; padding: 12px; font-size: 14px; margin-top: 8px; }

/* ---- Empty state ---- */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.empty-state .empty-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.empty-state .empty-desc { font-size: 13px; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 90%; max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.25s cubic-bezier(0.4,0,0.2,1);
  box-shadow: var(--shadow-elevated);
}
.modal-title {
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.modal-sub { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.modal-close { cursor: pointer; color: var(--text-muted); font-size: 20px; transition: var(--transition); }
.modal-close:hover { color: var(--danger); }

/* ---- Tooltip ---- */
.tooltip { position: relative; cursor: help; }
.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: var(--transition);
}
.tooltip:hover::after { opacity: 1; }

/* ---- Divider ---- */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ---- Animations ---- */
@keyframes slideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}
.animate-in { animation: slideIn 0.3s ease; }
.animate-pulse { animation: pulse 2s infinite; }

/* ---- Utilities ---- */
.text-right  { text-align: right; }
.text-center { text-align: center; }
.text-gold   { color: var(--gold); }
.text-muted  { color: var(--text-secondary); }
.text-danger { color: var(--danger); }
.text-success{ color: var(--success); }
.font-display{ font-family: var(--font-display); }
.font-bold   { font-weight: 700; }
.flex        { display: flex; }
.items-center{ align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2       { gap: 8px; }
.gap-3       { gap: 12px; }
.gap-4       { gap: 16px; }
.mb-4        { margin-bottom: 16px; }
.mb-6        { margin-bottom: 24px; }
.mt-4        { margin-top: 16px; }
.p-0         { padding: 0; }
.hidden      { display: none; }
.w-full      { width: 100%; }

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  :root { --nav-width: 200px; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); z-index: 200; }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .dividend-summary { grid-template-columns: 1fr 1fr; }
  .login-left { display: none; }
  .login-right { width: 100%; }
  .page-header, .page-body { padding-left: 20px; padding-right: 20px; }
  .flash { margin-left: 20px; margin-right: 20px; }
}
@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .dividend-summary { grid-template-columns: 1fr; }
  .partner-cards { grid-template-columns: 1fr; }
  .stat-value { font-size: 20px; }
  .page-header .page-title { font-size: 20px; }
}
