@charset "UTF-8";
/* ============================================================
   uDrive — main stylesheet entry
   Import this from resources/js/app.js  →  import '../sass/app.scss';
   (compiled by Laravel Mix / Vite)
   ============================================================ */
/* Fonts: add these <link>s to your Blade layout, or @import here if
   your build resolves remote @imports:

   <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
   <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=block" rel="stylesheet">
*/
/* ============================================================
   uDrive — Design Tokens
   Mirrors the RMI Fabrications (FAB) ERP visual language:
   royal-blue primary, amber accent, pastel-gradient tints,
   soft rounded cards, light default + full dark mode.
   ============================================================ */
:root {
  /* Brand */
  --brand-blue: #2f57e0;
  --brand-blue-600: #2a4fd0;
  --brand-blue-700: #2342b4;
  --brand-blue-050: #eaf0ff;
  --brand-blue-100: #d9e3ff;
  --brand-amber: #f5a13c;
  --brand-amber-600: #ec8f24;
  --brand-amber-050: #fff3e2;
  /* FAB logo gradient (gold -> red -> blue) */
  --fab-gold: #f0b429;
  --fab-red: #c0322b;
  --fab-blue: #2342b4;
  /* Accent assignable (theme switch) */
  --accent: var(--brand-blue);
  --accent-600: var(--brand-blue-600);
  --accent-700: var(--brand-blue-700);
  --accent-soft: var(--brand-blue-050);
  --accent-rgb: 47, 87, 224;
  /* Surfaces — light */
  --bg: #f4f6f9;
  --bg-tint: #eef1f6;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f7;
  --hover: #f2f5fa;
  --selected: #eaf0ff;
  /* Lines + text */
  --border: #e6e9ef;
  --border-strong: #d6dbe4;
  --text: #1d2330;
  --text-2: #4a5364;
  --text-3: #8a93a4;
  --text-inverse: #ffffff;
  /* Status */
  --green: #22a06b;
  --green-soft: #e6f6ee;
  --red: #e0524a;
  --red-soft: #fdecea;
  --purple: #7c5cff;
  --purple-soft: #efeaff;
  --teal: #0ea5a5;
  --cyan: #2aa7d8;
  /* File-type colors */
  --ft-doc: #2f6bed;
  --ft-sheet: #16a36a;
  --ft-slide: #e8893a;
  --ft-pdf: #e0524a;
  --ft-image: #8b5cf6;
  --ft-video: #db4f9a;
  --ft-audio: #0ea5a5;
  --ft-archive: #c08a2b;
  --ft-folder: #f0b54d;
  --ft-folder-2: #e89a2e;
  /* Pastel stat tints (from ERP HRMS cards) */
  --tint-purple: linear-gradient(135deg, #f3effe, #efe9fd);
  --tint-blue: linear-gradient(135deg, #eaf1ff, #e2ecff);
  --tint-green: linear-gradient(135deg, #e9f8ef, #e1f4e9);
  --tint-amber: linear-gradient(135deg, #fff2e1, #ffecd2);
  --tint-red: linear-gradient(135deg, #fdecec, #fbe4e4);
  /* Radii */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 22px;
  --r-pill: 999px;
  /* Shadows */
  --sh-xs: 0 1px 2px rgba(20, 28, 48, .06);
  --sh-sm: 0 1px 3px rgba(20, 28, 48, .07), 0 1px 2px rgba(20, 28, 48, .04);
  --sh-md: 0 6px 18px rgba(22, 32, 58, .08), 0 2px 6px rgba(22, 32, 58, .05);
  --sh-lg: 0 18px 48px rgba(22, 32, 58, .16), 0 6px 16px rgba(22, 32, 58, .08);
  --sh-pop: 0 12px 34px rgba(22, 32, 58, .18);
  /* Typography */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;
  --fw-bold: 700;
  /* Layout */
  --sidebar-w: 264px;
  --sidebar-w-collapsed: 76px;
  --topbar-h: 68px;
  --details-w: 340px;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ---------------- Dark theme ---------------- */
html[data-theme=dark] {
  --bg: #0e1116;
  --bg-tint: #0b0e13;
  --surface: #161b22;
  --surface-2: #1b212b;
  --surface-3: #222a35;
  --hover: #1e252f;
  --selected: #1c2740;
  --border: #262e3a;
  --border-strong: #323c4a;
  --text: #e8ecf3;
  --text-2: #aeb7c6;
  --text-3: #7d8799;
  --brand-blue-050: #182241;
  --accent-soft: #18233f;
  --green-soft: #122a20;
  --red-soft: #2e1816;
  --purple-soft: #211a3b;
  --tint-purple: linear-gradient(135deg, #1d1b2e, #211d36);
  --tint-blue: linear-gradient(135deg, #15203a, #172643);
  --tint-green: linear-gradient(135deg, #14241c, #16291f);
  --tint-amber: linear-gradient(135deg, #2a2114, #2e2415);
  --tint-red: linear-gradient(135deg, #2a1717, #2e1919);
  --sh-xs: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-sm: 0 1px 3px rgba(0, 0, 0, .45);
  --sh-md: 0 8px 22px rgba(0, 0, 0, .45);
  --sh-lg: 0 22px 54px rgba(0, 0, 0, .6);
  --sh-pop: 0 14px 38px rgba(0, 0, 0, .6);
}

/* Accent variants */
html[data-accent=amber] {
  --accent: var(--brand-amber);
  --accent-600: var(--brand-amber-600);
  --accent-700: #d97d1a;
  --accent-soft: var(--brand-amber-050);
  --accent-rgb: 245, 161, 60;
}

html[data-accent=amber][data-theme=dark] {
  --accent-soft: #2e2415;
}

html[data-accent=teal] {
  --accent: #0ea5a5;
  --accent-600: #0c9494;
  --accent-700: #0a7d7d;
  --accent-soft: #e3f6f6;
  --accent-rgb: 14, 165, 165;
}

html[data-accent=teal][data-theme=dark] {
  --accent-soft: #0f2a2a;
}

html[data-accent=purple] {
  --accent: #7c5cff;
  --accent-600: #6a49f2;
  --accent-700: #5a3ad8;
  --accent-soft: #efeaff;
  --accent-rgb: 124, 92, 255;
}

html[data-accent=purple][data-theme=dark] {
  --accent-soft: #211a3b;
}

/* ============================================================
   uDrive — Base, layout, controls, sidebar, topbar
   ============================================================ */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 14px;
  line-height: 1.5;
}

#app {
  height: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

::-moz-selection {
  background: rgba(var(--accent-rgb), 0.22);
}

::selection {
  background: rgba(var(--accent-rgb), 0.22);
}

/* Scrollbars */
*::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--text-3);
  background-clip: padding-box;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  line-height: 1;
}

.mi {
  font-size: 20px;
}

.mi-sm {
  font-size: 18px;
}

.mi-lg {
  font-size: 22px;
}

.fill .material-symbols-outlined,
.material-symbols-outlined.fill {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* ---------------- App shell ---------------- */
.app-shell {
  display: flex;
  height: 100%;
  overflow: hidden;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

.app-body {
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.app-content {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  padding: 26px 30px 60px;
  scroll-behavior: smooth;
}

.content-narrow {
  max-width: 1400px;
  margin: 0 auto;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-weight: var(--fw-semibold);
  font-size: 13.5px;
  color: var(--text);
  background: var(--surface);
  transition: background 0.16s var(--ease), border-color 0.16s, box-shadow 0.16s, transform 0.12s;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn .material-symbols-outlined {
  font-size: 19px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.32);
}

.btn-primary:hover {
  background: var(--accent-600);
}

.btn-ghost {
  background: transparent;
  color: var(--text-2);
}

.btn-ghost:hover {
  background: var(--hover);
  color: var(--text);
}

.btn-outline {
  background: var(--surface);
  border-color: var(--border-strong);
  color: var(--text-2);
}

.btn-outline:hover {
  background: var(--hover);
  color: var(--text);
  border-color: var(--text-3);
}

.btn-soft {
  background: var(--accent-soft);
  color: var(--accent);
}

.btn-soft:hover {
  filter: brightness(0.97);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-danger:hover {
  filter: brightness(0.95);
}

.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-lg {
  height: 46px;
  padding: 0 20px;
  font-size: 14.5px;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  border: none;
  background: transparent;
  color: var(--text-2);
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--hover);
  color: var(--text);
}

.icon-btn.active {
  background: var(--accent-soft);
  color: var(--accent);
}

.icon-btn-sm {
  width: 32px;
  height: 32px;
}

/* Segmented view switch */
.seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: var(--surface-3);
  border-radius: var(--r-sm);
}

.seg button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 30px;
  border: none;
  background: transparent;
  border-radius: 6px;
  color: var(--text-3);
  transition: all 0.15s;
}

.seg button .material-symbols-outlined {
  font-size: 19px;
}

.seg button:hover {
  color: var(--text-2);
}

.seg button.active {
  background: var(--surface);
  color: var(--accent);
  box-shadow: var(--sh-xs);
}

/* Chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12.5px;
  font-weight: var(--fw-medium);
  color: var(--text-2);
  transition: all 0.15s;
}

.chip .material-symbols-outlined {
  font-size: 17px;
}

.chip:hover {
  background: var(--hover);
  border-color: var(--border-strong);
}

.chip.active {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: var(--fw-semibold);
  line-height: 1.6;
}

.badge .material-symbols-outlined {
  font-size: 14px;
}

.badge-blue {
  background: var(--brand-blue-050);
  color: var(--brand-blue);
}

.badge-green {
  background: var(--green-soft);
  color: var(--green);
}

.badge-amber {
  background: var(--brand-amber-050);
  color: var(--brand-amber-600);
}

.badge-red {
  background: var(--red-soft);
  color: var(--red);
}

.badge-purple {
  background: var(--purple-soft);
  color: var(--purple);
}

.badge-gray {
  background: var(--surface-3);
  color: var(--text-2);
}

/* ---------------- Inputs ---------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field label {
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--text-2);
}

.input, .textarea, .select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.textarea {
  height: auto;
  padding: 12px 14px;
  resize: vertical;
  min-height: 92px;
}

.input::-moz-placeholder, .textarea::-moz-placeholder {
  color: var(--text-3);
}

.input::placeholder, .textarea::placeholder {
  color: var(--text-3);
}

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px rgba(var(--accent-rgb), 0.16);
}

.input-wrap {
  position: relative;
}

.input-wrap .input {
  padding-left: 42px;
}

.input-wrap > .material-symbols-outlined {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 20px;
  pointer-events: none;
}

.input-wrap .pw-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--text-3);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: grid;
  place-items: center;
}

.input-wrap .pw-toggle:hover {
  background: var(--hover);
  color: var(--text-2);
}

.switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: none;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .track {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: var(--border-strong);
  transition: background 0.2s;
}

.switch .track::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--sh-xs);
  transition: transform 0.2s var(--ease);
}

.switch input:checked + .track {
  background: var(--accent);
}

.switch input:checked + .track::before {
  transform: translateX(18px);
}

/* ---------------- Sidebar ---------------- */
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  transition: width 0.2s var(--ease);
}

.sidebar.collapsed {
  width: var(--sidebar-w-collapsed);
}

.sidebar-head {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 18px;
  flex: none;
}

.sidebar-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 6px 14px 14px;
}

.new-btn {
  margin: 6px 14px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  border-radius: var(--r-md);
  background: var(--accent);
  color: #fff;
  font-weight: var(--fw-semibold);
  font-size: 14px;
  border: none;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.32);
  transition: background 0.16s, transform 0.12s;
}

.new-btn:hover {
  background: var(--accent-600);
}

.new-btn:active {
  transform: translateY(1px);
}

.sidebar.collapsed .new-btn {
  margin: 6px auto 12px;
  width: 48px;
  padding: 0;
}

.sidebar.collapsed .new-btn .label {
  display: none;
}

.nav-section {
  margin-top: 12px;
}

.nav-label {
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 6px 12px 5px;
}

.sidebar.collapsed .nav-label {
  text-align: center;
  font-size: 9px;
  padding: 6px 0 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-weight: var(--fw-medium);
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
  position: relative;
  margin-bottom: 1px;
}

.nav-item .material-symbols-outlined {
  font-size: 21px;
  flex: none;
}

.nav-item:hover {
  background: var(--hover);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: var(--fw-semibold);
}

.nav-item.active .material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.nav-item .count {
  margin-left: auto;
  font-size: 11.5px;
  font-weight: var(--fw-semibold);
  color: var(--text-3);
  background: var(--surface-3);
  padding: 1px 8px;
  border-radius: 99px;
}

.nav-item.active .count {
  background: rgba(var(--accent-rgb), 0.16);
  color: var(--accent);
}

.nav-item .chev {
  margin-left: auto;
  font-size: 18px;
  color: var(--text-3);
  transition: transform 0.18s;
}

.nav-item .chev.open {
  transform: rotate(90deg);
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 0;
}

.sidebar.collapsed .nav-item .label,
.sidebar.collapsed .nav-item .count,
.sidebar.collapsed .nav-item .chev {
  display: none;
}

.nav-sub {
  padding-left: 14px;
  overflow: hidden;
}

.nav-sub .nav-item {
  height: 36px;
  font-size: 13px;
}

.nav-sub .nav-item .material-symbols-outlined {
  font-size: 18px;
  color: var(--ft-folder);
}

/* Storage meter in sidebar */
.storage-card {
  margin: 14px 4px 6px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.sidebar.collapsed .storage-card {
  display: none;
}

.storage-card .sc-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.storage-card .sc-top .material-symbols-outlined {
  font-size: 18px;
  color: var(--text-2);
}

.storage-card .sc-top b {
  font-size: 13px;
}

.meter {
  height: 8px;
  border-radius: 99px;
  background: var(--surface-3);
  overflow: hidden;
  display: flex;
}

.meter .seg-fill {
  height: 100%;
}

.meter.single .seg-fill {
  background: var(--accent);
  transition: width 0.5s var(--ease-out);
}

.storage-card .sc-text {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 9px;
}

.storage-card .btn {
  margin-top: 12px;
}

/* ---------------- Topbar ---------------- */
.topbar {
  height: var(--topbar-h);
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 20;
}

.topbar .menu-toggle {
  flex: none;
}

.search {
  flex: 1;
  max-width: 620px;
  position: relative;
}

.search input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 46px;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: var(--surface-3);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.search input::-moz-placeholder {
  color: var(--text-3);
}

.search input::placeholder {
  color: var(--text-3);
}

.search input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--accent);
  box-shadow: 0 0 0 3.5px rgba(var(--accent-rgb), 0.14);
}

.search > .material-symbols-outlined {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 21px;
  pointer-events: none;
}

.search .kbd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: 6px;
  font-weight: var(--fw-semibold);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.avatar {
  border-radius: 50%;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-semibold);
  color: #fff;
  overflow: hidden;
  background: var(--accent);
}

.avatar img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.avatar.s24 {
  width: 24px;
  height: 24px;
  font-size: 10px;
}

.avatar.s28 {
  width: 28px;
  height: 28px;
  font-size: 11px;
}

.avatar.s32 {
  width: 32px;
  height: 32px;
  font-size: 12px;
}

.avatar.s38 {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

.avatar.s44 {
  width: 44px;
  height: 44px;
  font-size: 15px;
}

.avatar-stack {
  display: flex;
}

.avatar-stack .avatar {
  border: 2px solid var(--surface);
  margin-left: -8px;
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

.user-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 46px;
  padding: 0 6px 0 8px;
  border-radius: var(--r-pill);
  border: none;
  background: transparent;
  transition: background 0.15s;
}

.user-btn:hover {
  background: var(--hover);
}

.user-btn .u-meta {
  text-align: left;
  line-height: 1.25;
}

.user-btn .u-meta b {
  font-size: 13px;
  display: block;
}

.user-btn .u-meta span {
  font-size: 11.5px;
  color: var(--text-3);
}

.user-btn .material-symbols-outlined {
  color: var(--text-3);
  font-size: 20px;
}

/* Page header */
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.page-head .ph-text {
  min-width: 0;
}

.page-head h1 {
  margin: 0;
  font-size: 26px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}

.page-head .crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-3);
  font-size: 13px;
  margin-top: 4px;
}

.page-head .crumbs .material-symbols-outlined {
  font-size: 16px;
}

.page-head .crumbs .c-link {
  cursor: pointer;
}

.page-head .crumbs .c-link:hover {
  color: var(--accent);
}

.page-head .crumbs .current {
  color: var(--text-2);
  font-weight: var(--fw-medium);
}

.page-head .ph-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.toolbar .spacer {
  flex: 1;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 26px 0 14px;
  font-size: 16px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.01em;
}

.section-title .more {
  margin-left: auto;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--accent);
  cursor: pointer;
}

.section-title .more:hover {
  text-decoration: underline;
}

/* Utilities */
.muted {
  color: var(--text-3);
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.gap-8 {
  gap: 8px;
}

.gap-12 {
  gap: 12px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  text-align: center;
  color: var(--text-3);
}

.empty-state .material-symbols-outlined {
  font-size: 56px;
  opacity: 0.55;
  margin-bottom: 14px;
}

.empty-state h3 {
  margin: 0 0 6px;
  color: var(--text-2);
  font-size: 16px;
}

.empty-state p {
  margin: 0;
  font-size: 13.5px;
  max-width: 360px;
}

/* Auto refresh toggle */
.auto-refresh-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text-2);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.auto-refresh-toggle:hover {
  border-color: var(--accent);
  color: var(--text);
}

.auto-refresh-toggle.is-on {
  background: var(--accent-soft);
  border-color: rgba(47, 91, 232, 0.32);
  color: var(--accent);
}

.auto-refresh-track {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--border);
  flex: none;
  transition: background 0.15s;
}

.auto-refresh-loader {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  background: var(--accent-soft);
}

.auto-refresh-loader .material-symbols-outlined {
  animation: spin 0.9s linear infinite;
}

.auto-refresh-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s;
}

