/* The AkountFly look: values taken from the product's own design system (frontend/src/index.css and components/ui). */

@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2191, U+2193, U+2212; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-500-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2191, U+2193, U+2212; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-ext-500-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2191, U+2193, U+2212; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-700-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2191, U+2193, U+2212; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-ext-700-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-800-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2122, U+2191, U+2193, U+2212; }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url(fonts/plus-jakarta-sans-latin-ext-800-normal.woff2) format("woff2"); unicode-range: U+0100-02BA, U+1E00-1EFF, U+20A0-20C0, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }

:root {
  --blue: #283f8b;
  --blue-dark: #1e3270;
  --blue-soft: #e8ebf3;
  --green: #108981;
  --green-dark: #0d7069;
  --green-soft: #e6f4f1;
  --teal: #5fc6c5;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f6;
  --bg: #f8fafc;
  --card: #ffffff;
  --red: #dc2626;
  --amber: #d97706;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.02), 0 4px 12px rgba(0, 0, 0, 0.02);
  --sidebar: 244px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0; color: var(--ink); background: var(--bg);
  font: 14px/1.55 "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  letter-spacing: -0.01em; -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(16, 137, 129, 0.15); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { letter-spacing: -0.02em; margin: 0; }
h1 { font-size: 24px; font-weight: 700; line-height: 1.25; }
h2 { font-size: 15px; font-weight: 700; }
p { margin: 0 0 8px; }
small, .muted { color: var(--muted); }
small { font-size: 12px; }
.icon { width: 18px; height: 18px; flex: none; }

/* ---------- shell ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); display: flex; flex-direction: column;
  background: var(--card); border-right: 1px solid var(--line); z-index: 20;
}
.brand { padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.brand img { width: 128px; height: auto; display: block; }
.brand span { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--muted); font-weight: 500; }
.brand em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--green); border: 1px solid rgba(16, 137, 129, 0.3); border-radius: 6px; padding: 0 6px; }
.nav { flex: 1; overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav a, .logout button {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 12px;
  color: var(--muted); font-weight: 500; transition: background 0.15s, color 0.15s;
}
.nav a:hover { background: #f1f5f9; color: var(--ink); text-decoration: none; }
.nav a.on { background: var(--blue); color: #fff; box-shadow: 0 10px 15px -3px rgba(40, 63, 139, 0.25); }
.nav .grow { flex: 1; }
.count { min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 99px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; }
.logout { padding: 10px 12px; border-top: 1px solid var(--line); margin: 0; }
.logout button { width: 100%; border: 0; background: none; box-shadow: none; justify-content: flex-start; height: auto; }
.logout button:hover { background: #fef2f2; color: var(--red); }
.content { margin-left: var(--sidebar); min-width: 0; }
main { max-width: 1120px; margin: 0 auto; padding: 28px 32px 56px; }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 20px; }
.page-head > div:first-child { flex: 1; min-width: 240px; }
.page-head p { color: var(--muted); margin: 4px 0 0; }
.section { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 30px 0 12px; scroll-margin-top: 16px; }
.section h2 { flex: 1; }

/* ---------- notices ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; margin-bottom: 12px; border: 1px solid; }
.alert .icon { margin-top: 1px; }
.alert pre { margin: 0 0 8px; }
.alert.warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert.bad { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.alert.ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.alert.info { background: var(--blue-soft); border-color: #cdd4ea; color: var(--blue); }
.alert a { color: inherit; font-weight: 700; text-decoration: underline; }
.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 12px; background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.flash.error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 12px; }
.card > :last-child { margin-bottom: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head .who { flex: 1; min-width: 160px; line-height: 1.35; }
.card-head .who b, .who > a { display: block; font-weight: 700; color: var(--ink); }
details > summary { cursor: pointer; font-weight: 600; color: var(--ink-2); list-style: none; display: flex; align-items: center; gap: 8px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "+"; color: var(--green); font-weight: 800; width: 12px; }
details[open] > summary::before { content: "–"; }
details[open] > summary { margin-bottom: 12px; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.tile {
  display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); border-left: 5px solid var(--tone, var(--blue));
  transition: transform 0.15s, box-shadow 0.15s;
}
a.tile:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06); }
.tile .chip { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--tone, var(--blue)); color: #fff; }
.tile b { display: block; font-size: 24px; font-weight: 800; line-height: 1.15; }
.tile span { color: var(--muted); font-size: 12.5px; font-weight: 500; }
.tone-blue { --tone: var(--blue); }
.tone-green { --tone: var(--green); }
.tone-amber { --tone: #f59e0b; }
.tone-red { --tone: #ef4444; }
.tone-gray { --tone: #94a3b8; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.metric { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; box-shadow: var(--shadow); color: var(--ink); }
a.metric:hover { text-decoration: none; border-color: #cbd5e1; }
.metric span { display: block; color: var(--muted); font-size: 12.5px; }
.metric b { display: block; font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric b i { font-style: normal; font-size: 14px; color: var(--faint); font-weight: 600; }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 6px; border: 0; border-radius: 99px; overflow: hidden; background: var(--line-soft); display: block; margin-top: 8px; }
progress::-webkit-progress-bar { background: var(--line-soft); }
progress::-webkit-progress-value { background: var(--green); border-radius: 99px; }
progress::-moz-progress-bar { background: var(--green); }

.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px; align-items: start; }

/* ---------- badges, avatars ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 6px; border: 1px solid var(--line); background: #f8fafc; color: var(--ink-2); font-size: 11.5px; font-weight: 600; line-height: 1.7; white-space: nowrap; }
a.badge:hover { text-decoration: none; border-color: #cbd5e1; }
.badge.green { background: #ecfdf5; border-color: #d1fae5; color: #047857; }
.badge.amber { background: #fffbeb; border-color: #fdeab3; color: #b45309; }
.badge.red { background: #fef2f2; border-color: #fee2e2; color: #b91c1c; }
.badge.blue { background: #eff6ff; border-color: #dbeafe; color: #1d4ed8; }
.badge.navy { background: var(--blue-soft); border-color: transparent; color: var(--blue); }
.badge.big { font-size: 13px; padding: 4px 12px; }
.badge b { font-weight: 800; }
.avatar { width: 38px; height: 38px; border-radius: 10px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--blue), #3d58ad); color: #fff; font-weight: 700; font-size: 13px; }
.avatar.small { width: 30px; height: 30px; border-radius: 8px; font-size: 11px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person a { font-weight: 600; color: var(--ink); display: block; }

/* ---------- forms ---------- */
input, select, textarea, button { font: inherit; color: inherit; letter-spacing: inherit; }
input, select, textarea {
  background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; height: 38px; max-width: 100%;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03); transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { height: auto; padding: 10px 12px; width: 100%; line-height: 1.6; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #cbd5e1; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(16, 137, 129, 0.15); }
::placeholder { color: var(--faint); }
input.wide { width: 100%; }
input[type="number"] { width: 100px; }
input.short { width: 90px; }
input[type="checkbox"] { width: 16px; height: 16px; padding: 0; accent-color: var(--green); box-shadow: none; }
input[type="file"] { padding: 6px 8px; height: auto; }
select { padding-right: 8px; }
label, .label { display: block; margin: 0 0 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px 18px; margin-bottom: 14px; align-items: end; }
.fields > div > input:not([type="number"]), .fields > div > select, .fields > div > textarea { width: 100%; }
.fields .full { grid-column: 1 / -1; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
label.check { display: inline-flex; gap: 8px; align-items: center; margin: 0; padding: 7px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; font-weight: 500; font-size: 13px; cursor: pointer; }
label.check:has(input:checked) { border-color: rgba(16, 137, 129, 0.4); background: var(--green-soft); }
label.check input.short { height: 28px; width: 70px; }

button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 15px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink-2); font-size: 13.5px; font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); white-space: nowrap; transition: background 0.15s, border-color 0.15s, transform 0.1s;
}
button:hover, .btn:hover { background: var(--bg); border-color: #cbd5e1; text-decoration: none; }
button:active { transform: scale(0.98); }
button:disabled { opacity: 0.5; pointer-events: none; }
button .icon, .btn .icon { width: 16px; height: 16px; }
button.primary { background: var(--green); border-color: var(--green); color: #fff; }
button.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
button.navy { background: var(--blue); border-color: var(--blue); color: #fff; }
button.navy:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
button.danger { color: var(--red); }
button.danger:hover { background: #fef2f2; border-color: #fecaca; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 0; }
.row.top { margin: 0 0 12px; }
.row .grow { flex: 1; min-width: 200px; }
form { margin: 0; }
form.inline { display: inline-flex; }

/* ---------- tables ---------- */
.scroll { overflow-x: auto; }
.table { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); overflow-x: auto; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; padding: 10px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: #fbfcfd; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 16px; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfcfe; }
td.nowrap { white-space: nowrap; }
.card .table { box-shadow: none; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.mono, code { font-family: "JetBrains Mono", ui-monospace, Menlo, monospace; font-size: 11.5px; line-height: 1.5; overflow-wrap: anywhere; letter-spacing: 0; }
textarea.mono { font-size: 12px; }

/* ---------- content blocks ---------- */
pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 6px 0; font: inherit; }
.prose { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink-2); max-width: 80ch; }
.bubble { max-width: 78ch; border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; background: #f1f5f9; border: 1px solid var(--line-soft); }
.bubble.us { background: var(--green-soft); border-color: #d3ebe6; margin-left: auto; }
.bubble pre { margin: 4px 0 0; }
.note { display: grid; gap: 2px; padding: 10px 14px; margin-bottom: 14px; border-left: 3px solid var(--teal); background: #f6fbfb; border-radius: 0 8px 8px 0; font-size: 13px; color: var(--ink-2); }
.facts { margin: 0; display: grid; gap: 10px; }
.facts dt { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); }
.facts dd { margin: 1px 0 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.empty { text-align: center; padding: 34px 20px; border: 1px dashed #cbd5e1; border-radius: 12px; color: var(--muted); background: #fff; margin-bottom: 12px; }
.empty .icon { width: 26px; height: 26px; color: var(--teal); margin-bottom: 6px; }
.empty b { display: block; color: var(--ink-2); }
.date { width: 58px; flex: none; text-align: center; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.date span { display: block; background: var(--blue); color: #fff; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 0; }
.date b { display: block; font-size: 20px; font-weight: 800; padding: 2px 0 3px; }
.tabs { display: inline-flex; gap: 2px; padding: 3px; background: #f1f5f9; border-radius: 10px; }
.tabs a { padding: 4px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 12.5px; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08); }
.jump { position: sticky; top: 0; z-index: 10; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0; background: var(--bg); }
.savebar { position: sticky; bottom: 0; z-index: 10; display: flex; align-items: center; gap: 12px; padding: 12px 0; background: linear-gradient(to top, var(--bg) 75%, rgba(248, 250, 252, 0)); }

/* ---------- sign in ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.hero { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.hero img { width: 170px; height: auto; margin-bottom: 14px; }
.hero h1 { font-size: 32px; max-width: 14ch; }
.hero p { color: rgba(255, 255, 255, 0.75); font-size: 15px; }
.hero ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; color: rgba(255, 255, 255, 0.9); }
.hero li { display: flex; gap: 12px; align-items: center; }
.hero li .icon { width: 22px; height: 22px; padding: 5px; border-radius: 99px; background: rgba(255, 255, 255, 0.14); }
.signin { display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.signin > div { width: 100%; max-width: 360px; }
.signin h2 { font-size: 21px; margin-bottom: 4px; }
.signin input { height: 40px; margin-bottom: 14px; }
.signin button { width: 100%; height: 40px; }
.public { max-width: 420px; margin: 14vh auto; padding: 0 20px; text-align: center; }
.public img { width: 150px; height: auto; margin-bottom: 22px; }
.public .card { padding: 28px; }

/* ---------- small screens ---------- */
@media (max-width: 960px) {
  .sidebar { position: static; width: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; }
  .brand span { margin: 0; }
  .nav { flex-direction: row; overflow-x: auto; padding: 8px 12px; }
  .nav a { white-space: nowrap; gap: 8px; }
  .logout { border: 0; padding: 0 12px 8px; }
  .logout button { width: auto; padding: 4px 12px; }
  .content { margin-left: 0; }
  main { padding: 18px 16px 48px; }
  .cols, .split { grid-template-columns: 1fr; }
  .hero { padding: 32px 24px; }
  .hero ul { display: none; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
