/* ============================================================
   Penia Online Bank – Main Stylesheet
   ============================================================ */

:root {
  --primary: #0A4C8B;
  --primary-dark: #073870;
  --primary-light: #1565C0;
  --accent: #F5A623;
  --accent-dark: #E09410;
  --bg: #F0F4F8;
  --bg-card: #FFFFFF;
  --nav-dark: #0D1B2A;
  --nav-darker: #081320;
  --text-primary: #1A202C;
  --text-secondary: #4A5568;
  --text-muted: #718096;
  --border: #E2E8F0;
  --border-light: #EDF2F7;
  --success: #2ECC71;
  --success-bg: #F0FFF4;
  --danger: #E53E3E;
  --danger-bg: #FFF5F5;
  --warning: #F6AD55;
  --warning-bg: #FFFAF0;
  --info: #3182CE;
  --info-bg: #EBF8FF;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.07);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.12), 0 8px 10px rgba(0,0,0,.08);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --sidebar-w: 260px;
  --topbar-h: 64px;
  --transition: 0.22s ease;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

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

/* ---- Sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  background: var(--nav-dark);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: transform var(--transition);
  overflow-y: auto;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.logo { display: flex; align-items: center; gap: 10px; }
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 16px;
  box-shadow: 0 4px 10px rgba(10,76,139,.4);
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-name { color: #fff; font-weight: 700; font-size: 1rem; letter-spacing: .3px; }
.logo-sub  { color: rgba(255,255,255,.45); font-size: .7rem; font-weight: 400; }

.sidebar-close {
  display: none;
  background: none; border: none; color: rgba(255,255,255,.5);
  cursor: pointer; font-size: 1rem; padding: 4px;
}

.sidebar-nav { flex: 1; padding: 16px 12px; }
.sidebar-nav ul { list-style: none; }
.sidebar-nav ul li + li { margin-top: 2px; }
.sidebar-section-label {
  color: rgba(255,255,255,.3);
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 20px 8px 6px;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255,255,255,.65);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  transition: all var(--transition);
}
.sidebar-nav a i { width: 18px; text-align: center; font-size: .9rem; }
.sidebar-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.sidebar-nav a.active {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(10,76,139,.4);
}

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar-user { display: flex; align-items: center; gap: 10px; }
.sidebar-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff; font-weight: 700; font-size: .8rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-avatar-img {
  width: 36px; height: 36px; border-radius: 50%; object-fit: cover;
}
.sidebar-user-info { overflow: hidden; }
.sidebar-user-info strong { display: block; color: #fff; font-size: .8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info span  { color: rgba(255,255,255,.4); font-size: .7rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 199; }

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

/* ---- Topbar ---- */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.sidebar-toggle {
  display: none;
  background: none; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 6px 10px; cursor: pointer; color: var(--text-secondary);
  font-size: .9rem; transition: all var(--transition);
}
.sidebar-toggle:hover { background: var(--bg); color: var(--text-primary); }
.topbar-right { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  position: relative;
  background: none; border: 1px solid var(--border);
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); cursor: pointer; font-size: .9rem;
  transition: all var(--transition);
}
.icon-btn:hover { background: var(--bg); border-color: var(--primary); color: var(--primary); }
.icon-btn .badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  font-size: .6rem; font-weight: 700;
  width: 17px; height: 17px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}