.auto-refresh-toggle.is-on .auto-refresh-track {
  background: var(--accent);
}

.auto-refresh-toggle.is-on .auto-refresh-thumb {
  transform: translateX(16px);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* ============================================================
   uDrive — Components: files, tables, modals, menus,
   details pane, dashboard, auth
   ============================================================ */
/* ---------------- File-type glyph ---------------- */
.ftype {
  display: inline-grid;
  place-items: center;
  flex: none;
  position: relative;
  border-radius: 9px;
}

.ftype .material-symbols-outlined {
  font-size: 22px;
}

.ftype.s36 {
  width: 36px;
  height: 36px;
}

.ftype.s36 .material-symbols-outlined {
  font-size: 20px;
}

.ftype.s40 {
  width: 40px;
  height: 40px;
}

.ftype.s44 {
  width: 44px;
  height: 44px;
}

.ftype.doc {
  background: rgba(47, 107, 237, 0.12);
  color: var(--ft-doc);
}

.ftype.sheet {
  background: rgba(22, 163, 106, 0.12);
  color: var(--ft-sheet);
}

.ftype.slide {
  background: rgba(232, 137, 58, 0.13);
  color: var(--ft-slide);
}

.ftype.pdf {
  background: rgba(224, 82, 74, 0.12);
  color: var(--ft-pdf);
}

.ftype.image {
  background: rgba(139, 92, 246, 0.12);
  color: var(--ft-image);
}

.ftype.video {
  background: rgba(219, 79, 154, 0.12);
  color: var(--ft-video);
}

.ftype.audio {
  background: rgba(14, 165, 165, 0.12);
  color: var(--ft-audio);
}

.ftype.archive {
  background: rgba(192, 138, 43, 0.13);
  color: var(--ft-archive);
}

.ftype.folder {
  background: transparent;
  color: var(--ft-folder);
}

.ftype.folder .material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
  font-size: 26px;
}

