:root {
  --bg-sidebar: #0f1b2d;
  --bg-sidebar-deep: #0a1422;
  --bg-main: #f5f6f8;
  --bg-card: #ffffff;
  --bg-card-dark: #122339;
  --text-primary: #1a2438;
  --text-secondary: #6b7588;
  --text-muted: #9aa3b5;
  --text-on-dark: #e7ecf3;
  --text-on-dark-muted: #8a96aa;
  --accent: #f5b324;
  --accent-soft: #fde8b3;
  --accent-deep: #d99a10;
  --green: #2bb673;
  --green-soft: #d6f2e4;
  --orange: #f59e0b;
  --orange-soft: #fdecc8;
  --blue: #3a7bd5;
  --blue-soft: #dceaf9;
  --red: #e64b4b;
  --red-soft: #fce0e0;
  --gray-line: #e7eaf0;
  --gray-bg: #f0f2f5;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-card-hover: 0 4px 12px rgba(16, 24, 40, 0.08), 0 2px 4px rgba(16, 24, 40, 0.05);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --font-display: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, sans-serif;
}

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

html, body {
  font-family: var(--font-body);
  background: var(--bg-main);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ===== LAYOUT ===== */
.app {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  background: linear-gradient(180deg, var(--bg-sidebar) 0%, var(--bg-sidebar-deep) 100%);
  color: var(--text-on-dark);
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand {
  padding: 0 24px 28px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 20px;
}
.brand-row { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 9px;
  background: var(--accent);
  color: #1a2438;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
  box-shadow: 0 4px 14px rgba(245, 179, 36, 0.35);
}
.brand-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
}
.brand-name span { color: var(--accent); }
.brand-sub {
  font-size: 11px;
  color: var(--text-on-dark-muted);
  margin-top: 6px;
  letter-spacing: 0.2px;
}

.nav {
  flex: 1;
  padding: 0 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 10px;
  color: var(--text-on-dark-muted);
  font-size: 13.5px;
  font-weight: 500;
  transition: all 0.15s ease;
  position: relative;
}
.nav a:hover {
  background: rgba(255,255,255,0.04);
  color: var(--text-on-dark);
}
.nav a.active {
  background: linear-gradient(90deg, rgba(245, 179, 36, 0.18) 0%, rgba(245, 179, 36, 0.04) 100%);
  color: var(--accent);
  font-weight: 600;
}
.nav a.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav a svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav a .chevron { margin-left: auto; opacity: 0.5; }

.sponsor-cta {
  margin: 16px 16px 0;
  padding: 18px 16px;
  background: linear-gradient(140deg, rgba(245, 179, 36, 0.12) 0%, rgba(245, 179, 36, 0.03) 100%);
  border: 1px solid rgba(245, 179, 36, 0.18);
  border-radius: 12px;
  text-align: center;
}
.sponsor-cta .crown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}
.sponsor-cta p {
  font-size: 12px;
  color: var(--text-on-dark-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}
.sponsor-cta button {
  width: 100%;
  background: var(--accent);
  color: #1a2438;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.sponsor-cta button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(245, 179, 36, 0.35);
}

/* ===== MAIN ===== */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--gray-line);
  padding: 14px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  color: var(--text-secondary);
  display: flex;
}
.menu-btn:hover { background: var(--gray-bg); }

.search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.search input {
  width: 100%;
  border: 1px solid var(--gray-line);
  background: var(--bg-main);
  padding: 10px 14px 10px 40px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text-primary);
  transition: all 0.15s;
}
.search input:focus {
  outline: none;
  border-color: var(--accent);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(245, 179, 36, 0.12);
}
.search svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.icon-btn {
  background: none;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  position: relative;
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--gray-bg); }
.icon-btn .badge {
  position: absolute;
  top: 7px;
  right: 8px;
  background: #e64b4b;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px solid #fff;
}

.user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 14px;
  border-left: 1px solid var(--gray-line);
  margin-left: 6px;
  cursor: pointer;
}
.user-info { text-align: right; line-height: 1.25; }
.user-name { font-weight: 700; font-size: 13.5px; color: var(--text-primary); }
.user-role { font-size: 11px; color: var(--accent-deep); font-weight: 600; }
.avatar {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f5b324, #d99a10);
  color: #1a2438;
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
}

/* ===== CONTENT ===== */
.content {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.page-head h1 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.6px;
  color: var(--text-primary);
}
.page-head .subtitle {
  color: var(--text-secondary);
  font-size: 13.5px;
  margin-top: 4px;
}
.breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb a:hover { color: var(--accent-deep); }
.breadcrumb svg { width: 12px; height: 12px; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
}
.btn-primary {
  background: var(--accent);
  color: #1a2438;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-deep);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(245, 179, 36, 0.3);
}
.btn-outline {
  background: #fff;
  color: var(--text-primary);
  border-color: var(--gray-line);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}
.btn-dark {
  background: var(--bg-card-dark);
  color: #fff;
}
.btn-dark:hover { background: #1d3354; }

/* Cards */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card-head {
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--gray-line);
}
.card-head h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}
.card-body { padding: 22px; }

.see-all {
  color: var(--accent-deep);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap 0.15s;
}
.see-all:hover { gap: 7px; }

/* Badges */
.badge-status {
  display: inline-block;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-ready { background: var(--green-soft); color: #1e8556; }
.badge-progress { background: var(--orange-soft); color: #b97a06; }
.badge-planned { background: var(--blue-soft); color: #2057a3; }
.badge-none { background: var(--gray-bg); color: var(--text-secondary); }
.badge-urgent { background: var(--red-soft); color: #b93a3a; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th {
  text-align: left;
  padding: 14px 22px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: #fafbfc;
  border-bottom: 1px solid var(--gray-line);
}
td {
  padding: 16px 22px;
  border-bottom: 1px solid var(--gray-line);
  font-size: 13px;
  color: var(--text-primary);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: #fafbfc; }

.amount { font-weight: 700; color: var(--text-primary); font-variant-numeric: tabular-nums; }
.date { color: var(--text-secondary); font-variant-numeric: tabular-nums; }

.row-actions { display: flex; align-items: center; gap: 6px; }
.row-actions button {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--gray-line);
  background: #fff;
  color: var(--text-secondary);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}
.row-actions button:hover {
  border-color: var(--accent);
  color: var(--accent-deep);
}

/* Filters bar */
.filters {
  background: #fff;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  box-shadow: var(--shadow-card);
}
.filter {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-main);
  border: 1px solid var(--gray-line);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-primary);
  cursor: pointer;
  font-weight: 500;
}
.filter:hover { border-color: var(--accent); }
.filter svg { width: 14px; height: 14px; color: var(--text-muted); }
.filter-input {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  width: 140px;
  color: var(--text-primary);
  outline: none;
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeUp 0.5s ease-out backwards;
}

/* Responsive */
@media (max-width: 1200px) {
  .app { grid-template-columns: 220px 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .content { padding: 18px; }
  .topbar { padding: 12px 18px; }
  th, td { padding: 12px 14px; }
}
