  @import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

  :root {
    --navy: #1B2A4A;
    --navy-light: #2E4468;
    --gold: #C9A961;
    --paper: #FAF7F0;
    --ink: #23262B;
    --ink-soft: #6B7280;
    --line: #E4DFD3;
    --green: #3F7A57;
    --green-bg: #EAF3EC;
    --clay: #B5533C;
    --clay-bg: #F7EAE6;
    --amber: #A9741E;
    --amber-bg: #FBF1DF;
    --radius: 10px;
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--paper);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
  }

  h1, h2, h3 { font-family: 'Source Serif 4', Georgia, serif; margin: 0 0 4px; line-height: 1.25; }
  h1 { font-size: 22px; font-weight: 600; }
  h2 { font-size: 18px; font-weight: 600; }
  h3 { font-size: 15px; font-weight: 600; }
  p { margin: 0; line-height: 1.55; }

  a { color: var(--navy); }

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

  .sidebar {
    width: 220px;
    background: var(--navy);
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    padding: 24px 0;
  }

  .sidebar .brand {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    margin-bottom: 12px;
  }
  .sidebar .brand h1 { color: #fff; font-size: 18px; }
  .sidebar .brand .who { color: var(--gold); font-size: 12.5px; margin-top: 4px; }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    border-left: 3px solid transparent;
    font-size: 14.5px;
    font-weight: 500;
  }
  .nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
  .nav-item.active { color: #fff; background: rgba(255,255,255,0.08); border-left-color: var(--gold); }

  .nav-item .dot {
    display: inline-block;
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--clay);
    margin-left: auto;
  }

  .logout {
    margin-top: auto;
    padding: 12px 20px;
    color: rgba(255,255,255,0.55);
    font-size: 13px;
    cursor: pointer;
    border-top: 1px solid rgba(255,255,255,0.12);
  }
  .logout:hover { color: #fff; }

  .main {
    flex: 1;
    padding: 32px 40px 100px;
    max-width: 780px;
  }

  .view { display: none; }
  .view.active { display: block; }

  .topline {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 20px;
  }
  .topline .sub { color: var(--ink-soft); font-size: 13.5px; }

  /* ---------- Login screen ---------- */
  .login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
  }
  .login-box {
    width: 100%;
    max-width: 360px;
    text-align: center;
  }
  .login-box .mark {
    width: 52px; height: 52px;
    background: var(--navy);
    border-radius: 12px;
    margin: 0 auto 18px;
    display: flex; align-items: center; justify-content: center;
    color: var(--gold);
    font-family: 'Source Serif 4', serif;
    font-size: 22px;
    font-weight: 700;
  }
  .login-box h1 { font-size: 24px; margin-bottom: 6px; }
  .login-box .sub { color: var(--ink-soft); font-size: 14px; margin-bottom: 28px; }

  /* ---------- Form elements ---------- */
  .field { margin-bottom: 14px; text-align: left; }
  .field label { display: block; font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; }
  .field input, .field textarea, .field select {
    width: 100%;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 14.5px;
    font-family: inherit;
    background: #fff;
    color: var(--ink);
  }
  .field input:focus, .field textarea:focus, .field select:focus {
    outline: none;
    border-color: var(--navy);
  }
  .field textarea { resize: vertical; min-height: 80px; }

  .btn {
    display: inline-block;
    padding: 11px 20px;
    background: var(--navy);
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 14.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
  }
  .btn:hover { background: var(--navy-light); }
  .btn:disabled { opacity: 0.6; cursor: default; }
  .btn.secondary { background: transparent; color: var(--navy); border: 1px solid var(--line); }
  .btn.secondary:hover { background: #fff; }
  .btn.small { width: auto; padding: 7px 14px; font-size: 13px; }
  .btn.danger { background: var(--clay); }
  .btn.danger:hover { background: #9c4632; }

  .error-msg {
    background: var(--clay-bg);
    color: var(--clay);
    padding: 10px 13px;
    border-radius: var(--radius);
    font-size: 13.5px;
    margin-bottom: 14px;
    display: none;
  }
  .error-msg.show { display: block; }

  .success-msg {
    background: var(--green-bg);
    color: var(--green);
    padding: 10px 13px;
    border-radius: var(--radius);
    font-size: 13.5px;
    margin-bottom: 14px;
    display: none;
  }
  .success-msg.show { display: block; }

  /* ---------- Cards / lists ---------- */
  .item {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
  }
  .item:last-child { border-bottom: none; }
  .item .meta { color: var(--ink-soft); font-size: 12.5px; margin-top: 5px; }
  .item .msg { margin-top: 6px; font-size: 14px; }
  .item-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

  .badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
  }
  .badge.paid { background: var(--green-bg); color: var(--green); }
  .badge.pending { background: var(--clay-bg); color: var(--clay); }
  .badge.verifying { background: var(--amber-bg); color: var(--amber); }

  .empty {
    padding: 40px 0;
    text-align: center;
    color: var(--ink-soft);
    font-size: 14px;
  }

  .gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
  }
  .gallery-grid img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--line);
  }

  table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
  th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); }
  th { color: var(--ink-soft); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: 0.02em; }

  .card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    margin-bottom: 18px;
  }

  .spinner {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
    vertical-align: middle;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* ---------- Mobile ---------- */
  .mobile-topbar { display: none; }

  @media (max-width: 720px) {
    .sidebar {
      position: fixed;
      bottom: 0; left: 0; right: 0;
      width: 100%;
      flex-direction: row;
      padding: 0;
      z-index: 50;
      box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
    }
    .sidebar .brand, .sidebar .logout { display: none; }
    .nav-item {
      flex: 1;
      flex-direction: column;
      gap: 3px;
      text-align: center;
      padding: 10px 4px;
      border-left: none;
      border-top: 3px solid transparent;
      font-size: 11px;
    }
    .nav-item.active { border-top-color: var(--gold); border-left: none; }

    .mobile-topbar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      background: var(--navy);
      color: #fff;
      position: sticky;
      top: 0;
      z-index: 40;
    }
    .mobile-topbar h1 { color: #fff; font-size: 16px; }
    .mobile-topbar .who { color: var(--gold); font-size: 11.5px; }
    .mobile-topbar span.logout-link { color: rgba(255,255,255,0.7); font-size: 12.5px; }

    .main { padding: 20px 18px 90px; max-width: 100%; }
  }