/* ---------------- Drive: list (rows) ---------------- */
.file-list {
  display: flex;
  flex-direction: column;
}

.list-head, .file-row {
  display: grid;
  grid-template-columns: minmax(220px, 2.4fr) 1fr 1fr 1.1fr 130px 44px;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
}

.list-head {
  height: 40px;
  font-size: 12px;
  font-weight: var(--fw-semibold);
  color: var(--text-3);
  text-transform: none;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 2;
}

.list-head .sortable {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
}

.list-head .sortable:hover {
  color: var(--text-2);
}

.list-head .sortable .material-symbols-outlined {
  font-size: 15px;
  opacity: 0.8;
}

.file-row {
  height: 56px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
}

.file-row:hover {
  background: var(--hover);
}

.file-row.selected {
  background: var(--selected);
}

.file-row.selected::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.file-row .fr-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.file-row .fr-name .nm {
  min-width: 0;
}

.file-row .fr-name .nm b {
  font-weight: var(--fw-medium);
  font-size: 13.5px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-row .fr-name .nm .sub {
  font-size: 11.5px;
  color: var(--text-3);
}

.file-row .col {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-row .owner-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.file-row .owner-cell span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shared-mark {
  color: var(--text-3);
  font-size: 15px !important;
}

.row-check {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid var(--border-strong);
  display: inline-grid;
  place-items: center;
  flex: none;
  transition: all 0.14s;
  background: var(--surface);
}

.row-check .material-symbols-outlined {
  font-size: 14px;
  color: #fff;
  opacity: 0;
}

.file-row:hover .fr-check, .file-row.selected .fr-check {
  opacity: 1;
}

.fr-check {
  opacity: 0;
  transition: opacity 0.12s;
}

.row-check.on {
  background: var(--accent);
  border-color: var(--accent);
}

.row-check.on .material-symbols-outlined {
  opacity: 1;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.12s;
}

.file-row:hover .row-actions {
  opacity: 1;
}

/* star toggle */
.star {
  color: var(--text-3);
  transition: color 0.15s, transform 0.15s;
}

.star.on {
  color: var(--brand-amber);
}

.star.on .material-symbols-outlined {
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

/* ---------------- Drive: table ---------------- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.data-table thead th {
  text-align: left;
  padding: 13px 14px;
  font-size: 12px;
  font-weight: var(--fw-semibold);
  color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table th.sortable {
  cursor: pointer;
}

.data-table th.sortable:hover {
  color: var(--text-2);
}

.data-table th .material-symbols-outlined {
  vertical-align: -3px;
  opacity: 0.8;
}

.data-table tbody td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  white-space: nowrap;
}

.data-table tbody tr {
  cursor: pointer;
  transition: background 0.12s;
}

.data-table tbody tr:hover {
  background: var(--hover);
}

.data-table tbody tr.selected {
  background: var(--selected);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table .fr-name .nm b {
  font-weight: var(--fw-medium);
}

/* ---------------- Drive: grid (cards) ---------------- */
.file-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.fcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.16s, border-color 0.16s, transform 0.12s;
  position: relative;
}

.fcard:hover {
  box-shadow: var(--sh-md);
  border-color: var(--border-strong);
}

.fcard.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.fcard .fc-thumb {
  height: 132px;
  background: var(--surface-2);
  display: grid;
  place-items: center;
  position: relative;
  border-bottom: 1px solid var(--border);
}

.fcard .fc-thumb img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.fcard .fc-thumb .ftype {
  width: 56px;
  height: 56px;
}

.fcard .fc-thumb .ftype .material-symbols-outlined {
  font-size: 30px;
}

.fcard .fc-thumb .ftype.folder .material-symbols-outlined {
  font-size: 56px;
}

.fcard .fc-meta {
  padding: 11px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.fcard .fc-meta .ftype.s36 {
  width: 30px;
  height: 30px;
}

.fcard .fc-meta .nm {
  min-width: 0;
  flex: 1;
}

.fcard .fc-meta .nm b {
  display: block;
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fcard .fc-meta .nm .sub {
  font-size: 11.5px;
  color: var(--text-3);
}

.fcard .fc-check {
  position: absolute;
  top: 10px;
  left: 10px;
  opacity: 0;
  transition: opacity 0.12s;
  z-index: 3;
}

.fcard:hover .fc-check, .fcard.selected .fc-check {
  opacity: 1;
}

.fcard .fc-more {
  position: absolute;
  top: 8px;
  right: 8px;
  opacity: 0;
  transition: opacity 0.12s;
  z-index: 3;
}

.fcard:hover .fc-more {
  opacity: 1;
}

.fcard .fc-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
}

/* folder card (flat, drive-like) */
.folder-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.folder-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: box-shadow 0.16s, border-color 0.16s;
  position: relative;
}

.folder-card:hover {
  box-shadow: var(--sh-sm);
  border-color: var(--border-strong);
  background: var(--hover);
}

.folder-card .fc-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
}

.folder-card .fc-icon .material-symbols-outlined {
  font-size: 24px;
  font-variation-settings: "FILL" 1;
}

.folder-card .nm {
  min-width: 0;
  flex: 1;
}

.folder-card .nm b {
  display: block;
  font-size: 14px;
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-card .nm .sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 2px;
}

/* big quick-access folder (frequently accessed) */
.qa-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.qa-folder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 22px;
  cursor: pointer;
  transition: box-shadow 0.16s, transform 0.14s, border-color 0.16s;
}

