/* AIT Drive - UI foundation
   Fonts: DM Sans + IBM Plex Mono (Google Fonts).
*/
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;650;700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  color-scheme: light;
  --font-ui: "DM Sans", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;

  --bg: #F4F5F2;
  --surface: #FFFFFF;
  --surface-2: #F8F9F6;
  --surface-3: #EEF0EB;
  --surface-hover: #F1F3EF;
  --ink: #202820;
  --ink-2: #59645A;
  --ink-3: #879087;
  --line: #E2E6DF;
  --line-strong: #CCD4C9;
  --accent: #286B50;
  --accent-hover: #1F5B42;
  --accent-soft: #E5F0E9;
  --accent-ink: #174A35;
  --danger: #B94A43;
  --danger-soft: #F9EAE8;
  --warning: #A66A21;
  --warning-soft: #F8F0E2;
  --info: #426B91;
  --info-soft: #EAF0F6;
  --shadow-sm: 0 1px 2px rgba(25, 38, 27, .05), 0 1px 1px rgba(25, 38, 27, .03);
  --shadow-md: 0 8px 24px rgba(25, 38, 27, .10), 0 2px 6px rgba(25, 38, 27, .05);
  --shadow-lg: 0 20px 60px rgba(25, 38, 27, .18), 0 4px 14px rgba(25, 38, 27, .08);

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  --r-xs: 6px;
  --r-sm: 9px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;

  --t-fast: 120ms;
  --t-base: 180ms;
  --t-slow: 260ms;
  --ease-out: cubic-bezier(.2, .75, .25, 1);
  --ease-in-out: cubic-bezier(.4, 0, .2, 1);

  --sidebar-w: 248px;
  --topbar-h: 72px;
  --content-max: 1440px;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171C18;
  --surface: #202721;
  --surface-2: #252E27;
  --surface-3: #303B32;
  --surface-hover: #2B352D;
  --ink: #E9EEE8;
  --ink-2: #B3BDB3;
  --ink-3: #829083;
  --line: #354137;
  --line-strong: #4A594C;
  --accent: #83B99A;
  --accent-hover: #9BC9AA;
  --accent-soft: #293D30;
  --accent-ink: #C4E5CE;
  --danger: #F08B80;
  --danger-soft: #452B29;
  --warning: #D6A65E;
  --warning-soft: #423522;
  --info: #8EB3D6;
  --info-soft: #293747;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .20);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .28);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, .42);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #171C18; --surface: #202721; --surface-2: #252E27;
    --surface-3: #303B32; --surface-hover: #2B352D;
    --ink: #E9EEE8; --ink-2: #B3BDB3; --ink-3: #829083;
    --line: #354137; --line-strong: #4A594C;
    --accent: #83B99A; --accent-hover: #9BC9AA;
    --accent-soft: #293D30; --accent-ink: #C4E5CE;
    --danger: #F08B80; --danger-soft: #452B29;
    --warning: #D6A65E; --warning-soft: #423522;
    --info: #8EB3D6; --info-soft: #293747;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.20);
    --shadow-md: 0 8px 24px rgba(0,0,0,.28);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.42);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 14px/1.5 var(--font-ui); letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 42%, transparent); outline-offset: 2px; }
[hidden] { display: none !important; }

