/* eFlow FileShare — harbour ink, white workspace, one amber seal. */
:root {
  /* "Sunny": bright violet actions, sunshine highlights, a little coral and mint */
  --ink: #5146E5;
  --ink-2: #4338CA;
  --ink-3: #5B52EE;
  --ink-soft: #EEEDFE;
  --seal: #FFC93C;
  --seal-soft: #FFF4D1;
  --seal-ink: #8A5A00;
  --pop: #FF6F91;
  --pop-soft: #FFE8EE;
  --canvas: #F6F7FF;
  --paper: #FFFFFF;
  --text: #1D1B3A;
  --muted: #636282;
  --line: #E6E6F3;
  --line-2: #D5D4EA;
  --danger: #D9354F;
  --danger-soft: #FFE9EC;
  --ok: #129E83;
  --ok-soft: #DDF7F0;
  --info: #3D63DD;
  --info-soft: #E6EDFF;
  --radius: 14px;
  --radius-sm: 10px;
  --font: 'Nunito Sans', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Fredoka', 'Nunito Sans', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --shadow: 0 1px 2px rgba(29, 27, 58, .05), 0 10px 30px -14px rgba(81, 70, 229, .25);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--canvas); }
[lang="ar"] body, body:lang(ar) { font-family: 'IBM Plex Sans Arabic', var(--font); }
h1, h2, h3 { line-height: 1.2; margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: 0; }
h1 { font-size: 1.7rem; font-weight: 600; }
h2 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--ink-3); text-underline-offset: 2px; }
a:hover { color: var(--ink); }
img, svg { vertical-align: middle; }
.ic { flex: none; }
code, pre { font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace; font-size: .88em; }
pre.code { background: var(--canvas); border: 1px solid var(--line); padding: 12px 14px; border-radius: var(--radius-sm); overflow-x: auto; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 2px; border-radius: 4px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: -999px; top: 8px; background: var(--seal); color: #000; padding: 8px 12px; z-index: 99; border-radius: 6px; }
.skip:focus { inset-inline-start: 8px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hint { color: var(--muted); font-size: .85rem; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.text-warn { color: var(--danger); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline { display: inline; }
.hp { position: absolute; inset-inline-start: -9999px; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 38px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-2); background: var(--paper); color: var(--text);
  font: inherit; font-weight: 700; font-size: .93rem; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { border-color: var(--ink-3); color: var(--ink); background: var(--ink-soft); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--ink); border-color: var(--ink); color: #fff; box-shadow: 0 6px 16px -8px rgba(81, 70, 229, .7); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); color: #fff; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); background: var(--danger); color: #fff; }
.btn-ghost-danger { border-color: transparent; background: transparent; color: var(--danger); }
.btn-ghost-danger:hover { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: .85rem; }
.btn-lg { min-height: 48px; padding: 0 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn.is-current { background: var(--ok-soft); color: var(--ok); border-color: transparent; cursor: default; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: var(--radius-sm); border: 0; background: transparent; color: var(--muted); cursor: pointer; list-style: none; }
.icon-btn:hover { background: var(--ink-soft); color: var(--ink); }
.icon-btn::-webkit-details-marker { display: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--ink-3); font: inherit; text-decoration: underline; cursor: pointer; }

/* ----------------------------------------------------------------- forms */
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack.narrow { max-width: 420px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span { font-size: .87rem; font-weight: 600; color: var(--text); display: inline-flex; align-items: center; gap: 6px; }
.field-row { justify-content: space-between; }
.field-row a { font-weight: 500; font-size: .85rem; }
.field small { color: var(--muted); font-size: .8rem; }
.field .opt { font-style: normal; font-weight: 400; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search], input[type=date], select, textarea {
  width: 100%; min-height: 40px; height: 40px; padding: 8px 11px; font: inherit; color: var(--text);
  background: var(--paper); border: 1px solid var(--line-2); border-radius: var(--radius-sm);
}
textarea { resize: vertical; min-height: 64px; height: auto; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink-3); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink-3) 22%, transparent); }
input:disabled { background: var(--canvas); color: var(--muted); }
.select-sm { min-height: 32px; padding: 4px 8px; width: auto; font-size: .87rem; }
.code-input { font-size: 1.5rem; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: .92rem; }
.check input { margin-top: 3px; accent-color: var(--ink); width: 16px; height: 16px; }
.check span { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.radio-list { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.radio-list legend { font-weight: 600; font-size: .9rem; margin-bottom: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.more-opts { border-top: 1px solid var(--line); padding-top: 12px; }
.more-opts > summary { cursor: pointer; font-weight: 600; font-size: .9rem; color: var(--ink-3); margin-bottom: 4px; }
.more-opts[open] > summary { margin-bottom: 14px; }
.more-opts > .stack + .stack { margin-top: 18px; }
.seg { display: inline-flex; background: var(--canvas); border: 1px solid var(--line); border-radius: 8px; padding: 3px; gap: 3px; align-self: flex-start; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: .88rem; color: var(--muted); }
.seg input:checked + span { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg input:focus-visible + span { outline: 2px solid var(--seal); }

/* ---------------------------------------------------------------- alerts */
.alert { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: .92rem; border: 1px solid transparent; }
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 25%, transparent); }
.alert-error { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert-warn { background: var(--seal-soft); color: var(--seal-ink); border-color: color-mix(in srgb, var(--seal) 45%, transparent); }
.alert form { display: inline; }
.alert .link-btn, .alert a { color: inherit; font-weight: 600; }

/* ------------------------------------------------------------- app shell */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--paper); color: var(--text); border-inline-end: 1px solid var(--line); display: flex; flex-direction: column; padding: 18px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand a, a.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 1.12rem; }
.sidebar .brand a { padding: 2px 6px; }
.org-name { margin: 14px 6px 16px; font-size: .8rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 600; }
.sidebar nav a .ic { color: var(--muted); }
.sidebar nav a:hover { background: var(--canvas); }
.sidebar nav a[aria-current="page"] { background: var(--ink-soft); color: var(--ink); }
.sidebar nav a[aria-current="page"] .ic { color: var(--ink); }
.nav-sep { margin: 18px 12px 6px; font-size: .78rem; color: var(--muted); font-weight: 600; }

/* storage gauge — the band meter */
.gauge { margin-top: auto; padding: 14px 14px; border-radius: 14px; background: linear-gradient(135deg, var(--seal-soft), var(--pop-soft)); }
.gauge-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.gauge-band { font-family: var(--display); font-weight: 600; color: var(--text); font-size: .95rem; }
.gauge-num { font-size: .78rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.gauge-track { height: 10px; border-radius: 5px; background: rgba(255,255,255,.8); overflow: hidden; }
.gauge-track span { display: block; height: 100%; background: var(--ink); border-radius: 5px; }
.gauge-warn .gauge-track span { background: #F59E3D; }
.gauge-crit .gauge-track span { background: var(--danger); }
.gauge-cta { display: inline-block; margin-top: 10px; color: var(--ink); font-size: .85rem; font-weight: 700; }

.main-col { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 28px; border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.topbar-spacer { flex: 1; }
.nav-toggle { display: none; }
.content { padding: 26px 28px 60px; max-width: 1280px; width: 100%; }

/* dropdowns */
details.lang-picker, details.user-menu, details.row-menu { position: relative; }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.lang-picker summary, .user-menu summary { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; padding: 6px 9px; border-radius: 7px; color: var(--muted); font-size: .88rem; font-weight: 500; }
.lang-picker summary:hover, .user-menu summary:hover { background: var(--ink-soft); color: var(--ink); }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--seal); color: var(--text); font-weight: 700; font-size: .85rem; flex: none; }
.user-name { color: var(--text); font-weight: 600; }
.menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); min-width: 200px; background: var(--paper); border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow); padding: 5px; z-index: 30; display: flex; flex-direction: column; }
.menu a, .menu button { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 6px; color: var(--text); text-decoration: none; font: inherit; font-size: .9rem; cursor: pointer; text-align: start; }
.menu a:hover, .menu button:hover { background: var(--ink-soft); }
.menu a[aria-current="true"] { font-weight: 700; color: var(--ink); }
.menu .danger { color: var(--danger); }
.menu .danger:hover { background: var(--danger-soft); }
.menu form { margin: 0; }

/* page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin-top: 5px; }
.head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.crumbs { display: flex; gap: 6px; align-items: center; font-size: .85rem; color: var(--muted); margin-bottom: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.search { display: flex; align-items: center; gap: 6px; padding-inline-start: 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--paper); color: var(--muted); }
.search input { border: 0; min-height: 36px; padding-inline-start: 0; width: 200px; background: transparent; }
.search input:focus { box-shadow: none; }
.search:focus-within { border-color: var(--ink-3); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 9px 12px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; margin-bottom: -1px; display: inline-flex; gap: 5px; align-items: center; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--seal); }
.tabs .tab-clear { margin-inline-start: auto; font-weight: 500; }
.section-title { margin: 30px 0 14px; }

/* tables */
.table-wrap { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: start; font-weight: 600; font-size: .8rem; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: color-mix(in srgb, var(--canvas) 55%, var(--paper)); }
.table th a { color: inherit; text-decoration: none; }
.table th a:hover { color: var(--ink); }
.table th[aria-sort] a, .table th a[aria-sort] { color: var(--ink); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: color-mix(in srgb, var(--ink-soft) 45%, transparent); }
.table .num { text-align: end; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table .actions { text-align: end; white-space: nowrap; width: 1%; }
.table .actions > * { display: inline-flex; vertical-align: middle; }
.table .actions form { margin: 0; }
.row-dim td { opacity: .55; }
.name-cell { min-width: 220px; }
.item-name { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; background: none; border: 0; padding: 0; font: inherit; font-weight: 600; cursor: pointer; text-align: start; }
.item-name:hover .nm { color: var(--ink-3); text-decoration: underline; }
.nm { word-break: break-word; }
.sub { display: flex; gap: 6px; margin-top: 4px; padding-inline-start: 42px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.ftype { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; flex: none; background: var(--ink-soft); color: var(--ink-3); }
.ftype-folder { background: var(--seal-soft); color: var(--seal-ink); }
.ftype-pdf { background: #FBE6E1; color: #A63B22; }
.ftype-image { background: #E8E6FA; color: #4E44A8; }
.ftype-sheet { background: #E1F2E7; color: #2C7A4D; }
.ftype-doc { background: #E1ECF8; color: #2B5E95; }
.ftype-archive { background: #F2ECE0; color: #7B5B22; }
.ftype-media { background: #F7E4F0; color: #96306E; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 999px; font-size: .75rem; font-weight: 600; background: var(--canvas); color: var(--muted); text-decoration: none; border: 1px solid var(--line); }
.tag-lock { color: var(--seal-ink); background: var(--seal-soft); border-color: transparent; }
.tag-share { color: var(--info); background: var(--info-soft); border-color: transparent; }
.expiry { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px dashed transparent; padding: 3px 7px; margin-inline-start: -7px; border-radius: 6px; font: inherit; font-size: .88rem; color: var(--text); cursor: pointer; white-space: nowrap; }
.expiry:hover { border-color: var(--line-2); }
.expiry-soon { color: var(--danger); font-weight: 600; }
.expiry-never { color: var(--muted); }
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--canvas); color: var(--muted); }
.pill-active { background: var(--ok-soft); color: var(--ok); }
.pill-invited { background: var(--info-soft); color: var(--info); }
.pill-disabled, .pill-suspended, .pill-revoked { background: var(--danger-soft); color: var(--danger); }
.pill-expired, .pill-used_up, .pill-off { background: var(--canvas); color: var(--muted); }
.pill-role { background: var(--ink-soft); color: var(--ink); }
.pill-platform { background: var(--seal-soft); color: var(--seal-ink); margin-inline-start: 4px; padding: 3px 6px; }
.person { display: flex; gap: 10px; align-items: center; min-width: 200px; }
.person .avatar { background: var(--ink-soft); color: var(--ink); }
.event { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .82rem; font-weight: 600; white-space: nowrap; background: var(--canvas); color: var(--text); }
.event-warn { background: var(--danger-soft); color: var(--danger); }
.event-info { background: var(--info-soft); color: var(--info); }
.event-quiet { background: transparent; color: var(--muted); font-weight: 500; padding-inline: 0; }
.compact-check { align-self: center; font-size: .85rem; }
.audit-table .details { color: var(--muted); font-size: .85rem; max-width: 420px; word-break: break-word; }
.mono-ip { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .85rem; cursor: help; }
.pager { display: flex; gap: 14px; align-items: center; justify-content: center; margin-top: 18px; font-size: .9rem; }

/* empty states */
.empty { text-align: center; padding: 56px 20px; background: var(--paper); border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }
.empty h2 { color: var(--text); margin: 12px 0 6px; font-size: 1.05rem; }

/* upload panel */
.upload-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 18px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; }
.dropzone { border: 2px dashed var(--line-2); border-radius: 9px; padding: 26px 16px; text-align: center; cursor: pointer; color: var(--ink-3); transition: border-color .15s, background .15s; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dropzone:hover, .dropzone.is-over { border-color: var(--ink-3); background: var(--ink-soft); }
.dz-title { font-weight: 700; color: var(--text); }
.upload-options { display: flex; flex-direction: column; gap: 12px; justify-content: center; }
.field.compact > span { font-size: .82rem; }
.upload-list { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.upload-list:empty { display: none; }
.upload-list li { border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; }
.up-row { display: flex; justify-content: space-between; gap: 10px; font-size: .88rem; }
.up-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-meta { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.up-bar { height: 4px; background: var(--canvas); border-radius: 2px; margin-top: 7px; overflow: hidden; }
.up-bar span { display: block; height: 100%; width: 0; background: var(--ink-3); transition: width .25s; }
.is-done .up-bar span { background: var(--ok); }
.is-done .up-meta { color: var(--ok); }
.is-error .up-meta { color: var(--danger); white-space: normal; text-align: end; }
.is-error .up-bar span { background: var(--danger); }
.callout { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 16px; border-radius: var(--radius); background: var(--seal-soft); border: 1px solid color-mix(in srgb, var(--seal) 45%, transparent); margin-bottom: 18px; flex-wrap: wrap; }
.copy-row { display: flex; gap: 8px; flex: 1; min-width: 280px; max-width: 560px; }
.copy-row input { font-size: .85rem; }

/* dialogs */
.dialog { border: 0; border-radius: 14px; padding: 0; width: min(460px, calc(100vw - 32px)); background: var(--paper); color: var(--text); box-shadow: 0 30px 80px -20px rgba(4, 25, 29, .5); }
.dialog-wide { width: min(580px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(29, 27, 58, .42); backdrop-filter: blur(2px); }
.dialog > form { padding: 22px 22px 18px; }
.dialog h2 { display: flex; gap: 8px; align-items: center; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--canvas); border-radius: 7px; font-weight: 600; font-size: .9rem; align-self: flex-start; max-width: 100%; word-break: break-all; }
@media (prefers-reduced-motion: no-preference) {
  .dialog[open] { animation: rise .18s ease-out; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.985); } }
}

/* settings panels */
.settings { display: grid; gap: 18px; max-width: 760px; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.panel > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; }
.panel > header h2 { display: flex; gap: 8px; align-items: center; }
.panel > p { margin-bottom: 14px; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 14px; }
.filters .field { min-width: 150px; }
.filters .grow { flex: 1; min-width: 200px; }
.filter-actions { display: flex; gap: 8px; }

/* billing */
.usage-hero { display: grid; grid-template-columns: 1fr 1.2fr; gap: 28px; align-items: center; background: linear-gradient(120deg, var(--ink-soft), var(--seal-soft)); color: var(--text); border-radius: 20px; padding: 26px 28px; }
.usage-plan { display: inline-block; font-weight: 800; color: var(--ink); margin-bottom: 4px; }
.usage-big { font-family: var(--display); font-size: 2.3rem; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.usage-big span { font-family: var(--font); font-size: 1rem; font-weight: 500; color: var(--muted); }
.usage-hero .muted { color: var(--muted); margin: 6px 0 12px; }
.usage-pick { font-size: 1.6rem; }
.gauge-none .gauge-head { margin-bottom: 0; }
.usage-note { color: var(--seal-ink); font-weight: 700; margin-bottom: 12px; }
.meter-track { height: 14px; border-radius: 7px; background: rgba(255,255,255,.85); overflow: hidden; }
.meter-track span { display: block; height: 100%; background: var(--ink); border-radius: 7px; }
.usage-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0 0; }
.usage-facts dt { font-size: .78rem; color: var(--muted); }
.usage-facts dd { margin: 2px 0 0; font-weight: 800; color: var(--text); }
.bands { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.band { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 4px; }
.band h3 { font-size: 1rem; color: var(--muted); font-weight: 600; }
.band-size { font-family: var(--display); font-size: 1.9rem; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.band-price { color: var(--muted); font-size: .9rem; margin-bottom: 8px; }
.band-price strong { color: var(--text); font-size: 1.05rem; }
.band-list { list-style: none; padding: 0; margin: 4px 0 16px; display: flex; flex-direction: column; gap: 5px; font-size: .88rem; flex: 1; }
.band-list li::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); margin-inline-end: 8px; vertical-align: middle; }
/* rising bars: each band lights one more bar — the bands read as a scale */
.band-bar { height: 34px; display: flex; align-items: flex-end; gap: 5px; margin-bottom: 12px; }
.band-bar span { flex: 1; border-radius: 3px; background: var(--canvas); }
.band-bar span.on { background: var(--seal); }
.band-bar span.on:last-of-type { background: var(--pop); }
.band-current { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink), var(--shadow); }
.band-highlight { border-color: var(--seal); box-shadow: 0 0 0 3px var(--seal-soft); }
.band form { margin: 0; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 0 0 8px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat dt { font-size: .82rem; color: var(--muted); font-weight: 600; }
.stat dd { margin: 4px 0 2px; font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* platform admin */
.kv { display: grid; gap: 6px; margin: 14px 0; }
.kv div { display: flex; gap: 10px; font-size: .9rem; }
.kv dt { color: var(--muted); min-width: 120px; }
.kv dd { margin: 0; font-weight: 600; word-break: break-all; }
.checklist { margin: 8px 0 0; padding-inline-start: 18px; }
.panel .row { margin-top: 12px; }
.log-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: start; }
.log-list { display: flex; flex-direction: column; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; }
.log-list a { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 7px; text-decoration: none; color: var(--text); }
.log-list a:hover { background: var(--ink-soft); }
.log-list a[aria-current="page"] { background: var(--ink-soft); box-shadow: inset 3px 0 0 var(--seal); }
.log-view { min-width: 0; }
.log-lines { margin: 0; background: #1D1B3A; color: #E4E2FF; border-radius: var(--radius); padding: 14px; font-size: .8rem; line-height: 1.55; max-height: 70vh; overflow: auto; white-space: pre-wrap; word-break: break-word; }
.log-lines span { display: block; }
.log-lines .log-bad { color: #ff9b85; }
@media (max-width: 960px) { .log-layout { grid-template-columns: 1fr; } }

/* -------------------------------------------------------- auth / public */
.auth-shell { min-height: 100vh; display: flex; flex-direction: column; background:
  radial-gradient(1100px 500px at 100% -10%, color-mix(in srgb, var(--ink-soft) 90%, transparent), transparent 70%), var(--canvas); }
.auth-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; }
.auth-main { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 16px 60px; }
.auth-card { width: 100%; max-width: 420px; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 30px 30px 26px; box-shadow: var(--shadow); }
.wide .auth-card { max-width: 520px; }
.auth-card h1 { font-size: 1.45rem; margin-bottom: 6px; }
.auth-card .lede { color: var(--muted); margin-bottom: 20px; }
.auth-card > .alert:first-child { margin-top: 0; }
.auth-foot { margin-top: 18px; color: var(--muted); font-size: .92rem; }
.auth-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--seal-soft); color: var(--seal-ink); margin-bottom: 14px; }
.muted-ic { background: var(--canvas); color: var(--muted); }
.center-row { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: .9rem; flex-wrap: wrap; }
.public .auth-card { max-width: 480px; }
.from { color: var(--muted); font-size: .9rem; margin-bottom: 14px; }
.dl-file { display: flex; gap: 14px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; }
.dl-file .ftype { width: 46px; height: 46px; border-radius: 11px; }
.dl-name { font-size: 1.1rem !important; word-break: break-word; margin-bottom: 3px !important; }
.dl-message { margin: 0 0 16px; padding: 10px 14px; border-inline-start: 3px solid var(--seal); background: var(--canvas); border-radius: 0 8px 8px 0; white-space: pre-wrap; }
.secure-note { display: flex; gap: 6px; align-items: center; margin-top: 16px; font-size: .82rem; color: var(--muted); justify-content: center; }

/* ---------------------------------------------------------------- landing */
.landing { background: var(--paper); }
.land-top { display: flex; justify-content: space-between; align-items: center; padding: 18px 40px; max-width: 1200px; margin: 0 auto; gap: 16px; flex-wrap: wrap; }
.land-nav { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.land-nav > a:not(.btn) { color: var(--text); text-decoration: none; font-weight: 600; padding: 0 8px; }
.hero { max-width: 1200px; margin: 0 auto; padding: 56px 40px 64px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 4.6vw, 3.7rem); line-height: 1.04; color: var(--text); max-width: 16ch; }

.hero-lede { font-size: 1.15rem; color: var(--muted); margin: 20px 0 26px; max-width: 46ch; }
.hero .row + .muted { margin-top: 14px; }
.hero-demo { margin: 0; }
.demo-card { background: var(--paper); color: var(--text); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: 0 40px 80px -40px rgba(81, 70, 229, .45); display: flex; flex-direction: column; gap: 12px; }
.demo-file { display: flex; gap: 12px; align-items: center; background: var(--canvas); border-radius: 14px; padding: 12px; }
.demo-file strong { display: block; color: var(--text); }
.demo-file span { font-size: .85rem; color: var(--muted); }
.demo-line { display: flex; gap: 9px; align-items: center; font-size: .92rem; padding: 0 4px; }
.demo-fuse { background: var(--seal-soft); border-radius: 14px; padding: 12px; }
.demo-fuse-label { display: flex; gap: 8px; align-items: center; font-weight: 700; color: var(--seal-ink); margin-bottom: 9px; font-size: .92rem; }
.demo-fuse-track { display: block; height: 8px; border-radius: 4px; background: rgba(255,255,255,.9); overflow: hidden; }
.demo-fuse-track span { display: block; height: 100%; width: 64%; background: var(--seal); border-radius: 4px; transform-origin: left; }
[dir="rtl"] .demo-fuse-track span { transform-origin: right; margin-inline-start: auto; }
@media (prefers-reduced-motion: no-preference) {
  .demo-fuse-track span { animation: burn 2.4s cubic-bezier(.3,.7,.3,1) .3s both; }
  @keyframes burn { from { width: 100%; } to { width: 64%; } }
}
.demo-log { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); padding-top: 10px; font-variant-numeric: tabular-nums; }
.features { max-width: 1200px; margin: 0 auto; padding: 20px 40px 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px 40px; }
.features > div { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 20px; }
.features > div:nth-child(3n+1) .ic { color: var(--ink); }
.features > div:nth-child(3n+2) .ic { color: var(--pop); }
.features > div:nth-child(3n) .ic { color: var(--ok); }
.features .ic { color: var(--ink-3); }
.features h2 { font-size: 1.05rem; margin: 10px 0 6px; }
.features p { color: var(--muted); font-size: .95rem; }
.pricing { background: var(--canvas); padding: 56px 40px 64px; }
.pricing > * { max-width: 1120px; margin-inline: auto; }
.pricing > h2 { font-size: 1.9rem; letter-spacing: -0.02em; }
.pricing > .muted { margin-top: 8px; margin-bottom: 26px; }
.pricing .hint, .bands + .hint { margin-top: 16px; }
.land-foot { display: flex; justify-content: space-between; padding: 24px 40px; color: var(--muted); font-size: .85rem; max-width: 1200px; margin: 0 auto; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset-block: 0; inset-inline-start: 0; width: 264px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .nav-open .sidebar { transform: none; box-shadow: 0 0 0 100vmax rgba(29, 27, 58, .35); }
  .nav-toggle { display: inline-grid; }
  .topbar { padding: 8px 16px; }
  .content { padding: 20px 16px 48px; }
  .upload-panel { grid-template-columns: 1fr; }
  .usage-hero { grid-template-columns: 1fr; padding: 22px; }
  .hero { grid-template-columns: 1fr; padding: 32px 20px 40px; gap: 32px; }
  .features { grid-template-columns: 1fr 1fr; padding: 10px 20px 40px; }
  .land-top, .land-foot { padding-inline: 20px; }
  .pricing { padding: 40px 20px; }
}
@media (max-width: 640px) {
  body { font-size: 14.5px; }
  /* file list becomes stacked rows: name on top, size · expiry · actions below */
  .files-table thead { display: none; }
  .files-table tbody tr { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; border-bottom: 1px solid var(--line); padding: 6px 0; }
  .files-table tbody tr:last-child { border-bottom: 0; }
  .files-table td { border: 0; padding: 4px 12px; }
  .files-table td.name-cell { grid-column: 1 / -1; }
  .files-table td.num { text-align: start; color: var(--muted); padding-inline-start: 54px; }
  .files-table td.actions { grid-column: 4; }
  .files-table tr.is-folder td:not(.name-cell):not(.actions) { display: none; }
  .files-table tr.is-folder { grid-template-columns: 1fr auto; }
  .files-table tr.is-folder td.name-cell { grid-column: 1; }
  .files-table tr.is-folder td.actions { grid-column: 2; }
  .table tbody tr:hover td { background: none; }
  .hide-sm { display: none; }
  .user-name, .lang-picker summary span { display: none; }
  .page-head { align-items: stretch; }
  .head-actions { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
  .grid-2 { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .usage-facts { grid-template-columns: 1fr 1fr; }
  .auth-card { padding: 24px 20px; }
  .auth-top { padding: 14px 16px; }
  .actions .btn-sm span { display: none; }
  .name-cell { min-width: 160px; }
  .table td, .table th { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------------------------------------------------------------- Flo, the phoenix */
.mascot { display: block; max-width: 100%; height: auto; }
.mascot-oops { filter: saturate(.55) brightness(1.04); opacity: .85; }
.auth-mascot { display: flex; justify-content: center; margin: -10px 0 6px; }
.empty .mascot { margin: 0 auto 4px; }
.from-row { display: flex; align-items: center; gap: 6px; margin: -8px 0 10px; }
.from-row .from { margin: 0; }
.usage-flo { display: flex; justify-content: center; }
.hero-demo { display: flex; flex-direction: column; align-items: center; }
.hero-flo { position: relative; z-index: 2; margin-bottom: -96px; pointer-events: none; }
.hero-demo .demo-card { width: 100%; padding-top: 70px; }
@media (max-width: 960px) { .hero-flo .mascot { width: 240px; height: 240px; } .hero-flo { margin-bottom: -70px; } }