.qa-folder:hover {
  box-shadow: var(--sh-md);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.qa-folder .qa-art {
  height: 100px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}

.qa-folder .qa-art .material-symbols-outlined {
  font-size: 56px;
  font-variation-settings: "FILL" 1;
  filter: drop-shadow(0 6px 10px rgba(240, 181, 77, 0.35));
}

.qa-folder b {
  font-size: 14.5px;
  font-weight: var(--fw-semibold);
}

.qa-folder .sub {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 3px;
}

/* ---------------- Dashboard widgets ---------------- */
.dash-grid {
  display: grid;
  gap: 18px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px 22px;
}

.card.flush {
  padding: 0;
  overflow: hidden;
}

/* storage breakdown */
.storage-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.storage-bar-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: var(--fw-bold);
}

.storage-bar-head .used {
  font-size: 14px;
  color: var(--text-2);
}

.storage-bar-head .used b {
  color: var(--text);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 26px;
  margin-bottom: 12px;
}

.legend .lg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
}

.legend .lg .dot {
  width: 11px;
  height: 11px;
  border-radius: 4px;
}

.legend .lg b {
  color: var(--text);
  margin-left: 2px;
}

.meter.multi {
  height: 12px;
  gap: 3px;
  background: transparent;
}

.meter.multi .seg-fill {
  border-radius: 4px;
  transition: flex-basis 0.5s var(--ease-out);
}

