/* SkyDrive — layout on top of Skyline Glass (glass.css). Desktop-first office tool, works on phones. */
:root {
  --font-display: 'Akira Expanded', 'Unbounded', 'Arial Black', sans-serif;
  --font-text: 'DIN 2014', 'Barlow', 'Helvetica Neue', Arial, sans-serif;
  --font-label: 'Akrobat', 'Barlow Semi Condensed', 'Barlow', 'Arial Narrow', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font-text); -webkit-font-smoothing: antialiased; background: var(--ground); }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.eyebrow, .label-s {
  font-family: var(--font-label); font-size: 11px; line-height: 14px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3);
}
.sg-backdrop__art { max-height: 58vh; }

/* ---------- top bar: glass floats, the title sits on the ground */
.sd-page { max-width: 1180px; margin: 0 auto; padding: 16px 24px 140px; }
.sd-bar {
  position: sticky; top: 12px; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  height: 60px; padding: 0 8px 0 18px; border-radius: var(--r-capsule);
}
.sd-brand { display: flex; align-items: center; gap: 10px; color: var(--glass-ink); text-decoration: none; }
.sd-brand img { width: 30px; height: 30px; display: block; }
.sd-brand b { font-family: var(--font-display); font-weight: 800; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; }
.sd-bar__mid { flex: 1; display: flex; justify-content: center; }
.sd-bar__end { display: flex; align-items: center; gap: 6px; }
.sd-bar .sg-seg { margin: 0; width: 240px; }
.sd-lens { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: var(--r-capsule); background: var(--lens); box-shadow: inset 0 1px 0 var(--glass-spec); transition: transform 380ms var(--spring); }
.sd-bar .sg-seg[data-tab="admin"] .sd-lens { transform: translateX(100%); }
.gbtn.ghost { background: transparent; color: var(--glass-ink); box-shadow: none; }
.gbtn.ghost:hover { background: var(--lens); }
.gbtn.solid { background: var(--action); color: var(--on-action); }
.sd-avatar { width: 34px; height: 34px; border-radius: 50%; display: block; object-fit: cover; background: var(--card-fill); }
.sd-me { display: flex; align-items: center; gap: 8px; padding: 0 6px 0 0; height: 44px; border: 0; background: transparent; border-radius: var(--r-capsule); cursor: pointer; }

