/* ZERÖ Studio: styled to sit next to the ZERÖ Hub (dark, Roboto, bold nav) with a Drive-style file view. */
:root {
  --bg: #141414;
  --side: #1a1a1a;
  --surface: #1f1f1f;
  --card: #262626;
  --card-hi: #2e2e2e;
  --line: #333;
  --line-soft: #2a2a2a;
  --text: #ececec;
  --muted: #9aa0a6;
  --ok: #2bb673;
  --err: #ff5a6e;
  --radius: 14px;
  --brand: #4566E1;
  --accent: #E8336B;
  --wm: 'Archivo', 'Arial Black', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
.ms { font-family: 'Material Symbols Rounded'; font-size: 20px; line-height: 1; font-weight: normal; font-style: normal; display: inline-block; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-feature-settings: 'liga'; font-feature-settings: 'liga'; user-select: none; }
.muted { color: var(--muted); }
.grow { flex: 1; }
.right { text-align: right; }

/* wordmark */
.wordmark { font-family: var(--wm); font-weight: 900; font-stretch: 125%; font-size: 40px; letter-spacing: -1px; line-height: 1; color: #fff; display: inline-block; }
.wordmark.is-img { height: 34px; width: auto; display: block; }

/* shell */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 264px; flex: 0 0 264px; background: var(--side); border-right: 1px solid var(--line-soft); padding: 18px 14px 12px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: block; padding: 8px 12px 18px; text-decoration: none; border-bottom: 1px solid var(--line-soft); margin-bottom: 14px; }
.new-btn { display: inline-flex; align-items: center; gap: 10px; align-self: flex-start; background: var(--card); padding: 14px 20px 14px 16px; border-radius: 16px; text-decoration: none; font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,.4); margin: 0 0 14px 4px; transition: background .15s; }
.new-btn:hover { background: var(--card-hi); }
.new-btn .ms { font-size: 24px; }
.nav-label { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 13px; color: #cfd3d8; padding: 14px 12px 8px; }
.nav-item { display: flex; align-items: center; gap: 22px; padding: 10px 14px; border-radius: 8px; text-decoration: none; font-weight: 700; font-size: 13px; color: #e8e8e8; margin-bottom: 2px; }
.nav-item .ms { color: #d0d0d0; }
.nav-item:hover { background: #252525; }
.nav-item.active { background: #2f2f2f; }
.side-spacer { flex: 1; }
.side-user { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line-soft); padding: 14px 6px 4px; }
.side-user .who { display: flex; flex-direction: column; min-width: 0; }
.side-user small { color: var(--muted); }
.side-user small a { color: var(--muted); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), #6652F7); display: grid; place-items: center; font-weight: 700; flex: 0 0 auto; }
.avatar.sm { width: 28px; height: 28px; font-size: 12px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 18px 28px 10px; }
.topbar h1 { font: 20px/1.2 Bionix, Inter, sans-serif; text-transform: uppercase; margin: 0; letter-spacing: .5px; }
.topbar .menu-btn { display: none; }
.content { flex: 1; margin: 0 16px 16px 0; background: var(--surface); border-radius: 18px; padding: 24px 28px 40px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card); padding: 9px 16px; border-radius: 10px; cursor: pointer; text-decoration: none; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--card-hi); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: color-mix(in srgb, var(--brand) 85%, #fff); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--err) 50%, transparent); color: var(--err); }
.btn-block { width: 100%; padding: 13px; }
.btn .ms { font-size: 19px; }
.icon-btn { background: none; border: 0; border-radius: 50%; width: 36px; height: 36px; display: inline-grid; place-items: center; cursor: pointer; color: #ddd; }
.icon-btn:hover { background: #333; }
.link-btn { background: none; border: 0; color: var(--brand); cursor: pointer; padding: 0; display: inline-flex; align-items: center; gap: 6px; font-weight: 500; margin: -4px 0 10px; }
.link-btn .ms { font-size: 18px; }

/* forms */
.lbl { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: #cfd3d8; margin-bottom: 14px; }
.lbl input:not([type=color]):not([type=file]):not([type=checkbox]), .lbl select, .lbl textarea, .inp {
  background: #181818; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); outline: none; width: 100%;
}
.lbl input:focus, .lbl select:focus, .lbl textarea:focus, .inp:focus { border-color: var(--brand); }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; cursor: pointer; }
.check input { accent-color: var(--brand); width: 16px; height: 16px; }
.color-row { display: flex; align-items: center; gap: 10px; }
input[type=color] { width: 44px; height: 34px; border: 1px solid var(--line); border-radius: 8px; background: #181818; padding: 2px; cursor: pointer; }
.logo-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.logo-preview { background: #111; padding: 12px 18px; border-radius: 10px; }
.logo-preview .wordmark.is-img { height: 26px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 14px; }
.font-preview { font-size: 34px; background: #111; border-radius: 10px; padding: 14px 18px; margin-bottom: 14px; }

/* auth: matches the hub sign-in card */
.auth-page { min-height: 100vh; display: grid; place-items: center; background: linear-gradient(135deg, #1b1b1d 0%, #1c1f3a 55%, #1d2350 100%); padding: 20px; }
.auth-card { width: 100%; max-width: 420px; background: #232323; border-radius: 18px; padding: 38px 40px 26px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.auth-mark { font-size: 54px; margin-bottom: 26px; }
.auth-mark.is-img { height: 46px; }
.auth-card h2 { font-size: 15px; margin: 0 0 4px; }
.auth-card .muted { margin: 0 0 22px; font-size: 14px; }
.field { position: relative; display: flex; align-items: center; border: 1px solid #555; border-radius: 6px; margin-bottom: 22px; height: 48px; }
.field:focus-within { border-color: var(--brand); }
.field-label { position: absolute; top: -9px; left: 12px; font-size: 12px; background: #232323; padding: 0 4px; color: #ccc; }
.field > .ms { padding: 0 6px 0 10px; color: #ccc; }
.field input { flex: 1; border: 0; background: transparent; outline: none; height: 100%; padding: 0 8px; font-size: 16px; min-width: 0; }
.peek { background: none; border: 0; border-left: 1px solid #555; height: 100%; padding: 0 10px; cursor: pointer; color: #ccc; }
.auth-foot { text-align: center; color: #6c7178; font-size: 12px; margin: 18px 0 0; }

/* flash */
.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 16px; font-weight: 500; }
.flash-ok { background: color-mix(in srgb, var(--ok) 18%, transparent); color: #9be3c0; }
.flash-err { background: color-mix(in srgb, var(--err) 16%, transparent); color: #ffb3bd; }

/* panels + tables */
.panel { background: var(--card); border-radius: var(--radius); padding: 22px 24px; margin-bottom: 20px; }
.panel.narrow { max-width: 680px; }
.panel h2 { margin: 0 0 6px; font-size: 18px; }
.panel h3 { margin: 22px 0 6px; font-size: 15px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-weight: 500; color: #cfd3d8; padding: 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.list td { padding: 10px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.list tbody tr:hover { background: #2a2a2a; }
.name-cell { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; background: #333; font-size: 12px; font-weight: 500; white-space: nowrap; }
.chip-brand { background: color-mix(in srgb, var(--brand) 25%, transparent); color: #c6d2ff; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; }
.dot.ok { background: var(--ok); } .dot.off { background: #666; }

/* modals */
.modal { background: #262626; color: var(--text); border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(440px, 92vw); }
.modal::backdrop { background: rgba(0,0,0,.6); }
.modal h3 { margin: 0 0 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; margin-top: 8px; }

/* ---------- Drive-style home ---------- */
.welcome { text-align: center; font: 30px/1.1 Bionix, Inter, sans-serif; text-transform: uppercase; margin: 6px 0 22px; letter-spacing: .5px; }
.search { display: flex; align-items: center; gap: 12px; max-width: 760px; margin: 0 auto; background: #2a2a2a; border-radius: 28px; padding: 0 20px; height: 54px; }
.search:focus-within { background: #fff; color: #222; }
.search input { flex: 1; border: 0; background: transparent; outline: none; font-size: 16px; min-width: 0; }
.filters { display: flex; justify-content: center; gap: 10px; margin: 16px 0 26px; flex-wrap: wrap; }
.filter { position: relative; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #444; border-radius: 9px; padding: 0 10px 0 12px; height: 36px; background: transparent; font-weight: 500; }
.filter.on { background: color-mix(in srgb, var(--brand) 22%, transparent); border-color: transparent; }
.filter select { appearance: none; background: transparent; border: 0; outline: none; padding-right: 18px; cursor: pointer; font-weight: 500; }
.filter select option { background: #262626; }
.filter .caret { position: absolute; right: 8px; pointer-events: none; font-size: 18px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 500; margin: 8px 0 14px; }
.section-title .ms { font-size: 22px; }
.section-title .grow { flex: 1; }
.type-group { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 4px 0 8px; }
.type-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 18px; }
.type-card { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 12px; padding: 10px 14px; text-decoration: none; transition: background .15s, transform .15s; }
.type-card:hover { background: var(--card-hi); transform: translateY(-1px); }
.type-card .ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; flex: 0 0 auto; }
.type-card strong { display: block; font-weight: 500; }
.type-card small { color: var(--muted); }
.view-toggle { display: inline-flex; border: 1px solid #555; border-radius: 999px; overflow: hidden; }
.view-toggle button { background: none; border: 0; padding: 6px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.view-toggle button.on { background: color-mix(in srgb, var(--brand) 30%, transparent); }
.file-ico { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; background: #333; flex: 0 0 auto; }
.post-link { text-decoration: none; }
.post-link:hover { text-decoration: underline; }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .ms { font-size: 48px; display: block; margin-bottom: 10px; color: #555; }
.grid-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.tile { background: var(--card); border-radius: 12px; padding: 10px; position: relative; }
.tile:hover { background: var(--card-hi); }
.tile-head { display: flex; align-items: center; gap: 8px; padding: 2px 0 8px 4px; font-weight: 500; }
.tile-head span.t { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-thumb { display: block; aspect-ratio: 1; border-radius: 8px; background: #181818 center/contain no-repeat; }
.tile small { display: block; color: var(--muted); padding: 8px 4px 2px; }
.menu { position: fixed; z-index: 50; background: #2b2b2b; border: 1px solid #3a3a3a; border-radius: 10px; padding: 6px 0; min-width: 190px; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.menu button { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; padding: 9px 16px; cursor: pointer; text-align: left; }
.menu button:hover { background: #363636; }
.menu .danger { color: var(--err); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #e8e8e8; color: #111; padding: 12px 20px; border-radius: 10px; font-weight: 500; opacity: 0; transition: .25s; z-index: 100; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }

@media (max-width: 900px) {
  .sidebar { position: fixed; left: -280px; z-index: 40; transition: left .2s; box-shadow: 0 0 40px rgba(0,0,0,.6); }
  .sidebar.open { left: 0; }
  .topbar .menu-btn { display: inline-grid; }
  .content { margin: 0 8px 8px; padding: 18px 16px 30px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none; }
}