.meter.multi .seg-fill.rest {
  background: var(--surface-3);
}

/* welcome hero (cloudbox-style) */
.hero {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 26px 28px;
  border-radius: var(--r-lg);
  background: var(--tint-blue);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.hero .hero-text {
  flex: 1;
  min-width: 0;
  z-index: 1;
}

.hero .hero-text h2 {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
}

.hero .hero-text p {
  margin: 0;
  color: var(--text-2);
  font-size: 13.5px;
}

.hero .hero-art {
  width: 132px;
  height: 96px;
  flex: none;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, rgba(var(--accent-rgb), 0.18), rgba(var(--accent-rgb), 0.05));
  display: grid;
  place-items: center;
}

.hero .hero-art .material-symbols-outlined {
  font-size: 56px;
  color: var(--accent);
}

/* recent file mini-card */
.mini-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
  position: relative;
}

.mini-card:hover {
  box-shadow: var(--sh-sm);
  border-color: var(--border-strong);
}

.mini-card .nm {
  min-width: 0;
  flex: 1;
}

.mini-card .nm b {
  display: block;
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-card .nm .sub {
  font-size: 11.5px;
  color: var(--text-3);
}

/* ---------------- Dropdown / menu ---------------- */
.menu {
  position: fixed;
  min-width: 216px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-pop);
  padding: 7px;
  z-index: 1000;
  animation: pop 0.14s var(--ease-out);
}

@keyframes pop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
  padding: 0 11px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  white-space: nowrap;
}

.menu-item .material-symbols-outlined {
  font-size: 19px;
  color: var(--text-3);
}

.menu-item:hover {
  background: var(--hover);
  color: var(--text);
}

.menu-item:hover .material-symbols-outlined {
  color: var(--text-2);
}

.menu-item.danger {
  color: var(--red);
}

.menu-item.danger .material-symbols-outlined {
  color: var(--red);
}

.menu-item.danger:hover {
  background: var(--red-soft);
}

.menu-item .hint {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-3);
}

.menu-item.has-sub::after {
  content: "chevron_right";
  font-family: "Material Symbols Outlined";
  margin-left: auto;
  font-size: 18px;
  color: var(--text-3);
}

.menu-sep {
  height: 1px;
  background: var(--border);
  margin: 6px 4px;
}

.menu-label {
  font-size: 11px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 8px 11px 5px;
}

/* create menu (the + New popover) */
.create-menu {
  min-width: 248px;
}

/* ---------------- Modal ---------------- */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 22, 38, 0.5);
  backdrop-filter: blur(3px);
  z-index: 900;
  display: grid;
  place-items: center;
  padding: 24px;
  animation: fade 0.16s ease;
}

