/* Gannita premium theme (v114) — loaded AFTER styles.css; overrides colours/surfaces only.
   Palette taken from the Gannita logo: deep navy + bright blue. Delete this file's <link> in
   index.html to go straight back to the previous look. */
:root {
  --ink: #0b1a2c; --ink-2: #102845; --ink-3: #0f4c9a;
  --bg: #eef1f7;
  --panel-2: #f5f7fb; --panel-3: #e8eef8;
  --border: #e3e8f2; --border-strong: #cdd7ea;
  --text: #0b1a2c; --muted: #5b6985; --muted-2: #8793ad;
  --accent: #0a84ff; --accent-2: #0a66cc; --accent-soft: #e5f2ff;
  --radius: 18px; --radius-sm: 12px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --shadow-sm: 0 1px 2px rgba(11, 26, 44, .04), 0 6px 16px -10px rgba(11, 26, 44, .18);
  --shadow-md: 0 18px 36px -20px rgba(11, 26, 44, .32), 0 2px 6px rgba(11, 26, 44, .05);
  --shadow-lg: 0 28px 60px -24px rgba(11, 26, 44, .5), 0 6px 16px rgba(11, 26, 44, .12);
}
html, body { background: var(--bg); }
body { background:
  radial-gradient(900px 420px at 8% -6%, rgba(10, 132, 255, .09), transparent 60%),
  radial-gradient(700px 380px at 100% 0, rgba(15, 76, 154, .08), transparent 55%), var(--bg) !important; }
h1, h2, h3 { letter-spacing: -.015em; }
.num, .rec-amount, .stat .n, .stat-pill .v, .totals .grand { font-variant-numeric: tabular-nums; }

/* ---- Top bar ---- */
.topbar { background: rgba(255, 255, 255, .82); border-bottom: 1px solid rgba(11, 26, 44, .06); }

/* ---- Cards ---- */
.card { border-radius: var(--radius); border-color: var(--border); box-shadow: var(--shadow-sm); padding: 20px; }
.card h2 { font-size: 16px; font-weight: 700; }
.card h2::before { width: 3px; height: 17px; background: linear-gradient(180deg, var(--accent), var(--ink-3)); }

