/* =====================================================================
   FYS Team Invoice  |  shared styles
   ===================================================================== */
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/pjs-400.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/pjs-500.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/pjs-600.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/pjs-700.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-style: normal; font-weight: 800; font-display: swap; src: url("../fonts/pjs-800.woff2") format("woff2"); }

:root {
  --navy-950: #040a1c;
  --navy-900: #081331;
  --navy-800: #0e1d48;
  --navy-700: #16296a;
  --brand: #0a6cff;
  --brand-2: #00b2ff;
  --brand-grad: linear-gradient(135deg, #00b2ff 0%, #0a6cff 55%, #2f4bff 100%);
  --brand-soft: #eaf3ff;
  --ink: #0b1530;
  --ink-2: #33405e;
  --muted: #6b7690;
  --line: #e4e8f1;
  --line-2: #eef1f7;
  --bg: #f3f5fa;
  --card: #ffffff;
  --amber: #b45309;   --amber-bg: #fff6e5;  --amber-dot: #f59e0b;
  --blue: #1d4ed8;    --blue-bg: #eaf1ff;   --blue-dot: #3b82f6;
  --green: #047857;   --green-bg: #e7f8f0;  --green-dot: #10b981;
  --teal: #0f766e;    --teal-bg: #e3f6f4;   --teal-dot: #14b8a6;
  --red: #b91c1c;     --red-bg: #fdecec;    --red-dot: #ef4444;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 21, 48, .06);
  --shadow: 0 1px 2px rgba(11, 21, 48, .05), 0 8px 24px -8px rgba(11, 21, 48, .12);
  --shadow-lg: 0 24px 60px -12px rgba(4, 10, 28, .35);
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 14.5px; cursor: pointer; white-space: nowrap;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease, opacity .2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 6px 18px -6px rgba(10, 108, 255, .55); }
.btn-primary:hover:not(:disabled) { box-shadow: 0 10px 24px -8px rgba(10, 108, 255, .7); }
.btn-dark { background: var(--navy-900); color: #fff; }
.btn-dark:hover:not(:disabled) { background: var(--navy-800); }
.btn-success { background: linear-gradient(135deg, #12c48b, #0a9f6f); color: #fff; box-shadow: 0 6px 18px -6px rgba(16, 185, 129, .55); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--ink); }
.btn-outline:hover:not(:disabled) { border-color: #c9d1e2; background: #fafbfe; }
.btn-danger { background: #fff; border-color: #f3c1c1; color: var(--red); }
.btn-danger:hover:not(:disabled) { background: var(--red-bg); }
.btn-ghost { background: transparent; color: var(--ink-2); }
.btn-ghost:hover:not(:disabled) { background: rgba(11, 21, 48, .05); }
.btn-ghost-light { background: rgba(255, 255, 255, .08); color: #fff; border-color: rgba(255, 255, 255, .16); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, .14); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13.5px; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
  display: inline-grid; place-items: center; cursor: pointer; color: var(--ink-2); position: relative;
  transition: background .15s, border-color .15s;
}
.icon-btn:hover { background: #f7f9fc; border-color: #cfd6e4; }
.icon-btn svg { width: 18px; height: 18px; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .35); border-top-color: #fff;
  animation: spin .8s linear infinite;
}
.spinner.dark { border-color: rgba(11, 21, 48, .15); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Form fields ---------- */
.field { display: flex; flex-direction: column; gap: 7px; }
.label { font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 6px; }
.label .opt { font-weight: 500; color: var(--muted); }
.hint { font-size: 12.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 46px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--line); background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.input:hover, .select:hover, .textarea:hover { border-color: #cdd5e5; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(10, 108, 255, .12); }
.input.invalid { border-color: var(--red-dot); box-shadow: 0 0 0 4px rgba(239, 68, 68, .1); }
.input-icon { position: relative; }
.input-icon > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.input-icon > .input { padding-left: 42px; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 38px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b7690' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.amount-wrap { position: relative; }
.amount-wrap .cur { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 12.5px; font-weight: 700; color: var(--muted); pointer-events: none; }
.amount-wrap .input { padding-left: 50px; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap; line-height: 1.3;
}
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.amber { color: var(--amber); background: var(--amber-bg); }
.pill.amber::before { background: var(--amber-dot); }
.pill.blue  { color: var(--blue);  background: var(--blue-bg); }
.pill.blue::before { background: var(--blue-dot); }
.pill.green { color: var(--green); background: var(--green-bg); }
.pill.green::before { background: var(--green-dot); }
.pill.teal  { color: var(--teal);  background: var(--teal-bg); }
.pill.teal::before { background: var(--teal-dot); }
.pill.red   { color: var(--red);   background: var(--red-bg); }
.pill.red::before { background: var(--red-dot); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; z-index: 1000; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px;
  background: var(--navy-900); color: #fff; box-shadow: var(--shadow-lg); font-size: 14px;
  animation: toastIn .25s ease;
}
.toast svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.toast.success svg { color: #34d399; }
.toast.error svg { color: #f87171; }
.toast.info svg { color: #60a5fa; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Month picker ---------- */
.mp-trigger {
  width: 100%; height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; text-align: left;
  transition: border-color .15s, box-shadow .15s;
}
.mp-trigger:hover { border-color: #cdd5e5; }
.mp-trigger:focus-visible, .mp-trigger[aria-expanded="true"] { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(10, 108, 255, .12); }
.mp-trigger svg { width: 18px; height: 18px; color: var(--brand); flex: none; }
.mp-trigger .mp-value { flex: 1; font-weight: 600; }
.mp-trigger .mp-value.placeholder { color: var(--muted); font-weight: 500; }
.mp-trigger .chev { color: var(--muted); }
.mp-trigger.compact { height: 38px; border-radius: 10px; font-size: 13.5px; width: auto; min-width: 170px; }
.mp-pop {
  position: fixed; z-index: 900; width: 300px; background: #fff; border-radius: 18px;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: 14px; animation: popIn .16s ease;
}
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.mp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.mp-year { font-weight: 700; font-size: 16px; letter-spacing: .2px; }
.mp-nav { width: 34px; height: 34px; border-radius: 10px; border: 0; background: #f2f5fa; display: grid; place-items: center; cursor: pointer; color: var(--ink-2); }
.mp-nav:hover:not(:disabled) { background: #e7ecf5; }
.mp-nav:disabled { opacity: .35; cursor: not-allowed; }
.mp-nav svg { width: 16px; height: 16px; }
.mp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mp-month {
  height: 46px; border-radius: 12px; border: 1px solid transparent; background: transparent; cursor: pointer;
  font-weight: 600; font-size: 14px; color: var(--ink); position: relative; transition: background .12s;
}
.mp-month:hover:not(:disabled) { background: var(--brand-soft); }
.mp-month:focus-visible { outline: none; border-color: var(--brand); }
.mp-month.today::after { content: ""; position: absolute; bottom: 7px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--brand); }
.mp-month.selected { background: var(--brand-grad); color: #fff; box-shadow: 0 6px 16px -6px rgba(10, 108, 255, .6); }
.mp-month.selected::after { background: #fff; }
.mp-month:disabled { color: #c3c9d6; cursor: not-allowed; }
.mp-foot { display: flex; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.mp-chip { flex: 1; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.mp-chip:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 800; background: rgba(4, 10, 28, .55); backdrop-filter: blur(4px);
  display: grid; place-items: center; padding: 16px; animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { width: 100%; max-width: 480px; background: #fff; border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden; animation: popIn .2s ease; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 0; }
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-body { padding: 18px 22px 22px; overflow: auto; }

/* ---------- Timeline (shared) ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tl-item { position: relative; display: flex; gap: 14px; padding-bottom: 20px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: var(--line); border-radius: 2px; }
.tl-item.done:not(:last-child)::before { background: #9fd9c3; }
.tl-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: #f1f4f9; color: #9aa4b8; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.tl-icon svg { width: 16px; height: 16px; }
.tl-item.done .tl-icon { background: var(--green-bg); color: var(--green); box-shadow: 0 0 0 1px #bfe8d6; }
.tl-item.current .tl-icon { background: var(--amber-bg); color: var(--amber); box-shadow: 0 0 0 1px #f6d9a3; }
.tl-item.rejected .tl-icon { background: var(--red-bg); color: var(--red); box-shadow: 0 0 0 1px #f3c1c1; }
.tl-item.paid .tl-icon { background: var(--teal-bg); color: var(--teal); box-shadow: 0 0 0 1px #a9e3dc; }
.tl-body { padding-top: 4px; min-width: 0; flex: 1; }
.tl-title { font-weight: 700; font-size: 14px; }
.tl-meta { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.tl-comment { margin-top: 8px; padding: 10px 12px; background: #f6f8fc; border-radius: 10px; font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; word-break: break-word; border-left: 3px solid var(--line); }
.tl-item.rejected .tl-comment { background: #fff6f6; border-left-color: var(--red-dot); }

/* ---------- Brand bits ---------- */
.logo { height: 40px; width: auto; align-self: flex-start; object-fit: contain; }
.logo-sm { height: 32px; }

/* =====================================================================
   SUBMISSION PAGE
   ===================================================================== */
.page-submit { min-height: 100vh; display: flex; flex-direction: column; }
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(0, 178, 255, .28), transparent 60%),
    radial-gradient(700px 380px at 0% 110%, rgba(47, 75, 255, .30), transparent 60%),
    linear-gradient(160deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  padding: 0 0 120px;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: linear-gradient(to bottom, #000 30%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent);
}
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 22px 0; gap: 12px; }
.hero-copy { padding-top: 34px; max-width: 640px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: #8fd3ff; background: rgba(0, 178, 255, .12); border: 1px solid rgba(0, 178, 255, .25); padding: 5px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(28px, 4.2vw, 42px); line-height: 1.12; letter-spacing: -.8px; margin: 16px 0 10px; font-weight: 800; }
.hero h1 .grad { background: linear-gradient(90deg, #5fd0ff, #3d8bff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: #b6c2df; font-size: 16px; margin: 0; }

.submit-main { margin-top: -84px; padding-bottom: 60px; flex: 1; }
.submit-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
.card { background: var(--card); border-radius: 22px; box-shadow: var(--shadow); border: 1px solid rgba(228, 232, 241, .7); }

.stepper { display: flex; gap: 6px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.stepper::-webkit-scrollbar { display: none; }
.step-chip { display: flex; align-items: center; gap: 9px; padding: 6px 12px 6px 6px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; flex: none; border: 0; background: none; cursor: default; }
.step-chip .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #eef1f7; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.step-chip .n svg { width: 14px; height: 14px; }
.step-chip.active { color: var(--ink); background: var(--brand-soft); }
.step-chip.active .n { background: var(--brand-grad); color: #fff; }
.step-chip.done { color: var(--ink-2); cursor: pointer; }
.step-chip.done .n { background: var(--green-bg); color: var(--green); }
.step-sep { flex: none; width: 18px; align-self: center; height: 2px; background: var(--line); border-radius: 2px; }

.step { padding: 28px; animation: stepIn .28s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.step-head { margin-bottom: 22px; }
.step-head h2 { margin: 0 0 4px; font-size: 21px; letter-spacing: -.3px; }
.step-head p { margin: 0; color: var(--muted); }
.step-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 28px; border-top: 1px solid var(--line-2); background: #fbfcfe; border-radius: 0 0 22px 22px; }
.step-actions .spacer { flex: 1; }

.names-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 16px; max-height: 420px; overflow: auto; padding: 2px; }
.name-tile {
  display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s, background .15s; position: relative;
}
.name-tile:hover { border-color: #bcd3ff; background: #fbfdff; }
.name-tile:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(10, 108, 255, .14); border-color: var(--brand); }
.name-tile.selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.name-tile .nm { font-weight: 600; font-size: 14.5px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.name-tile .check { margin-left: auto; width: 20px; height: 20px; border-radius: 50%; background: var(--brand); color: #fff; display: none; place-items: center; flex: none; }
.name-tile .check svg { width: 12px; height: 12px; }
.name-tile.selected .check { display: grid; }
.avatar {
  width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center;
  font-weight: 700; font-size: 13.5px; color: #fff; letter-spacing: .3px; background: var(--brand-grad);
}
.avatar.c1 { background: linear-gradient(135deg, #00b2ff, #0a6cff); }
.avatar.c2 { background: linear-gradient(135deg, #7c5cff, #4b3bff); }
.avatar.c3 { background: linear-gradient(135deg, #12c48b, #0a8f6f); }
.avatar.c4 { background: linear-gradient(135deg, #ff9f43, #f2600c); }
.avatar.c5 { background: linear-gradient(135deg, #ff5c8a, #d61f69); }
.avatar.c6 { background: linear-gradient(135deg, #1e2b5c, #0e1d48); }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
.empty svg { width: 34px; height: 34px; color: #b8c1d4; margin: 0 auto 8px; }

.row-2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; gap: 12px; }
.section-title h3 { margin: 0; font-size: 15px; }
.section-title .hint { margin: 0; }

.lines { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.lines-head, .line-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 180px 40px; gap: 10px; align-items: center; padding: 10px 12px; }
.lines-head { background: #f8f9fc; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; border-bottom: 1px solid var(--line); }
.line-row + .line-row { border-top: 1px solid var(--line-2); }
.line-row .idx { font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: center; }
.line-row .input { height: 42px; }
.line-remove { width: 36px; height: 36px; border: 0; background: none; border-radius: 9px; color: #a3abbd; cursor: pointer; display: grid; place-items: center; }
.line-remove:hover { background: var(--red-bg); color: var(--red); }
.line-remove svg { width: 17px; height: 17px; }
.lines-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; background: #fbfcfe; border-top: 1px solid var(--line); }
.add-line { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--brand); font-weight: 600; cursor: pointer; padding: 6px 8px; border-radius: 8px; font-size: 14px; }
.add-line:hover { background: var(--brand-soft); }
.add-line svg { width: 16px; height: 16px; }
.total { display: flex; align-items: baseline; gap: 10px; }
.total .t-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.total .t-val { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.lines-empty { padding: 22px 16px; text-align: center; color: var(--muted); font-size: 14px; }

.or-divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; margin: 24px 0 18px; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.dropzone {
  border: 1.5px dashed #c6d0e3; border-radius: 16px; padding: 30px 18px; text-align: center; cursor: pointer;
  background: linear-gradient(180deg, #fbfcff, #f6f8fd); transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.drag { border-color: var(--brand); background: var(--brand-soft); }
.dropzone:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(10, 108, 255, .12); }
.dz-icon { width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center; background: #fff; box-shadow: var(--shadow); color: var(--brand); }
.dz-icon svg { width: 24px; height: 24px; }
.dz-title { font-weight: 700; }
.dz-title span { color: var(--brand); }
.dz-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-top: 16px; }
.file-card { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.file-thumb { aspect-ratio: 4 / 3; background: #f1f4f9; display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb svg { width: 30px; height: 30px; }
.file-meta { padding: 8px 10px; font-size: 12px; }
.file-meta .fn { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.file-meta .fs { color: var(--muted); }
.file-remove { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: rgba(4, 10, 28, .65); color: #fff; display: grid; place-items: center; cursor: pointer; }
.file-remove:hover { background: var(--red-dot); }
.file-remove svg { width: 14px; height: 14px; }
.file-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(10, 108, 255, .15); }
.file-progress i { display: block; height: 100%; width: 0; background: var(--brand-grad); transition: width .3s; }
.char-count { text-align: right; font-size: 12px; color: var(--muted); }

.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.review-box { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.review-box .k { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.review-box .v { font-weight: 700; margin-top: 4px; font-size: 15.5px; word-break: break-word; }
.review-box.full { grid-column: 1 / -1; }
.review-table { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 14px; }
.review-table td { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.review-table td:last-child { text-align: right; font-weight: 600; white-space: nowrap; padding-left: 12px; }
.review-table tr:last-child td { border-bottom: 0; }
.review-table tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; font-weight: 800; padding-top: 10px; }
.notice { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--blue-bg); color: #1e3a8a; font-size: 13.5px; align-items: flex-start; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.notice.warn { background: var(--amber-bg); color: #7c3d06; }
.notice.error { background: var(--red-bg); color: #7f1d1d; }
.notice.success { background: var(--green-bg); color: #064e3b; }

.summary { position: sticky; top: 20px; padding: 22px; }
.summary h4 { margin: 0 0 16px; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.sum-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.sum-row:last-of-type { border-bottom: 0; }
.sum-row .k { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.sum-row .k svg { width: 16px; height: 16px; }
.sum-row .v { font-weight: 700; text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sum-total { margin-top: 14px; padding: 16px; border-radius: 14px; background: linear-gradient(160deg, var(--navy-900), var(--navy-700)); color: #fff; }
.sum-total .k { font-size: 12px; color: #a8b6d9; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.sum-total .v { font-size: 26px; font-weight: 800; letter-spacing: -.5px; margin-top: 2px; }
.flow { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.flow-item { display: flex; gap: 10px; align-items: center; font-size: 13px; color: var(--ink-2); padding: 5px 0; }
.flow-item .d { width: 22px; height: 22px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }

.success { padding: 50px 28px 40px; text-align: center; }
.success-badge { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #12c48b, #0a9f6f); box-shadow: 0 0 0 10px rgba(16, 185, 129, .12), 0 14px 30px -10px rgba(16, 185, 129, .7); animation: pop .45s cubic-bezier(.2, 1.4, .4, 1); }
.success-badge svg { width: 36px; height: 36px; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
.success h2 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.4px; }
.success p { color: var(--muted); margin: 0 auto; max-width: 460px; }
.ref-box { display: inline-flex; align-items: center; gap: 10px; margin: 22px 0 8px; padding: 10px 10px 10px 18px; border-radius: 14px; background: #f4f7fc; border: 1px solid var(--line); }
.ref-box code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 18px; font-weight: 700; letter-spacing: 1px; color: var(--ink); }
.success-actions { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

.status-result { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.status-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.status-head .t { font-weight: 700; }
.status-head .s { font-size: 13px; color: var(--muted); }

.site-foot { text-align: center; color: var(--muted); font-size: 12.5px; padding: 0 16px 28px; }

.loading-block { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--muted); }

@media (max-width: 960px) {
  .submit-grid { grid-template-columns: minmax(0, 1fr); }
  .summary { display: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar { padding: 16px 0; }
  .logo { height: 34px; }
  .hero { padding-bottom: 100px; }
  .hero-copy { padding-top: 18px; }
  .hero p { font-size: 15px; }
  .step { padding: 22px 18px; }
  .step-actions { padding: 14px 18px; }
  .stepper { padding: 14px 16px; }
  .step-chip .lbl { display: none; }
  .step-chip.active .lbl { display: inline; }
  .row-2 { grid-template-columns: 1fr; }
  .lines-head { display: none; }
  .line-row { grid-template-columns: minmax(0, 1fr) 40px; grid-template-areas: "desc rm" "amt amt"; row-gap: 8px; }
  .line-row .idx { display: none; }
  .line-row .l-desc { grid-area: desc; }
  .line-row .l-amt { grid-area: amt; }
  .line-row .line-remove { grid-area: rm; }
  .review-grid { grid-template-columns: 1fr; }
  .names-grid { grid-template-columns: 1fr; max-height: none; }
  .btn-hide-sm { display: none; }
  .ref-box code { font-size: 15px; }
}

/* =====================================================================
   ADMIN
   ===================================================================== */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: #fff; }
.login-brand {
  position: relative; overflow: hidden; color: #fff; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between;
  background:
    radial-gradient(700px 400px at 100% 0%, rgba(0, 178, 255, .30), transparent 60%),
    radial-gradient(600px 400px at 0% 100%, rgba(47, 75, 255, .35), transparent 60%),
    linear-gradient(160deg, var(--navy-950), var(--navy-800));
}
.login-brand h2 { font-size: clamp(26px, 3vw, 36px); line-height: 1.15; letter-spacing: -.6px; margin: 0 0 14px; font-weight: 800; max-width: 460px; }
.login-brand p { color: #b6c2df; max-width: 420px; margin: 0; }
.login-steps { display: grid; gap: 12px; margin-top: 30px; max-width: 420px; }
.login-step { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09); }
.login-step .n { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(0, 178, 255, .16); color: #7fd4ff; font-weight: 800; flex: none; }
.login-step b { display: block; font-size: 14.5px; }
.login-step span { font-size: 13px; color: #a8b6d9; }
.login-form-wrap { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.login-card { width: 100%; max-width: 400px; padding: 34px; }
.login-card h1 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.4px; }
.login-card .sub { color: var(--muted); margin: 0 0 26px; }
.login-card form { display: grid; gap: 16px; }
.pw-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 8px; display: grid; place-items: center; }
.pw-toggle:hover { background: #f1f4f9; }
.pw-toggle svg { width: 18px; height: 18px; }

.app { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; color: #c9d3ee;
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900) 60%, var(--navy-800));
}
.sidebar .logo { margin: 4px 8px 28px; height: 38px; }
.nav { display: grid; gap: 4px; }
.nav-label { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #6d7ca6; padding: 0 12px; margin: 6px 0 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; color: #c9d3ee; font-weight: 600; font-size: 14px; border: 0; background: none; cursor: pointer; text-align: left; width: 100%; }
.nav-item svg { width: 19px; height: 19px; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.nav-item.active { background: linear-gradient(90deg, rgba(0, 178, 255, .2), rgba(10, 108, 255, .12)); color: #fff; box-shadow: inset 2px 0 0 #2ab8ff; }
.nav-item .count { margin-left: auto; font-size: 11.5px; font-weight: 700; background: rgba(255, 255, 255, .1); color: #fff; padding: 1px 8px; border-radius: 999px; }
.nav-item .count.hot { background: #f59e0b; color: #1d1200; }
.side-foot { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
.me { display: flex; gap: 11px; align-items: center; padding: 8px; }
.me .avatar { width: 38px; height: 38px; }
.me .who { min-width: 0; flex: 1; }
.me .who b { display: block; color: #fff; font-size: 14px; }
.me .who span { font-size: 12px; color: #8fa0c9; }
.me .icon-btn { background: transparent; border-color: rgba(255, 255, 255, .12); color: #c9d3ee; }
.me .icon-btn:hover { background: rgba(255, 255, 255, .08); }

.main { min-width: 0; display: flex; flex-direction: column; }
.main-top { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 12px; padding: 16px 28px; background: rgba(243, 245, 250, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.main-top h1 { font-size: 20px; margin: 0; letter-spacing: -.3px; flex: 1; min-width: 0; }
.main-top .menu-btn { display: none; }
.content { padding: 24px 28px 48px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.greet { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.greet h2 { margin: 0; font-size: 24px; letter-spacing: -.4px; }
.greet p { margin: 4px 0 0; color: var(--muted); }
.role-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.role-badge svg { width: 15px; height: 15px; color: var(--brand); }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 18px; border-radius: 18px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; text-align: left; width: 100%; }
.kpi:hover { border-color: #c8d3ea; box-shadow: var(--shadow); transform: translateY(-1px); }
.kpi.highlight { border-color: #f6d9a3; background: linear-gradient(180deg, #fffaf0, #fff); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; }
.kpi-ico svg { width: 19px; height: 19px; }
.kpi-ico.amber { background: var(--amber-bg); color: var(--amber); }
.kpi-ico.blue { background: var(--blue-bg); color: var(--blue); }
.kpi-ico.green { background: var(--green-bg); color: var(--green); }
.kpi-ico.red { background: var(--red-bg); color: var(--red); }
.kpi-tag { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: #f59e0b; color: #1d1200; }
.kpi-val { font-size: 30px; font-weight: 800; letter-spacing: -.8px; margin-top: 12px; line-height: 1; }
.kpi-lbl { font-size: 13.5px; color: var(--muted); margin-top: 6px; font-weight: 600; }
.kpi-sub { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-sm); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.panel-head h3 { margin: 0; font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.panel-head h3 .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-dot); box-shadow: 0 0 0 4px rgba(16, 185, 129, .15); }
.panel-head .hint { margin: 0; }

.decisions { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 16px 20px 20px; }
.decision { display: flex; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; text-align: left; width: 100%; transition: border-color .15s, box-shadow .15s; }
.decision:hover { border-color: #c8d3ea; box-shadow: var(--shadow); }
.decision.new { border-color: #bcd3ff; background: linear-gradient(180deg, #f6f9ff, #fff); }
.decision .di { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.decision .di svg { width: 17px; height: 17px; }
.decision .di.ok { background: var(--green-bg); color: var(--green); }
.decision .di.no { background: var(--red-bg); color: var(--red); }
.decision .di.pay { background: var(--teal-bg); color: var(--teal); }
.decision .dt { font-weight: 700; font-size: 13.5px; }
.decision .ds { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.decision .dc { font-size: 12.5px; color: var(--ink-2); margin-top: 6px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.new-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-left: 6px; vertical-align: middle; }

.toolbar { display: flex; gap: 10px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.tabs { display: flex; gap: 4px; padding: 4px; background: #f1f4f9; border-radius: 12px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0; background: none; padding: 7px 12px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; white-space: nowrap; display: flex; gap: 7px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.tab .c { font-size: 11.5px; background: #e3e8f2; color: var(--ink-2); padding: 0 7px; border-radius: 999px; line-height: 18px; }
.tab.active .c { background: var(--brand-soft); color: var(--brand); }
.toolbar .grow { flex: 1; }
.search { position: relative; min-width: 200px; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search .input { height: 38px; border-radius: 10px; padding-left: 34px; font-size: 13.5px; }

.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; padding: 11px 20px; background: #fafbfd; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 14px 20px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.data tbody tr { cursor: pointer; transition: background .12s; }
table.data tbody tr:hover { background: #f8faff; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .right { text-align: right; }
.cell-member { display: flex; align-items: center; gap: 11px; min-width: 180px; }
.cell-member .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 12.5px; }
.cell-member b { display: block; font-size: 14px; }
.cell-member div > span { font-size: 12px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.amount { font-weight: 700; white-space: nowrap; }
.progress-dots { display: flex; align-items: center; gap: 4px; }
.pd { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: #f1f4f9; color: #9aa4b8; position: relative; }
.pd.ok { background: var(--green-bg); color: var(--green); }
.pd.no { background: var(--red-bg); color: var(--red); }
.pd.wait { background: var(--amber-bg); color: var(--amber); }
.pd.paid { background: var(--teal-bg); color: var(--teal); }
.pd-line { width: 10px; height: 2px; background: var(--line); border-radius: 2px; }
.pd-line.ok { background: #9fd9c3; }

.notif-wrap { position: relative; }
.badge-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 999px; background: var(--red-dot); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.notif-pop { position: absolute; right: 0; top: calc(100% + 10px); width: 360px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); z-index: 200; overflow: hidden; animation: popIn .15s ease; }
.notif-pop .np-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.notif-pop .np-head b { font-size: 14.5px; }
.notif-pop .np-list { max-height: 380px; overflow: auto; }
.np-item { display: flex; gap: 12px; padding: 12px 16px; border: 0; background: none; width: 100%; text-align: left; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.np-item:hover { background: #f8faff; }
.np-item.unread { background: #f5f9ff; }
.np-item .di { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.np-item .di svg { width: 16px; height: 16px; }
.np-item .di.ok { background: var(--green-bg); color: var(--green); }
.np-item .di.no { background: var(--red-bg); color: var(--red); }
.np-item .di.new { background: var(--blue-bg); color: var(--blue); }
.np-item .di.pay { background: var(--teal-bg); color: var(--teal); }
.np-item .t { font-size: 13.5px; font-weight: 600; }
.np-item .s { font-size: 12px; color: var(--muted); }

.drawer-backdrop { position: fixed; inset: 0; z-index: 600; background: rgba(4, 10, 28, .45); backdrop-filter: blur(2px); animation: fadeIn .2s ease; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 601; width: min(620px, 100vw); background: #fff; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slideIn .26s cubic-bezier(.2, .8, .2, 1); }
@keyframes slideIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 20px 24px; border-bottom: 1px solid var(--line-2); display: flex; gap: 14px; align-items: flex-start; }
.drawer-head .avatar { width: 46px; height: 46px; border-radius: 14px; font-size: 15px; }
.drawer-head .ttl { flex: 1; min-width: 0; }
.drawer-head h3 { margin: 0; font-size: 19px; letter-spacing: -.3px; }
.drawer-head .meta { font-size: 13px; color: var(--muted); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.drawer-head .meta code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 600; color: var(--ink-2); }
.drawer-body { flex: 1; overflow: auto; padding: 22px 24px; display: grid; gap: 22px; align-content: start; }
.drawer-foot { border-top: 1px solid var(--line); padding: 16px 24px; background: #fbfcfe; display: grid; gap: 12px; }
.drawer-foot .actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.d-section h4 { margin: 0 0 10px; font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); }
.d-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.d-stat { padding: 12px 14px; border-radius: 12px; background: #f7f9fc; border: 1px solid var(--line-2); }
.d-stat .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.d-stat .v { font-weight: 800; font-size: 16px; margin-top: 2px; }
.d-link { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); word-break: break-all; font-size: 14px; }
.d-link svg { width: 18px; height: 18px; flex: none; color: var(--brand); }
.d-notes { padding: 12px 14px; border-radius: 12px; background: #f7f9fc; white-space: pre-wrap; word-break: break-word; font-size: 14px; color: var(--ink-2); }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.att { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; background: #fff; padding: 0; text-align: left; transition: border-color .15s, box-shadow .15s; }
.att:hover { border-color: var(--brand); box-shadow: var(--shadow); }
.att .file-thumb { aspect-ratio: 4 / 3; }
.att .fn { font-size: 12px; padding: 7px 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }

.lightbox { position: fixed; inset: 0; z-index: 950; background: rgba(4, 10, 28, .92); display: grid; place-items: center; padding: 60px 16px 16px; animation: fadeIn .2s; }
.lightbox img { max-width: min(1200px, 100%); max-height: calc(100vh - 90px); border-radius: 10px; box-shadow: var(--shadow-lg); }
.lightbox .lb-bar { position: absolute; top: 14px; left: 16px; right: 16px; display: flex; justify-content: space-between; align-items: center; color: #fff; gap: 12px; }
.lightbox .lb-bar .fn { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lightbox .icon-btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .2); color: #fff; }

.team-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; }
.team-form { padding: 20px; display: grid; gap: 14px; }
.team-list .tm { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line-2); }
.team-list .tm:last-child { border-bottom: 0; }
.team-list .tm .nm { flex: 1; min-width: 0; }
.team-list .tm .nm b { display: block; font-size: 14px; }
.team-list .tm .nm span { font-size: 12.5px; color: var(--muted); }
.team-list .tm.inactive { opacity: .55; }
.switch { position: relative; width: 40px; height: 23px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch .tr { position: absolute; inset: 0; border-radius: 999px; background: #d5dbe7; cursor: pointer; transition: background .2s; }
.switch .tr::after { content: ""; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + .tr { background: var(--green-dot); }
.switch input:checked + .tr::after { transform: translateX(17px); }
.switch input:focus-visible + .tr { box-shadow: 0 0 0 4px rgba(10, 108, 255, .2); }

.denied { min-height: 100vh; display: grid; place-items: center; padding: 24px; text-align: center; }

@media (max-width: 1180px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .team-layout { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { padding: 28px 24px; }
  .login-brand .login-steps, .login-brand .lb-foot { display: none; }
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 700; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .main-top .menu-btn { display: inline-grid; }
  .main-top { padding: 12px 16px; }
  .content { padding: 18px 16px 40px; }
  .hide-md { display: none !important; }
}
@media (max-width: 640px) {
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-val { font-size: 24px; }
  .toolbar { padding: 12px 14px; }
  .search { min-width: 0; flex: 1 1 100%; }
  table.data th, table.data td { padding: 12px 14px; }
  .hide-sm { display: none !important; }
  .d-stats { grid-template-columns: 1fr 1fr; }
  .drawer-head, .drawer-body, .drawer-foot { padding-left: 16px; padding-right: 16px; }
  .decisions { padding: 14px; }
  .login-card { padding: 26px 20px; }
  .drawer-foot .actions .btn { flex: 1 1 auto; }
}