html[data-theme=dark] .overlay {
  background: rgba(0, 0, 0, 0.62);
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.modal {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  overflow: hidden;
  animation: modal-in 0.2s var(--ease-out);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
}

.modal.wide {
  max-width: 620px;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px 16px;
}

.modal-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: var(--fw-bold);
}

.modal-head .sub {
  font-size: 13px;
  color: var(--text-3);
  margin-top: 2px;
}

.modal-head .icon-btn {
  margin-left: auto;
}

.modal-body {
  padding: 4px 22px 8px;
  overflow-y: auto;
}

.modal-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 22px 20px;
}

.modal-foot .spacer {
  flex: 1;
}

/* ---------------- Share modal ---------------- */
.share-input-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.share-input-row .input-wrap {
  flex: 1;
}

.people-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 6px 0 4px;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 6px;
  border-radius: var(--r-sm);
}

.person-row:hover {
  background: var(--hover);
}

.person-row .pr-meta {
  flex: 1;
  min-width: 0;
}

.person-row .pr-meta b {
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  display: block;
}

.person-row .pr-meta span {
  font-size: 12px;
  color: var(--text-3);
}

.role-select {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 32px;
  padding: 0 8px 0 11px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: var(--fw-medium);
  font-family: inherit;
}

.role-select:hover {
  background: var(--hover);
}

.role-tag {
  font-size: 11px;
  color: var(--text-3);
}

.link-block {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.link-block .lb-top {
  display: flex;
  align-items: center;
  gap: 11px;
}

.link-block .lb-top .li {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
  flex: none;
}

.link-block .lb-top .nm {
  flex: 1;
}

.link-block .lb-top .nm b {
  font-size: 13.5px;
  display: block;
}

.link-block .lb-top .nm span {
  font-size: 12px;
  color: var(--text-3);
}

.link-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.link-row .input {
  background: var(--surface);
  font-size: 12.5px;
  color: var(--text-2);
}

/* ---------------- Upload ---------------- */
.dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--r-md);
  padding: 38px 20px;
  text-align: center;
  transition: all 0.18s;
  cursor: pointer;
  background: var(--surface-2);
}

.dropzone:hover, .dropzone.drag {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.dropzone .material-symbols-outlined {
  font-size: 46px;
  color: var(--accent);
}

.dropzone h4 {
  margin: 12px 0 4px;
  font-size: 15px;
}

.dropzone p {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-3);
}

.upload-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}

.upload-item:last-child {
  border-bottom: none;
}

.upload-item .nm {
  flex: 1;
  min-width: 0;
}

.upload-item .nm b {
  font-size: 13px;
  font-weight: var(--fw-medium);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-item .bar {
  height: 5px;
  border-radius: 99px;
  background: var(--surface-3);
  margin-top: 6px;
  overflow: hidden;
}

.upload-item .bar i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.2s;
}

/* big size-warning banner (>25MB / email-linked) */
.notice {
  display: flex;
  gap: 13px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--brand-amber-050);
  border: 1px solid rgba(245, 161, 60, 0.3);
  margin-bottom: 16px;
}

.notice .material-symbols-outlined {
  color: var(--brand-amber-600);
  font-size: 22px;
  flex: none;
}

.notice.notice-error {
  background: #fef2f2;
  border-color: rgba(239, 68, 68, 0.28);
}

.notice.notice-error .material-symbols-outlined {
  color: #dc2626;
}

.notice b {
  font-size: 13.5px;
}

.notice p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--text-2);
}

/* ---------------- Details / preview pane ---------------- */
.details {
  width: var(--details-w);
  flex: none;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slide-in 0.22s var(--ease-out);
}

@keyframes slide-in {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.details-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.details-head b {
  font-size: 14px;
  flex: 1;
}

.details-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px;
}

.details-preview {
  height: 168px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  overflow: hidden;
}

.details-preview img {
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.details-preview .ftype {
  width: 64px;
  height: 64px;
}

.details-preview .ftype .material-symbols-outlined {
  font-size: 36px;
}

.details h2 {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: var(--fw-bold);
  word-break: break-word;
}

.detail-tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin: 14px 0 16px;
}

