/* ECUFAST File Service — shares the ecufast.com.tr visual identity */
:root {
  --ink: #111317;
  --carbon: #171b20;
  --carbon-2: #1e232a;
  --graphite: #232930;
  --muted: #66707b;
  --muted-2: #8b939c;
  --line: #e4e7ea;
  --line-2: #eef0f2;
  --paper: #f3f5f7;
  --white: #ffffff;
  --red: #ed1b2f;
  --red-dark: #a70f1d;
  --red-soft: #fdecee;
  --green: #1f8f72;
  --green-soft: #e6f4ef;
  --amber: #b7791f;
  --amber-soft: #fdf3e1;
  --blue: #2563c9;
  --blue-soft: #e8effb;
  --violet: #6d4ad1;
  --violet-soft: #efeafb;
  --champagne: #d7b56d;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(17, 19, 23, .05);
  --shadow: 0 10px 30px rgba(17, 19, 23, .08);
  --shadow-lg: 0 24px 70px rgba(17, 19, 23, .18);
  --sidebar: 260px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: "Rajdhani", Inter, ui-sans-serif, system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
p { margin: 0; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 15px; height: 15px; }
.icon-lg { width: 22px; height: 22px; }
.mono { font-family: var(--mono); font-size: .92em; }
.num { font-family: var(--display); font-weight: 700; letter-spacing: .01em; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.strong { font-weight: 700; }
.text-red { color: var(--red); }
.text-green { color: var(--green); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--carbon);
  color: #c9ced4;
  border-right: 1px solid rgba(255,255,255,.04);
  z-index: 40;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 22px 22px 18px; }
.sidebar-brand img { width: 132px; height: auto; }
.sidebar-brand .tag {
  font-family: var(--display); font-weight: 700; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
  color: #fff; background: rgba(237,27,47,.16); border: 1px solid rgba(237,27,47,.35);
  padding: 2px 7px; border-radius: 5px;
}
.sidebar-nav { flex: 1; overflow-y: auto; padding: 6px 12px 18px; }
.nav-group { margin-top: 18px; }
.nav-group:first-child { margin-top: 4px; }
.nav-label { padding: 0 10px 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #6d757e; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; margin: 1px 0; border-radius: 7px;
  font-weight: 600; font-size: 13.5px; color: #c9ced4;
  transition: background .15s, color .15s;
}
.nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-link.active { background: rgba(237,27,47,.12); color: #fff; }
.nav-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--red); }
.nav-link.active .icon { color: var(--red); }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; display: inline-grid; place-items: center; border-radius: 10px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; }
.nav-count.soft { background: rgba(255,255,255,.1); color: #e3e6e9; }
.sidebar-foot { padding: 14px 16px 18px; border-top: 1px solid rgba(255,255,255,.06); }
.sidebar-cta {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  padding: 11px 14px; border-radius: 8px; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; font-weight: 800;
  box-shadow: 0 10px 24px rgba(237,27,47,.25);
}
.sidebar-cta:hover { filter: brightness(1.05); }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 14px;
  min-height: 66px; padding: 0 clamp(16px, 3vw, 34px);
  background: rgba(255,255,255,.88); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(17,19,23,.07);
}
.topbar-title { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: .01em; min-width: 0; }
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn.menu-toggle { display: none; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; border: 1px solid var(--line); background: var(--white); white-space: nowrap;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted-2); }
.status-pill.open .status-dot { background: #22b07d; box-shadow: 0 0 0 4px rgba(34,176,125,.15); }
.status-pill.closed .status-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(237,27,47,.12); }
.credit-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border-radius: 999px;
  background: var(--ink); color: #fff; font-weight: 700; white-space: nowrap;
}
.credit-pill .num { font-size: 17px; line-height: 1; }
.credit-pill .plus { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--red); }
.credit-pill.negative .num { color: #ffb4bb; }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 38px; height: 38px;
  border-radius: 9px; border: 1px solid var(--line); background: var(--white); cursor: pointer; color: var(--graphite);
}
.icon-btn:hover { border-color: #cfd4d9; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); border: 2px solid #fff; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); cursor: pointer; }
.avatar { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--carbon); color: #fff; font-weight: 800; font-size: 12px; flex: none; }
.user-chip .who { line-height: 1.15; text-align: left; }
.user-chip .who b { display: block; font-size: 13px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .who span { font-size: 11.5px; color: var(--muted); }
.content { padding: clamp(16px, 3vw, 32px); max-width: 1440px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-family: var(--display); font-size: clamp(24px, 3vw, 30px); font-weight: 700; }
.page-head p { color: var(--muted); margin-top: 4px; }
.eyebrow { display: inline-block; color: var(--red); font-size: 11.5px; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 4px; }
.sidebar-backdrop { display: none; }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; z-index: 50;
  background: var(--white); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg);
  padding: 6px; display: none;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 7px;
  border: 0; background: none; cursor: pointer; font-weight: 600; text-align: left; font-size: 13.5px;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--paper); }
