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

:root {
  --app-font: 'Prompt', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --bs-body-font-family: var(--app-font);
  --sidebar-w: 260px;
  --bg: #f6f4ec;
  --card-bg: #ffffff;
  --ink: #1a1f38;
  --muted: #8a8f9e;
  --navy-1: #0f1f4d;
  --navy-2: #16296b;
  --gold-1: #d4af37;
  --gold-2: #f3d97a;
  --brand-1: #b8860b;
  --brand-2: #f3d97a;
  --brand-grad: linear-gradient(135deg, var(--gold-1) 0%, var(--gold-2) 100%);
  --navy-grad: linear-gradient(180deg, var(--navy-1) 0%, #081029 100%);
  --shadow: 0 10px 30px rgba(15, 31, 77, 0.1);
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  font-family: var(--app-font);
  background: var(--bg);
  color: var(--ink);
  margin: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

a { text-decoration: none; }

.bi::before,
[class^="bi-"]::before,
[class*=" bi-"]::before {
  font-family: "bootstrap-icons" !important;
}

/* ---------- Sidebar ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--navy-grad);
  border-right: 1px solid rgba(212, 175, 55, 0.15);
  color: #fff;
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  padding: 0 6px;
}

.sidebar .brand img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  padding: 3px;
  flex-shrink: 0;
}

.sidebar .brand .logo-fallback {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--brand-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar .brand .site-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.65);
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 14.5px;
  font-weight: 400;
  margin-bottom: 4px;
  transition: all .2s ease;
}

.sidebar nav a i { font-size: 18px; width: 20px; text-align: center; }

.sidebar nav a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.sidebar nav a.active {
  background: var(--brand-grad);
  color: var(--navy-1);
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.35);
}

.sidebar .sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ---------- Main area ---------- */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 28px 32px 60px;
}

.topbar-admin {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.topbar-admin h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

.user-chip .avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-grad);
  color: var(--navy-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.user-chip .role-badge {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---------- Cards & stats ---------- */
.card-premium {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: none;
  padding: 22px 24px;
}

.stat-tile {
  border-radius: var(--radius);
  padding: 22px 24px;
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.stat-tile .stat-icon {
  position: absolute;
  right: 16px;
  top: 16px;
  font-size: 34px;
  opacity: .35;
}

.stat-tile h3 { font-size: 30px; font-weight: 700; margin: 0 0 2px; }
.stat-tile small { opacity: .85; font-size: 13px; }

.stat-tile.grad-1 { background: linear-gradient(135deg, #0f1f4d, #26398a); }
.stat-tile.grad-2 { background: linear-gradient(135deg, #b8860b, #f3d97a); color: var(--navy-1); }
.stat-tile.grad-2 small { opacity: .75; }
.stat-tile.grad-3 { background: linear-gradient(135deg, #1e3a8a, #3b5bdb); }
.stat-tile.grad-4 { background: linear-gradient(135deg, #16296b, #0f1f4d); }

.mini-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.16);
  color: var(--navy-1);
  font-size: 20px;
}

.table-premium {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.table-premium table { margin: 0; }
.table-premium thead th {
  background: #f8f9fd;
  border: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 16px 18px;
}
.table-premium tbody td {
  border-color: #eef0f6;
  padding: 14px 18px;
  vertical-align: middle;
  font-size: 14.5px;
}
.table-premium tbody tr:hover { background: #fafbff; }

.badge-status {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}
.badge-status.submitted { background: #fff4e0; color: #b5730a; }
.badge-status.approved { background: #e3fbe9; color: #1a9e4d; }
.badge-status.rejected { background: #fde4e4; color: #c62e2e; }
.badge-status.draft { background: #eef0f6; color: var(--muted); }

.btn-premium {
  background: var(--navy-grad);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: #fff;
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(15, 31, 77, 0.28);
  transition: all .15s ease;
}
.btn-premium:hover { transform: translateY(-1px); color: #fff; border-color: var(--gold-1); box-shadow: 0 8px 24px rgba(212, 175, 55, 0.3); }

.btn-outline-premium {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid rgba(15, 31, 77, 0.25);
  color: var(--navy-1);
  padding: 10px 22px;
  border-radius: 10px;
  font-weight: 500;
  transition: all .15s ease;
}
.btn-outline-premium:hover { transform: translateY(-1px); background: rgba(15, 31, 77, 0.06); color: var(--navy-1); }

/* ---------- Soft colored action buttons ---------- */
.btn-soft {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  border: 1px solid transparent;
  transition: all .15s ease;
}
.btn-soft:hover { transform: translateY(-1px); }

.btn-soft-blue { background: #e8f0ff; color: #2f5bd6; }
.btn-soft-blue:hover { background: #dbe7ff; color: #2f5bd6; }

.btn-soft-green { background: #e3fbe9; color: #1a9e4d; }
.btn-soft-green:hover { background: #d3f7dd; color: #1a9e4d; }

.btn-soft-purple { background: #f1e9fd; color: #7c3aed; }
.btn-soft-purple:hover { background: #e6d9fc; color: #7c3aed; }

.btn-soft-amber { background: #fff4e0; color: #b5730a; }
.btn-soft-amber:hover { background: #ffecc7; color: #b5730a; }

.btn-soft-teal { background: #e1f7f5; color: #0f9488; }
.btn-soft-teal:hover { background: #cff1ee; color: #0f9488; }

.btn-soft-rose { background: #fde4e4; color: #c62e2e; }
.btn-soft-rose:hover { background: #fbd5d5; color: #c62e2e; }

/* ---------- Edit nav buttons ---------- */
.btn-edit-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  background: #fff;
  transition: all .15s ease;
}
.btn-edit-nav:hover { transform: translateY(-1px); }

.btn-edit-nav-navy { border: 1px solid rgba(15, 31, 77, 0.25); color: var(--navy-1); }
.btn-edit-nav-navy:hover { background: rgba(15, 31, 77, 0.06); color: var(--navy-1); }
.btn-edit-nav-navy.active { background: var(--navy-grad); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(15, 31, 77, 0.28); }

.btn-edit-nav-primary { border: 1px solid rgba(59, 91, 219, 0.3); color: #3b5bdb; }
.btn-edit-nav-primary:hover { background: rgba(59, 91, 219, 0.08); color: #3b5bdb; }
.btn-edit-nav-primary.active { background: #3b5bdb; border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(59, 91, 219, 0.3); }

.btn-edit-nav-success { border: 1px solid rgba(26, 158, 77, 0.3); color: #1a9e4d; }
.btn-edit-nav-success:hover { background: rgba(26, 158, 77, 0.08); color: #1a9e4d; }
.btn-edit-nav-success.active { background: #1a9e4d; border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(26, 158, 77, 0.3); }

.btn-edit-nav-warning { border: 1px solid rgba(181, 115, 10, 0.3); color: #b5730a; }
.btn-edit-nav-warning:hover { background: rgba(181, 115, 10, 0.08); color: #b5730a; }
.btn-edit-nav-warning.active { background: #b5730a; border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(181, 115, 10, 0.3); }

.btn-edit-nav-info { border: 1px solid rgba(23, 162, 184, 0.3); color: #17a2b8; }
.btn-edit-nav-info:hover { background: rgba(23, 162, 184, 0.08); color: #17a2b8; }
.btn-edit-nav-info.active { background: #17a2b8; border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(23, 162, 184, 0.3); }

.form-control, .form-select {
  border-radius: 10px;
  border: 1px solid #e6e8f0;
  padding: 10px 14px;
  font-size: 14.5px;
}
.form-control:focus, .form-select:focus {
  border-color: var(--gold-1);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.section-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef0f6;
}

/* ---------- Member profile page ---------- */
.profile-hero {
  background: var(--navy-grad);
  border-radius: var(--radius);
  padding: 28px 32px;
  color: #fff;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.profile-hero::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.25), transparent 70%);
}
.profile-hero .avatar-lg {
  width: 78px;
  height: 78px;
  border-radius: 18px;
  background: var(--brand-grad);
  color: var(--navy-1);
  font-size: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.35);
  overflow: hidden;
  position: relative;
  z-index: 1;
}
.profile-hero .avatar-lg img { width: 100%; height: 100%; object-fit: cover; }
.profile-hero .profile-meta { position: relative; z-index: 1; flex: 1; min-width: 200px; }
.profile-hero h3 { color: #fff; margin: 0 0 6px; font-weight: 600; }
.profile-hero .profile-sub { color: rgba(255, 255, 255, 0.65); font-size: 13.5px; display: flex; gap: 14px; flex-wrap: wrap; }
.profile-hero .profile-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.profile-hero .profile-actions { position: relative; z-index: 1; display: flex; gap: 10px; flex-wrap: wrap; }

.pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.pill-badge.tone-submitted { background: rgba(212, 175, 55, 0.22); border-color: rgba(212, 175, 55, 0.4); }
.pill-badge.tone-approved { background: rgba(26, 158, 77, 0.25); border-color: rgba(26, 158, 77, 0.4); }
.pill-badge.tone-rejected { background: rgba(198, 46, 46, 0.25); border-color: rgba(198, 46, 46, 0.4); }
.pill-badge.tone-draft { background: rgba(255, 255, 255, 0.12); }
.pill-badge.tone-pending { background: rgba(212, 175, 55, 0.22); border-color: rgba(212, 175, 55, 0.4); }
.pill-badge.tone-paid, .pill-badge.tone-verified { background: rgba(26, 158, 77, 0.25); border-color: rgba(26, 158, 77, 0.4); }

.info-card .section-title { display: flex; align-items: center; gap: 10px; }
.info-card .section-title .icon-chip {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(212, 175, 55, 0.14);
  color: var(--navy-1);
  font-size: 15px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px 20px;
}
.info-grid .info-item label {
  display: block;
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 4px;
}
.info-grid .info-item .value {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  word-break: break-word;
}
.info-grid .info-item.span-2 { grid-column: span 2; }
.info-grid .info-item.span-3 { grid-column: span 3; }

.timeline { position: relative; padding-left: 6px; }
.timeline-item {
  position: relative;
  padding: 0 0 18px 22px;
  border-left: 2px solid #eef0f6;
}
.timeline-item:last-child { border-color: transparent; padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand-grad);
  box-shadow: 0 0 0 3px #fff;
}
.timeline-item .timeline-time { font-size: 11.5px; color: var(--muted); }
.timeline-item .timeline-action { font-size: 13.5px; font-weight: 600; color: var(--ink); margin: 2px 0; }
.timeline-item .timeline-detail { font-size: 13px; color: var(--muted); line-height: 1.5; }

.slip-preview {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #f8f9fd;
  border: 1px solid #eef0f6;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--navy-1);
  transition: all .15s ease;
}
.slip-preview:hover { background: #eef0f6; color: var(--navy-1); }

@media (max-width: 992px) {
  .sidebar { width: 76px; padding: 20px 10px; }
  .sidebar .site-name, .sidebar nav a span { display: none; }
  .sidebar nav a { justify-content: center; }
  .main-content { margin-left: 76px; }
}
