/* base.css */
:root {
  --bg: #f4f6f8;
  --bg-2: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f4f7;
  --sidebar: #111318;
  --sidebar-2: #181b22;
  --text: #121418;
  --text-2: #3f4650;
  --muted: #7b8491;
  --line: #dce2e8;
  --line-2: #edf1f5;
  --accent: #111318;
  --accent-2: #2d3440;
  --blue: #2563eb;
  --danger: #d04444;
  --danger-bg: #fff1f1;
  --success: #0f766e;
  --warning: #9a6700;
  --radius-xs: 7px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow-sm: 0 8px 20px rgba(15, 23, 42, .07);
  --shadow-md: 0 18px 42px rgba(15, 23, 42, .12);
  --sidebar-width: 270px;
  --topbar-height: 68px;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 9% -8%, rgba(17,19,24,.08), transparent 27rem),
    linear-gradient(180deg, #fbfcfd 0%, var(--bg) 58%, #eef1f4 100%);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
img, video, audio { max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(26px, 2.4vw, 36px); line-height: 1.1; letter-spacing: -0.055em; }
h2 { margin-bottom: 8px; font-size: 19px; letter-spacing: -0.035em; }
h3 { margin-bottom: 6px; font-size: 15px; letter-spacing: -0.02em; }
.muted { color: var(--muted); font-size: 13px; }
button:disabled { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* layout.css */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--topbar-height);
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(280px, 720px) 1fr;
  align-items: center;
  gap: 22px;
  padding: 0 24px;
  background: rgba(255,255,255,.86);
  border-bottom: 1px solid rgba(220,226,232,.86);
  backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; width: max-content; }