.detail-tabs button {
  border: none;
  background: transparent;
  padding: 9px 4px;
  font-size: 13px;
  font-weight: var(--fw-semibold);
  color: var(--text-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
}

.detail-tabs button.active {
  color: var(--accent);
  border-color: var(--accent);
}

.meta-row {
  display: flex;
  padding: 9px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.meta-row .k {
  width: 116px;
  color: var(--text-3);
  flex: none;
}

.meta-row .v {
  color: var(--text);
  flex: 1;
}

.detail-section-title {
  font-size: 12px;
  font-weight: var(--fw-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 18px 0 10px;
}

/* ---------------- Superadmin workspace switcher ---------------- */
.ws-trigger {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  transition: background 0.15s, border-color 0.15s;
  max-width: 250px;
}

.ws-trigger:hover {
  background: var(--hover);
  border-color: var(--text-3);
}

.ws-trigger.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.ws-trigger > .material-symbols-outlined:first-child {
  color: var(--accent);
  font-size: 20px;
  flex: none;
}

.ws-trigger .ws-label {
  text-align: left;
  line-height: 1.2;
  min-width: 0;
}

.ws-trigger .ws-label .ws-k {
  font-size: 10.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  display: block;
}

.ws-trigger .ws-label b {
  font-size: 13px;
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.ws-trigger > .material-symbols-outlined:last-child {
  color: var(--text-3);
  margin-left: auto;
  flex: none;
}

.ws-menu {
  min-width: 340px;
  max-width: 360px;
}

.ws-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  margin: 2px 4px 6px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
}

.ws-search .material-symbols-outlined {
  color: var(--text-3);
}

.ws-search input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
}

.ws-search input::-moz-placeholder {
  color: var(--text-3);
}

.ws-search input::placeholder {
  color: var(--text-3);
}

.ws-list {
  max-height: 320px;
  overflow-y: auto;
}

.ws-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.12s;
}

.ws-user:hover {
  background: var(--hover);
}

.ws-user.on {
  background: var(--accent-soft);
}

.ws-user .ws-meta {
  min-width: 0;
}

.ws-user .ws-meta b {
  font-size: 13.5px;
  font-weight: var(--fw-medium);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ws-user .ws-meta span {
  font-size: 11.5px;
  color: var(--text-3);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

/* impersonation banner */
.imp-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 18px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text);
}

.imp-banner .material-symbols-outlined {
  color: var(--accent);
  font-size: 20px;
}

.imp-banner b {
  font-weight: var(--fw-semibold);
}

.imp-banner .imp-exit {
  margin-left: auto;
  font-weight: var(--fw-semibold);
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.imp-banner .imp-exit:hover {
  text-decoration: underline;
}

/* ---------------- Toast ---------------- */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  background: #1f2430;
  color: #fff;
  border-radius: var(--r-md);
  box-shadow: var(--sh-lg);
  font-size: 13.5px;
  min-width: 280px;
  animation: toast-in 0.25s var(--ease-out);
}

html[data-theme=dark] .toast {
  background: #2a323f;
  border: 1px solid var(--border);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.toast .material-symbols-outlined {
  font-size: 20px;
}

.toast .ok {
  color: #5fd99a;
}

.toast .act {
  margin-left: auto;
  color: var(--brand-amber);
  font-weight: var(--fw-semibold);
  cursor: pointer;
  padding-left: 12px;
}

.toast .act:hover {
  text-decoration: underline;
}

/* selection action bar (floating) */
.sel-bar {
  position: fixed;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 8px 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  box-shadow: var(--sh-lg);
  animation: toast-in 0.2s var(--ease-out);
}

.sel-bar .count {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: var(--fw-semibold);
  padding-right: 8px;
  border-right: 1px solid var(--border);
  margin-right: 4px;
}

.sel-bar .count .x {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
}

.sel-bar .count .x .material-symbols-outlined {
  font-size: 17px;
}

/* ---------------- Auth ---------------- */
.auth-page {
  min-height: 100%;
  display: flex;
  align-items: stretch;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.auth-bg {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 56px;
  color: #fff;
}

.auth-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(20, 30, 60, 0.78), rgba(35, 66, 180, 0.5));
  z-index: 1;
}

.auth-bg img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  -o-object-fit: cover;
     object-fit: cover;
}

.auth-bg .ab-content {
  position: relative;
  z-index: 2;
  max-width: 460px;
}

.auth-bg .ab-content h2 {
  font-size: 34px;
  font-weight: var(--fw-bold);
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}

.auth-bg .ab-content p {
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.92;
  margin: 0;
}

.auth-bg .ab-feat {
  display: flex;
  gap: 24px;
  margin-top: 30px;
}

.auth-bg .ab-feat .f {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  font-weight: var(--fw-medium);
}

.auth-bg .ab-feat .f .material-symbols-outlined {
  font-size: 20px;
}

.auth-panel {
  width: 480px;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 56px;
  background: var(--surface);
}

.auth-card {
  width: 100%;
  max-width: 372px;
  margin: 0 auto;
}

.auth-card .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.auth-card h1 {
  font-size: 26px;
  font-weight: var(--fw-bold);
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.auth-card .lead {
  color: var(--text-3);
  font-size: 14px;
  margin: 0 0 26px;
}

.auth-card .field {
  margin-bottom: 16px;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.auth-row .remember {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13.5px;
  color: var(--text-2);
  cursor: pointer;
}

.auth-row a, .link-act {
  color: var(--accent);
  font-size: 13.5px;
  font-weight: var(--fw-semibold);
  cursor: pointer;
}

.auth-row a:hover, .link-act:hover {
  text-decoration: underline;
}

.auth-foot {
  text-align: center;
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--text-3);
}

.check {
  width: 19px;
  height: 19px;
  border-radius: 5px;
  border: 2px solid var(--border-strong);
  display: inline-grid;
  place-items: center;
  flex: none;
  transition: all 0.14s;
  background: var(--surface);
}

.check .material-symbols-outlined {
  font-size: 14px;
  color: #fff;
  opacity: 0;
}

.check.on {
  background: var(--accent);
  border-color: var(--accent);
}

.check.on .material-symbols-outlined {
  opacity: 1;
}

/* centered auth variant */
.auth-page.centered {
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-page.centered .auth-panel {
  width: 100%;
  max-width: 440px;
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  padding: 44px 44px;
  border: 1px solid var(--border);
  position: relative;
  z-index: 1;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.auth-page.centered .auth-bg {
  display: none;
}

.auth-page.centered {
  background: var(--bg);
}

.auth-page.centered::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(20, 30, 60, 0.72), rgba(35, 66, 180, 0.48)), url("https://images.unsplash.com/photo-1586528116311-ad8dd3c8310d?q=80&w=1600&auto=format&fit=crop") center/cover no-repeat;
  transform: scale(1.02);
}

/* brand-panel auth variant (brand on right) */
.auth-page.brandsplit {
  flex-direction: row-reverse;
}

.auth-page.brandsplit .auth-bg::before {
  background: linear-gradient(150deg, rgba(35, 66, 180, 0.82), rgba(47, 87, 224, 0.58));
}

.auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.35;
  z-index: 1;
}

/* token-redirect splash */
.redirect-splash {
  min-height: 100%;
  display: grid;
  place-items: center;
  background: radial-gradient(900px 500px at 50% 0%, rgba(var(--accent-rgb), 0.14), transparent 60%), var(--bg);
}

.redirect-splash .rs-card {
  text-align: center;
}

.spinner {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 4px solid var(--surface-3);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* logo lockup */
.logo {
  display: flex;
  align-items: center;
  gap: 11px;
}

.logo .mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  flex: none;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--fab-gold) 0%, var(--fab-red) 48%, var(--fab-blue) 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(35, 66, 180, 0.28);
}