.app-shell { min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.sidebar {
  position: sticky; top: 0; height: 100dvh; padding: 24px 16px;
  display: flex; flex-direction: column; gap: 28px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px; font-size: 17px; font-weight: 700; letter-spacing: -.04em; }
.brand-mark { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; color: #fff; background: #286B50; }
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-item {
  min-height: 42px; display: flex; align-items: center; gap: 12px;
  padding: 0 12px; border-radius: var(--r-sm); color: var(--ink-2);
  font-weight: 550; transition: background var(--t-fast) var(--ease-out), color var(--t-fast);
}
.sidebar-item:hover { color: var(--ink); background: var(--surface-hover); }
.sidebar-item[aria-current="page"], .sidebar-item.is-active { color: var(--accent-ink); background: var(--accent-soft); }
.sidebar-item svg { width: 18px; height: 18px; flex: none; }
.storage { margin-top: auto; padding: 16px 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.storage-head { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 600; }
.storage-caption { margin-top: 8px; color: var(--ink-3); font-size: 11px; }
.main { min-width: 0; }
.topbar {
  height: var(--topbar-h); display: flex; align-items: center; gap: 16px;
  padding: 0 32px; background: var(--surface); border-bottom: 1px solid var(--line);
}
.page { width: min(100%, var(--content-max)); margin: 0 auto; padding: 28px 32px 56px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.page-title { margin: 0; font-size: 25px; line-height: 1.2; letter-spacing: -.045em; font-weight: 650; }
.muted { color: var(--ink-2); }
.eyebrow { color: var(--ink-3); font: 500 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }

.btn {
  min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 15px; border: 1px solid transparent; border-radius: var(--r-sm);
  background: transparent; color: var(--ink); font-weight: 600; cursor: pointer;
  transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); border-color: var(--line-strong); }
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--line-strong); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { color: var(--ink); background: var(--surface-hover); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 32px; padding: 0 11px; font-size: 12px; }
.btn-icon { width: 38px; min-width: 38px; padding: 0; }

.input, .search-input {
  width: 100%; min-height: 42px; padding: 0 13px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.input::placeholder, .search-input::placeholder { color: var(--ink-3); }
.input:hover, .search-input:hover { border-color: var(--ink-3); }
.input:focus, .search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input:disabled { opacity: .5; cursor: not-allowed; background: var(--surface-2); }
.search-wrap { position: relative; width: min(100%, 440px); }
.search-wrap svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search-input { padding-left: 40px; background: var(--surface-2); border-color: transparent; }
.search-input:focus { background: var(--surface); border-color: var(--accent); }

.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; color: var(--ink-3); font-size: 13px; }
.breadcrumb a { color: var(--ink-2); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }
.breadcrumb-sep { color: var(--line-strong); }

.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.file-card {
  min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--surface); cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.file-card:hover { border-color: var(--line-strong); background: var(--surface); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.file-card.is-selected, .file-card[aria-selected="true"] { border-color: var(--accent); background: var(--accent-soft); }
.file-thumb { height: 112px; display: grid; place-items: center; margin-bottom: 12px; overflow: hidden; border-radius: var(--r-sm); background: var(--surface-2); }
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-meta { display: flex; align-items: center; gap: 9px; min-width: 0; }
.file-name { overflow: hidden; color: var(--ink); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.file-sub { margin-top: 3px; color: var(--ink-3); font: 11px var(--font-mono); }
.file-type-icon { width: 30px; height: 34px; flex: none; color: var(--ink-2); }
.file-type-icon.folder { color: #B48A42; }
.file-type-icon.image { color: #4D8B76; }
.file-type-icon.video { color: #587FA8; }
.file-type-icon.pdf { color: #BD625A; }
.file-type-icon.doc { color: #557EB6; }
.file-type-icon.zip { color: #9A7BB0; }

.file-list { width: 100%; border-collapse: separate; border-spacing: 0; }
.file-list th { padding: 10px 14px; color: var(--ink-3); text-align: left; font: 500 10px var(--font-mono); text-transform: uppercase; letter-spacing: .07em; border-bottom: 1px solid var(--line); }
.file-row { height: 58px; background: var(--surface); }
.file-row td { padding: 8px 14px; border-bottom: 1px solid var(--line); }
.file-row:hover { background: var(--surface-hover); }
.file-row.is-selected { background: var(--accent-soft); }
.file-row .file-meta { gap: 12px; }
.file-row .file-type-icon { width: 24px; height: 27px; }

.progress-track { height: 6px; overflow: hidden; border-radius: var(--r-pill); background: var(--surface-3); }
.progress-value { height: 100%; width: var(--progress, 0%); border-radius: inherit; background: var(--accent); transition: width var(--t-slow) var(--ease-out); }
.progress-value.is-indeterminate { width: 35%; animation: progress-sweep 1.2s ease-in-out infinite; }
@keyframes progress-sweep { from { transform: translateX(-110%); } to { transform: translateX(310%); } }

.dropzone {
  display: grid; place-items: center; min-height: 220px; padding: 32px;
  border: 1.5px dashed var(--line-strong); border-radius: var(--r-lg);
  background: var(--surface-2); text-align: center; color: var(--ink-2);
  transition: border-color var(--t-fast), background var(--t-fast), transform var(--t-fast);
}
.dropzone.is-dragover { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.005); }
.dropzone-icon { width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 14px; background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }

.toast-stack { position: fixed; z-index: 100; right: 24px; bottom: 24px; display: grid; gap: 10px; width: min(360px, calc(100vw - 32px)); }
.toast {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 15px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  box-shadow: var(--shadow-md); animation: toast-in var(--t-slow) var(--ease-out) both;
}
.toast-title { font-size: 13px; font-weight: 650; }
.toast-message { margin-top: 2px; color: var(--ink-2); font-size: 12px; }
.toast-success .toast-mark { color: var(--accent); }
.toast-error .toast-mark { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(12, 19, 14, .56); animation: fade-in var(--t-fast) ease-out; }
.modal {
  width: min(100%, 900px); max-height: min(88dvh, 900px); overflow: auto;
  border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface);
  box-shadow: var(--shadow-lg); animation: modal-in var(--t-slow) var(--ease-out) both;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-body { padding: 20px; }
.preview-stage { min-height: 260px; display: grid; place-items: center; overflow: auto; background: var(--surface-2); }
.preview-stage img, .preview-stage video { display: block; max-width: 100%; max-height: 70dvh; object-fit: contain; }
.preview-stage iframe { width: 100%; height: 70dvh; border: 0; background: white; }
.preview-text { width: 100%; padding: 24px; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.7 var(--font-mono); }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

.context-menu {
  position: fixed; z-index: 110; width: 210px; padding: 6px;
  border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface);
  box-shadow: var(--shadow-lg);
}
.context-menu button {
  width: 100%; min-height: 36px; display: flex; align-items: center; gap: 10px;
  padding: 0 10px; border: 0; border-radius: 7px; background: transparent;
  color: var(--ink); text-align: left; font-size: 13px; cursor: pointer;
}
.context-menu button:hover, .context-menu button:focus-visible { background: var(--surface-hover); }
.context-menu button.is-danger { color: var(--danger); }
.context-menu hr { height: 1px; margin: 5px 4px; border: 0; background: var(--line); }

.empty-state, .error-state { min-height: 340px; display: grid; place-content: center; justify-items: center; padding: 40px 20px; text-align: center; }
.empty-illustration { width: 76px; height: 76px; display: grid; place-items: center; margin-bottom: 18px; border-radius: 24px; background: var(--accent-soft); color: var(--accent); }
.empty-title { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.03em; }
.empty-copy { max-width: 340px; margin: 7px 0 18px; color: var(--ink-2); font-size: 13px; }
.error-state .empty-illustration { background: var(--danger-soft); color: var(--danger); }

.login-page { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: var(--bg); }
.login-card { width: min(100%, 420px); padding: 36px; border: 1px solid var(--line); border-radius: var(--r-xl); background: var(--surface); box-shadow: var(--shadow-md); }
.login-card .brand { padding: 0; margin-bottom: 34px; }
.login-card h1 { margin: 0 0 8px; font-size: 27px; letter-spacing: -.05em; }
.login-card .input { margin-top: 7px; }
.form-field { display: block; margin: 18px 0; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.login-card .btn { width: 100%; margin-top: 8px; }

@media (max-width: 900px) {
  :root { --sidebar-w: 208px; }
  .topbar { padding-inline: 22px; }
  .page { padding: 24px 22px 44px; }
}
@media (max-width: 680px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 60; inset: 0 auto 0 0; width: min(280px, 86vw); height: 100dvh; transform: translateX(-102%); transition: transform var(--t-base) var(--ease-out); box-shadow: var(--shadow-lg); }
  .sidebar.is-open { transform: translateX(0); }
  .topbar { height: 62px; gap: 10px; padding-inline: 16px; }
  .page { padding: 20px 16px 36px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; }
  .page-title { font-size: 22px; }
  .search-wrap { width: 100%; }
  .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .file-card { padding: 10px; }
  .file-thumb { height: 92px; }
  .file-list-wrap { overflow-x: auto; }
  .file-list { min-width: 560px; }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: 94dvh; border-radius: var(--r-lg); }
  .modal-body { padding: 12px; }
  .toast-stack { right: 12px; bottom: 12px; }
  .login-card { padding: 26px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ===================================================================
   App-specific additions (not in the generated design file)
   =================================================================== */
.mobile-only { display: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.sidebar > .btn-primary { width: 100%; }
.nav-label { padding: 0 12px 6px; }
.status-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: var(--ink-3); font: 11px var(--font-mono); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.status-dot.on { background: var(--accent); }
.status-dot.off { background: var(--danger); }
.sidebar-scrim { position: fixed; inset: 0; z-index: 55; background: rgba(12, 19, 14, .4); }
.page-heading .breadcrumb { margin-bottom: 8px; }

.file-card, .file-row { user-select: none; -webkit-user-select: none; }
.file-thumb .file-type-icon { width: 52px; height: 58px; }
.file-card .file-meta > div, .file-row .file-meta > div { min-width: 0; }
.file-list-wrap { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.file-row:last-child td { border-bottom: 0; }
.file-row { cursor: pointer; }
.col-num { font: 12px var(--font-mono); color: var(--ink-2); white-space: nowrap; }
.file-row td.col-name { max-width: 0; width: 100%; }
.file-row[aria-selected="true"] { background: var(--accent-soft); }

.preview-info { display: grid; justify-items: center; gap: 6px; padding: 40px 20px; text-align: center; }
.preview-info .file-type-icon { width: 56px; height: 62px; margin-bottom: 8px; }
.modal-title { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -.03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-head-text { min-width: 0; }
.modal-head-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.modal-sm { width: min(100%, 440px); }
.dialog-message { margin: 0 0 14px; font-size: 13px; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-danger-solid:hover { filter: brightness(.92); }

.context-head { padding: 8px 10px 6px; }
.context-head .file-name { font-size: 12.5px; }
.context-menu { width: 224px; animation: modal-in var(--t-base) var(--ease-out) both; }

.toast-body { flex: 1; min-width: 0; }
.toast-body .progress-track { margin-top: 10px; }
.toast-mark { flex: none; display: grid; place-items: center; width: 18px; height: 18px; margin-top: 1px; }
.toast-actions { display: flex; gap: 6px; margin-top: 10px; }
.toast-close { flex: none; }
.toast-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dropzone-overlay { position: fixed; inset: 12px; z-index: 90; min-height: 0; pointer-events: none; background: color-mix(in srgb, var(--accent-soft) 88%, transparent); border-color: var(--accent); }
.dropzone-overlay strong { display: block; font-size: 17px; color: var(--accent-ink); }

.form-error { margin: 0 0 8px; color: var(--danger); font-size: 12.5px; font-weight: 500; }
.input.is-invalid { border-color: var(--danger); }
.input.is-invalid:focus { box-shadow: 0 0 0 3px var(--danger-soft); }
.login-card .eyebrow { margin-bottom: 14px; }
.login-foot { margin: 22px 0 0; text-align: center; color: var(--ink-3); font-size: 12px; }
.spinner { width: 15px; height: 15px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-fade { opacity: .55; transition: opacity var(--t-base); pointer-events: none; }

@media (max-width: 680px) {
  .mobile-only { display: inline-flex; }
  .hide-mobile { display: none; }
  .topbar-actions { gap: 4px; }
  .dropzone-overlay { inset: 6px; }
}
@media (min-width: 681px) {
  .sidebar-scrim { display: none !important; }
}

.credit { margin: 18px 0 0; text-align: center; color: var(--ink-3); font: 11px/1.5 var(--font-mono); letter-spacing: 0; }
.login-card .credit { margin-top: 6px; }
.sidebar-credit { margin: 0; }

/* ===================================================================
   Multi-user: account block, admin panel, forms
   =================================================================== */
.account { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); }
.account-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.account-text { min-width: 0; }
.account-name { font-weight: 650; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 13px; text-transform: uppercase; }
.storage .btn { margin-top: 10px; width: 100%; }
.storage-caption.is-warn { color: var(--danger); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-card { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); display: grid; gap: 4px; align-content: start; }
.stat-value { font-size: 22px; font-weight: 650; letter-spacing: -.03em; }
.stat-sub { color: var(--ink-3); font-size: 12px; margin-bottom: 6px; }
.admin-note { margin: 0 0 22px; color: var(--ink-2); font-size: 12.5px; }
.admin-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-title { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -.03em; }
.admin-table td { vertical-align: middle; }
.admin-row { height: auto; cursor: default; }
.admin-row td { padding: 12px 14px; }
.admin-table .col-quota { min-width: 170px; }
.admin-table .col-quota .progress-track { margin-top: 6px; height: 5px; }
.col-actions { white-space: nowrap; text-align: right; }
.col-actions .btn + .btn { margin-left: 6px; }
.progress-value.is-warn { background: var(--danger); }
.badges { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 4px; }
.badge { display: inline-block; padding: 1px 8px; border-radius: var(--r-pill); background: var(--surface-3); color: var(--ink-2); font: 500 11px/1.6 var(--font-mono); }
.badge-accent { background: var(--accent-soft); color: var(--accent-ink); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }

.form-field .input { margin-top: 7px; }
.form-field .btn { margin-top: 8px; }
.field-hint { display: block; margin-top: 6px; color: var(--ink-3); font-size: 11.5px; font-weight: 400; }
.perm-set { margin: 18px 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.perm-set legend { padding: 0 6px; }
.check { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 13px; color: var(--ink); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.check input:disabled + span { color: var(--ink-3); }
select.input { appearance: auto; }
.btn[disabled] { pointer-events: none; }

@media (max-width: 680px) {
  .admin-bar { flex-wrap: wrap; }
}