.brand-mark, .auth-logo {
  width: 38px; height: 38px; display: grid; place-items: center; border-radius: 14px;
  color: #fff; background: linear-gradient(135deg, #101216, #323946); font-weight: 900;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), var(--shadow-xs);
}
.brand-text { font-size: 21px; font-weight: 900; letter-spacing: -0.065em; }
.top-search {
  height: 44px; min-width: 0; display: flex; align-items: center; gap: 8px;
  padding: 0 7px 0 16px; border: 1px solid var(--line); border-radius: 999px;
  background: #fff; box-shadow: var(--shadow-xs);
}
.search-icon { width: 14px; height: 14px; border: 2px solid var(--muted); border-radius: 999px; position: relative; flex: none; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 2px; right: -6px; bottom: -4px; background: var(--muted); transform: rotate(45deg); border-radius: 999px; }
.top-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; }
.top-search button { min-height: 34px; padding: 0 15px; border-radius: 999px; }
.top-actions { justify-self: end; display: flex; align-items: center; gap: 9px; }
.top-link { padding: 9px 11px; color: var(--text-2); border-radius: 999px; font-weight: 750; }
.top-link:hover { background: var(--surface-3); color: var(--text); }
.user-chip { display: inline-flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-weight: 800; color: var(--text-2); }
.user-avatar { width: 31px; height: 31px; border-radius: 999px; display: grid; place-items: center; color: #fff; background: var(--accent); font-size: 12px; }
.app-shell { display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); min-height: calc(100vh - var(--topbar-height)); }
.guest-shell { display: block; }
.sidebar { position: sticky; top: var(--topbar-height); height: calc(100vh - var(--topbar-height)); overflow: auto; background: linear-gradient(180deg, var(--sidebar), #151820); color: #fff; }
.sidebar-inner { min-height: 100%; display: flex; flex-direction: column; gap: 18px; padding: 22px 16px; }
.nav-group { display: grid; gap: 5px; }
.nav-title { padding: 7px 12px; color: rgba(255,255,255,.48); font-size: 11px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.nav-item { min-height: 42px; display: flex; align-items: center; gap: 11px; padding: 9px 10px; color: rgba(255,255,255,.72); border-radius: 13px; font-weight: 760; }
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(255,255,255,.1); }
.nav-item.active { box-shadow: inset 3px 0 0 rgba(255,255,255,.72); }
.nav-item.disabled { opacity: .55; }
.nav-icon { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 9px; color: #111318; background: rgba(255,255,255,.88); font-size: 11px; font-weight: 950; }
.nav-badge { margin-left: auto; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.12); color: rgba(255,255,255,.72); font-size: 11px; }
.storage-card { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(255,255,255,.07); }
.storage-card-head { display: flex; justify-content: space-between; align-items: center; font-weight: 850; }
.status-dot { width: 9px; height: 9px; border-radius: 999px; background: #46d39a; box-shadow: 0 0 0 4px rgba(70,211,154,.14); }
.storage-meter { height: 8px; margin: 14px 0 10px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.14); }
.storage-meter span { display: block; width: 36%; height: 100%; border-radius: inherit; background: #fff; }
.storage-card p { margin: 0; color: rgba(255,255,255,.58); font-size: 12px; }
.content { min-width: 0; padding: 30px; }
.content-inner { width: min(1480px, 100%); margin: 0 auto; }
.flash { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; padding: 12px 14px; border: 1px solid #bfd5ff; border-radius: 14px; background: #f3f7ff; color: #13315f; font-weight: 700; }
.flash span { width: 8px; height: 8px; margin-top: 7px; border-radius: 999px; background: #2563eb; flex: none; }
.page-stack { display: grid; gap: 18px; }
.page-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 12px 0 20px; border-bottom: 1px solid var(--line); background: transparent; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.page-kicker, .section-label { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--muted); font-size: 11px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.page-kicker::before, .section-label::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--accent); }
@media (max-width: 1040px) {
  .topbar { grid-template-columns: 1fr; height: auto; padding: 14px; }
  .top-search { width: 100%; }
  .top-actions { justify-self: stretch; justify-content: space-between; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar-inner { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .storage-card { display: none; }
  .content { padding: 18px; }
}
@media (max-width: 680px) { .sidebar-inner { grid-template-columns: 1fr; } .page-hero { flex-direction: column; padding: 20px; } }

/* components.css */
.btn, button, .item-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--theme-on-accent, #fff);
  background: var(--accent);
  font-weight: 830;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease;
}
.btn:hover, button:hover, .item-actions a:hover { transform: translateY(-1px); box-shadow: var(--shadow-xs); }
.btn-primary { color: #fff; background: var(--accent); }
.btn-secondary, button.secondary, .item-actions a { color: var(--text); background: var(--surface-2); border-color: var(--line); }
.btn-ghost { color: var(--text-2); background: var(--surface-2); border-color: transparent; }
.btn-danger, button.danger { color: #fff; background: var(--danger); }
.btn.small, button.small { min-height: 32px; padding: 5px 10px; border-radius: 10px; font-size: 12px; }
.full { width: 100%; }

input, select, textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-2);
  outline: 0;
  transition: border-color .12s ease, box-shadow .12s ease, background .12s ease;
}
input:focus, select:focus, textarea:focus { border-color: #9aa4b2; box-shadow: 0 0 0 4px rgba(17,19,24,.06); }
label span { display: block; margin-bottom: 6px; color: var(--text-2); font-size: 12px; font-weight: 850; }
.stack-form { display: grid; gap: 13px; }
.mini-badge, .table-badge { display: inline-flex; align-items: center; width: max-content; min-height: 24px; padding: 3px 9px; border-radius: 999px; color: var(--text-2); background: var(--surface-3); font-size: 11px; font-weight: 900; }
.filter-chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-chip-row span { display: inline-flex; align-items: center; min-height: 31px; padding: 6px 11px; border-radius: 999px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 850; }
.filter-chip-row.strong span { background: var(--surface); border: 1px solid var(--line-2); }
.empty-state { grid-column: 1 / -1; min-height: 220px; display: grid; place-items: center; text-align: center; padding: 28px; border: 1px dashed var(--line); border-radius: var(--radius-xl); background: var(--surface); }
.empty-state h2 { margin: 8px 0 4px; }
.empty-state p { margin: 0; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 18px; color: #fff; background: var(--accent); font-weight: 950; }
.details-menu { position: absolute; right: 0; top: 36px; z-index: 20; width: 270px; display: grid; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-md); }
.item-menu { position: relative; }
.item-menu summary { width: 34px; height: 34px; display: grid; place-items: center; list-style: none; border-radius: 11px; color: var(--text-2); background: var(--surface-2); border: 1px solid var(--line-2); cursor: pointer; font-weight: 900; }
.item-menu summary::-webkit-details-marker { display: none; }
.menu-form { display: grid; gap: 8px; }
.menu-form label { margin-bottom: -2px; color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.menu-divider { height: 1px; background: var(--line-2); }
.table-card, .command-card, .list-panel, .settings-card, .preview-card { border: 1px solid var(--line-2); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-xs); }
.table-head, .list-panel-head, .command-head, .settings-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.table-wrap { overflow: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.data-table th, .data-table td { padding: 13px 14px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.data-table th { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .04em; background: var(--surface-2); }
.data-table tr:last-child td { border-bottom: 0; }
.table-empty { padding: 24px; text-align: center; color: var(--muted); }

/* auth.css */
.auth-page { min-height: calc(100vh - var(--topbar-height)); display: grid; grid-template-columns: minmax(320px, .95fr) minmax(360px, 460px); align-items: center; gap: 34px; padding: 52px min(6vw, 72px); }
.auth-page.simple { grid-template-columns: minmax(320px, 460px); justify-content: center; }
.auth-visual { padding: 34px; border: 1px solid rgba(255,255,255,.5); border-radius: 32px; background: linear-gradient(135deg, rgba(255,255,255,.78), rgba(244,246,249,.72)); box-shadow: var(--shadow-sm); }
.auth-visual .auth-logo { width: 58px; height: 58px; margin-bottom: 18px; font-size: 22px; }
.auth-visual h1 { margin-bottom: 12px; font-size: clamp(38px, 5vw, 64px); }
.auth-visual p { max-width: 560px; color: var(--text-2); font-size: 17px; font-weight: 640; }
.auth-feature-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.auth-feature-list span { padding: 8px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); color: var(--text-2); font-size: 12px; font-weight: 850; }
.auth-card { padding: 30px; border: 1px solid var(--line-2); border-radius: 28px; background: rgba(255,255,255,.9); box-shadow: var(--shadow-md); }
.auth-card.small-card { width: min(460px, 100%); }
.auth-card h2 { margin-bottom: 4px; font-size: 28px; }
.auth-foot { margin: 18px 0 0; color: var(--muted); }
.auth-foot a { color: var(--text); font-weight: 900; }
@media (max-width: 900px) { .auth-page { grid-template-columns: 1fr; padding: 28px 18px; } .auth-visual { display: none; } }

/* drive.css */
.drive-page { display: grid; gap: 18px; }
.drive-hero { background: linear-gradient(135deg, rgba(255,255,255,.9), rgba(244,246,248,.78)); }
.breadcrumb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 720; }
.breadcrumb-root { color: var(--text); }
.drive-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.summary-card { min-height: 104px; display: grid; align-content: center; gap: 4px; padding: 18px; border: 1px solid var(--line-2); border-radius: 20px; background: rgba(255,255,255,.83); box-shadow: var(--shadow-xs); }
.summary-card strong { font-size: 26px; line-height: 1; letter-spacing: -0.045em; }
.summary-card span:last-child { color: var(--muted); font-size: 12px; font-weight: 760; }
.summary-label { color: var(--muted); font-size: 11px !important; font-weight: 900 !important; text-transform: uppercase; letter-spacing: .06em; }
.summary-wide strong { font-size: 20px; }
.command-grid { display: grid; grid-template-columns: minmax(280px, .68fr) minmax(420px, 1.32fr); gap: 16px; }
.command-card { padding: 20px; }
.upload-form { display: grid; gap: 14px; }
.file-drop { min-height: 132px; display: grid; place-items: center; align-content: center; gap: 6px; padding: 18px; border: 1px dashed #b8c2cf; border-radius: 18px; background: linear-gradient(180deg, #fbfcfe, #f4f6f9); text-align: center; cursor: pointer; }
.file-drop:hover { border-color: #7c8795; }
.file-drop input { width: 1px; height: 1px; opacity: 0; padding: 0; min-height: 0; overflow: hidden; }
.file-drop-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: var(--accent); font-size: 20px; font-weight: 900; }
.file-drop strong { font-size: 16px; letter-spacing: -0.02em; }
.file-drop small { color: var(--muted); font-weight: 700; }
.policy-grid { display: grid; grid-template-columns: 1fr 1fr 1fr auto; gap: 10px; align-items: end; }
.policy-manual { min-width: 160px; }
.list-panel { padding: 18px; }
.list-panel-head { margin-bottom: 14px; }
.list-panel-head.compact { margin-bottom: 6px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.item-card { position: relative; min-height: 190px; display: grid; grid-template-rows: auto 1fr auto; gap: 14px; padding: 16px; border: 1px solid var(--line-2); border-radius: 22px; background: rgba(255,255,255,.92); box-shadow: var(--shadow-xs); transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.item-card:hover { transform: translateY(-2px); border-color: #c9d1dc; box-shadow: var(--shadow-sm); }
.item-card.compact { min-height: 160px; }
.item-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.item-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 18px; border: 1px solid var(--line-2); background: linear-gradient(180deg, #f8fafc, #edf1f6); color: #28303b; font-size: 12px; font-weight: 950; letter-spacing: .04em; }
.item-icon.folder { background: linear-gradient(180deg, #fff5d6, #ffe6a3); color: #7a4b00; border-color: #f7d98d; }
.item-icon.image { background: linear-gradient(180deg, #e9fbff, #cef5ff); color: #036075; }
.item-icon.video { background: linear-gradient(180deg, #fff0f7, #ffe0ee); color: #9f174d; }
.item-icon.audio { background: linear-gradient(180deg, #f0fdf7, #d9fbe9); color: #0b7456; }
.item-icon.pdf { background: linear-gradient(180deg, #fff3eb, #ffe1d2); color: #b13b16; }
.item-icon.archive { background: linear-gradient(180deg, #f4f0ff, #e7ddff); color: #5b31b8; }
.item-icon.code { background: linear-gradient(180deg, #f8fafc, #e2e8f0); color: #111827; }
.item-icon.text { background: linear-gradient(180deg, #f7fee7, #ecfccb); color: #4d7c0f; }
.item-body { min-width: 0; }
.item-name { margin: 0 0 7px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; font-size: 15px; font-weight: 900; }
.item-meta { margin: 0; color: var(--muted); font-size: 12px; font-weight: 760; }
.item-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.item-actions .btn, .item-actions a { min-height: 32px; padding: 6px 9px; border-radius: 10px; font-size: 12px; }
@media (max-width: 1180px) { .drive-summary { grid-template-columns: repeat(2, 1fr); } .command-grid { grid-template-columns: 1fr; } .policy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .policy-grid button { grid-column: 1 / -1; } }
@media (max-width: 680px) { .drive-summary { grid-template-columns: 1fr; } .policy-grid { grid-template-columns: 1fr; } .file-grid { grid-template-columns: 1fr; } }

/* forms.css */
.inline-filter { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.inline-filter input { width: 210px; }
.inline-filter select { width: 150px; }
.search-console { display: grid; gap: 16px; padding: 18px; border: 1px solid var(--line-2); border-radius: var(--radius-xl); background: rgba(255,255,255,.86); box-shadow: var(--shadow-xs); }
.search-main-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.search-filter-grid { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 12px; }
.settings-layout { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(420px, 1.25fr); gap: 18px; align-items: start; }
.settings-card { padding: 22px; display: grid; gap: 14px; }
.settings-card.wide { min-width: 0; }
.settings-row { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.unit-label { min-height: 40px; display: inline-flex; align-items: center; padding: 0 12px; color: var(--muted); font-weight: 900; }
.switch-row { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--text-2); }
.switch-row input { width: auto; min-height: auto; }
.switch-ui { width: 40px; height: 22px; position: relative; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line); }
.switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-xs); }
.switch-row input:checked + .switch-ui { background: var(--accent); border-color: var(--accent); }
.switch-row input:checked + .switch-ui::after { left: 21px; }
.policy-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.policy-item { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface-2); }
.policy-item input { width: auto; min-height: auto; }
.policy-type { margin: 0; flex: 1; color: var(--text); font-size: 13px; }
.policy-state { color: var(--muted); font-size: 11px; font-weight: 900; }
.form-submit-row { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
@media (max-width: 1180px) { .search-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .settings-layout { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .search-main-row { grid-template-columns: 1fr; } .search-filter-grid { grid-template-columns: 1fr; } .inline-filter { justify-content: stretch; } .inline-filter input, .inline-filter select, .inline-filter button { width: 100%; } }

/* preview.css */
.preview-card { padding: 0; overflow: hidden; }
.preview-card[data-office-preview] [hidden] { display:none !important; }
.preview-card[data-office-preview] iframe { display:block; width:100%; height:75vh; border:0; }
.text-preview { margin: 0; min-height: 520px; padding: 24px; overflow: auto; color: #d9e2ef; background: #111318; font-family: "Cascadia Code", "Consolas", monospace; font-size: 13px; line-height: 1.65; white-space: pre-wrap; }

/* workspace.css */
.workspace-page { display: grid; gap: 18px; }
.workspace-hero { background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(239,242,247,.82)); }
.workspace-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.workspace-card { min-height: 200px; display: grid; align-content: end; padding: 22px; border: 1px solid var(--line-2); border-radius: var(--radius-xl); background: linear-gradient(180deg, #fff, #f5f7fa); box-shadow: var(--shadow-xs); }
.workspace-card span { width: max-content; margin-bottom: 48px; padding: 5px 10px; border-radius: 999px; color: #fff; background: var(--accent); font-size: 11px; font-weight: 900; letter-spacing: .05em; text-transform: uppercase; }
.workspace-card p { margin: 0; color: var(--muted); font-weight: 680; }
.editor-shell { min-height: 620px; display: grid; grid-template-columns: 220px minmax(0, 1fr); border: 1px solid var(--line-2); border-radius: var(--radius-xl); background: #fff; overflow: hidden; box-shadow: var(--shadow-xs); }
.editor-rail { display: grid; align-content: start; gap: 10px; padding: 18px; background: #f8fafc; border-right: 1px solid var(--line-2); }
.editor-stage { display: grid; place-items: center; padding: 24px; background: linear-gradient(135deg, #f7f8fa, #eef1f5); }
.editor-placeholder { max-width: 480px; text-align: center; }
.editor-placeholder p { color: var(--muted); }
@media (max-width: 820px) { .editor-shell { grid-template-columns: 1fr; } .editor-rail { border-right: 0; border-bottom: 1px solid var(--line-2); grid-template-columns: repeat(2, 1fr); } }

/* admin.css */
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat-card { padding: 20px; border: 1px solid var(--line-2); border-radius: 22px; background: #fff; box-shadow: var(--shadow-xs); }
.stat-card span { color: var(--muted); font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.stat-card strong { display: block; margin: 7px 0 2px; font-size: 34px; letter-spacing: -0.05em; }
.stat-card small { color: var(--muted); font-weight: 750; }
.admin-grid { display: grid; gap: 18px; }
@media (max-width: 820px) { .stats-grid { grid-template-columns: 1fr; } }

/* landing.css */
/* ALchive landing screen: separated from auth and drive */
.guest-screen {
  --bg: #0f172a;
  --text: #f8fafc;
  --text-2: #d4dceb;
  --muted: #94a3b8;
  --surface: #182235;
  background: #0f172a;
}
.guest-screen .landing-topbar {
  grid-template-columns: 240px 1fr auto;
  background: rgba(15, 23, 42, .76);
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  backdrop-filter: blur(18px);
}
.guest-screen .brand-text,
.guest-screen .top-link { color: #f8fafc; }
.guest-screen .top-link:hover { background: rgba(255,255,255,.08); }
.guest-screen .brand-mark,
.landing-logo {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  box-shadow: 0 14px 30px rgba(59, 130, 246, .22);
}
.landing-page {
  min-height: calc(100vh - var(--topbar-height));
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 72px 24px;
  background:
    radial-gradient(circle at 78% 8%, rgba(59, 130, 246, .15), transparent 28rem),
    radial-gradient(circle at 12% 82%, rgba(139, 92, 246, .13), transparent 24rem),
    linear-gradient(135deg, #0f172a 0%, #111c2f 50%, #0b1220 100%);
}
.landing-ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(2px);
  opacity: .6;
  pointer-events: none;
}
.landing-ambient-a { width: 420px; height: 420px; right: -120px; top: -140px; background: rgba(37, 99, 235, .22); }
.landing-ambient-b { width: 300px; height: 300px; left: -90px; bottom: -110px; background: rgba(124, 58, 237, .18); }
.landing-hero-card {
  position: relative;
  width: min(620px, 92vw);
  padding: 52px 58px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 30px;
  background: rgba(22, 33, 51, .72);
  box-shadow: 0 34px 80px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255,255,255,.05);
  backdrop-filter: blur(18px);
  color: #f8fafc;
}
.landing-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 17px;
  font-weight: 950;
  margin-bottom: 24px;
}
.landing-hero-card h1 {
  font-size: clamp(42px, 5vw, 68px);
  margin-bottom: 14px;
  letter-spacing: -0.075em;
}
.landing-hero-card p {
  max-width: 500px;
  margin-bottom: 30px;
  color: #cbd5e1;
  font-size: 17px;
  line-height: 1.75;
}
.landing-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.landing-actions .btn { min-width: 124px; justify-content: center; }
@media (max-width: 720px) {
  .guest-screen .landing-topbar { grid-template-columns: 1fr auto; }
  .landing-hero-card { padding: 38px 28px; }
}

/* auth_v2.css */
/* Login screen: a solid dark background without decorative shapes. */
.auth-screen {
  min-height: 100vh;
  color: #f8fafc;
  background: #0b0b0b;
  overflow: hidden;
}
.auth-screen .app-shell,
.auth-screen .guest-shell,
.auth-screen .content,
.auth-screen .content-inner {
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
}
.auth-stage {
  min-height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  padding: 32px;
}
.auth-panel {
  position: relative;
  width: 430px;
  max-width: 92vw;
  padding: 52px 46px;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 26px;
  background: rgba(28, 41, 61, .88);
  box-shadow: 0 34px 90px rgba(2, 6, 23, .35), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(18px);
}
.auth-symbol {
  width: 58px;
  height: 58px;
  margin: 0 auto 20px;
  border-radius: 17px;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 18px 38px rgba(59, 130, 246, .27);
  position: relative;
}
.auth-symbol::before,
.auth-symbol::after { content: ""; position: absolute; }
.cloud-symbol::before {
  width: 25px;
  height: 13px;
  left: 16px;
  top: 25px;
  border-radius: 10px;
  background: #fff;
}
.cloud-symbol::after {
  width: 14px;
  height: 14px;
  left: 24px;
  top: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: -8px 5px 0 -2px #fff, 8px 6px 0 -3px #fff;
}
.user-plus-symbol::before {
  width: 16px;
  height: 16px;
  left: 18px;
  top: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 20px 0 5px #fff;
  clip-path: inset(0 0 -18px 0 round 10px);
}
.user-plus-symbol::after {
  width: 18px;
  height: 4px;
  right: 14px;
  top: 25px;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 #fff;
}
.auth-panel h1 {
  margin: 0 0 8px;
  text-align: center;
  font-size: 30px;
  letter-spacing: -0.06em;
}
.auth-subtitle {
  margin-bottom: 34px;
  text-align: center;
  color: #a7b3c6;
  font-weight: 650;
}
.auth-form { display: grid; gap: 22px; }
.auth-form .auth-remember { display: flex; align-items: center; gap: 9px; color: #cbd5e1; font-size: 13px; cursor: pointer; }
.auth-form .auth-remember input { appearance:none; width:17px; height:17px; min-height:0; flex:none; margin:0; padding:0; border:1px solid #7185a3; border-radius:3px; background:#0f172a; display:grid; place-content:center; cursor:pointer; }
.auth-form .auth-remember input:checked { background:#2563eb; border-color:#60a5fa; }
.auth-form .auth-remember input:checked::after { content:""; width:8px; height:4px; border-left:2px solid #fff; border-bottom:2px solid #fff; transform:translateY(-1px) rotate(-45deg); }
.auth-form .auth-remember input:focus-visible { outline:2px solid #93c5fd; outline-offset:3px; }
@media (forced-colors:active) { .auth-form .auth-remember input { appearance:auto; } .auth-form .auth-remember input::after { content:none; } }
.auth-remember-hint { margin: -14px 0 0; color: #94a3b8; font-size: 12px; }
.auth-form label { display: grid; gap: 8px; color: #aebbd0; font-weight: 800; }
.auth-form input {
  height: 54px;
  border: 1px solid rgba(148, 163, 184, .13);
  border-radius: 13px;
  padding: 0 18px;
  outline: none;
  color: #e5eefc;
  background: #121c2e;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
.auth-form input::placeholder { color: #5f6f85; }
.auth-form input:focus {
  border-color: rgba(59, 130, 246, .65);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .13);
}
.auth-password-field { display:grid; gap:8px; min-width:0; }
.auth-password-control { position:relative; min-width:0; }
.auth-screen .auth-form .auth-password-control input { width:100%; padding-inline-end:52px !important; }
.auth-password-toggle {
  position:absolute; inset-block:2px; inset-inline-end:2px;
  display:grid; place-items:center; width:44px; min-height:36px;
  margin:0; padding:0; border:0; border-radius:10px;
  color:var(--theme-muted,#aebbd0); background:transparent; cursor:pointer;
}
.auth-password-toggle[hidden] { display:none; }
.auth-password-toggle:hover { color:var(--theme-text,#f8fafc); background:var(--theme-hover,#1e293b); }
.auth-password-toggle:focus-visible { outline:2px solid var(--theme-focus,#93c5fd); outline-offset:-2px; }
.auth-password-eye { width:20px; height:20px; }
.auth-password-eye-slash { display:none; }
.auth-password-toggle[aria-pressed=true] .auth-password-eye-slash { display:block; }
.auth-submit {
  height: 58px;
  margin-top: 8px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 15px 32px rgba(37, 99, 235, .22);
}
.login-submit { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.register-submit { background: linear-gradient(135deg, #8b5cf6, #7c3aed); box-shadow: 0 15px 32px rgba(124,58,237,.24); }
.auth-divider {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 36px 0 24px;
  color: #617087;
  font-style: normal;
  font-weight: 700;
}
.auth-divider span { height: 1px; flex: 1; background: rgba(148, 163, 184, .16); }
.auth-divider em { font-style: normal; white-space: nowrap; }
.auth-secondary {
  width: max-content;
  min-width: 160px;
  height: 45px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(59, 130, 246, .28);
  border-radius: 12px;
  color: #60a5fa;
  font-weight: 900;
}
.auth-secondary:hover { background: rgba(59, 130, 246, .08); }
.register-secondary { color: #a78bfa; border-color: rgba(139,92,246,.36); }
@media (max-width: 520px) {
  .auth-stage { padding: 20px; }
  .auth-panel { padding: 38px 26px; }
}

/* panel_v2.css */
/* Sidebar and logged-in topbar redesign: Google Drive / MEGA inspired, ALchive dark blue */
.app-screen {
  --bg: #0f172a;
  --bg-2: #111c2f;
  --surface: #172033;
  --surface-2: #1b2940;
  --surface-3: #22324d;
  --sidebar: #0b1220;
  --sidebar-2: #111827;
  --text: #f8fafc;
  --text-2: #dbe5f4;
  --muted: #91a0b6;
  --line: rgba(148, 163, 184, .15);
  --line-2: rgba(148, 163, 184, .1);
  --accent: #3b82f6;
  --accent-2: #2563eb;
  --sidebar-width: 278px;
  background: #0f172a;
}
.app-screen.sidebar-collapsed { --sidebar-width: 74px; }
.app-screen .topbar {
  grid-template-columns: var(--sidebar-width) minmax(280px, 700px) 1fr;
  background: rgba(15, 23, 42, .92);
  border-bottom: 1px solid rgba(148, 163, 184, .13);
  backdrop-filter: blur(18px);
  transition: grid-template-columns .18s ease;
}
.app-screen .brand {
  display: none;
}
.app-screen .top-search {
  background: #121c2e;
  border-color: rgba(148, 163, 184, .16);
  color: #dbeafe;
}
.app-screen .top-search input { color: #e5eefc; }
.app-screen .top-search input::placeholder { color: #74849b; }
.app-screen .top-search button {
  border: 0;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 900;
}
.app-screen .top-link { color: #cbd5e1; }
.app-screen .top-link:hover { background: rgba(255,255,255,.07); color: #fff; }
.app-screen .user-chip {
  background: #172033;
  border-color: rgba(148, 163, 184, .18);
  color: #e5eefc;
}
.app-screen .user-avatar,
.app-screen .brand-mark {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
}
.app-screen .app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  background: radial-gradient(circle at 72% 5%, rgba(37, 99, 235, .08), transparent 28rem), #0f172a;
  transition: grid-template-columns .18s ease;
}
.app-screen .content {
  background: #0f172a;
  color: #f8fafc;
}
.sidebar {
  position: sticky;
  top: var(--topbar-height);
  height: calc(100vh - var(--topbar-height));
  overflow: visible;
  background: linear-gradient(180deg, #0b1220 0%, #101827 100%);
  border-right: 1px solid rgba(148, 163, 184, .12);
  color: #f8fafc;
  transition: width .18s ease;
}
.sidebar-head {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 18px 0 22px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}
.sidebar-brand {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-size: 19px;
  font-weight: 950;
  letter-spacing: -0.05em;
}
.brand-mark.compact {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  flex: none;
}
.sidebar-toggle {
  width: 36px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, .16);
  border-radius: 10px;
  color: #e5eefc;
  background: transparent;
  cursor: pointer;
  font-weight: 950;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.07); }
.sidebar-inner {
  min-height: calc(100% - 70px);
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 22px 14px 16px;
}
.nav-group { display: grid; gap: 6px; }
.nav-title {
  padding: 0 12px 5px;
  color: #93a4bd;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: none;
}
.nav-item {
  position: relative;
  min-height: 45px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  color: #d7e0ee;
  border-radius: 0;
  font-weight: 850;
  letter-spacing: -0.01em;
  background: transparent;
}
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active {
  color: #fff;
  background: rgba(255,255,255,.09);
  box-shadow: inset 4px 0 0 #3b82f6;
}
.nav-current {
  display: none;
  margin-left: auto;
  color: #bfdbfe;
  font-size: 20px;
  line-height: 1;
}
.nav-item.active .nav-current { display: block; }
.nav-item.disabled { opacity: .55; cursor: default; }
.nav-icon {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 0;
  background: transparent;
  color: #fff;
  position: relative;
  font-size: 0;
}
.line-icon::before,
.line-icon::after { content: ""; position: absolute; box-sizing: border-box; }
.line-icon.cloud::before {
  width: 22px; height: 12px; left: 3px; top: 11px;
  border: 2px solid currentColor; border-top: 0; border-radius: 0 0 10px 10px;
}
.line-icon.cloud::after {
  width: 16px; height: 16px; left: 6px; top: 4px;
  border: 2px solid currentColor; border-bottom: 0; border-radius: 999px 999px 0 0;
}
.line-icon.clock::before { width: 21px; height: 21px; border: 2px solid currentColor; border-radius: 50%; }
.line-icon.clock::after { width: 8px; height: 7px; border-left: 2px solid currentColor; border-bottom: 2px solid currentColor; left: 13px; top: 7px; }
.line-icon.heart::before { content: "♡"; position: static; font-size: 26px; line-height: 1; }
.line-icon.edit::before { width: 18px; height: 22px; border: 2px solid currentColor; border-radius: 3px; left: 3px; top: 3px; }
.line-icon.edit::after { width: 11px; height: 3px; background: currentColor; transform: rotate(-35deg); right: 1px; bottom: 5px; border-radius: 3px; }
.line-icon.folder::before { width: 23px; height: 16px; left: 2px; top: 9px; border: 2px solid currentColor; border-radius: 3px; }
.line-icon.folder::after { width: 10px; height: 5px; left: 4px; top: 5px; border: 2px solid currentColor; border-bottom: 0; border-radius: 3px 3px 0 0; }
.line-icon.trash::before { width: 17px; height: 18px; left: 6px; top: 8px; border: 2px solid currentColor; border-top: 0; }
.line-icon.trash::after { width: 20px; height: 2px; left: 4px; top: 6px; background: currentColor; box-shadow: 5px -4px 0 -1px currentColor; }
.line-icon.gear::before { content: "⚙"; position: static; font-size: 24px; line-height: 1; }
.line-icon.user::before { width: 11px; height: 11px; left: 8px; top: 4px; border: 2px solid currentColor; border-radius: 50%; }
.line-icon.user::after { width: 20px; height: 10px; left: 4px; bottom: 3px; border: 2px solid currentColor; border-radius: 12px 12px 0 0; border-bottom: 0; }
.line-icon.admin::before { content: "♛"; position: static; font-size: 24px; line-height: 1; }
.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.09);
  color: #a9b8ca;
  font-size: 11px;
  font-weight: 800;
}
.storage-card {
  margin-top: auto;
  padding: 16px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 16px;
  background: rgba(255, 255, 255, .055);
}
.storage-card-head {
  display: grid;
  gap: 3px;
  font-size: 12px;
  color: #dbeafe;
  font-weight: 850;
}
.storage-card-head span:last-child { color: #f8fafc; font-size: 11px; }
.storage-meter {
  height: 6px;
  margin: 12px 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.16);
  overflow: hidden;
}
.storage-meter span { display: block; width: 56%; height: 100%; border-radius: inherit; background: #e5eefc; }
.storage-manage { color: #60a5fa; font-weight: 900; font-size: 12px; }
.sidebar-resizer {
  position: absolute;
  top: 72px;
  right: -5px;
  width: 10px;
  height: calc(100% - 150px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: col-resize;
  color: rgba(255,255,255,.4);
}
.sidebar-resizer span {
  width: 2px;
  height: 44px;
  border-left: 1px solid rgba(255,255,255,.35);
  border-right: 1px solid rgba(255,255,255,.2);
}
.app-screen.sidebar-collapsed .sidebar-brand-text,
.app-screen.sidebar-collapsed .nav-label,
.app-screen.sidebar-collapsed .nav-title,
.app-screen.sidebar-collapsed .nav-badge,
.app-screen.sidebar-collapsed .storage-card-head,
.app-screen.sidebar-collapsed .storage-meter,
.app-screen.sidebar-collapsed .storage-manage {
  display: none;
}
.app-screen.sidebar-collapsed .sidebar-head {
  justify-content: center;
  padding: 0;
}
.app-screen.sidebar-collapsed .sidebar-brand { display: none; }
.app-screen.sidebar-collapsed .sidebar-toggle {
  width: 44px;
  border: 0;
  font-size: 18px;
}
.app-screen.sidebar-collapsed .sidebar-toggle::before { content: "≫"; }
.app-screen.sidebar-collapsed .sidebar-toggle { color: transparent; }
.app-screen.sidebar-collapsed .sidebar-toggle::before { color: #e5eefc; }
.app-screen.sidebar-collapsed .sidebar-inner {
  padding: 16px 10px;
  align-items: center;
  gap: 18px;
}
.app-screen.sidebar-collapsed .nav-item {
  width: 48px;
  height: 48px;
  padding: 0;
  justify-content: center;
}
.app-screen.sidebar-collapsed .nav-current { display: none !important; }
.app-screen.sidebar-collapsed .storage-card {
  width: 48px;
  height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
}
.app-screen.sidebar-collapsed .sidebar-resizer { display: none; }
@media (max-width: 1040px) {
  .app-screen .topbar { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar-resizer { display: none; }
  .app-screen .app-shell { grid-template-columns: 1fr; }
  .sidebar-head { display: none; }
  .sidebar-inner { min-height: auto; display: grid; grid-template-columns: 1fr; }
}

/* ui_directive_01.css */
/* User-directed UI pass 01: solid dark frame, compact MEGA/Drive-like sidebar, upload button flow */

/* Global dark app surface: no decorative divider/gradient noise */
body.app-screen,
body.guest-screen {
  background: #0f172a !important;
}

body.app-screen .app-shell,
body.app-screen .content,
body.app-screen .content-inner {
  background: #0f172a !important;
}

/* Landing: full solid surface, top actions only, no duplicate hero buttons or visual frame */
.guest-screen .landing-topbar {
  background: #0f172a !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.guest-screen .landing-page {
  background: #0f172a !important;
  min-height: calc(100vh - var(--topbar-height));
}
.guest-screen .landing-ambient { display: none !important; }
.guest-screen .landing-hero-card {
  width: min(720px, 92vw);
  padding: 52px 18px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.guest-screen .landing-logo { margin-bottom: 18px; }
.guest-screen .landing-hero-card p { max-width: 640px; }
.guest-screen .landing-actions { display: none !important; }

/* Logged-in topbar: sidebar collapse must not squeeze search */
.app-screen {
  --sidebar-width: 244px;
  --topbar-height: 58px;
}
.app-screen.sidebar-collapsed { --sidebar-width: 64px; }
.app-screen .topbar {
  height: var(--topbar-height);
  display: grid !important;
  grid-template-columns: minmax(320px, 680px) auto !important;
  justify-content: center;
  align-items: center;
  gap: 22px;
  padding: 0 22px !important;
  background: #0f172a !important;
  border-bottom: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.app-screen .topbar .brand { display: none !important; }
.app-screen .top-search {
  width: min(680px, 48vw);
  justify-self: center;
  height: 40px;
  background: #111c2f !important;
  border-color: rgba(148, 163, 184, .20) !important;
  box-shadow: none !important;
}
.app-screen .top-search button {
  min-height: 30px;
  padding: 0 14px;
  background: #f8fafc !important;
  color: #0f172a !important;
}
.app-screen .top-actions { justify-self: end; }

/* Sidebar: compact text/icons, resize handle remains visible, active tab points with chevron */
.app-screen .app-shell {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr) !important;
  transition: grid-template-columns .16s ease;
}
.sidebar {
  top: var(--topbar-height) !important;
  height: calc(100vh - var(--topbar-height)) !important;
  background: #0b1220 !important;
  border-right: 0 !important;
  box-shadow: none !important;
}
.sidebar-head {
  height: 58px !important;
  padding: 0 14px 0 18px !important;
  border-bottom: 0 !important;
}
.sidebar-brand { gap: 10px !important; font-size: 17px !important; }
.brand-mark.compact { width: 34px !important; height: 34px !important; border-radius: 11px !important; }
.sidebar-toggle {
  width: 34px !important;
  height: 32px !important;
  border-radius: 9px !important;
  color: transparent !important;
  background: #111c2f !important;
  border: 1px solid rgba(148, 163, 184, .16) !important;
  position: relative;
}
.sidebar-toggle:hover { background: #172033 !important; }
.toggle-chevrons,
.toggle-chevrons::before,
.toggle-chevrons::after {
  display: block;
  position: absolute;
  width: 8px;
  height: 8px;
  border-left: 2px solid #dbeafe;
  border-bottom: 2px solid #dbeafe;
  transform: rotate(45deg);
  border-radius: 1px;
}
.toggle-chevrons { left: 13px; top: 11px; }
.toggle-chevrons::before { content: ""; left: 5px; top: -7px; }
.toggle-chevrons::after { display: none; }
.app-screen.sidebar-collapsed .toggle-chevrons,
.app-screen.sidebar-collapsed .toggle-chevrons::before {
  transform: rotate(-135deg);
}
.app-screen.sidebar-collapsed .toggle-chevrons { left: 10px; }
.app-screen.sidebar-collapsed .sidebar-toggle::before { content: none !important; }

.sidebar-inner {
  min-height: calc(100% - 58px) !important;
  gap: 18px !important;
  padding: 15px 10px 12px !important;
}
.nav-title {
  padding: 0 10px 4px !important;
  font-size: 12px !important;
  color: #9aaac0 !important;
}
.nav-item {
  min-height: 38px !important;
  gap: 10px !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
  font-weight: 820 !important;
  color: #cbd5e1 !important;
}
.nav-item.active {
  color: #fff !important;
  background: rgba(255,255,255,.075) !important;
  box-shadow: inset 3px 0 0 #3b82f6 !important;
}
.nav-current { font-size: 17px !important; color: #dbeafe !important; }
.nav-icon {
  width: 22px !important;
  height: 22px !important;
  color: #e5eefc !important;
}
.nav-badge { font-size: 10px !important; padding: 1px 7px !important; }

/* Cleaner line icons */
.line-icon.cloud::before { width: 17px !important; height: 9px !important; left: 2px !important; top: 11px !important; border-width: 2px !important; }
.line-icon.cloud::after { width: 13px !important; height: 13px !important; left: 4px !important; top: 5px !important; border-width: 2px !important; }
.line-icon.clock::before { width: 19px !important; height: 19px !important; }
.line-icon.clock::after { left: 10px !important; top: 5px !important; width: 6px !important; height: 7px !important; }
.line-icon.star::before { content: "☆"; position: static; font-size: 22px; line-height: 1; }
.line-icon.heart::before { content: "☆" !important; position: static !important; font-size: 22px !important; line-height: 1 !important; }
.line-icon.folder::before { width: 20px !important; height: 14px !important; top: 8px !important; left: 1px !important; }
.line-icon.folder::after { width: 9px !important; height: 4px !important; top: 5px !important; left: 3px !important; }
.line-icon.edit::before { width: 15px !important; height: 18px !important; left: 2px !important; top: 2px !important; }
.line-icon.edit::after { width: 10px !important; right: 0 !important; bottom: 3px !important; }
.line-icon.trash::before {
  width: 14px !important;
  height: 15px !important;
  left: 4px !important;
  top: 7px !important;
  border: 2px solid currentColor !important;
  border-top: 0 !important;
  border-radius: 0 0 2px 2px;
}
.line-icon.trash::after {
  width: 18px !important;
  height: 2px !important;
  left: 2px !important;
  top: 5px !important;
  background: currentColor !important;
  box-shadow: 5px -3px 0 -1px currentColor !important;
}
.line-icon.gear::before { font-size: 20px !important; }
.line-icon.user::before { width: 9px !important; height: 9px !important; left: 6px !important; top: 3px !important; }
.line-icon.user::after { width: 17px !important; height: 8px !important; left: 2px !important; bottom: 2px !important; }

.storage-card {
  padding: 14px !important;
  border-radius: 14px !important;
  border-color: rgba(148, 163, 184, .14) !important;
}
.storage-card-head { font-size: 11px !important; }
.storage-manage { font-size: 11px !important; }
.sidebar-resizer {
  top: 58px !important;
  height: calc(100% - 58px) !important;
  right: -4px !important;
  width: 8px !important;
  display: flex !important;
}
.sidebar-resizer span { height: 38px !important; opacity: .75; }
.app-screen.sidebar-collapsed .sidebar-brand-text,
.app-screen.sidebar-collapsed .nav-label,
.app-screen.sidebar-collapsed .nav-title,
.app-screen.sidebar-collapsed .nav-badge,
.app-screen.sidebar-collapsed .storage-card-head,
.app-screen.sidebar-collapsed .storage-meter,
.app-screen.sidebar-collapsed .storage-manage { display: none !important; }
.app-screen.sidebar-collapsed .sidebar-brand { display: none !important; }
.app-screen.sidebar-collapsed .sidebar-head { height: 58px !important; justify-content: center !important; padding: 0 !important; }
.app-screen.sidebar-collapsed .sidebar-inner { align-items: center !important; padding: 12px 8px !important; }
.app-screen.sidebar-collapsed .nav-item { width: 42px !important; height: 42px !important; min-height: 42px !important; padding: 0 !important; justify-content: center !important; }
.app-screen.sidebar-collapsed .nav-current { display: none !important; }
.app-screen.sidebar-collapsed .storage-card { width: 42px !important; height: 42px !important; border-radius: 12px !important; }

/* Drive main: remove heavy hero/upload zone. Keep explorer-first workflow. */
.legacy-drive-shell {
  max-width: 960px !important;
  padding-top: 20px !important;
}
.drive-action-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 2px 0 18px;
}
.hidden-upload-form { display: none; }
.drive-upload-control { position: relative; }
.drive-action-btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  border-radius: 10px;
  border: 0;
  color: #0f172a;
  background: #f8fafc;
  font-weight: 900;
  cursor: pointer;
}
.drive-action-btn:hover { transform: none !important; box-shadow: none !important; background: #e5eefc; }
.btn-icon.upload-arrow {
  width: 16px;
  height: 16px;
  position: relative;
  display: inline-block;
}
.btn-icon.upload-arrow::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 2px;
  width: 2px;
  height: 12px;
  background: currentColor;
}
.btn-icon.upload-arrow::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 2px;
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
}
.upload-options-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  z-index: 1000;
  width: 250px;
  display: none;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, .18);
  border-radius: 14px;
  background: #111c2f;
  box-shadow: 0 18px 42px rgba(0,0,0,.30);
}
.upload-options-menu.open { display: grid; gap: 4px; }
.upload-option-item {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  color: #e5eefc;
  background: transparent;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}
.upload-option-item:hover:not(.disabled) { background: rgba(255,255,255,.08); }
.upload-option-item.disabled { opacity: .38; cursor: not-allowed; }
.upload-option-item small { margin-left: auto; color: #94a3b8; font-size: 10px; }
.upload-option-icon {
  width: 20px;
  height: 20px;
  position: relative;
  flex: none;
  color: #f8fafc;
}
.upload-option-icon.file::before { content: ""; position: absolute; inset: 2px 4px; border: 2px solid currentColor; border-radius: 2px; }
.upload-option-icon.folder::before { content: ""; position: absolute; left: 1px; top: 7px; width: 18px; height: 11px; border: 2px solid currentColor; border-radius: 2px; }
.upload-option-icon.folder::after { content: ""; position: absolute; left: 3px; top: 4px; width: 8px; height: 5px; border: 2px solid currentColor; border-bottom: 0; border-radius: 2px 2px 0 0; }
.upload-option-icon.link::before { content: ""; position: absolute; width: 11px; height: 7px; left: 1px; top: 6px; border: 2px solid currentColor; border-radius: 999px; transform: rotate(-25deg); }
.upload-option-icon.link::after { content: ""; position: absolute; width: 11px; height: 7px; right: 1px; top: 6px; border: 2px solid currentColor; border-radius: 999px; transform: rotate(-25deg); }

.global-drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  display: none;
  place-items: center;
  background: rgba(15, 23, 42, .72);
  backdrop-filter: blur(6px);
}
.global-drop-overlay.active { display: grid; }
.global-drop-card {
  width: min(460px, 90vw);
  padding: 34px;
  text-align: center;
  border-radius: 22px;
  border: 1px dashed rgba(96, 165, 250, .6);
  background: #111c2f;
  color: #f8fafc;
}
.global-drop-icon {
  width: 54px;
  height: 54px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(59, 130, 246, .18);
}
.global-drop-icon::before { content: "↑"; color: #60a5fa; font-size: 28px; font-weight: 900; }
.global-drop-card p { margin: 6px 0 0; color: #94a3b8; }

.upload-target-modal {
  position: fixed;
  inset: 0;
  z-index: 8050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, .62);
}
.upload-target-modal.open { display: flex; }
.upload-target-box {
  width: min(520px, 92vw);
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .16);
  background: #111c2f;
  box-shadow: 0 30px 70px rgba(0,0,0,.38);
  color: #f8fafc;
}
.upload-target-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}
.upload-target-head h2 { margin: 0; font-size: 18px; }
.upload-target-head button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: rgba(255,255,255,.06);
  color: #cbd5e1;
  cursor: pointer;
}
.upload-target-body { padding: 20px; }
.upload-target-label {
  margin: 0 0 8px;
  color: #93a4bd;
  font-size: 12px;
  font-weight: 900;
}
.upload-target-path {
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: #f8fafc;
}
.upload-target-path span { color: #94a3b8; }
.upload-target-hint { margin: 12px 0 0; color: #94a3b8; font-size: 13px; }
.upload-target-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px 20px;
}
.target-cancel,
.target-submit {
  min-width: 92px;
  border: 0;
  border-radius: 10px;
  font-weight: 900;
}
.target-cancel { background: rgba(255,255,255,.08); color: #e2e8f0; }
.target-submit { background: #f8fafc; color: #0f172a; }

/* Old filter/search region remains quieter. */
.legacy-filter-strip {
  background: transparent !important;
  border: 0 !important;
  padding: 0 !important;
}
.legacy-inline-search input,
.legacy-inline-search select {
  background: #111c2f !important;
}

@media (max-width: 900px) {
  .app-screen .topbar { grid-template-columns: 1fr !important; padding: 10px 14px !important; }
  .app-screen .top-search { width: 100%; }
  .app-screen .top-actions { display: none; }
}

/* ui_directive_02.css */
/* User-directed UI pass 02: fixed sidebar, true resize/collapse, explorer-left alignment, filter-only center */

.app-screen {
  --sidebar-width: 244px;
  --sidebar-collapsed-width: 64px;
  --topbar-height: 56px;
}
.app-screen.sidebar-collapsed { --sidebar-width: var(--sidebar-collapsed-width); }

/* Sidebar occupies the full left edge from the top. It is not below the topbar. */
.app-screen .sidebar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: var(--sidebar-width) !important;
  height: 100vh !important;
  z-index: 100 !important;
  background: #0b1220 !important;
  border-right: 1px solid rgba(148, 163, 184, .10) !important;
}

.app-screen .topbar {
  position: fixed !important;
  top: 0 !important;
  left: var(--sidebar-width) !important;
  right: 0 !important;
  z-index: 80 !important;
  height: var(--topbar-height) !important;
  display: grid !important;
  grid-template-columns: minmax(360px, 680px) auto !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 22px !important;
  padding: 0 22px !important;
  background: #0f172a !important;
  border-bottom: 1px solid rgba(148, 163, 184, .08) !important;
}

.app-screen .app-shell {
  display: block !important;
  min-height: 100vh !important;
  padding-left: var(--sidebar-width) !important;
  padding-top: var(--topbar-height) !important;
  background: #0f172a !important;
  transition: padding-left .14s ease !important;
}

.app-screen .content {
  min-height: calc(100vh - var(--topbar-height)) !important;
  padding: 0 !important;
  background: #0f172a !important;
}

/* Top search remains top-center; it no longer shrinks with the sidebar. */
.app-screen .top-search {
  width: min(680px, 50vw) !important;
  min-width: 360px !important;
  justify-self: center !important;
}

/* Sidebar header, typography, and icons: smaller and cleaner. */
.app-screen .sidebar-head {
  height: 66px !important;
  padding: 0 14px 0 18px !important;
  border-bottom: 1px solid rgba(148, 163, 184, .08) !important;
}
.app-screen .sidebar-brand {
  gap: 10px !important;
  font-size: 16px !important;
  letter-spacing: -0.04em !important;
}
.app-screen .brand-mark.compact {
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
}
.app-screen .sidebar-inner {
  min-height: calc(100vh - 66px) !important;
  padding: 16px 10px 12px !important;
  gap: 18px !important;
}
.app-screen .nav-title {
  padding: 0 10px 5px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  color: #8fa3bc !important;
}
.app-screen .nav-item {
  min-height: 36px !important;
  padding: 7px 10px !important;
  gap: 10px !important;
  font-size: 12px !important;
  font-weight: 850 !important;
}
.app-screen .nav-icon {
  width: 20px !important;
  height: 20px !important;
}
.app-screen .nav-current {
  font-size: 15px !important;
  font-weight: 900 !important;
}
.app-screen .nav-badge {
  font-size: 9px !important;
  padding: 1px 6px !important;
}

/* Toggle button: replace awkward broken chevrons with a simple compact glyph. */
.app-screen .sidebar-toggle {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  display: grid !important;
  place-items: center !important;
  background: #111c2f !important;
  border: 1px solid rgba(148, 163, 184, .16) !important;
  color: #dbeafe !important;
  font-size: 0 !important;
  position: relative !important;
}
.app-screen .sidebar-toggle .toggle-chevrons,
.app-screen .sidebar-toggle .toggle-chevrons::before,
.app-screen .sidebar-toggle .toggle-chevrons::after {
  all: unset !important;
}
.app-screen .sidebar-toggle::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-35%, -50%) rotate(45deg);
}
.app-screen.sidebar-collapsed .sidebar-toggle::after {
  transform: translate(-65%, -50%) rotate(225deg);
}

/* Cleaner icon replacements. */
.app-screen .line-icon.star::before,
.app-screen .line-icon.heart::before {
  content: "☆" !important;
  position: static !important;
  font-size: 22px !important;
  line-height: 1 !important;
}
.app-screen .line-icon.trash::before {
  width: 12px !important;
  height: 14px !important;
  left: 4px !important;
  top: 6px !important;
  border: 2px solid currentColor !important;
  border-top: 0 !important;
  border-radius: 0 0 2px 2px !important;
}
.app-screen .line-icon.trash::after {
  width: 16px !important;
  height: 2px !important;
  left: 2px !important;
  top: 4px !important;
  background: currentColor !important;
  box-shadow: 4px -3px 0 -1px currentColor !important;
}

/* Resize handle is always present. It does not act as a collapse toggle. */
.app-screen .sidebar-resizer {
  position: absolute !important;
  top: 66px !important;
  right: -5px !important;
  width: 10px !important;
  height: calc(100vh - 66px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: col-resize !important;
  z-index: 130 !important;
}
.app-screen .sidebar-resizer span {
  display: block !important;
  width: 2px !important;
  height: 44px !important;
  border-left: 1px solid rgba(255,255,255,.38) !important;
  border-right: 1px solid rgba(255,255,255,.18) !important;
  opacity: .85 !important;
}
.app-screen.sidebar-collapsed .sidebar-resizer {
  display: flex !important;
  top: 66px !important;
  height: calc(100vh - 66px) !important;
}

/* Collapsed state: icon rail only, but the toggle remains at the top. */
.app-screen.sidebar-collapsed .sidebar-head {
  height: 66px !important;
  padding: 0 !important;
  justify-content: center !important;
}
.app-screen.sidebar-collapsed .sidebar-brand { display: none !important; }
.app-screen.sidebar-collapsed .sidebar-inner {
  align-items: center !important;
  padding: 12px 8px !important;
  gap: 16px !important;
}
.app-screen.sidebar-collapsed .nav-item {
  width: 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  padding: 0 !important;
  justify-content: center !important;
}
.app-screen.sidebar-collapsed .nav-item.active {
  box-shadow: inset 3px 0 0 #3b82f6 !important;
}
.app-screen.sidebar-collapsed .storage-card {
  width: 42px !important;
  height: 42px !important;
  padding: 0 !important;
  display: grid !important;
  place-items: center !important;
}

/* Drive surface: pull the file manager left and remove the duplicate center search/form blocks. */
.legacy-drive-shell {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 20px 44px 110px !important;
  box-sizing: border-box !important;
}
.drive-action-toolbar {
  margin: 0 0 14px !important;
  justify-content: flex-start !important;
}
.drive-context-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 14px;
}
.compact-breadcrumb {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 800;
}
.compact-breadcrumb a {
  color: #93c5fd;
  text-decoration: none;
}
.compact-breadcrumb .breadcrumb-current {
  padding: 6px 10px;
  border-radius: 9px;
  color: #dbeafe;
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(59, 130, 246, .20);
}
.drive-action-btn.secondary {
  background: rgba(255,255,255,.08) !important;
  color: #e5eefc !important;
  border: 1px solid rgba(148, 163, 184, .16) !important;
}
.btn-icon.folder-plus {
  width: 16px;
  height: 16px;
  display: inline-block;
  position: relative;
}
.btn-icon.folder-plus::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 16px;
  height: 10px;
  border: 2px solid currentColor;
  border-radius: 2px;
}
.btn-icon.folder-plus::after {
  content: "+";
  position: absolute;
  right: -5px;
  top: -6px;
  font-size: 16px;
  font-weight: 900;
}

.legacy-filter-strip {
  margin: 0 0 16px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
}
.legacy-inline-search.filter-only-form {
  display: flex !important;
  justify-content: flex-end !important;
  align-items: center !important;
  gap: 8px !important;
}
.legacy-inline-search.filter-only-form select {
  width: 148px !important;
  min-height: 38px !important;
  background: #111c2f !important;
  border: 1px solid rgba(148, 163, 184, .18) !important;
  border-radius: 10px !important;
  color: #e5eefc !important;
}
.legacy-inline-search.filter-only-form button {
  min-height: 38px !important;
  padding: 0 15px !important;
  border-radius: 10px !important;
}
.legacy-inline-search.filter-only-form input { display: none !important; }

/* Create folder modal reused from the upload target visual language. */
.create-folder-modal {
  position: fixed;
  inset: 0;
  z-index: 8060;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(2, 6, 23, .62);
}
.create-folder-modal.open { display: flex; }
.create-folder-box {
  width: min(460px, 92vw);
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, .16);
  background: #111c2f;
  color: #f8fafc;
  box-shadow: 0 30px 70px rgba(0,0,0,.38);
}
.create-folder-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
}
.create-folder-head h2 { margin: 0; font-size: 18px; }
.create-folder-head button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 9px;
  background: rgba(255,255,255,.06);
  color: #cbd5e1;
  cursor: pointer;
}
.create-folder-form { padding: 20px; display: grid; gap: 10px; }
.create-folder-form label { color: #93a4bd; font-size: 12px; font-weight: 900; }
.create-folder-form input {
  min-height: 44px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .16);
  background: #0f172a;
  color: #f8fafc;
}
.create-folder-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

@media (max-width: 900px) {
  .app-screen .topbar {
    left: var(--sidebar-width) !important;
    grid-template-columns: minmax(220px, 1fr) !important;
  }
  .app-screen .top-search { width: min(520px, calc(100vw - var(--sidebar-width) - 40px)) !important; min-width: 0 !important; }
  .app-screen .top-actions { display: none !important; }
  .legacy-drive-shell { width: auto !important; padding: 16px 16px 110px 22px !important; }
}

/* ui_directive_03.css */

/* User-directed UI pass 03
   - top search fixed independent of sidebar width
   - remove top-right account/settings buttons from drive frame
   - remove gray empty-state cards
   - stabilize sidebar resize/collapse visual behavior
   - replace malformed CSS line icons with mask-based icons
*/

.app-screen {
  --sidebar-width: 244px;
  --sidebar-collapsed-width: 64px;
  --topbar-height: 56px;
}
.app-screen.sidebar-collapsed { --sidebar-width: var(--sidebar-collapsed-width); }

/* Topbar is viewport-fixed. It no longer starts after, or resizes with, the sidebar. */
.app-screen .topbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: var(--topbar-height) !important;
  z-index: 80 !important;
  display: block !important;
  padding: 0 !important;
  background: #0f172a !important;
  border-bottom: 1px solid rgba(148, 163, 184, .08) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}
.app-screen .topbar .brand { display: none !important; }
.app-screen .top-actions { display: none !important; }

/* Search stays at the visual center of the viewport. */
.app-screen .top-search {
  position: absolute !important;
  top: 8px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: min(680px, 46vw) !important;
  min-width: 420px !important;
  max-width: 680px !important;
  height: 40px !important;
  margin: 0 !important;
  z-index: 1 !important;
  background: #111c2f !important;
  border: 1px solid rgba(148, 163, 184, .22) !important;
  box-shadow: none !important;
}
.app-screen .top-search input { color: #dbeafe !important; }
.app-screen .top-search input::placeholder { color: #6f7f96 !important; }
.app-screen .top-search button {
  min-height: 30px !important;
  padding: 0 14px !important;
  border-radius: 999px !important;
  background: #f8fafc !important;
  color: #0f172a !important;
  font-weight: 900 !important;
}

/* Sidebar remains the only left column and covers the top-left edge. */
.app-screen .sidebar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  bottom: 0 !important;
  width: var(--sidebar-width) !important;
  height: 100vh !important;
  z-index: 100 !important;
  background: #0b1220 !important;
  border-right: 1px solid rgba(148, 163, 184, .10) !important;
  overflow: visible !important;
}
.app-screen .app-shell {
  display: block !important;
  min-height: 100vh !important;
  padding-left: var(--sidebar-width) !important;
  padding-top: var(--topbar-height) !important;
  background: #0f172a !important;
  transition: padding-left .14s ease !important;
}

/* Resizer stays present in both expanded and collapsed states, but does not act as a click-to-open button. */
.app-screen .sidebar-resizer,
.app-screen.sidebar-collapsed .sidebar-resizer {
  display: flex !important;
  position: absolute !important;
  top: 66px !important;
  right: -5px !important;
  width: 10px !important;
  height: calc(100vh - 66px) !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: col-resize !important;
  z-index: 140 !important;
}
.app-screen .sidebar-resizer span {
  display: block !important;
  width: 2px !important;
  height: 44px !important;
  border-left: 1px solid rgba(255,255,255,.35) !important;
  border-right: 1px solid rgba(255,255,255,.16) !important;
  opacity: .8 !important;
}

/* Fixed SVG bounds center the chevron independently of font metrics. */
.app-screen .sidebar-toggle {
  width: 34px !important;
  height: 34px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 10px !important;
  border: 1px solid rgba(148, 163, 184, .16) !important;
  background: #111c2f !important;
  color: transparent !important;
  font-size: 0 !important;
  position: relative !important;
}
.app-screen .sidebar-toggle .toggle-chevrons { display: none !important; }
.app-screen .sidebar-toggle::before {
  content: "" !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 20px !important;
  height: 20px !important;
  background: #dbeafe !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m15 6-6 6 6 6' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  transform: translate(-50%, -50%) !important;
}
.app-screen.sidebar-collapsed .sidebar-toggle::before { content: "" !important; transform: translate(-50%, -50%) rotate(180deg) !important; }
.app-screen .sidebar-toggle::after { content: none !important; display: none !important; }

/* Replace fragile hand-drawn icons with stable single-color SVG masks. */
.app-screen .line-icon {
  color: #e5eefc !important;
  background: transparent !important;
}
.app-screen .line-icon::before {
  content: "" !important;
  position: static !important;
  display: block !important;
  width: 20px !important;
  height: 20px !important;
  background: currentColor !important;
  border: 0 !important;
  box-shadow: none !important;
  transform: none !important;
  border-radius: 0 !important;
  -webkit-mask-repeat: no-repeat !important;
  mask-repeat: no-repeat !important;
  -webkit-mask-position: center !important;
  mask-position: center !important;
  -webkit-mask-size: contain !important;
  mask-size: contain !important;
}
.app-screen .line-icon::after { content: none !important; display: none !important; }
.app-screen .line-icon.cloud::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 18H8a5 5 0 1 1 1.1-9.9A6 6 0 0 1 20 11.2 3.5 3.5 0 0 1 17.5 18Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.5 18H8a5 5 0 1 1 1.1-9.9A6 6 0 0 1 20 11.2 3.5 3.5 0 0 1 17.5 18Z'/%3E%3C/svg%3E"); }
.app-screen .line-icon.clock::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.app-screen .line-icon.star::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.3 6.4 20.2 7.5 14 3 9.6l6.2-.9L12 3Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m12 3 2.8 5.7 6.2.9-4.5 4.4 1.1 6.2L12 17.3 6.4 20.2 7.5 14 3 9.6l6.2-.9L12 3Z'/%3E%3C/svg%3E"); }
.app-screen .line-icon.edit::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h10l4 4v12H5z'/%3E%3Cpath d='M14 4v5h5'/%3E%3Cpath d='m9 16 6-6 2 2-6 6H9z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 4h10l4 4v12H5z'/%3E%3Cpath d='M14 4v5h5'/%3E%3Cpath d='m9 16 6-6 2 2-6 6H9z'/%3E%3C/svg%3E"); }
.app-screen .line-icon.folder::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h6l2 2h10v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h6l2 2h10v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2Z'/%3E%3C/svg%3E"); }
.app-screen .line-icon.trash::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V4h6v3'/%3E%3Cpath d='M7 7l1 13h8l1-13'/%3E%3Cpath d='M10 11v5M14 11v5'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16'/%3E%3Cpath d='M9 7V4h6v3'/%3E%3Cpath d='M7 7l1 13h8l1-13'/%3E%3Cpath d='M10 11v5M14 11v5'/%3E%3C/svg%3E"); }
.app-screen .line-icon.gear::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z'/%3E%3Cpath d='M19 12a7 7 0 0 0-.1-1l2-1.5-2-3.4-2.4 1a7.7 7.7 0 0 0-1.7-1L14.5 3h-5l-.3 3.1a7.7 7.7 0 0 0-1.7 1l-2.4-1-2 3.4L5.1 11a7 7 0 0 0 0 2l-2 1.5 2 3.4 2.4-1a7.7 7.7 0 0 0 1.7 1l.3 3.1h5l.3-3.1a7.7 7.7 0 0 0 1.7-1l2.4 1 2-3.4-2-1.5c.1-.3.1-.7.1-1Z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z'/%3E%3Cpath d='M19 12a7 7 0 0 0-.1-1l2-1.5-2-3.4-2.4 1a7.7 7.7 0 0 0-1.7-1L14.5 3h-5l-.3 3.1a7.7 7.7 0 0 0-1.7 1l-2.4-1-2 3.4L5.1 11a7 7 0 0 0 0 2l-2 1.5 2 3.4 2.4-1a7.7 7.7 0 0 0 1.7 1l.3 3.1h5l.3-3.1a7.7 7.7 0 0 0 1.7-1l2.4 1 2-3.4-2-1.5c.1-.3.1-.7.1-1Z'/%3E%3C/svg%3E"); }
.app-screen .line-icon.user::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E"); }
.app-screen .line-icon.admin::before { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 7l8 4 8-4-8-4Z'/%3E%3Cpath d='M4 11l8 4 8-4'/%3E%3Cpath d='M4 15l8 4 8-4'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 7l8 4 8-4-8-4Z'/%3E%3Cpath d='M4 11l8 4 8-4'/%3E%3Cpath d='M4 15l8 4 8-4'/%3E%3C/svg%3E"); }

/* No gray placeholder boxes for empty folder/file sections. Keep only headings and blank space. */
.folder-section .empty-state,
.file-section .empty-state,
.compact-empty {
  display: none !important;
}
.folder-section,
.file-section { min-height: 56px; }

/* Keep the file manager left-biased while using all space beside the sidebar. */
.legacy-drive-shell {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding-left: 44px !important;
  padding-right: 44px !important;
  box-sizing: border-box !important;
}

@media (max-width: 980px) {
  .app-screen .top-search {
    width: min(620px, calc(100vw - 180px)) !important;
    min-width: 260px !important;
  }
}

/* ui_directive_04.css */
/* User-directed UI pass 04
   - auth pages never show app sidebar
   - auth messages live inside auth card, not in top flash area
   - real storage meter display based on used bytes / 10GB placeholder quota
   - upload and create controls aligned in one compact row
   - expandable quick-create rail for txt/Word/Excel/PPTX
*/

.auth-screen .sidebar,
.auth-screen .topbar {
  display: none !important;
}

.auth-screen .content-inner {
  width: 100% !important;
  max-width: none !important;
}

.auth-message {
  min-height: 48px;
  margin: -12px 0 22px;
  padding: 14px 16px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  font-size: 14px;
  font-weight: 850;
  line-height: 1.35;
}

.auth-message-error {
  color: #fecaca;
  background: rgba(127, 29, 29, .42);
  border: 1px solid rgba(248, 113, 113, .52);
}

.auth-message-success {
  color: #bbf7d0;
  background: rgba(20, 83, 45, .42);
  border: 1px solid rgba(74, 222, 128, .46);
}

.auth-message-message {
  color: #bfdbfe;
  background: rgba(30, 64, 175, .34);
  border: 1px solid rgba(96, 165, 250, .38);
}

.storage-card-head span:last-child {
  white-space: normal !important;
  text-align: left !important;
  max-width: none;
}

.storage-meter span {
  max-width: 100%;
}

.drive-action-toolbar {
  margin-top: 18px !important;
  margin-bottom: 12px !important;
}

.drive-main-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  min-height: 42px;
}

.drive-upload-control {
  position: relative;
}

.upload-conflict-label {
  display: block;
  margin: 16px 0 7px;
  color: #cbd5e1;
  font-size: 12px;
  font-weight: 700;
}

.upload-conflict-select,
.upload-manual-name,
.create-folder-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid rgba(148, 163, 184, .25);
  border-radius: 9px;
  background: #111b2e;
  color: #e5eefc;
  padding: 0 12px;
}

.upload-manual-name { margin-top: 8px; }
.upload-manual-help { margin: 7px 0 0; color: #94a3b8; font-size: 11px; }

.drive-action-btn.primary,
.drive-action-btn.secondary {
  height: 42px !important;
  min-width: 106px !important;
  padding: 0 18px !important;
  border-radius: 10px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.drive-action-btn.primary {
  background: #f8fafc !important;
  color: #0f172a !important;
  border: 1px solid rgba(255,255,255,.14) !important;
}

.drive-action-btn.secondary {
  background: #172033 !important;
  color: #e5eefc !important;
  border: 1px solid rgba(148, 163, 184, .28) !important;
}

.create-rail-toggle {
  width: 32px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: #172033;
  color: #e5eefc;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease;
  position: relative;
}

.create-rail-toggle:hover {
  background: #1f2a44;
  border-color: rgba(96, 165, 250, .55);
}

.create-rail-toggle span {
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  font-size: 0;
  transform: rotate(45deg);
}

.create-rail-toggle.open span {
  transform: rotate(225deg);
}

.create-quick-rail {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  transition: max-width .18s ease, opacity .14s ease;
}

.create-quick-rail.open {
  max-width: 560px;
  opacity: 1;
  pointer-events: auto;
}

.create-quick-rail form {
  margin: 0;
}

.quick-create-btn {
  height: 42px;
  min-width: 96px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, .28);
  background: #172033;
  color: #e5eefc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
  font-size: 14px;
  cursor: pointer;
}

.quick-create-btn:hover {
  background: #1f2a44;
  border-color: rgba(96, 165, 250, .55);
}

.quick-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  font-size: 11px;
  font-weight: 950;
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.28);
}

.quick-icon.txt {
  background: linear-gradient(135deg, #64748b, #334155);
}
.quick-icon.txt::before { content: "TXT"; font-size: 8px; }

.quick-icon.word {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}
.quick-icon.word::before { content: "W"; }

.quick-icon.excel {
  background: linear-gradient(135deg, #22c55e, #15803d);
}
.quick-icon.excel::before { content: "X"; }

.quick-icon.pptx {
  background: linear-gradient(135deg, #f97316, #dc2626);
}
.quick-icon.pptx::before { content: "P"; }

.drive-context-row {
  margin-top: 6px !important;
  min-height: 34px !important;
  display: flex !important;
  justify-content: flex-start !important;
  align-items: center !important;
}

.compact-breadcrumb {
  margin: 0 !important;
}

@media (max-width: 960px) {
  .create-quick-rail.open {
    max-width: 360px;
    flex-wrap: wrap;
  }
  .quick-create-btn {
    min-width: 86px;
  }
}

/* trash.css */
.trash-page{display:grid;gap:16px;color:#e5eefc}.trash-header{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:10px 4px 18px;border-bottom:1px solid #263954}.trash-kicker{margin-bottom:8px;color:#6ea8ff;font-size:11px;font-weight:900;letter-spacing:.1em}.trash-header h1{margin:0 0 8px;font-size:30px}.trash-header p{margin:0;color:#93a4bd}.trash-summary{display:flex;gap:16px;margin-top:13px;color:#b8c7dc;font-size:12px}.trash-empty-button{min-height:38px;padding:0 14px;border:1px solid rgba(239,83,80,.45);border-radius:10px;background:transparent;color:#ff8a87;font-weight:800}.trash-empty-button:hover{background:rgba(239,83,80,.12)}
.trash-toolbar{display:flex;gap:9px;align-items:center}.trash-toolbar select,.trash-search{width:auto;min-height:38px;border:1px solid #263954;border-radius:10px;background:#111c2f!important;color:#dbe7f7!important}.trash-toolbar select{padding:0 34px 0 11px}.trash-search{display:flex;align-items:center;flex:1;max-width:360px;padding:0 11px}.trash-search span{color:#7f93ae}.trash-search input{min-height:36px;border:0!important;background:transparent!important;color:#e5eefc!important;box-shadow:none!important}.trash-search input::placeholder{color:#71839c}
.trash-selection-bar{display:none;align-items:center;justify-content:space-between;gap:14px;min-height:52px;padding:8px 12px;border:1px solid #31558a;border-radius:12px;background:#142642}.trash-selection-bar.visible{display:flex}.trash-selection-bar>div{display:flex;gap:7px}.trash-action{min-height:34px;padding:0 12px;border:1px solid #35527a;border-radius:9px;background:#182b49;color:#dce9fb}.trash-action.restore{background:#2463aa;border-color:#3478c8;color:#fff}.trash-action.danger{border-color:rgba(239,83,80,.42);background:transparent;color:#ff8a87}
.trash-list-shell{overflow:hidden;border:1px solid #263954;border-radius:14px;background:#111c2f}.trash-list-head,.trash-row{display:grid;grid-template-columns:minmax(260px,2fr) minmax(150px,1.2fr) 170px 120px 90px 40px;align-items:center;gap:12px}.trash-list-head{min-height:42px;padding:0 14px;background:#0e1a2d;color:#91a4bd;font-size:11px;font-weight:800}.trash-list-head label{display:flex;align-items:center;gap:13px}.trash-list-head input,.trash-checkbox{width:16px;height:16px;min-height:0;accent-color:#4f8cff}.trash-row{min-height:68px;padding:8px 14px;border-top:1px solid #20324c;color:#c8d5e8}.trash-row:hover{background:#142139}.trash-row.selected{background:#172b49}.trash-name-cell{display:flex;align-items:center;gap:12px;min-width:0}.trash-name-cell>div{min-width:0}.trash-name-cell strong{display:block;overflow:hidden;color:#edf4ff;text-overflow:ellipsis;white-space:nowrap}.trash-name-cell small{display:block;margin-top:3px;color:#788ca8}.trash-item-icon{width:31px;height:31px;flex:none;border-radius:8px;background:#203b63;position:relative}.trash-item-icon.file:before{content:"";position:absolute;inset:7px 9px;border:1.5px solid #78aaf0;border-radius:2px}.trash-item-icon.folder{background:#4b3c1f}.trash-item-icon.folder:before{content:"";position:absolute;left:6px;top:10px;width:20px;height:14px;border:1.5px solid #e4b85f;border-radius:3px}.trash-path{overflow:hidden;color:#93a4bd;text-overflow:ellipsis;white-space:nowrap}.trash-row time,.trash-expiry,.trash-row>div:nth-last-child(2){color:#9eb0c7;font-size:12px}.trash-expiry.urgent{color:#ff9b77}.trash-more{width:32px;min-height:32px;border:0;border-radius:8px;background:transparent;color:#aebdd0;font-size:20px}.trash-more:hover{background:#203450;color:#fff}.trash-no-results{padding:34px;text-align:center;color:#8295af}
.trash-menu{position:absolute;z-index:5200;width:190px;padding:6px;border:1px solid #304462;border-radius:11px;background:#16233a;box-shadow:0 18px 45px rgba(0,0,0,.38)}.trash-menu button{display:block;width:100%;padding:9px 10px;border:0;border-radius:7px;background:transparent;color:#dce7f6;text-align:left}.trash-menu button:hover{background:#213653}.trash-menu button.danger{color:#ff8a87}
.trash-modal{position:fixed;inset:0;z-index:6000;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(3,9,20,.72);backdrop-filter:blur(5px)}.trash-modal.open{display:flex}.trash-modal-card{width:min(460px,100%);padding:20px;border:1px solid #304462;border-radius:16px;background:#111c2f;color:#e5eefc;box-shadow:0 24px 70px rgba(0,0,0,.48)}.trash-modal-card header{display:flex;align-items:center;justify-content:space-between}.trash-modal-card header h2{margin:0}.trash-modal-card header button{border:0;background:transparent;color:#9fb0c6;font-size:24px}.trash-modal-card p{margin:16px 0;color:#aebed2}.trash-modal-card label{color:#aebed2;font-size:12px}.trash-modal-card select{margin-top:7px;background:#16243a;color:#edf4ff;border-color:#304462}.trash-modal-card footer{display:flex;justify-content:flex-end;gap:8px;margin-top:20px}.trash-modal-card footer button{min-height:38px;padding:0 14px;border-radius:9px}.trash-modal-card footer .secondary{border:1px solid #304462;background:#17263d;color:#dce7f6}.trash-modal-card footer .primary{border:0;background:#3478c8;color:#fff}.trash-modal-card footer .danger{border:0;background:#d94b4b;color:#fff}.trash-confirm-summary{padding:12px;border-radius:10px;background:#17243a;color:#c1d0e3}.trash-empty-state{padding:90px 20px;text-align:center;color:#8295af}.trash-empty-state>span{display:inline-grid;width:44px;height:44px;place-items:center;border:1px solid #2d4668;border-radius:50%;color:#6ea8ff}.trash-empty-state h2{margin:14px 0 6px;color:#dce7f6}.trash-empty-state p{margin:0}
@media(max-width:900px){.trash-list-head{display:none}.trash-row{grid-template-columns:1fr 36px;gap:6px;padding:14px}.trash-row>*:not(.trash-name-cell):not(.trash-more){grid-column:1;padding-left:60px}.trash-toolbar{flex-wrap:wrap}.trash-search{max-width:none;flex-basis:100%}.trash-selection-bar{align-items:flex-start;flex-direction:column}.trash-header{flex-direction:column}.trash-empty-button{align-self:flex-end}}

/* drive_views.css */
.legacy-drive-shell .legacy-filter-strip {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
}

.legacy-drive-shell .legacy-filter-strip .filter-only-form { flex: 0 0 auto; justify-content: flex-start !important; }
.drive-view-control { display: flex; align-items: center; gap: 9px; margin-left: auto; color: #94a3b8; font-size: 12px; font-weight: 700; white-space: nowrap; }
.drive-view-buttons { display: inline-flex; padding: 3px; border: 1px solid rgba(148,163,184,.16); border-radius: 10px; background: rgba(15,23,42,.66); }
.drive-view-button { display:inline-grid; place-items:center; width:40px; min-height:38px; padding:0; border:0; border-radius:7px; background:transparent; color:#94a3b8; cursor:pointer; font:inherit; }
.drive-view-button svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.drive-view-button:focus-visible { outline:2px solid #60a5fa; outline-offset:2px; }
.drive-view-button:hover { color: #e2e8f0; background: rgba(51,65,85,.7); }
.legacy-drive-shell[data-view-mode="list"] .drive-view-button[data-view-mode="list"],
.legacy-drive-shell[data-view-mode="compact"] .drive-view-button[data-view-mode="compact"],
.legacy-drive-shell[data-view-mode="thumbnail"] .drive-view-button[data-view-mode="thumbnail"] { color: #fff; background: #2563eb; }
.file-thumbnail { display: none; position: relative; overflow: hidden; background: #091225; }
.legacy-drive-shell[data-view-mode="list"] .file-thumbnail { display: block; width: 48px; height: 48px; flex: 0 0 48px; border-radius: 8px; }
.legacy-drive-shell[data-view-mode="list"] .file-thumbnail img { display: block; width: 100%; height: 100%; object-fit: contain; }
.legacy-drive-shell[data-view-mode="list"] .file-item:has(.file-thumbnail) .file-icon { display: none; }
.legacy-drive-shell[data-view-mode="list"] .video-thumbnail-badge { width: 18px; height: 18px; font-size: 10px; }
.preview-download-btn { min-height: 34px; padding: 0 12px; align-items: center; border-radius: 8px; background: #2563eb; color: #fff; font-size: 13px; font-weight: 800; text-decoration: none; }

.legacy-drive-shell[data-view-mode="thumbnail"] .folder-list,
.legacy-drive-shell[data-view-mode="thumbnail"] .file-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}
.legacy-drive-shell[data-view-mode="thumbnail"] .explorer-item { position: relative; min-width: 0; min-height: 210px; margin: 0; flex-direction: column; align-items: stretch; }
.legacy-drive-shell[data-view-mode="thumbnail"] .item-main-area { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px; }
.legacy-drive-shell[data-view-mode="thumbnail"] .item-checkmark { position: absolute; z-index: 2; top: 10px; left: 10px; background: rgba(15,23,42,.82); }
.legacy-drive-shell[data-view-mode="thumbnail"] .folder-icon,
.legacy-drive-shell[data-view-mode="thumbnail"] .file-icon { width: 100%; height: 126px; border-radius: 10px; font-size: 16px; }
.legacy-drive-shell[data-view-mode="thumbnail"] .folder-icon svg { width: 54px; height: 54px; }
.legacy-drive-shell[data-view-mode="thumbnail"] .file-thumbnail { display: block; width: 100%; height: 126px; border-radius: 10px; }
.legacy-drive-shell[data-view-mode="thumbnail"] .file-thumbnail + .file-info { margin-left: 0; }
.legacy-drive-shell[data-view-mode="thumbnail"] .file-thumbnail img,
.legacy-drive-shell[data-view-mode="thumbnail"] .file-thumbnail video { width: 100%; height: 100%; display: block; object-fit: cover; }
.legacy-drive-shell[data-view-mode="thumbnail"] .file-item:has(.file-thumbnail) .file-icon { display: none; }
.legacy-drive-shell[data-view-mode="thumbnail"] .folder-info,
.legacy-drive-shell[data-view-mode="thumbnail"] .file-info { width: 100%; margin-left: 0; }
.legacy-drive-shell[data-view-mode="thumbnail"] .item-option-btn { position: absolute; z-index: 3; right: 7px; top: 7px; width: 34px; height: 34px; border: 0; border-radius: 8px; background: rgba(15,23,42,.82); }
.video-thumbnail-badge { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); display: grid; place-items: center; width: 36px; height: 36px; padding-left: 2px; border-radius: 999px; color: #fff; background: rgba(15,23,42,.74); }

@media (max-width: 780px) {
  .legacy-drive-shell .legacy-filter-strip { align-items: stretch; flex-direction: column; }
  .drive-view-control { justify-content: space-between; margin-left: 0; }
  .legacy-drive-shell[data-view-mode="thumbnail"] .folder-list,
  .legacy-drive-shell[data-view-mode="thumbnail"] .file-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

.upload-conflict-modal { position: fixed; inset: 0; z-index: 9100; display: none; place-items: center; padding: 20px; background: rgba(2,6,23,.7); }
.upload-conflict-modal.open { display: grid; }
.upload-conflict-box { width: min(760px, 95vw); max-height: 96vh; overflow: hidden; border: 1px solid rgba(148,163,184,.2); border-radius: 18px; background: #172033; color: #e5eefc; box-shadow: 0 28px 80px rgba(0,0,0,.5); }
.upload-conflict-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; background: #172033; border-bottom: 1px solid rgba(148,163,184,.14); }
.upload-conflict-head h2 { margin: 0; font-size: 20px; }
.upload-conflict-head button { width: 36px; height: 36px; border: 0; border-radius: 9px; background: transparent; color: #94a3b8; font-size: 25px; cursor: pointer; }
.upload-conflict-body { padding: 14px 20px 16px; }
.upload-conflict-message { margin: 0 0 9px; color: #cbd5e1; font-size: 14px; line-height: 1.45; }
.conflict-option { width: 100%; margin-top: 9px; padding: 13px 16px; border: 1px solid rgba(148,163,184,.12); border-radius: 13px; background: rgba(15,23,42,.32); color: inherit; text-align: left; cursor: pointer; }
.conflict-option:not(.conflict-manual-option) { min-height: 112px; display: grid; grid-template-columns: minmax(175px, 1fr) 88px minmax(190px, 1.25fr); grid-template-rows: auto 1fr; column-gap: 20px; align-items: center; }
.conflict-option:hover, .conflict-option:focus-visible { outline: none; border-color: rgba(96,165,250,.45); background: rgba(59,130,246,.11); }
.conflict-option > strong { display: block; color: #60a5fa; font-size: 16px; line-height: 1.25; }
.conflict-option > span { display: block; margin-top: 4px; color: #94a3b8; font-size: 12px; line-height: 1.4; }
.conflict-option:not(.conflict-manual-option) > strong { grid-column: 1; grid-row: 1; align-self: end; }
.conflict-option:not(.conflict-manual-option) > span { grid-column: 1; grid-row: 2; align-self: start; }
.conflict-option:not(.conflict-manual-option) .conflict-file-row { display: contents; }
.conflict-option:not(.conflict-manual-option) .conflict-thumb { grid-column: 2; grid-row: 1 / 3; }
.conflict-option:not(.conflict-manual-option) .conflict-file-row > div:last-child { grid-column: 3; grid-row: 1 / 3; min-width: 0; display: grid; align-content: center; gap: 5px; }
.conflict-file-row b { overflow: hidden; color: #e2e8f0; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.conflict-file-row small { color: #94a3b8; font-size: 12px; }
.conflict-thumb { width: 84px; height: 84px; flex: 0 0 84px; display: grid; place-items: center; overflow: hidden; border-radius: 11px; background: #22304a; color: #60a5fa; font-size: 12px; font-weight: 900; }
.conflict-thumb img, .conflict-thumb video { width: 100%; height: 100%; object-fit: cover; }
.conflict-manual-option { min-height: 106px; cursor: default; }
.conflict-manual-controls { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; margin-top: 15px; }
.conflict-manual-controls input { min-width: 0; height: 44px; padding: 0 13px; border: 1px solid rgba(148,163,184,.3); border-radius: 9px; outline: none; background: #0f172a; color: #f8fafc; font-size: 14px; }
.conflict-manual-controls input:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.conflict-manual-controls button { padding: 0 16px; border: 0; border-radius: 9px; background: #2563eb; color: #fff; font-weight: 800; cursor: pointer; }
#conflictManualError { min-height: 16px; margin: 7px 0 0; color: #fca5a5; font-size: 12px; }
.conflict-apply-all { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 22px; border-top: 1px solid rgba(148,163,184,.14); background: #111827; color: #e2e8f0; font-size: 13px; }
.conflict-apply-all input { width: 21px; height: 21px; flex: 0 0 21px; accent-color: #3b82f6; cursor: pointer; }
.conflict-apply-all:has(input:disabled) { color: #64748b; }

.upload-transfer-window { position: fixed; z-index: 8500; right: 24px; bottom: 24px; width: min(410px, calc(100vw - 32px)); overflow: hidden; border: 1px solid rgba(148,163,184,.28); border-radius: 12px; background: #101722; color: #e5eefc; box-shadow: 0 18px 55px rgba(0,0,0,.52); }
.upload-transfer-window[hidden] { display: none; }
.upload-transfer-window header { height: 48px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border-bottom: 1px solid rgba(148,163,184,.2); cursor: move; user-select: none; touch-action: none; }
.upload-transfer-window header strong { margin-right: auto; }
.upload-transfer-window header span { min-width: 22px; padding: 3px 6px; border-radius: 6px; background: #0369a1; color: #fff; text-align: center; font-size: 11px; }
.upload-transfer-window header button, .upload-transfer-window footer button { border: 0; background: transparent; color: #cbd5e1; cursor: pointer; }
.upload-transfer-window header button { width: 30px; height: 30px; font-size: 18px; }
.upload-transfer-list { max-height: 310px; overflow: auto; }
.upload-transfer-item { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 55px; padding: 7px 12px; border-bottom: 1px solid rgba(148,163,184,.11); }
.upload-transfer-item > div { min-width: 0; display: grid; gap: 2px; }
.upload-transfer-item b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.upload-transfer-item small, .transfer-size { color: #94a3b8; font-size: 10px; }
.transfer-kind { color: #38bdf8; font-weight: 900; }
.upload-transfer-item i { height: 2px; overflow: hidden; border-radius: 2px; background: rgba(148,163,184,.18); }
.upload-transfer-item em { display: block; width: 0; height: 100%; background: #38bdf8; transition: width .16s; }
.upload-transfer-item[data-state="complete"] .transfer-kind { color: #34d399; }
.upload-transfer-item[data-state="complete"] .transfer-kind::after { content: "✓"; }
.upload-transfer-item[data-state="complete"] .transfer-kind { font-size: 0; }
.upload-transfer-item[data-state="complete"] .transfer-kind::after { font-size: 14px; }
.upload-transfer-item[data-state="error"] small { color: #f87171; }
.upload-transfer-window footer { display: flex; justify-content: flex-end; padding: 10px 12px; }
.upload-transfer-window footer button { font-size: 11px; text-decoration: underline; }
.upload-transfer-window.minimized .upload-transfer-list, .upload-transfer-window.minimized footer { display: none; }

@media (max-width: 680px) {
  .upload-conflict-box { max-height: 94vh; overflow-y: auto; }
  .conflict-option:not(.conflict-manual-option) { grid-template-columns: minmax(120px, 1fr) 74px minmax(120px, 1fr); column-gap: 10px; }
  .conflict-thumb { width: 70px; height: 70px; }
  .conflict-manual-controls { grid-template-columns: 1fr; }
  .conflict-manual-controls button { min-height: 42px; }
}

/* workspace_ui.css */
/* Shared workspace surfaces. The drive keeps its existing explorer layout. */
.app-screen { color-scheme: dark; }
.app-screen .content-inner { padding: 20px 24px 36px; }
.app-screen .page-hero h1 { margin: 0; font-size: 28px; }
.app-screen .page-hero p { margin: 8px 0 0; }
.app-screen .page-kicker { display: none; }
.app-screen :is(button,.btn,input,select) { font-size: 14px; }
.app-screen :is(button,.btn) { min-height: 40px; }
.app-screen input:is([type=checkbox],[type=radio]) { appearance: auto; width: 18px; height: 18px; min-height: 18px; padding: 0; flex: none; accent-color: var(--accent); }
.app-screen :focus-visible { outline: 2px solid #79adff; outline-offset: 3px; }
.app-screen input:disabled { opacity: 1; color: var(--muted); }
.app-screen .flash { background: var(--surface-2); color: var(--text-2); border-color: var(--line); }
.sidebar-logout { flex: none; padding: 0 4px 12px; }
.sidebar-logout button { width: 100%; justify-content: flex-start; color: var(--text-2); background: transparent; border-color: var(--line); }
.sidebar-logout button:hover { background: var(--surface-2); }
.app-screen .sidebar-inner { padding-bottom: 0; }
.account-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items: start; }
.settings-card h2 { margin: 0; font-size: 18px; }
.settings-card p { margin: 0; line-height: 1.7; }
.settings-card button { justify-self: start; }
.settings-card .switch-row { min-height: 44px; font-size: 14px; }
.switch-row span, .policy-item span { margin-bottom: 0; }
.policy-item { min-height: 48px; cursor: pointer; }
.policy-item:has(input:checked) { border-color: #416a9f; }
.policy-item:has(input:disabled) { opacity: .55; cursor: default; }
.policy-list { grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); }
.account-session { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.preferences-shell { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 24px; align-items: start; }
.preferences-nav { display: grid; gap: 5px; position: sticky; top: 20px; padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.preferences-nav button { text-align: left; border: 0; background: transparent; color: var(--muted); }
.preferences-nav button[aria-selected=true] { background: #223856; color: #f0f6ff; }
.preferences-panel { display: grid; gap: 18px; min-width: 0; }
.preferences-panel[hidden] { display: none; }
.preferences-panels { min-width: 0; }
.preferences-panel .account-grid { grid-template-columns: 1fr; }
.settings-card h3 { margin: 6px 0 0; font-size: 14px; }
.settings-card form { display: grid; gap: 14px; min-width: 0; }
.settings-card [role=status] { font-size: 12px; color: var(--muted); }
.profile-image-row { display: flex; gap: 20px; align-items: center; min-width: 0; }
.profile-image-row > div { min-width: 0; display: grid; gap: 8px; }
.profile-image-row input { max-width: 100%; }
.profile-image { flex: none; width: 76px; height: 76px; object-fit: cover; border-radius: 50%; border: 1px solid var(--line); }
.account-avatar { overflow: hidden; }
.account-avatar img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.upload-location-preference { display: flex; gap: 12px; padding: 10px 16px; align-items: center; }
.upload-location-preference[hidden] { display: none; }
.upload-location-preference small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
@media (max-width: 760px) {
  .preferences-shell { grid-template-columns: 1fr; gap: 14px; }
  .preferences-nav { position: static; grid-template-columns: repeat(3,minmax(0,1fr)); }
  .preferences-nav button { text-align: center; padding-inline: 6px; }
  .profile-image-row { gap: 12px; }
  .profile-image { width: 54px; height: 54px; }
}
.page-toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.page-toolbar p { margin: 0; }
.view-options { display: inline-flex; gap: 3px; padding: 3px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; flex: none; }
.view-options button { display:grid; place-items:center; flex:none; width:40px; min-height:40px; box-sizing:border-box; border:0; background:transparent; color:var(--muted); border-radius:7px; padding:8px; }
.view-options svg { width:22px; height:22px; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round; }
.view-options button:hover { background:var(--surface-2); color:var(--text); }
.view-options button[aria-pressed=true] { background: var(--surface-3); color: var(--text); }
.library-items { display: grid; gap: 8px; }
.library-row { display: grid; grid-template-columns: 20px 48px minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.library-row.selected { background: #172b49; border-color: #416a9f; }
.library-checkbox, #librarySelectAll { width: 18px; height: 18px; min-height: 0; accent-color: #4f8cff; }
.library-selection-toolbar label { display: flex; align-items: center; gap: 8px; }
.library-commands { display: flex; flex-wrap: wrap; gap: 8px; }
.library-page[data-view=thumbnail] .library-row { position: relative; }
.library-page[data-view=thumbnail] .library-checkbox { position: absolute; top: 20px; left: 20px; z-index: 1; }
.library-name { min-width: 0; }
.library-name a { display: block; color: var(--text); font-weight: 700; overflow-wrap: anywhere; }
.library-name .library-location-link { display: inline-flex; align-items: center; min-height: 44px; color: #93c5fd; font-size: 12px; font-weight: 500; }
.library-name .library-location-link:hover { text-decoration: underline; }
.library-name small { display: block; color: var(--muted); margin-top: 6px; line-height: 1.6; overflow-wrap: anywhere; }
.file-visual { display: grid; place-items: center; overflow: hidden; width: 48px; height: 48px; border-radius: 8px; background: var(--surface-2); color: #82b7ff; font-size: 12px; font-weight: 800; }
.file-visual img { width: 100%; height: 100%; object-fit: contain; }
.file-visual[data-type-group="word"] { background: linear-gradient(135deg, #2563eb, #1746a2); color: #fff; }
.file-visual[data-type-group="spreadsheet"] { background: linear-gradient(135deg, #16a34a, #106b35); color: #fff; }
.file-visual[data-type-group="presentation"] { background: linear-gradient(135deg, #e84435, #b42520); color: #fff; }
.library-page[data-view=thumbnail] .library-items { grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); }
.library-page[data-view=thumbnail] .library-row { grid-template-columns: minmax(0,1fr); align-content: start; gap: 12px; }
.library-page[data-view=thumbnail] .file-visual { width: 100%; height: 140px; font-size: 24px; }
.library-page[data-view=thumbnail] .library-row form { justify-self: start; }
.library-page[data-view=compact] .library-row { grid-template-columns:20px 30px minmax(0,1fr) auto; gap:12px; padding:8px 12px; border-radius:8px; }
.library-page[data-view=compact] .file-visual { width:30px; height:30px; border-radius:6px; font-size:10px; }
.library-page[data-view=compact] .trash-item-icon { width:26px; height:26px; }
.library-page[data-view=compact] .library-name>a:not(.library-location-link) { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.library-page[data-view=compact] .library-name small { display:none; }
.library-page[data-view=compact] .library-location-link { min-height:0; margin-top:4px; font-size:11px; }
.library-page[data-view=compact] .library-row form button { min-height:30px; padding:4px 8px; font-size:12px; }
.share-card { padding: 18px; display: grid; gap: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.share-card header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.share-card h2 { font-size: 17px; margin: 0; overflow-wrap: anywhere; }
.share-meta { display: flex; flex-wrap: wrap; gap: 10px 24px; color: var(--muted); }
.share-link { display: flex; align-items: end; gap: 10px; }
.share-link label { flex: 1; min-width: 0; }
.share-link input { text-overflow: ellipsis; }
.app-dialog { width: min(820px,calc(100vw - 32px)); max-width: none; max-height: calc(100dvh - 32px); overflow: auto; padding: 22px; border: 1px solid #35445c; border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 24px 80px #0008; }
.app-dialog::backdrop { background: #020617bb; }
.app-dialog:not([open]), [hidden].folder-tools, #folderMore[hidden], .trash-row[hidden], .trash-no-results[hidden], .trash-menu[hidden] { display: none !important; }
.app-dialog header,.app-dialog footer { display: flex; align-items: center; gap: 12px; }
.app-dialog header h2 { margin: 0; font-size: 20px; flex: 1; }
.app-dialog header button { color: var(--muted); background: transparent; font-size: 24px; }
.app-dialog footer { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); justify-content: flex-end; }
.app-dialog footer>div { margin-right: auto; min-width: 0; }
.app-dialog footer strong { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.app-dialog button { flex-shrink: 0; }
.folder-tools { display: flex; gap: 10px; align-items: center; margin: 12px 0; }
.folder-tools label { flex: 1; min-width: 0; }
#folderBreadcrumbs { display: flex; flex-wrap: wrap; gap: 4px; min-width: 0; }
#folderBreadcrumbs button { padding: 4px 8px; overflow-wrap: anywhere; max-width: 100%; }
#folderBreadcrumbs button+button::before { content: '›'; color: var(--muted); }
.folder-browser { display: grid; grid-template-columns: minmax(160px, .7fr) minmax(0,1.5fr); border: 1px solid var(--line); border-radius: 10px; height: clamp(140px,32dvh,300px); overflow: hidden; }
#folderTree { background: var(--bg); overflow: auto; padding: 8px; border-right: 1px solid var(--line); }
.folder-tree-line { display: flex; min-width: max-content; }
.folder-tree-line button { justify-content: flex-start; background: transparent; font-weight: 500; padding: 6px; }
.folder-tree-line button[aria-current] { background: var(--surface-3); color: #9dc4ff; }
.folder-results { padding: 10px; overflow: auto; }
#folderStatus { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.folder-entry { display: flex; justify-content: flex-start; width: 100%; text-align: left; background: transparent; border-radius: 8px; color: var(--text); padding: 12px 8px; }
.folder-entry:hover { background: var(--surface-3); }
.folder-entry-icon { font-size: 28px; color: #efc365; flex: none; }
.folder-entry>span:last-child { min-width: 0; }
.folder-entry strong,.folder-entry small { display: block; overflow-wrap: anywhere; }
.folder-entry small { color: var(--muted); font-weight: 400; margin-top: 4px; }
.form-error { color: #ffa6a6; margin: 8px 0; }
.form-error:empty { display: none; }
.rename-name-fields { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.rename-name-fields input { flex: 1; min-width: 0; }
.rename-name-fields span { flex: none; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.trash-toolbar { flex-wrap: wrap; }
.trash-toolbar .view-options { margin-left: auto; }
.trash-list-head,.trash-row { grid-template-columns: minmax(180px,2fr) minmax(100px,1fr) 145px 100px 70px 40px; }
.trash-selection-bar>div { flex-wrap: wrap; }
.trash-name-cell .file-visual { flex: none; width: 36px; height: 36px; }
.trash-row:focus-visible { outline-offset: -3px; }
.trash-page[data-view=thumbnail] .trash-list-head { display: flex; background: transparent; }
.trash-page[data-view=thumbnail] .trash-list-head>span { display: none; }
.trash-page[data-view=thumbnail] .trash-list { display: grid; grid-template-columns: repeat(auto-fill,minmax(205px,1fr)); gap: 12px; padding: 12px; }
.trash-page[data-view=thumbnail] .trash-row { position: relative; display: flex; flex-direction: column; align-items: stretch; border: 1px solid var(--line); border-radius: 12px; padding: 12px; gap: 6px; min-width: 0; }
.trash-page[data-view=thumbnail] .trash-name-cell { display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
.trash-page[data-view=thumbnail] .trash-checkbox { position: absolute; top: 18px; left: 18px; z-index: 1; }
.trash-page[data-view=thumbnail] .file-visual { width: 100%; height: 130px; font-size: 24px; }
.trash-page[data-view=thumbnail] .trash-item-icon { width: 48px; height: 48px; }
.trash-page[data-view=thumbnail] .trash-row>* { padding-left: 0; }
.trash-page[data-view=thumbnail] .trash-more { position: absolute; right: 14px; top: 14px; background: var(--surface-2); }
.trash-page[data-view=thumbnail] .trash-name-cell strong { white-space: normal; overflow-wrap: anywhere; }
.trash-page[data-view=compact] .trash-row { min-height:42px; padding-block:4px; gap:10px; }
.trash-page[data-view=compact] .trash-name-cell { gap:8px; }
.trash-page[data-view=compact] .trash-name-cell .file-visual { width:26px; height:26px; border-radius:5px; font-size:10px; }
.trash-page[data-view=compact] .trash-item-icon { width:24px; height:24px; }
.library-page[data-view=compact] .trash-item-icon.folder::before,.trash-page[data-view=compact] .trash-item-icon.folder::before { left:4px; top:7px; width:16px; height:11px; }
.trash-page[data-view=compact] .trash-name-cell small { display:none; }
.trash-page[data-view=compact] .trash-more { min-height:30px; }
.trash-confirm-dialog { width: min(500px,calc(100vw - 32px)); }
.text-editor { width: 100%; min-height: 360px; height: 52dvh; resize: vertical; font: 14px/1.7 Consolas,monospace; tab-size: 4; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
@media(max-width:1100px) { .trash-list-head,.trash-row { grid-template-columns: minmax(150px,2fr) minmax(90px,1fr) 130px 95px 65px 40px; gap: 8px; } }
@media(max-width:900px) { .trash-list-head { display: flex; } .trash-list-head>span { display:none; } .trash-row { grid-template-columns: minmax(0,1fr) 40px; } .account-grid { grid-template-columns: 1fr; } }
@media(max-width:767px) {
  .app-screen .app-shell { padding-left: 0 !important; }
  .app-screen .sidebar-head { display: flex !important; }
  .app-screen .sidebar-inner { display: flex; flex-direction: column; }
  .app-screen.sidebar-collapsed .sidebar { height: 56px !important; bottom: auto !important; }
  .app-screen.sidebar-collapsed .sidebar-inner { display: none !important; }
  .app-screen .sidebar-resizer { display: none !important; }
  .app-screen:not(.sidebar-collapsed)::before { content: ''; position: fixed; inset: 0; background: #020617aa; z-index: 90; }
  .app-screen .content-inner { padding: 16px 12px 24px; }
  .app-screen .top-search { min-width: 0 !important; width: calc(100vw - 88px) !important; left: auto !important; right: 12px; transform: none !important; }
  .app-screen .top-search input { width: 0; }
  .app-dialog { padding: 14px; }
  .folder-browser { grid-template-columns: minmax(0,1fr); }
  #folderTree { display: none; }
  .folder-tools { flex-wrap: wrap; }
  .app-dialog footer { flex-wrap: wrap; }
  .app-dialog footer>div { flex-basis: 100%; }
  .library-row { grid-template-columns: 20px 40px minmax(0,1fr); gap: 10px; }
  .library-row form { grid-column: 3; }
  .library-page[data-view=thumbnail] .library-row form { grid-column: 1; }
  .library-page[data-view=compact] .library-row { grid-template-columns:20px 30px minmax(0,1fr); gap:8px; }
  .trash-page[data-view=compact] .trash-row>*:not(.trash-name-cell):not(.trash-more) { padding-left:52px; }
  .trash-toolbar .view-options { margin-left: 0; }
  .share-link { flex-wrap: wrap; }
  .share-link label { flex-basis: 100%; }
}

/* hosting.css */
.hosting-card { min-width: 0; gap: 20px; }
.hosting-card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.hosting-card-header .settings-heading { min-width: 0; }
.hosting-tabs { display: flex; gap: 4px; margin-left: auto; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.hosting-card .hosting-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 34px; padding: 6px 11px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.hosting-card .hosting-tab[aria-selected=true] { border-color: var(--line); background: var(--surface); color: var(--text); }
.hosting-card .hosting-tab:hover { color: var(--text); }
/* Keep the tab state distinct from the final generic secondary-button theme. */
html[data-theme] .hosting-card .hosting-tab { border-color: transparent !important; background: transparent !important; color: var(--muted) !important; }
html[data-theme] .hosting-card .hosting-tab[aria-selected=true] { border-color: var(--line) !important; background: var(--surface) !important; color: var(--text) !important; }
html[data-theme] .hosting-card .hosting-tab:hover { color: var(--text) !important; }
.hosting-tab-panel { display: grid; gap: 20px; min-width: 0; }
.hosting-tab:focus-visible, .hosting-tab-panel:focus-visible, .hosting-manual-scroll:focus-visible { outline: 2px solid var(--theme-focus, var(--blue)); outline-offset: 3px; border-radius: 10px; }
.hosting-manual-icon { width: 17px; height: 17px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.hosting-manual-icon .hosting-manual-icon-dot { fill: currentColor; stroke: none; }
.hosting-manual-panel { gap: 14px; }
.hosting-manual-intro { display: grid; gap: 6px; }
.hosting-card .hosting-manual-intro h3 { margin: 0; font-size: 16px; font-weight: 750; }
.hosting-manual-intro p { color: var(--muted); font-size: 12px; }
.hosting-manual-scroll { display: grid; align-content: start; gap: 14px; min-width: 0; max-height: clamp(320px, calc(100dvh - 250px), 700px); padding: 2px 6px 3px 2px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.hosting-manual-section, .hosting-guide-detail { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.hosting-manual-section { display: grid; gap: 12px; }
.hosting-manual-section > p { color: var(--text-2); font-size: 12px; }
.hosting-card .hosting-manual-scroll :is(p, dd, li) { font-size: 13px; line-height: 1.85; }
.hosting-card .hosting-guide-flow { padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); font-weight: 650; line-height: 1.9; overflow-wrap: anywhere; }
.hosting-card .hosting-manual-section h4, .hosting-card .hosting-guide-detail h5 { margin: 0; color: var(--text); font-size: 13px; font-weight: 750; }
.hosting-card .hosting-guide-detail h5 { margin-top: 3px; }
.hosting-method-list, .hosting-troubleshooting-list { display: grid; gap: 12px; margin: 0; }
.hosting-method-list > div, .hosting-troubleshooting-list > div { display: grid; gap: 5px; min-width: 0; }
.hosting-method-list dt, .hosting-troubleshooting-list dt { color: var(--text); font-size: 12px; font-weight: 750; }
.hosting-method-list dd, .hosting-troubleshooting-list dd { margin: 0; color: var(--text-2); font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.hosting-guide-steps, .hosting-guide-checklist { display: grid; gap: 9px; margin: 0; padding-left: 20px; color: var(--text-2); font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.hosting-guide-steps strong { color: var(--text); font-weight: 700; }
.hosting-card .hosting-guide-note { padding: 9px 11px; border-left: 2px solid var(--muted); background: var(--surface-2); color: var(--text-2); font-size: 12px; }
.hosting-guide-detail summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 28px; color: var(--text); font-size: 13px; font-weight: 750; cursor: pointer; list-style: none; }
.hosting-guide-detail summary::-webkit-details-marker { display: none; }
.hosting-guide-detail summary::after { content: ''; flex: 0 0 7px; width: 7px; height: 7px; margin-right: 3px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); transition: transform .15s ease; }
.hosting-guide-detail[open] summary::after { transform: rotate(225deg); }
.hosting-guide-detail summary:focus-visible { outline: 2px solid var(--theme-focus, var(--blue)); outline-offset: 3px; border-radius: 4px; }
.hosting-guide-detail-body { display: grid; gap: 12px; margin-top: 14px; }
.hosting-guide-detail-body p { color: var(--text-2); font-size: 12px; }
.hosting-manual-scroll code { padding: 1px 3px; border-radius: 3px; color: var(--text); background: var(--surface-2); font-size: .95em; overflow-wrap: anywhere; }
.hosting-manual-scroll pre { margin: 9px 0 0; padding: 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.hosting-manual-scroll pre code { padding: 0; line-height: 1.7; }
.hosting-guide-source-links { display: flex; flex-wrap: wrap; gap: 9px 16px; }
.hosting-guide-source-links a { color: var(--text-2); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.hosting-guide-source-links a:hover { color: var(--text); }
@media (prefers-reduced-motion: reduce) { .hosting-guide-detail summary::after { transition: none; } }
.hosting-card p { margin: 0; line-height: 1.65; overflow-wrap: anywhere; }
.hosting-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.hosting-section { display: grid; align-content: start; gap: 16px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.hosting-section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.hosting-card .hosting-section h3 { margin: 0; font-size: 14px; font-weight: 750; }
.hosting-save-state { color: var(--muted); font-size: 11px; line-height: 1.5; }
.hosting-save-state.is-dirty { color: var(--warning); }
.hosting-card .hosting-form { display: grid; gap: 16px; min-width: 0; }
.hosting-field { display: grid; gap: 8px; min-width: 0; }
.hosting-card .field-label label { margin: 0; color: var(--text-2); font-size: 12px; font-weight: 750; }
.hosting-card input, .hosting-card select { min-width: 0; width: 100%; }
.hosting-device { justify-self: start; font-size: 12px; }
.hosting-lan-fields { padding: 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.hosting-lan-summary { display: grid; gap: 9px; min-width: 0; margin: 3px 0; }
.hosting-lan-summary > div { display: grid; gap: 3px; min-width: 0; }
.hosting-lan-summary dt { color: var(--muted); font-size: 11px; }
.hosting-lan-summary dd { margin: 0; color: var(--text); font-size: 12px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.hosting-card .hosting-lan-help { font-size: 12px; line-height: 1.75; color: var(--muted); }
.hosting-card #hostingLanStatus:empty { display: none; }
.hosting-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.hosting-save-actions { padding-top: 2px; }
.hosting-state { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 13px; line-height: 1.6; }
.hosting-status-dot { width: 8px; height: 8px; margin-top: 6px; flex: 0 0 8px; border-radius: 50%; background: var(--muted); }
.hosting-status-dot.is-active { background: var(--success); }
.hosting-card:is([data-connection-state=cleanup],[data-connection-state=error]) .hosting-status-dot { background: var(--warning); }
.hosting-connection #hostingStatus { white-space: pre-line; }
.hosting-connection #hostingStatus[data-kind=issue] { padding: 10px 12px; border-left: 2px solid var(--warning); border-radius: 0 8px 8px 0; background: var(--surface-2); }
.hosting-check-actions { padding-top: 2px; }
.hosting-connection-actions button { flex: 1 1 auto; font-size: 12px; }
.hosting-card button:not(.secondary):not(.context-help-trigger) { color: var(--theme-on-accent, var(--surface)); }
.hosting-link-card { display: grid; gap: 10px; min-width: 0; padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.hosting-link-row { display: flex; gap: 8px; align-items: center; min-width: 0; }
.hosting-link-row input { flex: 1 1 auto; }
.hosting-link-row button { flex: none; white-space: nowrap; }
.hosting-details { padding-top: 2px; min-width: 0; font-size: 12px; }
.hosting-details summary { width: fit-content; min-height: 28px; color: var(--muted); cursor: pointer; }
.hosting-details summary:focus-visible { outline: 2px solid var(--theme-focus, var(--blue)); outline-offset: 3px; border-radius: 4px; }
.hosting-details .hosting-field { margin-top: 10px; }
.hosting-local-notice { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.hosting-readonly { font-size: .85rem; }
.hosting-dialog { box-sizing: border-box; width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); overflow: auto; margin: auto; padding: clamp(18px, 3vw, 28px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-md); }
.hosting-dialog::backdrop { background: color-mix(in srgb, var(--text) 72%, transparent); }
.hosting-dialog form { display: grid; gap: 18px; }
.hosting-dialog label { display: grid; gap: 8px; min-width: 0; }
.hosting-dialog h2, .hosting-dialog p { margin: 0; line-height: 1.6; }
.hosting-dialog .hosting-ack { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 10px; align-items: start; line-height: 1.5; }
.hosting-ack input { width: 16px; min-height: 16px; margin-top: 3px; accent-color: var(--accent); }
.hosting-dialog-status { color: var(--danger); overflow-wrap: anywhere; }
.hosting-card [hidden], .hosting-dialog [hidden] { display: none !important; }
@media (max-width: 900px) { .hosting-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 600px) {
  .hosting-card { gap: 16px; }
  .hosting-tab-panel { gap: 16px; }
  .hosting-manual-section, .hosting-guide-detail { padding: 13px; }
  .hosting-section, .hosting-link-card { padding: 14px; }
  .hosting-actions > button { flex: 1 1 150px; }
  .hosting-link-row { flex-wrap: wrap; }
  .hosting-link-row input { flex-basis: 100%; }
  .hosting-link-row button { width: 100%; }
  .hosting-readonly { font-size: .75rem; }
}
@media (pointer: coarse) { .hosting-card .hosting-tab, .hosting-guide-detail summary { min-height: 44px; } }