.dropdown-menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.notif-menu { width: min(380px, 92vw); padding: 0; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 800; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { display: flex !important; gap: 10px; padding: 11px 14px !important; border-radius: 0 !important; border-bottom: 1px solid var(--line-2) !important; align-items: flex-start !important; }
.notif-item.unread { background: #fff7f8; }
.notif-item .t { font-weight: 700; font-size: 13px; }
.notif-item .b { color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.notif-item .d { color: var(--muted-2); font-size: 11.5px; margin-top: 2px; }

/* ---------- Cards & layout ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card-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; }
.card-head h2, .card-head h3 { font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 9px; }
.card-head h2 .icon, .card-head h3 .icon { color: var(--red); }
.card-body { padding: 20px; }
.card-body.tight { padding: 0; }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.end { justify-content: flex-end; }
.mt { margin-top: 18px; }
.mt-sm { margin-top: 10px; }
.mb { margin-bottom: 18px; }
.divider { border: 0; border-top: 1px solid var(--line-2); margin: 16px 0; }

/* ---------- Stats ---------- */
.stat { position: relative; padding: 18px 20px; overflow: hidden; }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.stat-value { font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1.1; margin-top: 6px; }
.stat-sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.stat-icon { position: absolute; right: 16px; top: 16px; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--paper); color: var(--graphite); }
.stat.accent { background: linear-gradient(150deg, var(--carbon), #262c34); color: #fff; border-color: transparent; }
.stat.accent .stat-label, .stat.accent .stat-sub { color: #aab1b9; }
.stat.accent .stat-icon { background: rgba(237,27,47,.18); color: #ff5a68; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--white); font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: transform .12s, box-shadow .15s, background .15s, border-color .15s;
}
.btn:hover { border-color: #cdd2d7; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: #fff; border-color: transparent; box-shadow: 0 8px 20px rgba(237,27,47,.22); }
.btn-primary:hover { filter: brightness(1.06); border-color: transparent; }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-dark:hover { background: var(--graphite); }
.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-danger { background: var(--white); color: var(--red); border-color: #f5c2c7; }
.btn-danger:hover { background: var(--red-soft); border-color: #f0a9b0; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--paper); border-color: transparent; }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .5; pointer-events: none; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; white-space: nowrap; background: var(--paper); color: var(--graphite); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.plain::before { display: none; }
.badge-success { background: var(--green-soft); color: var(--green); }
.badge-warning { background: var(--amber-soft); color: var(--amber); }
.badge-danger { background: var(--red-soft); color: var(--red-dark); }
.badge-info { background: var(--blue-soft); color: var(--blue); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-muted { background: var(--line-2); color: var(--muted); }
.badge-dark { background: var(--ink); color: #fff; }
.badge-express { background: #111317; color: #ffd166; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.chip-red { background: var(--red-soft); border-color: #f6c8cd; color: var(--red-dark); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; padding: 11px 16px; font-size: 11.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); background: #fafbfc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr:hover td { background: #fbfbfc; }
.table .right, .right { text-align: right; }
.table .ref { font-family: var(--mono); font-weight: 700; font-size: 12.5px; }
.cell-title { font-weight: 700; }
.cell-sub { color: var(--muted); font-size: 12.5px; }
.amount-pos { color: var(--green); font-weight: 800; }
.amount-neg { color: var(--red-dark); font-weight: 800; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 12.5px; font-weight: 800; color: var(--graphite); }
.label .req { color: var(--red); }
.hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border-radius: 8px;
  border: 1px solid #d9dde1; background: var(--white); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { min-height: 96px; resize: vertical; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2366707b' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(17,19,23,.08); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--red); }
.input-sm { min-height: 34px; padding: 5px 10px; font-size: 13px; }
.error { color: var(--red-dark); font-size: 12.5px; font-weight: 600; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; font-weight: 600; }
.check input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--red); flex: none; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 22px; background: #cfd4d9; position: relative; cursor: pointer; transition: background .15s; flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked { background: var(--green); }
.switch input:checked::after { transform: translateX(16px); }
.input-group { display: flex; }
.input-group .input { border-radius: 8px 0 0 8px; }
.input-group .addon { display: grid; place-items: center; padding: 0 12px; border: 1px solid #d9dde1; border-left: 0; border-radius: 0 8px 8px 0; background: var(--paper); font-weight: 700; color: var(--muted); white-space: nowrap; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters .input, .filters .select { width: auto; min-width: 150px; min-height: 38px; }
.filters .search { flex: 1; min-width: 200px; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }

/* ---------- Alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 13px 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); font-weight: 500; }
.alert .icon { margin-top: 1px; }
.alert-success { background: var(--green-soft); border-color: #bfe3d6; color: #135c49; }
.alert-danger { background: var(--red-soft); border-color: #f6c8cd; color: #8a0d19; }
.alert-warning { background: var(--amber-soft); border-color: #f2dcb2; color: #7a4f0f; }
.alert-info { background: var(--blue-soft); border-color: #c9d9f3; color: #1d4a95; }
.alert-dark { background: var(--carbon); border-color: var(--carbon); color: #e8eaed; }
.alert b { font-weight: 800; }
.flash-stack { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tab { padding: 10px 14px; font-weight: 700; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); border-bottom-color: var(--red); }
.segmented { display: inline-flex; padding: 3px; border-radius: 9px; background: var(--line-2); gap: 2px; flex-wrap: wrap; }
.segmented a { padding: 6px 12px; border-radius: 7px; font-weight: 700; font-size: 12.5px; color: var(--muted); }
.segmented a.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }

/* ---------- Definition list ---------- */
.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 9px 14px; font-size: 13.5px; }
.dl dt { color: var(--muted); font-weight: 600; }
.dl dd { margin: 0; font-weight: 600; word-break: break-word; }

/* ---------- Empty ---------- */
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty .icon { width: 36px; height: 36px; margin: 0 auto 10px; color: #b5bbc2; }
.empty h3 { color: var(--ink); font-size: 16px; margin-bottom: 4px; }

/* ---------- File request wizard ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 22px; }
.step { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; background: var(--white); border: 1px solid var(--line); font-weight: 700; color: var(--muted); }
.step .n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); font-family: var(--display); font-size: 15px; flex: none; }
.step.done { color: var(--ink); }
.step.done .n { background: var(--ink); color: #fff; }
.wizard-section { scroll-margin-top: 90px; }
.option-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.option-tile { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 13px 14px 13px 44px; border-radius: 10px; border: 1px solid var(--line); background: var(--white); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.option-tile:hover { border-color: #c9ced3; }
.option-tile input { position: absolute; left: 14px; top: 15px; width: 18px; height: 18px; accent-color: var(--red); margin: 0; }
.option-tile .name { font-weight: 800; line-height: 1.3; }
.option-tile .desc { color: var(--muted); font-size: 12px; line-height: 1.4; }
.option-tile .price { font-family: var(--display); font-weight: 700; font-size: 16px; color: var(--ink); }
.option-tile .price small { font-family: var(--font); font-size: 11px; color: var(--muted); font-weight: 700; }
.option-tile.checked { border-color: var(--red); background: #fff8f8; box-shadow: 0 0 0 3px rgba(237,27,47,.08); }
.option-tile.emission .name::after { content: "OFF-ROAD"; margin-left: 6px; font-size: 9.5px; letter-spacing: .08em; padding: 1px 5px; border-radius: 4px; background: var(--ink); color: #ffd166; vertical-align: 2px; }
.option-cat { margin: 16px 0 8px; font-size: 11.5px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.option-cat:first-child { margin-top: 0; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 30px 20px; text-align: center; border: 2px dashed #cdd2d7; border-radius: 12px; background: #fafbfc; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--red); background: #fff7f8; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone .icon { width: 34px; height: 34px; color: var(--red); }
.dropzone .dz-title { font-weight: 800; font-size: 15px; }
.dropzone .dz-file { display: none; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 8px; background: var(--ink); color: #fff; font-weight: 700; font-size: 13px; }
.dropzone.has-file .dz-file { display: inline-flex; }
.summary-card { position: sticky; top: 86px; }
.summary-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; font-size: 13.5px; }
.summary-line span:last-child { font-weight: 700; white-space: nowrap; }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 12px; margin-top: 8px; border-top: 1px dashed var(--line); }
.summary-total .num { font-size: 34px; }
.balance-meter { height: 8px; border-radius: 8px; background: var(--line-2); overflow: hidden; margin-top: 8px; }
.balance-meter span { display: block; height: 100%; background: var(--green); border-radius: 8px; }
.emission-box { border: 1px solid #f2dcb2; background: var(--amber-soft); border-radius: 10px; padding: 14px 16px; }

/* ---------- Request detail ---------- */
.req-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.req-hero h1 { font-family: var(--display); font-size: clamp(22px, 3vw, 30px); }
.req-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.progress-track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 18px; }
.progress-track div { position: relative; padding-top: 12px; font-size: 12px; font-weight: 700; color: var(--muted-2); }
.progress-track div::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 5px; border-radius: 5px; background: var(--line); }
.progress-track div.on { color: var(--ink); }
.progress-track div.on::before { background: var(--red); }
.progress-track div.done::before { background: var(--ink); }
.file-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.file-row:last-child { border-bottom: 0; }
.file-ico { width: 40px; height: 40px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--paper); color: var(--graphite); }
.file-ico.mod { background: var(--red-soft); color: var(--red); }
.file-ico.ok { background: var(--green-soft); color: var(--green); }
.file-row .grow { flex: 1; min-width: 0; }
.download-hero { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: 12px; background: linear-gradient(135deg, var(--carbon), #272d35); color: #fff; flex-wrap: wrap; }
.download-hero .icon-lg { color: #3bd59b; }
.download-hero .grow { flex: 1; min-width: 200px; }
.download-hero p { color: #aab1b9; font-size: 13px; }
.analysis { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.warn-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.warn-list li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; font-weight: 600; color: #8a0d19; }

/* ---------- Chat ---------- */
.chat { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; max-height: 560px; overflow-y: auto; background: #fafbfc; }
.msg { display: flex; gap: 10px; max-width: 86%; }
.msg .bubble { padding: 10px 13px; border-radius: 12px; background: var(--white); border: 1px solid var(--line); white-space: pre-wrap; word-break: break-word; }
.msg .meta { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.msg.mine .bubble { background: var(--ink); color: #f1f3f5; border-color: var(--ink); }
.msg.mine .meta { text-align: right; }
.msg.internal .bubble { background: #fff8e6; border-color: #f2dcb2; color: #5c3d0a; }
.msg.system { align-self: center; max-width: 100%; }
.msg.system .bubble { background: transparent; border: 0; padding: 2px 8px; color: var(--muted); font-size: 12.5px; font-weight: 600; text-align: center; }
.msg .attach { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 10px; border-radius: 7px; background: rgba(127,127,127,.12); font-weight: 700; font-size: 12.5px; }
.composer { padding: 14px 16px; border-top: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 10px; }
.composer .textarea { min-height: 70px; }

/* ---------- Pricing tiles ---------- */
.package-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.package { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.package:hover { border-color: #c9ced3; }
.package input { position: absolute; opacity: 0; }
.package.checked, .package:has(input:checked) { border-color: var(--red); box-shadow: 0 0 0 3px rgba(237,27,47,.1); }
.package .credits { font-family: var(--display); font-size: 32px; font-weight: 700; line-height: 1; }
.package .bonus { color: var(--green); font-weight: 800; font-size: 12.5px; }
.package .price { font-weight: 800; font-size: 16px; margin-top: 6px; }
.package .per { color: var(--muted); font-size: 12px; }
.package .flag { position: absolute; top: -10px; right: 12px; padding: 2px 8px; border-radius: 6px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; }
.iban { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: #fafbfc; flex-wrap: wrap; }
.iban .mono { font-size: 13.5px; font-weight: 700; letter-spacing: .02em; }

/* ---------- Charts ---------- */
.bars { display: flex; align-items: flex-end; gap: 4px; height: 180px; padding-top: 10px; }
.bars .bar { flex: 1; min-width: 4px; background: linear-gradient(180deg, var(--red), #c21326); border-radius: 4px 4px 0 0; position: relative; }
.bars .bar:hover { filter: brightness(1.15); }
.bars .bar.zero { background: var(--line); }
.bars-axis { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 11.5px; margin-top: 6px; }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; margin-bottom: 10px; }
.hbar .track { grid-column: 1 / -1; height: 7px; border-radius: 7px; background: var(--line-2); overflow: hidden; }
.hbar .track span { display: block; height: 100%; background: var(--ink); border-radius: 7px; }

/* ---------- Week editor ---------- */
.week-row { display: grid; grid-template-columns: 110px 1fr 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); }

/* ---------- Pagination ---------- */
.pagination { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; padding: 16px; }
.pagination a, .pagination span { min-width: 34px; height: 34px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--white); font-weight: 700; font-size: 13px; }
.pagination .active { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .disabled { opacity: .45; }

/* ---------- Modal ---------- */
dialog.modal { border: 0; padding: 0; border-radius: 14px; width: min(520px, calc(100vw - 28px)); box-shadow: var(--shadow-lg); }
dialog.modal::backdrop { background: rgba(17,19,23,.55); backdrop-filter: blur(2px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 16px; font-weight: 800; }
.modal-body { padding: 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line-2); background: #fafbfc; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-radius: 10px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-weight: 600; max-width: 380px; animation: toast-in .25s ease; }
.toast .icon { color: #3bd59b; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); background: var(--white); }
.auth-visual {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(28px, 4vw, 56px);
  background: radial-gradient(circle at 18% 12%, rgba(237,27,47,.28), transparent 42%), radial-gradient(circle at 90% 90%, rgba(215,181,109,.12), transparent 40%), linear-gradient(160deg, #0f1114, #1b2027 60%, #121519);
  color: #fff;
}
.auth-visual::after { content: ""; position: absolute; inset: 0; 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(180deg, transparent, #000 30%, #000 70%, transparent); pointer-events: none; }
.auth-visual > * { position: relative; z-index: 1; }
.auth-visual img { width: 190px; }
.auth-visual h2 { font-family: var(--display); font-size: clamp(32px, 4.2vw, 54px); line-height: 1.02; font-weight: 700; max-width: 560px; }
.auth-visual h2 em { font-style: normal; color: var(--red); }
.auth-visual .lead { color: #b8bec5; font-size: 15.5px; max-width: 480px; margin-top: 14px; }
.auth-features { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 560px; margin-top: 30px; }
.auth-feature { display: flex; gap: 10px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.auth-feature .icon { color: var(--red); margin-top: 2px; }
.auth-feature b { display: block; font-size: 13.5px; }
.auth-feature span { color: #9aa2ab; font-size: 12.5px; }
.auth-foot { color: #7c858e; font-size: 12.5px; display: flex; gap: 16px; flex-wrap: wrap; }
.auth-form { display: flex; flex-direction: column; justify-content: center; padding: clamp(28px, 5vw, 64px); }
.auth-box { width: 100%; max-width: 440px; margin: 0 auto; }
.auth-box h1 { font-family: var(--display); font-size: 32px; font-weight: 700; }
.auth-box > p { color: var(--muted); margin: 6px 0 24px; }
.auth-box.wide { max-width: 640px; }
.auth-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; gap: 10px; }
.lang-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--paper); }
.lang-switch a { padding: 4px 9px; border-radius: 6px; font-size: 12px; font-weight: 800; color: var(--muted); }
.lang-switch a.active { background: var(--white); color: var(--ink); box-shadow: var(--shadow-sm); }
.auth-mobile-logo { display: none; width: 140px; }

/* ---------- PDF-ish print ---------- */
@media print {
  .sidebar, .topbar, .no-print { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .summary-card { position: static; }
}
@media (max-width: 1024px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; transform: translateX(-100%); transition: transform .22s ease; }
  body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(17,19,23,.5); z-index: 35; }
  .icon-btn.menu-toggle { display: inline-grid; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-visual { display: none; }
  .auth-mobile-logo { display: block; }
}
@media (max-width: 760px) {
  .grid-2, .grid-3, .form-grid { grid-template-columns: minmax(0, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .topbar { gap: 8px; }
  .topbar-title { font-size: 18px; }
  .status-pill .label-text, .user-chip .who, .hide-sm { display: none; }
  .dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .dl dd { margin-bottom: 8px; }
  .week-row { grid-template-columns: 1fr 1fr; }
  .msg { max-width: 96%; }
  .stat-value { font-size: 28px; }
  .table th, .table td { padding: 10px 12px; }
}
@media (max-width: 420px) {
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .credit-pill .label-text { display: none; }
}

/* Canned reply picker */
.select-sm { padding-top: 6px; padding-bottom: 6px; font-size: 13px; min-height: 0; }

/* Log analysis */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.log-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.finding { border: 1px solid var(--line); border-left: 4px solid var(--muted-2); border-radius: 10px; padding: 10px 14px; }
.finding-critical { border-left-color: var(--red); background: var(--red-soft); }
.finding-warning { border-left-color: var(--amber); background: var(--amber-soft); }
.finding-info { border-left-color: var(--blue); }
.finding-good { border-left-color: var(--green); background: var(--green-soft); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: fs-spin .8s linear infinite; display: inline-block; }
@keyframes fs-spin { to { transform: rotate(360deg); } }
.lc-wrap { position: relative; }
.lc-canvas { width: 100%; height: 320px; display: block; touch-action: pan-y; }
.lc-canvas.small { height: 220px; }
.lc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.lc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12.5px; font-weight: 600; cursor: pointer; user-select: none; background: transparent; color: var(--muted); }
.lc-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); opacity: .35; }
.lc-chip.on { color: var(--ink); border-color: var(--c); }
.lc-chip.on i { opacity: 1; }
.lc-tip { position: absolute; pointer-events: none; background: var(--ink); color: #fff; font-size: 12px; padding: 8px 10px; border-radius: 8px; line-height: 1.5; white-space: nowrap; z-index: 2; display: none; }
.lc-tip b { font-weight: 700; }
.lc-title { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.lc-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