/* ---- Buttons ---- */
.btn {
  background: linear-gradient(135deg, #1a6fe0, var(--ink-2) 120%); border-radius: 12px; letter-spacing: -.005em;
  box-shadow: 0 10px 20px -10px rgba(11, 40, 90, .65), 0 0 0 1px rgba(10, 132, 255, .35) inset;
}
.btn:hover { filter: none; box-shadow: 0 14px 24px -10px rgba(11, 40, 90, .75), 0 0 0 1px rgba(107, 182, 255, .6) inset; transform: translateY(-1px); }
.btn.secondary { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(11, 26, 44, .06); border: 1.5px solid var(--border); }
.btn.secondary:hover { transform: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.btn.danger { background: linear-gradient(135deg, #e5484d, #b42318); box-shadow: 0 10px 20px -12px rgba(180, 35, 24, .7); }

/* ---- Inputs ---- */
input, select, textarea { border-radius: 12px; background: #fff; border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { box-shadow: 0 0 0 4px rgba(10, 132, 255, .16); }

/* ---- Home header (receivable / payable hero) ---- */
.home-header {
  background:
    radial-gradient(420px 220px at 100% -10%, rgba(10, 132, 255, .5), transparent 62%),
    radial-gradient(360px 240px at -5% 120%, rgba(15, 76, 154, .55), transparent 60%),
    linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 62%, #123a6b 100%);
  border-radius: 22px; padding: 24px 22px 22px;
  box-shadow: 0 26px 50px -28px rgba(11, 26, 44, .85), 0 0 0 1px rgba(255, 255, 255, .05) inset;
}
.home-header::before { background: transparent; width: auto; height: auto; inset: 0; right: 0; top: 0; border-radius: 0; opacity: .6;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, .035) 0 1px, transparent 1px 11px);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.home-header::after { display: none; }
.home-greet { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #8fc4ff; opacity: 1; font-weight: 700; }
.stat-pill { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 14px 16px; backdrop-filter: blur(8px); }
.stat-pill .v { font-family: var(--serif); font-weight: 600; font-size: 25px; letter-spacing: -.02em; margin: 6px 0 3px; }
.stat-pill .k { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .7; font-weight: 600; }

/* ---- Segmented toggle ---- */
.segment { border-radius: 15px; background: #e9eef7; border-color: transparent; box-shadow: inset 0 1px 2px rgba(11, 26, 44, .06); }
.segment button.active { color: var(--ink); }

/* ---- List rows ---- */
.rec-row { border-radius: 16px; padding: 14px 16px; border-color: var(--border); box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset; }
.rec-row:hover { border-color: rgba(10, 132, 255, .35); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.rec-avatar { border-radius: 50%; width: 42px; height: 42px; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, var(--ink-3), var(--ink)); box-shadow: 0 6px 12px -6px rgba(11, 26, 44, .6); }
.rec-title { font-weight: 700; letter-spacing: -.005em; }
.rec-amount { font-family: var(--serif); font-weight: 600; font-size: 17px; color: var(--ink); letter-spacing: -.01em; }
.rec-amount-sub { color: #c2261f; font-weight: 600; }

/* ---- Status badges ---- */
.badge { text-transform: capitalize; letter-spacing: .01em; padding: 4px 11px 4px 9px; }
.badge.sent { background: #e5f2ff; color: #0a66cc; }
.badge.paid { background: #e5f6ec; color: #0f8a4b; }
.badge.partially_paid { background: #fdf1de; color: #b45309; }
.badge.overdue { background: #fdebea; color: #c2261f; }

/* ---- Dashboard stat tiles ---- */
.stat { border-radius: 18px; }
.stat::before { width: 0; }
.stat .n { font-family: var(--serif); font-weight: 600; font-size: 28px; letter-spacing: -.02em; }
.stat .l { text-transform: uppercase; letter-spacing: .12em; font-size: 10.5px; font-weight: 700; color: var(--muted-2); }

/* ---- Tables ---- */
th { text-transform: uppercase; letter-spacing: .1em; font-size: 10.5px; color: var(--muted-2); font-weight: 700; }
tbody tr:hover td { background: #f6f9ff; }

/* ---- Totals blocks inside forms ---- */
.totals .grand { font-family: var(--serif); }

/* ---- Modals ---- */
.modal-backdrop { background: rgba(8, 18, 34, .55); backdrop-filter: blur(6px); }
.modal { border-radius: 22px; box-shadow: var(--shadow-lg); }

/* ---- Desktop sidebar: dark navy rail ---- */
@media (min-width: 900px) and (pointer: fine) {
  main { max-width: 1160px; }
  .sidebar {
    margin: 12px 0 12px 12px; padding: 16px 12px; border-radius: 22px; border-right: 0;
    height: calc(100vh - 57px - 24px); top: 69px;
    background: radial-gradient(260px 200px at 100% 0, rgba(10, 132, 255, .28), transparent 62%), linear-gradient(180deg, var(--ink), #0e2038);
    box-shadow: 0 30px 50px -30px rgba(11, 26, 44, .8);
  }
  .sidebar-group-title { color: #6f86ab; letter-spacing: .16em; font-size: 10px; }
  .sidebar button { color: #a9bbd8; border-radius: 12px; }
  .sidebar button:hover { background: rgba(255, 255, 255, .07); color: #fff; }
  .sidebar button.active { background: rgba(10, 132, 255, .2); color: #fff; box-shadow: 0 0 0 1px rgba(107, 182, 255, .35) inset; }
  .sidebar .sidebar-logout { border-top-color: rgba(255, 255, 255, .1); }
  .sidebar-group.sidebar-logout button { color: #ff8a8f; }
}

/* ---- Phone: floating dark tab bar + gradient FAB ---- */
@media (max-width: 899px), (pointer: coarse) {
  .bottom-nav {
    left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); border: 0; border-radius: 24px; padding: 0;
    background: rgba(11, 26, 44, .94); box-shadow: 0 24px 40px -16px rgba(11, 26, 44, .7), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  }
  .bottom-nav button { color: #8da3c4; padding: 11px 2px 9px; }
  .bottom-nav button.active { color: #fff; }
  .bottom-nav button.active .icon-wrap { background: rgba(10, 132, 255, .28); box-shadow: 0 0 0 1px rgba(107, 182, 255, .4) inset; }
  main { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
  .fab { bottom: calc(86px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(135deg, #1a8bff, var(--ink-3)); box-shadow: 0 18px 30px -10px rgba(10, 80, 180, .7), 0 0 0 1px rgba(255, 255, 255, .2) inset; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---- "More options" / Menu sheets: roomier rows with a chevron ---- */
.more-sheet-list button { position: relative; padding: 14px 34px 14px 10px; border-radius: 14px; }
.more-sheet-list button::after { content: "›"; position: absolute; right: 12px; top: 50%; transform: translateY(-52%); font-size: 20px; color: var(--muted-2); font-weight: 400; }
.more-sheet-list button.danger-text::after { color: var(--bad); }
.menu-group-title { letter-spacing: .16em; font-size: 10px; }