/* Notification Dropdown */
.notif-wrapper { position: relative; }
.notif-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 340px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-xl);
  display: none; z-index: 300;
}
.notif-dropdown.open { display: flex; flex-direction: column; }
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  font-weight: 600; font-size: .875rem;
  border-bottom: 1px solid var(--border-light);
}
.notif-count { background: var(--primary); color: #fff; font-size: .65rem; padding: 2px 7px; border-radius: 20px; font-weight: 600; }
.notif-list { max-height: 320px; overflow-y: auto; }
.notif-item {
  display: flex; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: #EBF5FF; }
.notif-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .85rem; }
.notif-success .notif-icon { background: var(--success-bg); color: var(--success); }
.notif-warning .notif-icon { background: var(--warning-bg); color: var(--warning); }
.notif-danger  .notif-icon { background: var(--danger-bg);  color: var(--danger);  }
.notif-info    .notif-icon { background: var(--info-bg);    color: var(--info);    }
.notif-body { flex: 1; overflow: hidden; }
.notif-title { font-size: .8rem; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-msg  { font-size: .75rem; color: var(--text-secondary); line-height: 1.4; }
.notif-time { font-size: .7rem; color: var(--text-muted); margin-top: 3px; }
.notif-empty { padding: 24px; text-align: center; color: var(--text-muted); font-size: .85rem; }
.notif-footer { display: block; text-align: center; padding: 10px; font-size: .8rem; font-weight: 500; color: var(--primary); border-top: 1px solid var(--border-light); }
.notif-footer:hover { background: var(--bg); }

/* Avatar */
.user-avatar-wrapper { position: relative; }
.avatar-btn {
  background: none; border: 2px solid var(--border); border-radius: 50%;
  width: 38px; height: 38px; cursor: pointer; overflow: hidden;
  transition: border-color var(--transition);
}
.avatar-btn:hover { border-color: var(--primary); }
.avatar-img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; font-weight: 700; font-size: .75rem;
  display: flex; align-items: center; justify-content: center;
}
.avatar-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 220px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-xl); display: none; z-index: 300;
  overflow: hidden;
}
.avatar-dropdown.open { display: block; }
.avatar-info { padding: 14px 16px; border-bottom: 1px solid var(--border-light); }
.avatar-info strong { display: block; font-size: .875rem; font-weight: 600; }
.avatar-info span   { font-size: .75rem; color: var(--text-muted); }
.avatar-dropdown a  {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; color: var(--text-secondary);
  font-size: .85rem; transition: all var(--transition);
}
.avatar-dropdown a:hover { background: var(--bg); color: var(--primary); }
.avatar-dropdown a i { width: 16px; }
.avatar-dropdown hr { border: none; border-top: 1px solid var(--border-light); margin: 4px 0; }
.logout-link:hover { color: var(--danger) !important; }

/* ---- Page Body ---- */
.page-body { flex: 1; padding: 28px 28px 40px; }

/* ---- Page Header ---- */
.page-header { margin-bottom: 24px; }
.page-header h1 { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.page-header p  { font-size: .875rem; color: var(--text-muted); }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--text-muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }

/* ---- Cards ---- */
.card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}
.card-header h2 { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
.card-header .card-action { font-size: .8rem; font-weight: 500; color: var(--primary); }
.card-body { padding: 20px; }

/* ---- Stat Cards ---- */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; margin-bottom: 24px; }
.stat-card {
  background: #fff; border-radius: var(--radius);
  border: 1px solid var(--border); padding: 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.stat-icon.blue   { background: #EBF8FF; color: var(--primary); }
.stat-icon.green  { background: var(--success-bg); color: var(--success); }
.stat-icon.gold   { background: #FFFBEB; color: var(--accent); }
.stat-icon.purple { background: #FAF5FF; color: #805AD5; }
.stat-card .stat-info { flex: 1; }
.stat-card .stat-label { font-size: .75rem; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.stat-card .stat-sub   { font-size: .75rem; color: var(--text-muted); margin-top: 2px; }

/* ---- Balance Hero Card ---- */
.balance-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #1565C0 60%, #0D47A1 100%);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  color: #fff;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(10,76,139,.35);
}
.balance-hero::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 200px; height: 200px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.balance-hero::after {
  content: '';
  position: absolute; bottom: -60px; right: 80px;
  width: 150px; height: 150px;
  background: rgba(255,255,255,.04);
  border-radius: 50%;
}
.balance-hero-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.balance-label { font-size: .8rem; font-weight: 500; opacity: .7; letter-spacing: .5px; text-transform: uppercase; margin-bottom: 6px; }
.balance-amount { font-size: 2.4rem; font-weight: 800; letter-spacing: -1px; line-height: 1; }
.balance-currency-badge {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff; font-size: .7rem; font-weight: 600;
  padding: 4px 10px; border-radius: 20px;
  letter-spacing: .5px;
}
.balance-accounts { display: flex; gap: 20px; flex-wrap: wrap; }
.balance-account-item {
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px; flex: 1; min-width: 140px;
}
.balance-account-item .acc-type { font-size: .72rem; opacity: .7; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 3px; }
.balance-account-item .acc-num  { font-size: .85rem; font-weight: 500; opacity: .85; margin-bottom: 4px; }
.balance-account-item .acc-bal  { font-size: 1.1rem; font-weight: 700; }

/* ---- Account Cards ---- */
.account-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  transition: all var(--transition);
  cursor: pointer;
}
.account-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.account-type-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.account-type-icon.savings  { background: #EBF8FF; color: var(--primary); }
.account-type-icon.checking { background: #FEFCBF; color: #B7791F; }
.account-card-info { flex: 1; }
.account-card-info .acc-type-label { font-size: .75rem; font-weight: 500; color: var(--text-muted); text-transform: capitalize; margin-bottom: 2px; }
.account-card-info .acc-number      { font-size: .875rem; font-weight: 600; color: var(--text-primary); }
.account-card-right { text-align: right; }
.account-card-right .acc-balance    { font-size: 1.1rem; font-weight: 700; color: var(--text-primary); }
.account-card-right .acc-currency   { font-size: .72rem; color: var(--text-muted); }

/* ---- Debit/Credit Cards ---- */
.bank-card {
  background: linear-gradient(135deg, #0D1B2A 0%, #1A3A5C 100%);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
  min-height: 165px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition);
}
.bank-card:hover { transform: translateY(-4px); }
.bank-card.frozen { opacity: .7; filter: grayscale(.4); }
.bank-card::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 130px; height: 130px;
  background: rgba(255,255,255,.05);
  border-radius: 50%;
}
.bank-card-top { display: flex; align-items: center; justify-content: space-between; }
.bank-card-chip {
  width: 34px; height: 26px; border-radius: 4px;
  background: linear-gradient(135deg, #d4a843 0%, #f5d17a 50%, #d4a843 100%);
}
.bank-card-type { font-size: .9rem; font-weight: 700; opacity: .9; letter-spacing: 1px; }
.bank-card-type.visa { color: #fff; font-style: italic; font-size: 1.2rem; }
.bank-card-type.mc   { color: #fff; }
.bank-card-number { font-size: 1rem; font-weight: 500; letter-spacing: 3px; margin: 10px 0; opacity: .9; }
.bank-card-bottom { display: flex; align-items: flex-end; justify-content: space-between; }
.bank-card-name   { font-size: .78rem; font-weight: 500; text-transform: uppercase; letter-spacing: 1px; opacity: .8; }
.bank-card-expiry-label { font-size: .6rem; opacity: .6; margin-bottom: 1px; }
.bank-card-expiry-val   { font-size: .82rem; font-weight: 500; }
.card-status-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: .65rem; font-weight: 600; padding: 3px 8px; border-radius: 12px;
  text-transform: uppercase; letter-spacing: .5px;
}
.badge-active    { background: rgba(46,204,113,.2); color: #2ECC71; border: 1px solid rgba(46,204,113,.3); }
.badge-frozen    { background: rgba(113,128,150,.2); color: #A0AEC0; border: 1px solid rgba(113,128,150,.3); }
.badge-cancelled { background: rgba(229,62,62,.2);  color: #FC8181; border: 1px solid rgba(229,62,62,.3); }

/* ---- Transactions ---- */
.transaction-list { list-style: none; }
.transaction-item {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.transaction-item:last-child { border-bottom: none; }
.txn-icon {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
}
.txn-icon.credit   { background: var(--success-bg); color: var(--success); }
.txn-icon.debit    { background: var(--danger-bg);  color: var(--danger);  }
.txn-icon.transfer { background: var(--info-bg);    color: var(--info);    }
.txn-info  { flex: 1; overflow: hidden; }
.txn-desc  { font-size: .875rem; font-weight: 500; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-date  { font-size: .75rem; color: var(--text-muted); margin-top: 1px; }
.txn-right { text-align: right; flex-shrink: 0; }
.txn-amount        { font-size: .95rem; font-weight: 700; }
.txn-amount.credit { color: var(--success); }
.txn-amount.debit  { color: var(--danger); }
.txn-amount.transfer { color: var(--info); }
.txn-ref   { font-size: .7rem; color: var(--text-muted); margin-top: 1px; }

/* Status badges */
.status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .72rem; font-weight: 600; padding: 3px 9px; border-radius: 20px;
  text-transform: capitalize; letter-spacing: .3px;
}
.status-completed, .status-active { background: var(--success-bg); color: #276749; }
.status-pending   { background: var(--warning-bg); color: #7B4F12; }
.status-failed, .status-suspended, .status-cancelled { background: var(--danger-bg); color: #9B2C2C; }
.status-inactive, .status-frozen  { background: #EDF2F7; color: #4A5568; }

/* ---- Grid Helpers ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 20px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* ---- Forms ---- */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .8rem; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; letter-spacing: .2px; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem; font-family: inherit;
  color: var(--text-primary); background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,76,139,.1); }
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { background: var(--bg); color: var(--text-muted); cursor: not-allowed; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-text { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: .75rem; color: var(--danger); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input-group { position: relative; }
.input-group .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .85rem; }
.input-group .form-control { padding-left: 36px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 600; font-family: inherit;
  cursor: pointer; border: none; transition: all var(--transition);
  letter-spacing: .2px; text-decoration: none;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 4px 12px rgba(10,76,139,.3); }
.btn-accent    { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #27AE60; color: #fff; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #C53030; color: #fff; }
.btn-outline   { background: transparent; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-outline-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-outline-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost     { background: var(--bg); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--border-light); color: var(--text-primary); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-lg { padding: 13px 28px; font-size: .95rem; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; min-width: 36px; }

/* ---- Tables ---- */
.table-wrapper { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; }
table.data-table th {
  background: var(--bg); font-size: .75rem; font-weight: 600;
  color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px;
  padding: 10px 16px; text-align: left; border-bottom: 1px solid var(--border);
}
table.data-table td { padding: 12px 16px; font-size: .875rem; border-bottom: 1px solid var(--border-light); vertical-align: middle; }
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: var(--bg); }
.table-amount-credit { color: var(--success); font-weight: 700; }
.table-amount-debit  { color: var(--danger);  font-weight: 700; }

/* ---- Quick Actions ---- */
.quick-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.quick-action-btn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 20px; background: #fff;
  border: 1px solid var(--border); border-radius: var(--radius);
  cursor: pointer; transition: all var(--transition); text-decoration: none;
  min-width: 90px;
}
.quick-action-btn:hover { border-color: var(--primary); background: #EBF8FF; color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow); }
.quick-action-btn .qa-icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
}
.quick-action-btn:nth-child(1) .qa-icon { background: #EBF8FF; color: var(--primary); }
.quick-action-btn:nth-child(2) .qa-icon { background: var(--success-bg); color: var(--success); }
.quick-action-btn:nth-child(3) .qa-icon { background: #FAF5FF; color: #805AD5; }
.quick-action-btn:nth-child(4) .qa-icon { background: #FFFBEB; color: var(--accent); }
.quick-action-btn span { font-size: .75rem; font-weight: 500; color: var(--text-secondary); }

/* ---- Toast ---- */
.toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius-sm);
  background: #fff; border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); min-width: 280px; max-width: 400px;
  opacity: 0; transform: translateX(20px);
  transition: opacity .3s, transform .3s;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-success { border-left: 4px solid var(--success); }
.toast-danger  { border-left: 4px solid var(--danger);  }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-info    { border-left: 4px solid var(--info);    }
.toast i { font-size: 1rem; }
.toast-success i { color: var(--success); }
.toast-danger i  { color: var(--danger);  }
.toast-warning i { color: var(--warning); }
.toast-info i    { color: var(--info);    }
.toast span { flex: 1; font-size: .85rem; color: var(--text-primary); }
.toast button { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: .8rem; padding: 2px; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; opacity: 0; pointer-events: none; transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl); width: 90%; max-width: 480px;
  transform: scale(.95); transition: transform var(--transition);
  overflow: hidden;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px; border-bottom: 1px solid var(--border-light);
}
.modal-header h3 { font-size: 1.05rem; font-weight: 700; }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-muted); font-size: 1.1rem; padding: 2px; }
.modal-body { padding: 22px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border-light); }

/* ---- Search / Filter Bar ---- */
.filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; background: var(--bg);
  border-radius: var(--radius-sm); margin-bottom: 16px;
}
.filter-bar .form-control { max-width: 180px; background: #fff; }
.filter-bar .search-input { max-width: 260px; }

/* ---- Pagination ---- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 16px 0 4px; }
.pagination a, .pagination span {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  font-size: .85rem; font-weight: 500; border: 1px solid var(--border);
  color: var(--text-secondary); transition: all var(--transition);
}
.pagination a:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---- Landing Page ---- */
.landing-page { background: var(--nav-dark); min-height: 100vh; display: flex; }
.landing-left {
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: 60px 60px 60px 80px;
  background: linear-gradient(160deg, var(--nav-darker) 0%, #0D2845 50%, #0A3D6B 100%);
  position: relative; overflow: hidden;
}
.landing-left::before {
  content: '';
  position: absolute; top: -100px; left: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(10,76,139,.4) 0%, transparent 70%);
}
.landing-left::after {
  content: '';
  position: absolute; bottom: -80px; right: -80px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(245,166,35,.15) 0%, transparent 70%);
}
.landing-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 60px; position: relative; z-index: 1; }
.landing-brand-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.2rem; box-shadow: 0 6px 16px rgba(10,76,139,.4);
}
.landing-brand-text .brand-name { color: #fff; font-size: 1.3rem; font-weight: 800; display: block; }
.landing-brand-text .brand-sub  { color: rgba(255,255,255,.4); font-size: .75rem; }
.landing-hero-text { position: relative; z-index: 1; margin-bottom: 40px; }
.landing-hero-text h1 { font-size: 2.6rem; font-weight: 800; color: #fff; line-height: 1.15; margin-bottom: 16px; }
.landing-hero-text h1 .text-gold { color: var(--accent); }
.landing-hero-text p  { font-size: 1rem; color: rgba(255,255,255,.55); max-width: 420px; line-height: 1.7; }
.landing-features { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.feature-item { display: flex; align-items: center; gap: 12px; }
.feature-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: .85rem; flex-shrink: 0;
}
.feature-text { color: rgba(255,255,255,.65); font-size: .875rem; }
.landing-right {
  width: 480px; min-height: 100vh;
  background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 50px 50px;
}
.login-box { width: 100%; max-width: 380px; }
.login-box h2 { font-size: 1.6rem; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.login-box .login-sub { font-size: .875rem; color: var(--text-muted); margin-bottom: 30px; }
.login-box .form-group { margin-bottom: 16px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 16px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.divider span { font-size: .75rem; color: var(--text-muted); white-space: nowrap; }

/* ---- Alert ---- */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-sm);
  margin-bottom: 16px; font-size: .875rem;
}
.alert i { margin-top: 1px; font-size: .9rem; flex-shrink: 0; }
.alert-danger  { background: var(--danger-bg);  border: 1px solid #FEB2B2; color: #9B2C2C; }
.alert-success { background: var(--success-bg); border: 1px solid #9AE6B4; color: #276749; }
.alert-info    { background: var(--info-bg);    border: 1px solid #90CDF4; color: #2B6CB0; }
.alert-warning { background: var(--warning-bg); border: 1px solid #F6AD55; color: #7B4F12; }

/* ---- Transfer Card ---- */
.transfer-summary {
  background: var(--bg); border-radius: var(--radius-sm);
  padding: 16px; margin: 16px 0; border: 1px solid var(--border);
}
.transfer-summary-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 0; font-size: .875rem;
}
.transfer-summary-row .label { color: var(--text-muted); }
.transfer-summary-row .value { font-weight: 600; }
.transfer-summary-total { border-top: 1px solid var(--border); margin-top: 6px; padding-top: 10px; }
.transfer-summary-total .value { font-size: 1.1rem; color: var(--primary); }

/* ---- Progress/Steps ---- */
.steps { display: flex; align-items: center; margin-bottom: 28px; }
.step { display: flex; align-items: center; gap: 10px; }
.step-num {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700; border: 2px solid var(--border);
  color: var(--text-muted); transition: all var(--transition);
}
.step.active .step-num { border-color: var(--primary); background: var(--primary); color: #fff; }
.step.done  .step-num { border-color: var(--success); background: var(--success); color: #fff; }
.step-label { font-size: .8rem; font-weight: 500; color: var(--text-muted); }
.step.active .step-label { color: var(--primary); font-weight: 600; }
.step.done  .step-label  { color: var(--success); }
.step-line { flex: 1; height: 2px; background: var(--border); margin: 0 8px; }
.step.done + .step-line { background: var(--success); }

/* ---- Admin ---- */
.admin-page { background: var(--bg); min-height: 100vh; }
.admin-topbar {
  background: var(--nav-dark); height: 60px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; box-shadow: 0 2px 8px rgba(0,0,0,.2);
  position: sticky; top: 0; z-index: 100;
}
.admin-topbar .logo { display: flex; align-items: center; gap: 10px; }
.admin-topbar .logo span { color: #fff; font-weight: 700; font-size: 1.05rem; }
.admin-topbar .admin-nav { display: flex; align-items: center; gap: 4px; }
.admin-topbar .admin-nav a {
  color: rgba(255,255,255,.65); padding: 7px 14px;
  border-radius: var(--radius-sm); font-size: .85rem; font-weight: 500;
  transition: all var(--transition);
}
.admin-topbar .admin-nav a:hover { background: rgba(255,255,255,.1); color: #fff; }
.admin-topbar .admin-nav a.active { background: var(--primary); color: #fff; }
.admin-topbar .admin-right { display: flex; align-items: center; gap: 10px; }
.admin-topbar .admin-right a { color: rgba(255,255,255,.65); font-size: .85rem; }
.admin-topbar .admin-right a:hover { color: #fff; }
.admin-body { padding: 28px; max-width: 1400px; margin: 0 auto; }

/* ---- Empty State ---- */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 50px 20px; text-align: center; color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 14px; opacity: .4; }
.empty-state p { font-size: .9rem; }

/* ---- Avatar Upload ---- */
.avatar-upload { display: flex; align-items: center; gap: 20px; margin-bottom: 20px; }
.avatar-preview {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; border: 3px solid var(--border);
}
.avatar-preview-initials {
  width: 80px; height: 80px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.5rem; font-weight: 700;
  border: 3px solid var(--border); flex-shrink: 0;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #A0AEC0; }

/* ---- Utilities ---- */
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-warning { color: var(--warning) !important; }
.text-info    { color: var(--info)    !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-primary { color: var(--primary) !important; }
.text-right   { text-align: right; }
.text-center  { text-align: center; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }
.mb-0  { margin-bottom: 0; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }
.section-gap { margin-bottom: 24px; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-1-2, .grid-2-1 { grid-template-columns: 1fr; }
  .landing-left { display: none; }
  .landing-right { width: 100%; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: flex; }
  .sidebar-overlay.open { display: block; }
  .sidebar-toggle { display: flex; }
  .main-content { margin-left: 0; }
  .page-body { padding: 20px 16px 32px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .balance-amount { font-size: 1.8rem; }
  .form-row { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar .form-control { max-width: 100%; }
  .admin-topbar .admin-nav { display: none; }
  .admin-body { padding: 16px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .balance-hero { padding: 20px; }
  .balance-amount { font-size: 1.6rem; }
  .grid-4 { grid-template-columns: 1fr; }
  .quick-actions { justify-content: space-between; }
  .quick-action-btn { flex: 1; min-width: 70px; padding: 12px 8px; }
}
