/* ============================================================================
   V3 Cloud — AMOLED black, Drive-style layout
   Fonts: Roboto (Apache-2.0) + Material Symbols Outlined (Apache-2.0), bundled
   ========================================================================== */

@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; src: url('../assets/fonts/roboto-400-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; src: url('../assets/fonts/roboto-400-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0306-0307, U+0309, U+030A, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500; src: url('../assets/fonts/roboto-500-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 500; src: url('../assets/fonts/roboto-500-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0306-0307, U+0309, U+030A, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; src: url('../assets/fonts/roboto-700-latin.woff2') format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; src: url('../assets/fonts/roboto-700-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02AF, U+0300-0301, U+0303-0304, U+0306-0307, U+0309, U+030A, U+0323, U+0329, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Material Symbols Outlined'; font-style: normal; font-weight: 100 700; src: url('../assets/fonts/material-symbols.woff2') format('woff2'); }

:root {
  /* AMOLED palette — true black base, Drive-dark pastel accents */
  --bg:        #000000;
  --surface:   #0c0d0f;
  --surface-2: #16171a;
  --surface-3: #222327;
  --hover:     #1c1d21;
  --active:    #2a2b30;
  --border:    #2b2c31;
  --text:      #e3e3e3;
  --text-2:    #9aa0a6;
  --text-3:    #5f6368;
  --accent:    #8ab4f8;   /* Drive dark blue */
  --accent-2:  #aecbfa;
  --yellow:    #fdd663;
  --green:     #81c995;
  --red:       #f28b82;
  --orange:    #fcad70;
  --purple:    #c58af9;
  --crimson:   #dc143c;
  --sel-strong:rgba(138, 180, 248, .24);
  --danger:    #f28b82;
  --radius:    8px;
  --radius-lg: 16px;
  --shadow:    0 8px 32px rgba(0, 0, 0, .8);
  --topbar-h:  64px;
  --sidebar-w: 264px;
  font-size: 15px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; } /* ensure the hidden attribute beats any display rule */
html, body { height: 100%; overflow: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Roboto', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
button { font-family: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input { font-family: inherit; }

/* Material Symbols */
.ms {
  font-family: 'Material Symbols Outlined';
  font-weight: normal; font-style: normal;
  font-size: 22px; line-height: 1;
  letter-spacing: normal; text-transform: none; display: inline-block;
  white-space: nowrap; word-wrap: normal; direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.ico-blue   { color: var(--accent); }
.ico-yellow { color: var(--yellow); }
.ico-green  { color: var(--green); }
.ico-red    { color: var(--red); }
.ico-purple { color: var(--purple); }
.ico-crimson { color: var(--crimson); }
.ico-grey   { color: var(--text-2); }

/* ============================ LAYOUT ==================================== */
.app { display: flex; flex-direction: column; height: 100vh; background: var(--bg); }
.body { display: flex; flex: 1; min-height: 0; position: relative; }

/* ============================ TOP BAR =================================== */
.topbar {
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px 8px 8px;
  background: var(--bg);
  flex: none;
}
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: background .12s ease, color .12s ease;
  flex: none;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn.active { background: var(--surface-3); color: var(--text); }

.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 0 4px; }
.brand-logo { width: 34px; height: 34px; }
.logo-cloud { fill: #e8eaed; }
.logo-v { stroke: #000; }
.brand-name {
  font-size: 21.5px; font-weight: 500; color: var(--text-2);
  letter-spacing: .2px; white-space: nowrap;
}

.search-wrap {
  flex: 1; max-width: 720px; margin: 0 auto;
  display: flex; align-items: center; gap: 4px;
  background: var(--surface-2);
  border-radius: 24px; height: 48px; padding: 0 6px 0 14px;
  transition: background .15s ease;
}
.search-wrap:focus-within { background: var(--surface-3); }
.search-ico { color: var(--text-2); font-size: 20px; }
#search {
  flex: 1; background: none; border: 0; outline: 0;
  color: var(--text); font-size: 15.5px; padding: 0 8px;
}
#search::placeholder { color: var(--text-3); }

.topbar-right { display: flex; align-items: center; gap: 6px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #3c4043, #202124);
  color: var(--accent); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-left: 6px; cursor: default;
  border: 1px solid var(--border);
}

/* ============================ SIDEBAR =================================== */
.sidebar {
  width: var(--sidebar-w); flex: none;
  display: flex; flex-direction: column;
  padding: 8px 0 12px 12px;
  background: var(--bg);
  overflow-y: auto; overflow-x: hidden;
  transition: margin-left .18s ease;
}
.sidebar.hidden { margin-left: calc(-1 * var(--sidebar-w)); }

.sidebar-top { position: relative; padding: 4px 8px 12px 4px; }
.new-btn {
  display: inline-flex; align-items: center; gap: 12px;
  background: #e8eaed; color: #000;
  border-radius: var(--radius-lg); padding: 12px 22px 12px 16px;
  font-size: 14.5px; font-weight: 500; letter-spacing: .1px;
  box-shadow: 0 1px 3px rgba(0,0,0,.6);
  transition: background .12s ease, box-shadow .12s ease;
}
.new-btn:hover { background: #d7d9dc; box-shadow: 0 2px 8px rgba(0,0,0,.8); }
.new-plus { font-size: 20px; }

.new-dropdown {
  position: absolute; top: 64px; left: 4px; z-index: 60;
  background: var(--surface-3); border-radius: var(--radius-lg);
  padding: 8px 0; min-width: 220px;
  box-shadow: var(--shadow);
}
.dd-item {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 11px 20px;
  font-size: 14px; color: var(--text);
}
.dd-item:hover { background: var(--hover); }
.dd-item .ms { font-size: 20px; color: var(--text-2); }

.nav { display: flex; flex-direction: column; gap: 1px; padding: 0 8px 0 4px; }
.nav-item {
  display: flex; align-items: center; gap: 16px;
  border-radius: 20px; padding: 10px 14px;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  text-align: left; width: 100%;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-3); color: var(--text); }
.nav-item.active .nav-ico { color: var(--accent); }
.nav-ico { font-size: 20px; color: var(--text-2); flex: none; }
.nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-sep { height: 1px; background: var(--border); margin: 10px 14px; }
.nav-section {
  font-size: 12.5px; font-weight: 500; color: var(--text-3);
  padding: 4px 14px 8px; letter-spacing: .3px;
  display: flex; align-items: center; gap: 6px;
}
.nav-section-t { flex: 1; }
.nav-section-add {
  border: 0; background: transparent; color: var(--text-3); cursor: pointer;
  border-radius: 50%; width: 22px; height: 22px; display: grid; place-items: center;
}
.nav-section-add:hover { background: var(--surface-3); color: var(--text); }
.nav-section-add .ms { font-size: 16px; }

.loc-item {
  display: flex; align-items: center; gap: 16px;
  border-radius: 20px; padding: 9px 14px;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  width: 100%; text-align: left;
}
.loc-item:hover { background: var(--surface-2); color: var(--text); }
.loc-item.active { background: var(--surface-3); color: var(--text); }
.loc-item.active .nav-ico { color: var(--accent); }
.loc-item .nav-label { flex: 1; }
.loc-badge {
  font-size: 10.5px; font-weight: 700; letter-spacing: .5px;
  color: var(--text-3); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 6px; flex: none;
}

.storage-meter {
  margin: auto 12px 0 8px; padding: 14px 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.meter-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 500; color: var(--text-2);
  margin-bottom: 10px;
}
.meter-bar { height: 4px; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.meter-fill { height: 100%; width: 0; border-radius: 2px; background: var(--accent); transition: width .4s ease; }
.meter-fill.warn { background: var(--orange); }
.meter-fill.full { background: var(--red); }
.meter-buy {
  display: flex; align-items: center; gap: 8px;
  margin-top: 12px; font-size: 13px; font-weight: 500; color: var(--accent);
}
.meter-buy:hover { text-decoration: underline; }
.meter-buy .ms { font-size: 18px; }

/* ============================ MAIN / FILES ============================== */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 24px 4px 28px; flex: none; min-height: 52px;
}
.toolbar-right { display: flex; align-items: center; gap: 2px; }
.tb-sep { width: 1px; height: 24px; background: var(--border); margin: 0 8px; }

.crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-width: 0; }
.crumb {
  font-size: 19px; color: var(--text); font-weight: 400;
  padding: 6px 8px; border-radius: 6px; max-width: 260px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.crumb:hover:not(.crumb-last) { background: var(--surface-2); }
a.crumb, button.crumb { text-decoration: none; }
.crumb-link { color: var(--text-2); font-weight: 400; }
.crumb-last { font-weight: 500; }
.crumb-sep { color: var(--text-3); font-size: 18px; }

.chips { display: flex; gap: 8px; padding: 6px 28px 10px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 5px 14px; font-size: 13.5px; color: var(--text-2);
  background: transparent;
}
.chip:hover { background: var(--surface-2); color: var(--text); }
.chip-caret { font-size: 16px; }

.content { flex: 1; overflow-y: auto; padding: 2px 12px 24px 20px; outline: none; }

/* ---- list view (file table) ---- */
.thead {
  display: flex; align-items: center;
  color: var(--text-3); font-size: 12.5px; font-weight: 500;
  padding: 8px 16px 8px 22px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--bg); z-index: 5;
  letter-spacing: .2px;
}
.th { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.th:hover { color: var(--text-2); }
.th-name { flex: 1; min-width: 220px; }
.th-owner { width: 200px; }
.th-mod { width: 170px; }
.th-size { width: 90px; justify-content: flex-end; }
.th .ms { font-size: 15px; }

.row {
  display: flex; align-items: center;
  height: 49px; border-radius: 6px;
  padding: 0 16px 0 8px;
  cursor: default; position: relative;
}
.row:hover { background: var(--surface); }
.row.selected { background: var(--sel); }
.row.cut { opacity: .45; }
.cell { display: flex; align-items: center; min-width: 0; font-size: 14px; color: var(--text-2); }
.cell-name { flex: 1; gap: 12px; }
.cell-owner { width: 200px; }
.cell-mod { width: 170px; }
.cell-size { width: 90px; justify-content: flex-end; color: var(--text-2); }
.fname {
  color: var(--text); font-size: 14.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.row.selected .fname { color: var(--accent-2); }
.ficon { font-size: 20px; flex: none; width: 24px; text-align: center; }

.row-check {
  width: 18px; height: 18px; border-radius: 3px;
  border: 2px solid var(--text-3); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 0; transition: all .1s ease;
}
.row:hover .row-check, .row.selected .row-check { border-color: var(--accent); }
.row.selected .row-check { background: var(--accent); border-color: var(--accent); }
.row.selected .row-check::after { content: 'check'; font-family: 'Material Symbols Outlined'; font-size: 14px; color: #000; font-variation-settings: 'FILL' 1, 'wght' 700; }
.row-check.inactive { visibility: hidden; }

/* ---- grid view ---- */
.grid {
  display: grid; gap: 4px; padding: 12px 12px 24px 12px;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.gcard {
  border-radius: var(--radius); padding: 14px 10px 12px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  text-align: center;
}
.gcard:hover { background: var(--surface); }
.gcard.selected { background: var(--sel); }
.gcard .ficon { font-size: 42px; width: auto; }
.gcard .gname {
  font-size: 13.5px; color: var(--text); line-height: 1.35;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  word-break: break-word; max-width: 100%;
}
.gcard .gmeta { font-size: 12px; color: var(--text-3); }
.gcard.selected .gname { color: var(--accent-2); }

/* ---- empty state ---- */
.empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; color: var(--text-3); padding: 90px 20px; text-align: center;
}
.empty .ms { font-size: 64px; color: var(--surface-3); }
.empty-title { font-size: 17px; font-weight: 500; color: var(--text-2); }
.empty-sub { font-size: 13.5px; max-width: 400px; line-height: 1.5; }

/* ---- drop overlay ---- */
.drop-overlay {
  position: absolute; inset: 12px; z-index: 80;
  border: 2px dashed var(--accent); border-radius: var(--radius-lg);
  background: rgba(10, 12, 16, .88);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
}
.drop-card { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--accent); }
.drop-card .ms { font-size: 56px; }

/* ============================ DETAILS PANEL ============================= */
.details {
  width: 360px; flex: none; border-left: 1px solid var(--border);
  background: var(--bg); display: flex; flex-direction: column;
  overflow-y: auto;
}
.details-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 12px 8px 24px;
}
.details-title { font-size: 18px; font-weight: 500; }
.details-body { padding: 8px 24px 32px; }
.d-preview { display: flex; justify-content: center; padding: 26px 0 18px; }
.d-preview .ms { font-size: 120px; }
.d-name {
  font-size: 20px; font-weight: 500; text-align: center;
  word-break: break-word; line-height: 1.35; margin-bottom: 22px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.d-name .icon-btn { width: 30px; height: 30px; }
.d-name .icon-btn .ms { font-size: 17px; }
.d-sec { margin-top: 22px; }
.d-sec-title { font-size: 13px; font-weight: 500; color: var(--text-2); margin-bottom: 10px; }
.d-row { display: flex; justify-content: space-between; gap: 18px; padding: 7px 0; font-size: 13.5px; }
.d-key { color: var(--text-2); flex: none; }
.d-val { color: var(--text); text-align: right; word-break: break-all; }
.d-actions { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.d-action {
  display: flex; align-items: center; gap: 16px;
  border-radius: 20px; padding: 10px 16px;
  font-size: 14px; font-weight: 500; color: var(--text-2);
  width: 100%; text-align: left;
}
.d-action:hover { background: var(--surface-2); color: var(--text); }
.d-action .ms { font-size: 20px; }
.d-action.danger:hover { color: var(--red); }

/* ============================ TRANSFER DOCK ============================= */
.dock {
  /* CloudGate tray: rounded, hairline border, elevated card. */
  position: absolute; left: 50%; transform: translateX(-50%); bottom: 18px;
  width: min(560px, calc(100% - 32px)); z-index: 90;
  display: flex; flex-direction: column;
  max-height: 46vh; border-radius: 8px;
  background: var(--surface-2); border: 1px solid #3a3a3a;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .65);
}
.dock-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 10px 10px 20px; flex: none;
}
.dock-title { font-size: 15.5px; font-weight: 500; }
.dock-actions { display: flex; gap: 2px; }
.dock-actions .icon-btn { width: 32px; height: 32px; }
.dock-list { overflow-y: auto; padding: 2px 8px; flex: 1; }
.dock-foot {
  flex: none; padding: 10px 20px 14px; display: flex; align-items: center; justify-content: space-between;
  color: var(--text-2); font-size: 13px; border-top: 1px solid var(--border);
}
.dock-foot .btn-text { font-size: 13px; padding: 6px 10px; }

.dock-item { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--radius); }
.dock-item:hover { background: var(--surface-3); }
.di-icon { font-size: 20px; color: var(--text-2); flex: none; }
.di-mid { flex: 1; min-width: 0; }
.di-name { font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.di-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; display: flex; gap: 8px; }
.di-sub .err { color: var(--red); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 240px; }
.di-cancel { flex: none; }
.di-cancel .icon-btn { width: 30px; height: 30px; }
.di-cancel .icon-btn .ms { font-size: 17px; }
.di-status .ms { font-size: 22px; }
.done-ico { color: var(--green); }
.fail-ico { color: var(--red); }

/* Progress bars in the CloudGate web-app pattern (my.cloudgate-app.com):
   a 4px rounded grey track, a brand-colored fill whose width is the
   percentage, and a pulsing half-width fill while the size is still
   unknown ("indeterminate"). */
.progress-track { height: 4px; border-radius: 4px; background: #2c2c2c; margin-top: 6px; overflow: hidden; }
.progress-fill { height: 100%; background: #6b78ee; border-radius: 4px; width: 0; transition: width .25s ease; }
.progress-fill.indet { width: 50%; animation: cg-pulse 1.4s ease-in-out infinite; }
.progress-fill.done { background: #6cd483; }
.progress-fill.fail { background: #ff6b5b; }
@keyframes cg-pulse { 0% { transform: translateX(-100%); } 100% { transform: translateX(200%); } }

.dock-fab {
  position: absolute; right: 22px; bottom: 22px; z-index: 89;
  width: 56px; height: 56px; border-radius: 16px;
  background: var(--surface-3); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.dock-fab:hover { background: var(--active); }
.dock-fab .ms { font-size: 26px; }
.fab-badge {
  position: absolute; top: -6px; right: -6px;
  background: var(--accent); color: #000;
  font-size: 11px; font-weight: 700;
  border-radius: 10px; padding: 1px 6px;
}

/* ============================ CONTEXT MENU ============================== */
.ctx-menu {
  position: fixed; z-index: 200; min-width: 224px;
  background: var(--surface-3); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 8px 0;
  border: 1px solid rgba(255,255,255,.04);
}
.ctx-item {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 10px 18px;
  font-size: 13.5px; color: var(--text);
}
.ctx-item:hover { background: var(--hover); }
.ctx-item .ms { font-size: 19px; color: var(--text-2); }
.ctx-item.danger { color: var(--red); }
.ctx-item.danger .ms { color: var(--red); }
.ctx-sep { height: 1px; background: var(--border); margin: 6px 0; }
.ctx-label { padding: 8px 18px 4px; font-size: 11.5px; color: var(--text-3); letter-spacing: .4px; }
.ctx-item .check { margin-left: auto; font-size: 16px; color: var(--accent); visibility: hidden; }
.ctx-item.checked .check { visibility: visible; }

/* ============================ DIALOGS =================================== */
.backdrop {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, .72);
  display: flex; align-items: center; justify-content: center;
}
.dialog {
  position: fixed; z-index: 301; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: var(--surface-2); border-radius: var(--radius-lg);
  padding: 24px; width: 400px; max-width: calc(100vw - 48px);
  box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.05);
  max-height: calc(100vh - 80px); overflow-y: auto;
}
.dialog-wide { width: 560px; }
.dlg-title { font-size: 21px; font-weight: 500; margin-bottom: 20px; }
.dlg-input {
  width: 100%; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-size: 14.5px; padding: 13px 15px; outline: none;
}
.dlg-input:focus { border-color: var(--accent); }
.dlg-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 22px; }
.btn-text {
  font-size: 14px; font-weight: 500; color: var(--accent);
  padding: 10px 16px; border-radius: var(--radius);
}
.btn-text:hover { background: rgba(138, 180, 248, .12); }
.btn-filled {
  font-size: 14px; font-weight: 500; color: #000;
  background: var(--accent); border-radius: var(--radius);
  padding: 10px 22px;
}
.btn-filled:hover { background: var(--accent-2); }
.flex1 { flex: 1; }

/* connect dialog */
.connect-kinds { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.kind-chip {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 20px;
  padding: 8px 14px; font-size: 13px; color: var(--text-2);
}
.kind-chip .ms { font-size: 18px; }
.kind-chip:hover { background: var(--surface-3); }
.kind-chip.sel { border-color: var(--accent); color: var(--text); background: var(--sel); }
.kind-chip.sel .ms { color: var(--accent); }
.connect-form { display: flex; flex-direction: column; gap: 12px; }
.cf-row { display: flex; flex-direction: column; gap: 6px; }
.cf-row label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.cf-row input, .cf-row select {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 14px; padding: 11px 13px; outline: none; width: 100%;
}
.cf-row input:focus, .cf-row select:focus { border-color: var(--accent); }
.cf-hint { font-size: 12px; color: var(--text-3); line-height: 1.45; }
.cf-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cf-members { display: flex; flex-wrap: wrap; gap: 8px; }
.cf-member {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 20px;
  padding: 6px 8px 6px 12px; font-size: 12.5px; color: var(--text);
}
.cf-member.on { border-color: var(--accent); background: var(--sel); }
.cf-member .ms { font-size: 16px; color: var(--text-2); }
.cf-member.on .ms { color: var(--accent); }
.connect-test { margin-top: 12px; font-size: 13px; line-height: 1.5; min-height: 0; }
.connect-test.ok { color: var(--green); }
.connect-test.err { color: var(--red); }
.cf-auto { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.cf-auto .btn-filled { padding: 11px 20px; font-size: 14px; }
.cf-auto .btn-text { padding-left: 0; font-size: 13px; color: var(--text-2); }
.cf-auto-status { font-size: 13px; line-height: 1.5; }
.cf-auto-status.run { color: var(--text-2); }
.cf-auto-status.ok { color: var(--green); }
.cf-auto-status.err { color: var(--red); }

/* move dialog */
.move-crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-bottom: 10px; }
.move-list {
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--surface); height: 280px; overflow-y: auto;
  padding: 6px;
}
.move-row {
  display: flex; align-items: center; gap: 12px;
  border-radius: 6px; padding: 9px 12px; width: 100%;
  font-size: 14px; color: var(--text); text-align: left;
}
.move-row:hover { background: var(--surface-3); }
.move-row .ms { font-size: 20px; color: var(--accent); }
.move-row .mr-sub { margin-left: auto; color: var(--text-3); font-size: 12px; }
.move-empty { color: var(--text-3); font-size: 13px; padding: 16px; text-align: center; }

/* settings */
.settings-grid { display: grid; grid-template-columns: 1fr 120px; gap: 12px 16px; align-items: center; }
.settings-grid label { font-size: 13.5px; color: var(--text-2); }
.settings-grid input {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 14px; padding: 10px 12px; outline: none; width: 100%;
}
.settings-grid input:focus { border-color: var(--accent); }
.staging-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.staging-path {
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-size: 12.5px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 9px 12px;
}
.staging-note { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.settings-note { margin-top: 14px; font-size: 12px; color: var(--text-3); line-height: 1.5; }

/* about */
.about-body { text-align: center; }
.about-logo { width: 76px; height: 76px; margin-bottom: 8px; }
.about-name { font-size: 20px; font-weight: 500; }
.about-version { color: var(--text-3); font-size: 12.5px; margin: 4px 0 16px; }
.about-body p { font-size: 13px; color: var(--text-2); line-height: 1.55; text-align: left; margin-bottom: 10px; }
.about-body p.about-note { color: var(--text-3); }

/* first run */
.first-text { font-size: 14px; color: var(--text-2); line-height: 1.55; margin-bottom: 18px; }
.first-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.first-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 18px; text-align: left;
}
.first-card:hover { background: var(--surface-3); border-color: var(--accent); }
.first-card .ms { font-size: 26px; margin-bottom: 6px; }
.first-card b { font-size: 14.5px; font-weight: 500; }
.first-card span:last-child { font-size: 12px; color: var(--text-3); }

/* ============================ TOASTS ==================================== */
.toasts { position: fixed; left: 22px; bottom: 22px; z-index: 400; display: flex; flex-direction: column; gap: 10px; }
.toast {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-3); color: var(--text);
  border-radius: var(--radius); padding: 13px 18px;
  font-size: 13.5px; box-shadow: var(--shadow);
  border: 1px solid var(--border);
  animation: toast-in .18s ease;
  max-width: 420px;
}
.toast .ms { font-size: 19px; flex: none; }
.toast.ok .ms { color: var(--green); }
.toast.err .ms { color: var(--red); }
.toast.info .ms { color: var(--accent); }
.toast .t-action { color: var(--accent); font-weight: 500; margin-left: 8px; white-space: nowrap; }
@keyframes toast-in { from { transform: translateY(12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============================ SCROLLBARS ================================ */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: #2e2f33; border-radius: 8px; border: 3px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3c3d42; }
::-webkit-scrollbar-track { background: transparent; }

/* text selection color */
::selection { background: rgba(138, 180, 248, .32); }

/* no-select helper */
.noscroll { overflow: hidden; }

/* ============================ v0.2 ADDITIONS ============================= */

/* ---- New dropdown sections ---- */
.dd-sep { height: 1px; background: var(--border); margin: 6px 0; }
.dd-title { padding: 8px 20px 4px; font-size: 11.5px; color: var(--text-3); letter-spacing: .4px; }

/* ---- search clear ---- */
.search-clear { width: 32px; height: 32px; }
.search-clear .ms { font-size: 17px; }

/* ---- crumb sub (search view) ---- */
.crumb-sub { font-size: 14px; color: var(--text-3); margin-left: 6px; }

/* ---- row hover chrome: star + more ---- */
.row-more {
  width: 36px; height: 36px; border-radius: 50%; margin-left: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2); opacity: 0; flex: none; transition: opacity .1s ease;
}
.row:hover .row-more, .row.selected .row-more { opacity: 1; }
.row-more:hover { background: var(--surface-3); color: var(--text); }
.row-more .ms { font-size: 19px; }
.row { padding-right: 8px; }

.row-star {
  display: inline-flex; align-items: center; flex: none;
  color: var(--text-3); opacity: 0; margin-left: 4px; cursor: pointer;
  width: 28px; height: 28px; border-radius: 50%; justify-content: center;
  transition: opacity .1s ease, color .1s ease;
}
.row:hover .row-star, .row-star.on { opacity: 1; }
.row-star:hover { color: var(--yellow); background: var(--surface-2); }
.row-star.on { color: var(--yellow); }
.row-star.on .ms { font-variation-settings: 'FILL' 1, 'wght' 500; }
.row-star .ms { font-size: 19px; }

/* grid star */
.gstar {
  position: absolute; top: 8px; right: 8px;
  color: var(--text-3); opacity: 0; display: inline-flex;
  width: 30px; height: 30px; border-radius: 50%;
  align-items: center; justify-content: center;
}
.gcard { position: relative; }
.gcard:hover .gstar, .gstar.on { opacity: 1; }
.gstar:hover { color: var(--yellow); background: var(--surface-3); }
.gstar.on { color: var(--yellow); }
.gstar.on .ms { font-variation-settings: 'FILL' 1, 'wght' 500; }

/* details star button */
.d-star { width: 34px; height: 34px; }
.d-star .ms { font-size: 21px; }
.d-star.on { color: var(--yellow); }
.d-star.on .ms { font-variation-settings: 'FILL' 1, 'wght' 500; }

/* ---- filter chips active ---- */
.chip.on { border-color: var(--accent); color: var(--accent); background: var(--sel); }
.chip-clear { font-size: 15px; }
.chip-clear:hover { color: var(--text); }

/* ---- trash view ---- */
.trash-banner {
  display: flex; align-items: center; gap: 12px;
  margin: 2px 16px 14px 12px; padding: 12px 16px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); font-size: 13px; color: var(--text-2);
}
.trash-banner .ms { font-size: 20px; color: var(--text-3); flex: none; }
.trash-banner span:nth-child(2) { flex: 1; line-height: 1.45; }
.row-restore, .row-forever {
  width: 36px; height: 36px; border-radius: 50%; margin-left: 4px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-2); opacity: 0; transition: opacity .1s ease;
}
.row:hover .row-restore, .row:hover .row-forever { opacity: 1; }
.row-restore:hover { color: var(--green); background: var(--surface-3); }
.row-forever:hover { color: var(--red); background: var(--surface-3); }

/* ---- storage view ---- */
.storage-hero {
  display: flex; align-items: center; gap: 18px;
  margin: 8px 16px 20px 12px; padding: 20px 24px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.storage-hero > .ms { font-size: 44px; flex: none; }
.sh-title { font-size: 19px; font-weight: 500; }
.sh-sub { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.storage-hero .btn-filled { margin-left: auto; flex: none; display: inline-flex; align-items: center; }
.storage-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px; padding: 0 12px 24px 12px;
}
.storage-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px 20px;
}
.storage-card > .ms { font-size: 30px; }
.sc-name { font-size: 15px; font-weight: 500; }
.sc-sub { font-size: 12px; color: var(--text-3); }
.storage-card .meter-bar { width: 100%; margin-top: 6px; }

/* ---- preview overlay ---- */
.preview {
  position: fixed; inset: 0; z-index: 250;
  background: #000;
  display: flex; flex-direction: column;
}
.preview-top {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 10px 22px; gap: 12px;
  background: var(--surface); border-bottom: 1px solid var(--border);
}
.preview-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.preview-id > .ms { font-size: 30px; flex: none; }
.preview-titles { min-width: 0; }
.preview-name {
  font-size: 15.5px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 46vw;
}
.preview-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; white-space: nowrap; }
.preview-actions { display: flex; gap: 2px; flex: none; }
.preview-stage {
  flex: 1; min-height: 0; position: relative;
  display: flex; align-items: stretch;
}
.preview-media { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; position: relative; }
.pv-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.pv-video { max-width: 100%; max-height: 100%; outline: none; }
.pv-pdf { width: 100%; height: 100%; border: 0; background: #111; }
.pv-audio { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.pv-audio > .ms { font-size: 110px; }
.pv-audio audio { width: min(560px, 70vw); }
.pv-text {
  align-self: stretch; width: 100%; overflow: auto;
  background: var(--surface); color: var(--text);
  font-family: 'Roboto Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 13px; line-height: 1.6; padding: 24px 28px;
  white-space: pre-wrap; word-break: break-word; user-select: text;
}
.pv-loading { color: var(--text-3); }
.pv-loading .ms { font-size: 42px; }
.pv-fallback { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 20px; }
.pv-fallback > .ms { font-size: 96px; }
.pv-fb-title { font-size: 17px; font-weight: 500; word-break: break-all; }
.pv-fb-sub { font-size: 13px; color: var(--text-3); max-width: 520px; line-height: 1.5; }
.pv-fb-actions { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.preview-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--surface-2); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow); border: 1px solid var(--border);
}
.preview-nav:hover { background: var(--surface-3); }
.preview-nav .ms { font-size: 30px; }
.preview-nav.prev { left: 18px; }
.preview-nav.next { right: 18px; }
.preview-foot {
  flex: none; text-align: center; font-size: 12px; color: var(--text-3);
  padding: 8px; background: var(--surface); border-top: 1px solid var(--border);
}

/* ---- confirm / conflict dialogs ---- */
.confirm-body { font-size: 14px; color: var(--text-2); line-height: 1.55; word-break: break-word; }
.dlg-hint { font-size: 12px; color: var(--text-3); margin-top: 8px; line-height: 1.45; }

/* ---- small util: spin ---- */
.ms-spin { animation: spin 1.1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================================
   v0.3 ADDITIONS — categories, shares, vault, backup
   ========================================================================== */

.cat-item:hover { background: var(--surface-2); color: var(--text); }
.cat-item.active { background: var(--surface-3); color: var(--text); }
.cat-item .nav-ico { font-size: 20px; flex: none; }
.cat-item .cat-count { margin-left: auto; font-size: 11.5px; color: var(--text-3); }

/* ---- trash category cards ---- */
.trash-cats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px; margin: 2px 16px 16px 12px;
}
.trash-cat {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px; text-align: left;
}
.trash-cat:hover { background: var(--surface-3); }
.trash-cat.sel { border-color: var(--accent); background: var(--sel); }
.trash-cat .ms { font-size: 24px; }
.trash-cat b { font-size: 13.5px; font-weight: 500; color: var(--text); }
.trash-cat span { font-size: 11.5px; color: var(--text-3); }

/* ---- shared links view ---- */
.share-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px; border-bottom: 1px solid var(--border);
}
.share-row:hover { background: var(--surface); }
.share-row .ms { font-size: 22px; flex: none; }
.share-mid { flex: 1; min-width: 0; }
.share-name { font-size: 14px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.share-url {
  font-size: 11.5px; color: var(--text-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 520px;
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
}
.share-exp { font-size: 11.5px; color: var(--text-3); flex: none; }
.share-exp.soon { color: var(--orange); }

/* ---- vault view ---- */
.vault-hero {
  display: flex; align-items: center; gap: 16px;
  margin: 8px 16px 16px 12px; padding: 18px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.vault-hero > .ms { font-size: 38px; color: var(--purple); flex: none; }
.vault-hero .vh-title { font-size: 17px; font-weight: 500; }
.vault-hero .vh-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; line-height: 1.45; }
.vault-hero .btn-filled { margin-left: auto; flex: none; }
.vault-hero .btn-text { flex: none; }

/* ---- backup view ---- */
.backup-hero {
  display: flex; align-items: center; gap: 16px;
  margin: 8px 16px 16px 12px; padding: 18px 22px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.backup-hero > .ms { font-size: 38px; color: var(--yellow); flex: none; }
.backup-hero .bh-title { font-size: 17px; font-weight: 500; }
.backup-hero .bh-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; line-height: 1.45; }
.backup-hero .btn-filled { margin-left: auto; flex: none; }
.backup-list { display: flex; flex-direction: column; gap: 10px; padding: 0 12px 24px 12px; }
.backup-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 18px;
}
.backup-card > .ms { font-size: 26px; color: var(--yellow); flex: none; }
.bc-mid { flex: 1; min-width: 0; }
.bc-name { font-size: 14.5px; font-weight: 500; color: var(--text); }
.bc-sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.bc-progress { height: 3px; border-radius: 2px; background: var(--surface-3); margin-top: 8px; overflow: hidden; }
.bc-progress > div { height: 100%; background: var(--accent); width: 0; transition: width .2s ease; }
.bc-actions { display: flex; gap: 2px; flex: none; }

/* ---- category cards on the storage view ---- */
.cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px; margin: 0 12px 20px 12px;
}
.cat-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 14px 16px; text-align: left;
}
.cat-card:hover { background: var(--surface-3); }
.cat-card > .ms { font-size: 26px; flex: none; }
.cat-card b { display: block; font-size: 13.5px; font-weight: 500; color: var(--text); }
.cat-card span { font-size: 11.5px; color: var(--text-3); }

/* ---- details panel extras ---- */
.d-action .ms.lock { color: var(--purple); }

/* ---- accounts & stacks ---- */
.acc-bar { display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 16px 6px 12px; flex-wrap:wrap; }
.acc-bar-l { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.acc-bar-r code { font-size:11px; background:var(--surface-3); padding:1px 5px; border-radius:4px; }
.acc-section { font-size:11.5px; font-weight:600; letter-spacing:.06em; text-transform:uppercase;
  color:var(--text-3); padding:12px 16px 6px 12px; }
.acc-none { color:var(--text-3); font-style:italic; }
.acc-name { font-weight:500; }
.acc-sub { font-size:11.5px; color:var(--text-3); }
.acc-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; }
.acc-dot.ok { background:var(--green); }
.acc-dot.warn { background:#e8a33d; }
.acc-table { width:calc(100% - 28px); margin:0 14px 18px 14px; border-collapse:collapse; font-size:13px; }
.acc-table th { text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.05em;
  color:var(--text-3); font-weight:600; padding:6px 10px; border-bottom:1px solid var(--border); }
.acc-table td { padding:9px 10px; border-bottom:1px solid var(--border); vertical-align:middle; }
.acc-table tr:hover td { background:var(--surface-2); }
.acc-table .mono { font-family:ui-monospace,Consolas,monospace; font-size:11.5px; color:var(--text-2); }
.acc-actions { text-align:right; white-space:nowrap; }
.stack-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(240px,1fr)); gap:10px;
  margin:0 16px 8px 12px; }
.stack-card { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:10px 12px; }
.stack-head { display:flex; align-items:center; gap:8px; font-size:13.5px; }
.stack-head .ms { font-size:20px; }
.stack-head .acc-sub { margin-left:auto; }
.stack-members { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.stack-chip { font-size:11.5px; background:var(--surface-3); border:1px solid var(--border);
  border-radius:999px; padding:2px 9px; color:var(--text-2); }

/* ---- backups ---- */
.acc-backups { margin:0 16px 8px 12px; display:flex; flex-direction:column; gap:2px; }
.acc-backup-row { display:flex; align-items:center; gap:10px; padding:6px 8px;
  border-radius:8px; font-size:12.5px; }
.acc-backup-row:hover { background:var(--surface-2); }
.acc-backup-row .ms { font-size:18px; }
.acc-backup-file { font-family:ui-monospace,Consolas,monospace; font-size:11.5px; color:var(--text-2); }
.acc-backup-row .btn-text { margin-left:auto; }

/* ---- text preview editor ---- */
.pv-edit-wrap { position:relative; width:100%; height:100%; display:flex; }
.pv-text { margin:0; padding:18px 22px; width:100%; overflow:auto; font-family:ui-monospace,Consolas,monospace;
  font-size:12.5px; line-height:1.55; white-space:pre-wrap; word-break:break-word; color:var(--text); }
.pv-editor { width:100%; height:100%; padding:18px 22px; border:0; resize:none; outline:none;
  background:var(--surface); color:var(--text); font-family:ui-monospace,Consolas,monospace;
  font-size:12.5px; line-height:1.55; }

/* Cloud Gate members inside a stack chip */
.stack-chip.cg { border-color:var(--green); color:var(--green); }
.stack-chip.more { color:var(--text-3); }

/* stack cards: actions (edit / mount / open) */
.stack-actions { display:flex; gap:4px; margin-top:8px; }
.stack-actions .btn-text { font-size:12px; padding:4px 10px; }
.stack-card { cursor:pointer; }
.stack-card:hover { border-color:var(--accent, #4a9d4a); }

/* ---- stack editor dialog ---- */
.stack-edit-members { margin-top:6px; }
.stack-member-list { display:flex; flex-direction:column; gap:2px; max-height:260px; overflow:auto;
  margin:0 0 8px; padding:6px; border:1px solid var(--border); border-radius:8px; background:var(--surface-2); }
.stack-member-row { display:flex; align-items:center; gap:10px; padding:6px 8px; border-radius:6px; font-size:12.5px; }
.stack-member-row:hover { background:var(--surface-3); }
.stack-member-row .ms { font-size:17px; }
.stack-member-row .grow { flex:1; }
.stack-member-row .acc-sub { font-size:11px; }
.stack-member-row.in-stack { color:var(--text); }
.stack-member-row:not(.in-stack) { color:var(--text-3); }

/* ---- performance mode dialog ---- */
.perf-body { display:flex; flex-direction:column; gap:12px; margin:6px 0 10px; }
.perf-row { display:flex; gap:12px; align-items:flex-start; }
.perf-row .ms { font-size:24px; margin-top:2px; }
.perf-row p { margin:2px 0 0; font-size:12.5px; color:var(--text-2); }

/* ---- origin badge in file rows (which account holds the file) ---- */
.origin-badge { display:inline-flex; align-items:center; gap:4px; font-size:11px; color:var(--green);
  border:1px solid var(--green); border-radius:999px; padding:1px 8px; max-width:170px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; vertical-align:middle; }
.origin-badge .ms { font-size:13px; }

/* ---- Windows volumes (accounts view) ---- */
.vol-card { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:12px 14px; margin-bottom:10px; }
.vol-card.mounted { border-color:var(--accent, #4a9d4a); }
.vol-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.vol-head .ms { font-size:18px; }
.vol-state { margin-left:auto; font-size:11px; color:var(--muted, #8a8f98); text-transform:uppercase; letter-spacing:.06em; }
.vol-card.mounted .vol-state { color:var(--accent, #4a9d4a); }
.vol-meta { margin:6px 0 8px; }
.vol-members { display:grid; gap:6px; margin-bottom:10px; }
.vol-member { display:grid; grid-template-columns:minmax(120px, 1fr) auto; gap:4px 10px; align-items:center; }
.vol-m-name { font-size:12px; }
.vol-m-free { font-size:11px; color:var(--muted, #8a8f98); }
.vol-member .meter-bar { grid-column:1 / -1; height:4px; }
.vol-member.poisoned { opacity:.55; }
.vol-tag { font-size:10px; color:var(--danger, #d06565); border:1px solid currentColor; border-radius:4px; padding:0 4px; }
.vol-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.vol-actions select { background:var(--bg); color:var(--fg); border:1px solid var(--border); border-radius:6px; padding:6px 8px; font-size:12px; }
.vol-actions input { width:52px; text-transform:uppercase; }
.vol-warn { display:flex; gap:10px; align-items:flex-start; background:color-mix(in srgb, #d0a12e 10%, transparent); border:1px solid #d0a12e55; border-radius:10px; padding:10px 12px; margin-bottom:10px; font-size:12px; }
.vol-warn .ms { color:#d0a12e; font-size:18px; }
.vol-warn a { color:var(--accent, #5b9bd5); }

/* ---- zip extractor panel (in-app) ---- */
.pv-zip { display:flex; flex-direction:column; height:100%; padding:14px 18px; gap:10px; }
.pv-zip-head { display:flex; align-items:center; gap:12px; }
.pv-zip-head .ms { font-size:30px; }
.pv-zip-list { flex:1; overflow:auto; border:1px solid var(--border); border-radius:10px;
  background:var(--surface-2); padding:6px; display:flex; flex-direction:column; gap:1px; }
.pv-zip-row { display:flex; align-items:center; gap:10px; padding:6px 8px; border-radius:6px;
  font-size:12.5px; }
.pv-zip-row:hover { background:var(--surface-3); }
.pv-zip-row .ms { font-size:17px; color:var(--text-2); }
.pv-zip-row.dir { color:var(--text-2); }
.pv-zip-row .grow { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pv-zip-row .acc-sub { font-size:11px; }
.pv-zip button:disabled { opacity:.6; cursor:default; }

/* ============================ MODELS CATALOG ============================= */
.models-wrap { display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 18px 22px; overflow: auto; }
.models-head { display: flex; flex-direction: column; gap: 10px; }
.models-title h2 { font-size: 20px; font-weight: 500; margin-bottom: 4px; }
.models-title p { color: var(--text-2); font-size: 13px; max-width: 720px; line-height: 1.5; }
.models-title code { background: var(--surface-3); border-radius: 4px; padding: 1px 6px; font-size: 12px; }
.models-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.models-idx {
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13px; letter-spacing: .08em;
  color: #ff5c77; background: rgba(220, 20, 60, .12); border: 1px solid rgba(220, 20, 60, .45);
  border-radius: 999px; padding: 6px 14px;
}
.models-idx.pulse { animation: models-idx-pulse 1.2s ease-out 1; }
@keyframes models-idx-pulse {
  0% { box-shadow: 0 0 0 0 rgba(220, 20, 60, .55); }
  100% { box-shadow: 0 0 0 14px rgba(220, 20, 60, 0); }
}
.models-btn {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 500;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px;
  padding: 9px 16px; color: var(--text);
}
.models-btn:hover { background: var(--surface-3); }
.models-btn:disabled { opacity: .5; cursor: default; }
.models-btn .ms { font-size: 18px; }
.models-btn.primary { background: var(--crimson); border-color: #ff4d68; color: #fff; }
.models-btn.primary:hover { background: #e8184a; }
.models-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--text-2); font-size: 12.5px; }
.models-meta span { display: inline-flex; align-items: center; gap: 6px; }
.models-meta .ms { font-size: 16px; color: var(--text-3); }
.models-error, .models-ok {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px;
  border-radius: 8px; padding: 9px 12px; line-height: 1.45;
}
.models-error { background: rgba(242, 139, 130, .1); border: 1px solid rgba(242, 139, 130, .4); color: var(--red); }
.models-ok { background: rgba(129, 201, 149, .1); border: 1px solid rgba(129, 201, 149, .4); color: var(--green); }
.models-settings {
  display: grid; grid-template-columns: repeat(2, minmax(240px, 1fr)); gap: 12px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px 18px;
}
.models-settings h3 { grid-column: 1 / -1; font-size: 14px; font-weight: 500; }
.models-field { display: flex; flex-direction: column; gap: 5px; }
.models-field label { font-size: 11.5px; color: var(--text-2); letter-spacing: .02em; }
.models-field input, .models-field select {
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px; font-size: 13px; outline: none;
}
.models-field input:focus, .models-field select:focus { border-color: var(--accent); }
.models-field.wide { grid-column: 1 / -1; }
.models-field.actions { grid-column: 1 / -1; justify-items: start; }
.models-table-wrap { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: auto; background: var(--surface); }
.models-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.models-table th {
  position: sticky; top: 0; background: var(--surface-2); color: var(--text-2);
  text-align: left; font-size: 11px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.models-table td { padding: 10px 14px; border-bottom: 1px solid rgba(43, 44, 49, .55); vertical-align: middle; }
.models-table tbody tr:hover { background: var(--hover); }
.models-table .ta-r { text-align: right; }
.models-idx-cell { font-variant-numeric: tabular-nums; font-weight: 700; color: #ff5c77; }
.models-name { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- drag & drop overlay (installDropTarget in app.js) ---- */
.drop-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(3, 10, 17, 0.72);
  backdrop-filter: blur(3px);
}
.drop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 40px 56px;
  border: 2px dashed var(--accent, #77e2fc);
  border-radius: 16px;
  background: rgba(15, 20, 25, 0.9);
  text-align: center;
}
.drop-card .ms { font-size: 56px; color: var(--accent, #77e2fc); }
.drop-title { font-size: 18px; font-weight: 600; color: var(--text-1, #fff); }
.drop-sub { font-size: 13px; color: var(--text-3, #8f9ba9); max-width: 380px; line-height: 1.5; }