.logo .mark .material-symbols-outlined {
  color: #fff;
  font-size: 22px;
  font-variation-settings: "FILL" 1;
}

.logo .wm {
  line-height: 1.1;
}

.logo .wm b {
  font-size: 18px;
  font-weight: var(--fw-bold);
  letter-spacing: -0.02em;
  display: block;
}

.logo .wm b .u {
  color: var(--accent);
}

.logo .wm span {
  font-size: 9.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.14em;
  color: var(--text-3);
  text-transform: uppercase;
}

.sidebar.collapsed .logo .wm {
  display: none;
}

/* responsive */
@media (max-width: 1100px) {
  .details {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: 850;
    box-shadow: var(--sh-lg);
  }
}
@media (max-width: 880px) {
  .auth-panel {
    width: 100%;
  }
  .auth-bg {
    display: none;
  }
  .sidebar {
    position: fixed;
    z-index: 880;
    height: 100%;
    box-shadow: var(--sh-lg);
    transform: translateX(-100%);
    transition: transform 0.2s;
  }
  .sidebar.mobile-open {
    transform: none;
  }
}
.notifications-menu {
  position: absolute;
  right: 0;
  top: 46px;
  left: auto;
  min-width: 320px;
  max-width: 360px;
}

.notification-item {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  cursor: pointer;
  align-items: flex-start;
}

.notification-item:hover {
  background: var(--hover);
}

.notification-item .material-symbols-outlined {
  color: var(--accent);
  flex: none;
}

.notification-item b {
  display: block;
  font-size: 13px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-item span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
  text-transform: capitalize;
}

.empty-notifications {
  padding: 12px;
  color: var(--text-3);
  font-size: 13px;
}

/* mobile responsive refinements */
@media (max-width: 640px) {
  .app-content {
    padding: 26px 12px 48px;
    overflow-x: hidden;
  }
  .content-narrow {
    max-width: 100%;
  }
  .topbar {
    gap: 8px;
    padding: 0 10px;
  }
  .topbar .search {
    flex: 0 0 auto;
    width: 82px;
  }
  .topbar .search input {
    color: transparent;
    padding-right: 12px;
  }
  .topbar .search input:focus {
    color: var(--text);
    width: min(70vw, 280px);
    position: relative;
    z-index: 25;
  }
  .topbar .search .kbd {
    right: 10px;
  }
  .topbar-actions {
    gap: 2px;
    min-width: 0;
  }
  .topbar-actions .btn {
    padding: 0 12px;
  }
  .user-btn {
    display: none;
  }
  .avatar-stack {
    margin-right: 2px !important;
  }
  .notifications-menu {
    right: -4px;
    min-width: min(320px, 100vw - 24px);
    max-width: calc(100vw - 24px);
  }
  .page-head {
    align-items: stretch;
    gap: 12px;
    margin-bottom: 18px;
  }
  .page-head h1 {
    font-size: 30px;
    line-height: 1.6;
  }
  .page-head .ph-text {
    flex: 1 1 auto;
  }
  .page-head .ph-actions {
    margin-left: auto;
    justify-content: flex-end;
    gap: 12px;
  }
  .page-head .ph-actions .btn {
    min-width: 132px;
    justify-content: center;
  }
  .card {
    padding: 18px 20px;
  }
  .storage-bar-head {
    align-items: flex-start;
    gap: 8px;
  }
  .storage-bar-head .used {
    line-height: 1.35;
  }
  .legend {
    gap: 12px 18px;
  }
  .section-title {
    margin-top: 28px;
    font-size: 19px;
  }
  .qa-grid,
  .file-grid,
  .folder-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .qa-folder {
    padding: 22px 26px;
  }
  .qa-folder .qa-art {
    height: 130px;
  }
  .toolbar {
    align-items: stretch;
  }
  .toolbar .spacer {
    display: none;
  }
  .toolbar > div {
    width: 100%;
  }
  .seg {
    flex: none;
  }
  .file-list {
    overflow: hidden;
  }
  .list-head,
  .file-row {
    grid-template-columns: minmax(0, 1fr) 76px 40px;
    gap: 10px;
    padding: 0 12px;
  }
  .list-head > :nth-child(2),
  .list-head > :nth-child(4),
  .list-head > :nth-child(5),
  .file-row > :nth-child(2),
  .file-row > :nth-child(4),
  .file-row > :nth-child(5) {
    display: none;
  }
  .file-row {
    height: 70px;
  }
  .file-row .row-actions {
    opacity: 1;
  }
  .file-row .fr-check {
    opacity: 1;
  }
  .file-row .fr-name {
    min-width: 0;
  }
  .card.flush {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .data-table {
    min-width: 640px;
  }
  .modal {
    max-height: calc(100vh - 24px);
  }
  .overlay {
    padding: 12px;
  }
}
@media (max-width: 480px) {
  .page-head {
    flex-wrap: wrap;
  }
  .page-head .ph-text {
    flex: 1 1 42%;
  }
  .page-head .ph-actions {
    flex: 1 1 52%;
    width: auto;
  }
  .page-head .ph-actions .btn {
    min-width: 0;
    flex: 1;
    padding: 0 12px;
  }
  .storage-bar-head {
    flex-wrap: wrap;
  }
}
@media (max-width: 480px) {
  .page-head {
    display: block;
  }
}
.image-preview-modal {
  display: grid;
  min-height: 55vh;
  max-height: 72vh;
  place-items: center;
  overflow: auto;
  border-radius: 16px;
  background: var(--surface-2);
}

.image-preview-modal img {
  max-width: 100%;
  max-height: 70vh;
  -o-object-fit: contain;
     object-fit: contain;
}

/* Vue transition helpers used across the app */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.16s var(--ease);
}

.fade-enter, .fade-leave-to {
  opacity: 0;
}