.sd-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin: 44px 4px 28px; }
.sd-head .sg-title { font-size: clamp(28px, 4vw, 44px); line-height: 1.02; letter-spacing: .01em; }
.sd-head p { margin: 8px 0 0; color: var(--ink-2); font-size: 17px; line-height: 24px; }
.sd-week { display: flex; align-items: center; gap: 4px; height: 52px; padding: 4px; border-radius: var(--r-capsule); }
.sd-week__label { min-width: 132px; text-align: center; font-family: var(--font-label); font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.sd-week__label small { display: block; font-size: 10px; letter-spacing: .14em; color: var(--glass-ink-2); }

/* ---------- auditoriums */
.sd-level { margin-bottom: 36px; }
.sd-level__head { display: flex; align-items: baseline; gap: 14px; margin: 0 4px 12px; }
.sd-level__head h2 { margin: 0; font-family: var(--font-display); font-size: 20px; line-height: 24px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.sd-level__head span { color: var(--ink-3); font-size: 15px; }
.sd-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .sd-slots { grid-template-columns: 1fr; } }

.sd-slot { border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow-card); overflow: hidden; display: flex; flex-direction: column; min-height: 260px; position: relative; }
.sd-slot__top { padding: 18px 18px 14px; display: grid; gap: 4px; border-bottom: 1px solid var(--separator); }
.sd-slot__name { display: flex; align-items: center; gap: 10px; }
.sd-slot__name h3 { margin: 0; font-size: 20px; line-height: 26px; font-weight: 600; }
.sd-mac { display: flex; align-items: center; gap: 8px; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.sd-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.sd-dot.ok { background: var(--positive); }
.sd-dot.warn { background: var(--caution); }
.sd-dot.bad { background: var(--critical); }
.sd-files { flex: 1; }
.sd-file { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 10px 10px 18px; position: relative; }
.sd-file + .sd-file::before { content: ''; position: absolute; top: 0; left: 66px; right: 0; height: 1px; background: var(--separator); }
.sd-file__tile { flex: none; width: 36px; height: 36px; border-radius: var(--r-badge); background: var(--card-fill); display: grid; place-items: center; color: var(--ink); }
.sd-file__text { flex: 1; min-width: 0; }
.sd-file__name { font-size: 16px; line-height: 21px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-file__sub { font-size: 13px; line-height: 18px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 0 8px; }
.sd-file__sub .ok { color: var(--positive); font-weight: 600; }
.sd-file__acts { display: flex; gap: 2px; flex: none; opacity: .55; transition: opacity 120ms; }
.sd-file:hover .sd-file__acts, .sd-file:focus-within .sd-file__acts { opacity: 1; }
@media (hover: none) { .sd-file__acts { opacity: 1; } }
.sd-ibtn { width: 36px; height: 36px; border: 0; border-radius: var(--r-badge); background: transparent; display: grid; place-items: center; color: var(--ink-2); cursor: pointer; }
.sd-ibtn:hover { background: var(--card-fill); color: var(--ink); }
.sd-ibtn.danger:hover { color: var(--critical); }
.sd-ibtn svg, .sd-file__tile svg, .gbtn svg, .sg-mini svg { width: 18px; height: 18px; stroke-width: 1.75; }
.sd-empty { padding: 26px 18px; color: var(--ink-3); font-size: 15px; line-height: 21px; }

.sd-drop { margin: 0 12px 12px; display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 56px; padding: 0 16px; border: 1.5px dashed var(--line-strong); border-radius: var(--r-badge); color: var(--ink-2); font-family: var(--font-label); font-weight: 600; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; background: transparent; }
.sd-drop:hover { color: var(--ink); border-color: var(--ink); }
.sd-slot.is-over { outline: 2px solid var(--ink); outline-offset: -2px; }
.sd-slot.is-over .sd-drop { border-style: solid; border-color: var(--ink); color: var(--ink); background: var(--card-fill); }

.sd-sub { border-top: 1px solid var(--separator); }
.sd-sub__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 10px 4px 18px; }

/* ---------- floating transfer tray */
.sd-float { position: fixed; left: 0; right: 0; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 30; display: grid; justify-items: center; padding: 0 16px; pointer-events: none; }
.sd-tray { pointer-events: auto; width: min(100%, 520px); border-radius: var(--r-widget); padding: 12px 14px; display: grid; gap: 10px; }
.sd-job { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; }
.sd-job__name { font-size: 14px; line-height: 18px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-job__pct { font-family: var(--font-label); font-weight: 600; font-size: 12px; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.sd-job__bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--lens); overflow: hidden; }
.sd-job__bar i { display: block; height: 100%; width: 0; background: currentColor; transition: width 200ms linear; }
.sd-job.err .sd-job__pct { color: var(--critical); }
.sd-toast { pointer-events: auto; border-radius: var(--r-capsule); padding: 12px 20px; font-size: 15px; line-height: 20px; margin-top: 10px; max-width: min(100%, 560px); }

/* ---------- admin */
.sd-admin { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; align-items: start; }
@media (max-width: 860px) { .sd-admin { grid-template-columns: 1fr; } }
.sd-field { display: grid; gap: 6px; }
.sd-field label { font-family: var(--font-label); font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.sd-input, .sd-select { height: 44px; padding: 0 14px; border: 1px solid var(--separator); border-radius: var(--r-badge); background: var(--card); color: var(--ink); font: inherit; font-size: 16px; width: 100%; }
.sd-input:focus, .sd-select:focus { outline: 2px solid var(--focus); outline-offset: 1px; }
.sd-inline { display: flex; gap: 8px; align-items: center; }
.sd-inline .sd-input { flex: 1; }
.sd-step { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sd-step__ctl { display: flex; align-items: center; gap: 4px; }
.sd-step__val { min-width: 74px; text-align: center; font-size: 22px; line-height: 26px; font-weight: 300; font-variant-numeric: tabular-nums; }
.sd-step__val small { display: block; font-family: var(--font-label); font-size: 10px; line-height: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.sd-switch { position: relative; width: 52px; height: 32px; border-radius: var(--r-capsule); border: 0; background: var(--card-fill); box-shadow: inset 0 0 0 1px var(--separator); cursor: pointer; flex: none; transition: background 200ms var(--spring); }
.sd-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: var(--card); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform 280ms var(--spring); }
.sd-switch[aria-checked="true"] { background: var(--action); }
.sd-switch[aria-checked="true"]::after { transform: translateX(20px); }
.sd-note { margin: 0; font-size: 14px; line-height: 20px; color: var(--ink-2); }
.sd-code { font-family: var(--font-display); font-weight: 800; font-size: 34px; letter-spacing: .14em; text-align: center; padding: 18px 8px; border-radius: var(--r-badge); background: var(--card-fill); user-select: all; }
.sd-role { font-family: var(--font-label); font-weight: 600; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

/* ---------- gate / sign-in */
.sd-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.sd-gate__card { width: min(100%, 420px); border-radius: var(--r-sheet); padding: 36px 28px 28px; display: grid; gap: 18px; justify-items: center; text-align: center; }
.sd-gate__card img { width: 88px; height: 88px; }
.sd-gate__card h1 { margin: 0; font-family: var(--font-display); font-size: 30px; line-height: 32px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; }
.sd-gate__card p { margin: 0; color: var(--glass-ink-2); font-size: 16px; line-height: 23px; }
.sd-gate__card .gbtn { width: 100%; }

.sd-spin { animation: sd-spin 1s linear infinite; }
@keyframes sd-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sd-spin { animation: none; } .sd-lens, .sd-switch, .sd-switch::after { transition: none; } }

@media (max-width: 640px) {
  .sd-page { padding: 10px 12px 140px; }
  .sd-bar { padding: 0 6px 0 12px; }
  .sd-brand b { display: none; }
  .sd-bar .sg-seg { width: 180px; }
  .sd-head { margin-top: 28px; }
  .sd-week__label { min-width: 104px; }
}
