:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-soft: #f2f2f5;
  --surface: rgba(255, 255, 255, .82);
  --surface-solid: #ffffff;
  --surface-raised: #fafafa;
  --line: rgba(0, 0, 0, .075);
  --line-strong: rgba(0, 0, 0, .14);
  --text: #1d1d1f;
  --text-soft: #6e6e73;
  --text-faint: #86868b;
  --accent: #1d1d1f;
  --accent-2: #6e6e73;
  --accent-dim: rgba(0, 0, 0, .045);
  --success: #248a3d;
  --warning: #b25000;
  --danger: #d70015;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 18px 55px rgba(0, 0, 0, .085);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; font-family: var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }
::selection { color: #fff; background: #1d1d1f; }
:focus-visible { outline: 3px solid rgba(0, 0, 0, .14); outline-offset: 2px; }

.portal-body { position: relative; overflow-x: hidden; }
.ambient { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: linear-gradient(180deg, #fbfbfd 0%, #f5f5f7 44%, #f2f2f5 100%); }
.ambient-grid, .ambient-orbit { display: none; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes modalIn { from { opacity: 0; transform: translateY(8px) scale(.992); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes pulse { 0%,100% { opacity: .7; } 50% { opacity: 1; } }

.brand-lockup { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; position: relative; border: 0; border-radius: 12px; background: #1d1d1f; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.brand-mark::after { display: none; }
.brand-mark span { font-size: 10px; line-height: 1; font-weight: 700; letter-spacing: .09em; color: #fff; }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 13px; font-weight: 650; letter-spacing: .08em; }
.brand-copy small { color: var(--text-faint); font-size: 9px; letter-spacing: .14em; }
.eyebrow { display: block; color: var(--text-faint); font-size: 10px; font-weight: 600; letter-spacing: .13em; line-height: 1.4; }

.login-shell { width: min(1280px, calc(100% - 64px)); min-height: 100vh; margin: auto; display: grid; grid-template-rows: auto 1fr auto; }
.login-brand { display: flex; align-items: center; justify-content: space-between; padding: 28px 0; border-bottom: 1px solid var(--line); }
.system-state { display: flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 12px; }
.system-state span, .system-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); animation: pulse 2.6s ease-in-out infinite; }
.login-stage { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(420px, .62fr); gap: clamp(56px, 8vw, 128px); align-items: center; padding: 76px 4vw 88px; }
.login-context { max-width: 610px; animation: fadeUp .4s ease both; }
.context-index { margin-bottom: 24px; color: var(--text-faint); font-size: 10px; font-weight: 600; letter-spacing: .14em; }
.login-context h1 { max-width: 610px; margin: 0; font-size: clamp(46px, 5vw, 76px); line-height: 1.01; letter-spacing: -.052em; font-weight: 620; }
.context-rule { width: 100%; height: 1px; margin: 38px 0 26px; background: var(--line-strong); }
.context-meta { display: grid; gap: 14px; margin: 0; }
.context-meta div { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.context-meta dt, .context-meta dd { margin: 0; font-size: 12px; }
.context-meta dt { color: var(--text-faint); }
.context-meta dd { color: var(--text-soft); }
.access-panel { position: relative; overflow: hidden; padding: 30px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.9); box-shadow: var(--shadow); backdrop-filter: saturate(140%) blur(24px); animation: fadeUp .42s .04s ease both; }
.access-panel::before { display: none; }
.access-panel-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 25px; }
.access-panel h2 { margin: 8px 0 0; font-size: 24px; font-weight: 620; letter-spacing: -.032em; }
.access-glyph { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: #f5f5f7; font-size: 21px; }
.access-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 24px; padding: 4px; border-radius: 13px; background: #f2f2f7; }
.access-tab { display: flex; align-items: flex-start; gap: 10px; min-height: 91px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.018); text-align: left; cursor: pointer; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.access-tab:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.access-tab.is-active { border-color: rgba(99,213,210,.42); background: var(--accent-dim); }
.tab-number { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border: 1px solid var(--line-strong); border-radius: 7px; color: var(--text-soft); font-size: 10px; font-weight: 800; }
.access-tab.is-active .tab-number { color: #071111; background: var(--accent); border-color: var(--accent); }
.access-tab span:last-child { display: grid; gap: 5px; }
.access-tab strong { font-size: 12px; line-height: 1.25; }
.access-tab small { color: var(--text-faint); font-size: 10px; line-height: 1.35; }
.access-form { display: none; gap: 12px; }
.access-form.is-active { display: grid; animation: fadeUp .25s ease both; }
.access-form label, .field > span { color: var(--text-soft); font-size: 11px; font-weight: 620; letter-spacing: .02em; }
.code-field { display: flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 13px; background: rgba(2,5,8,.55); transition: border-color .2s, box-shadow .2s; }
.code-field:focus-within { border-color: rgba(99,213,210,.55); box-shadow: 0 0 0 3px rgba(99,213,210,.08); }
.code-field input { width: 100%; height: 53px; min-width: 0; padding: 0 15px; color: var(--text); border: 0; outline: 0; background: transparent; font-size: 14px; letter-spacing: .03em; }
.room-code-field input { letter-spacing: .15em; font-weight: 700; text-transform: uppercase; }
.code-field input::placeholder, .field input::placeholder, .search-field input::placeholder { color: #4f5b68; }
.reveal-button { flex: 0 0 auto; margin-right: 8px; padding: 7px 9px; border: 0; border-radius: 7px; color: var(--text-faint); background: transparent; font-size: 10px; cursor: pointer; }
.reveal-button:hover { color: var(--text); background: rgba(255,255,255,.05); }
.primary-action, .ghost-action, .danger-action { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 46px; padding: 0 18px; border-radius: 11px; font-weight: 680; font-size: 12px; cursor: pointer; transition: transform .2s, border-color .2s, background .2s, opacity .2s; }
.primary-action { border: 1px solid var(--accent); color: #061111; background: var(--accent); box-shadow: 0 12px 35px rgba(99,213,210,.13); }
.primary-action:hover { transform: translateY(-1px); background: #7ae0dd; }
.primary-action:disabled, .ghost-action:disabled { cursor: not-allowed; opacity: .38; transform: none; }
.access-form .primary-action { width: 100%; justify-content: space-between; margin-top: 5px; }
.primary-action.compact { min-height: 42px; padding: 0 16px; }
.ghost-action { border: 1px solid var(--line-strong); color: var(--text-soft); background: rgba(255,255,255,.025); }
.ghost-action:hover { color: var(--text); border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.05); }
.danger-action { border: 1px solid rgba(239,123,131,.34); color: #ffabb1; background: rgba(239,123,131,.07); }
.danger-action:hover { background: rgba(239,123,131,.14); }
.access-foot { display: flex; justify-content: space-between; gap: 20px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); color: var(--text-faint); font-size: 9px; letter-spacing: .02em; }
.notice { margin-bottom: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--text-soft); background: rgba(255,255,255,.025); font-size: 11px; line-height: 1.5; }
.notice-error { border-color: rgba(239,123,131,.3); color: #ffabb1; background: rgba(239,123,131,.07); }
.notice-warning { border-color: rgba(227,183,108,.25); color: #e9c98f; background: rgba(227,183,108,.07); }
.notice code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.login-footer { display: flex; align-items: center; justify-content: space-between; padding: 24px 0 30px; border-top: 1px solid var(--line); color: var(--text-faint); font-size: 10px; letter-spacing: .08em; }
.login-footer nav { display: flex; gap: 24px; }
.login-footer a:hover { color: var(--text-soft); }

.app-shell { position: relative; display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; z-index: 4; height: 100vh; display: flex; flex-direction: column; padding: 25px 18px 18px; border-right: 1px solid var(--line); background: rgba(8,11,15,.91); backdrop-filter: blur(20px); }
.sidebar-brand { padding: 0 8px 24px; border-bottom: 1px solid var(--line); }
.sidebar-nav { display: grid; gap: 5px; margin-top: 22px; }
.nav-item { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; min-height: 43px; padding: 0 10px; border: 1px solid transparent; border-radius: 10px; color: var(--text-soft); font-size: 12px; transition: color .2s, background .2s, border-color .2s; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.025); }
.nav-item.is-active { color: var(--text); border-color: rgba(99,213,210,.18); background: linear-gradient(90deg, rgba(99,213,210,.12), rgba(99,213,210,.025)); }
.nav-icon { color: var(--text-faint); font-size: 15px; }
.nav-item.is-active .nav-icon { color: var(--accent); }
.nav-item b { min-width: 23px; padding: 3px 6px; border: 1px solid var(--line); border-radius: 20px; color: var(--text-faint); font-size: 9px; text-align: center; }
.sidebar-system { display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 15px 11px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.018); }
.sidebar-system div, .sidebar-user > div:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.sidebar-system strong, .sidebar-user strong { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-system small, .sidebar-user small { color: var(--text-faint); font-size: 9px; }
.sidebar-user { display: grid; grid-template-columns: 34px minmax(0,1fr) 28px; align-items: center; gap: 9px; margin-top: 10px; padding: 12px 9px 2px; border-top: 1px solid var(--line); }
.user-avatar, .participant-avatar { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(99,213,210,.24); border-radius: 10px; color: var(--accent); background: var(--accent-dim); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.user-avatar.small { width: 31px; height: 31px; border-radius: 9px; font-size: 10px; }
.sidebar-user form button { width: 28px; height: 28px; border: 0; border-radius: 7px; color: var(--text-faint); background: transparent; cursor: pointer; }
.sidebar-user form button:hover { color: var(--text); background: rgba(255,255,255,.05); }
.workspace { width: min(1560px, 100%); padding: 34px clamp(28px, 4vw, 66px) 70px; overflow: hidden; }
.workspace-header { display: flex; justify-content: space-between; align-items: flex-end; gap: 30px; margin-bottom: 30px; animation: fadeUp .5s ease both; }
.workspace-header h1 { margin: 7px 0 0; font-size: clamp(31px, 3vw, 45px); line-height: 1; letter-spacing: -.045em; }
.header-actions { display: flex; align-items: center; gap: 9px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.metric-card { position: relative; overflow: hidden; min-height: 132px; display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(20,26,34,.86), rgba(10,14,19,.84)); box-shadow: inset 0 1px 0 rgba(255,255,255,.025); }
.metric-card::before { content: ""; position: absolute; width: 95px; height: 95px; right: -35px; top: -35px; border: 1px solid rgba(255,255,255,.055); border-radius: 50%; }
.reveal-card:nth-child(2) { animation-delay: .06s; }.reveal-card:nth-child(3) { animation-delay: .12s; }.reveal-card:nth-child(4) { animation-delay: .18s; }
.reveal-card { animation: fadeUp .52s ease both; }
.metric-label { color: var(--text-faint); font-size: 10px; letter-spacing: .05em; }
.metric-card strong { margin-top: 8px; font-size: 31px; line-height: 1; letter-spacing: -.04em; }
.metric-card small { margin-top: 7px; color: var(--text-soft); font-size: 10px; }
.metric-accent { border-color: rgba(99,213,210,.25); background: linear-gradient(145deg, rgba(18,42,44,.72), rgba(10,18,21,.87)); }
.metric-accent strong { color: var(--accent); }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13,18,24,.76); box-shadow: inset 0 1px 0 rgba(255,255,255,.025); backdrop-filter: blur(16px); }
.rooms-panel { margin-top: 16px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 78px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.panel-heading h2 { margin: 5px 0 0; font-size: 17px; letter-spacing: -.025em; }
.search-field { display: flex; align-items: center; width: 230px; height: 39px; gap: 8px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.16); color: var(--text-faint); }
.search-field input { width: 100%; border: 0; outline: 0; color: var(--text-soft); background: transparent; font-size: 10px; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; min-width: 1120px; border-collapse: collapse; }
.data-table th { padding: 12px 15px; color: var(--text-faint); border-bottom: 1px solid var(--line); font-size: 9px; font-weight: 620; letter-spacing: .07em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 15px; border-bottom: 1px solid rgba(255,255,255,.055); font-size: 10px; vertical-align: middle; }
.data-table tbody tr { transition: background .18s; }
.data-table tbody tr:hover { background: rgba(255,255,255,.018); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.room-name { display: flex; align-items: center; gap: 11px; min-width: 175px; }
.room-symbol { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid var(--line); border-radius: 9px; color: var(--accent); background: rgba(99,213,210,.045); font-size: 16px; }
.room-name > span:last-child, .file-cell, .usage-cell, .admin-row > div, .participant-row > div:nth-child(2), .file-row-admin > div { display: grid; gap: 4px; min-width: 0; }
.room-name strong, .file-cell strong, .admin-row strong, .participant-row strong, .file-row-admin strong { max-width: 210px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.room-name small, .file-cell small, .admin-row small, .participant-row small, .file-row-admin small { color: var(--text-faint); font-size: 9px; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 20px; font-size: 9px; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-live { color: var(--success); border-color: rgba(101,214,160,.18); background: rgba(101,214,160,.055); }
.status-closed { color: var(--warning); border-color: rgba(227,183,108,.18); background: rgba(227,183,108,.055); }
.status-expired { color: var(--text-faint); }
.table-primary { color: var(--text-soft); white-space: nowrap; }
.table-number { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-soft); }
.muted { color: var(--text-faint); }
.usage-cell { min-width: 130px; color: var(--text-soft); }
.usage-cell i { width: 100%; height: 3px; overflow: hidden; border-radius: 4px; background: rgba(255,255,255,.07); }
.usage-cell i b { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width .8s ease; }
.icon-action { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-soft); background: rgba(255,255,255,.018); cursor: pointer; transition: border-color .2s, color .2s, background .2s; }
.icon-action:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255,255,255,.05); }
.icon-action.danger { color: var(--danger); }
.empty-state { display: grid; justify-items: center; gap: 7px; padding: 55px 20px; color: var(--text-soft); }
.empty-state span { color: var(--accent); font-size: 28px; }.empty-state small { color: var(--text-faint); }
.dashboard-columns { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(330px, .65fr); gap: 16px; margin-top: 16px; }
.activity-list { padding: 4px 20px 15px; }
.activity-item { display: grid; grid-template-columns: 9px minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.055); }
.activity-item:last-child { border-bottom: 0; }
.activity-marker { width: 7px; height: 7px; margin-top: 4px; border: 1px solid var(--accent); border-radius: 50%; box-shadow: 0 0 0 3px rgba(99,213,210,.06); }
.activity-item strong { display: block; font-size: 10px; }
.activity-item p { margin: 4px 0 0; color: var(--text-faint); font-size: 9px; line-height: 1.4; }
.activity-item time { color: var(--text-faint); font-size: 8px; white-space: nowrap; }
.admin-list, .participant-list, .file-list-admin { padding: 8px 16px 16px; }
.admin-row, .participant-row, .file-row-admin { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; min-height: 54px; padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,.055); }
.admin-row:last-child, .participant-row:last-child, .file-row-admin:last-child { border-bottom: 0; }
.empty-inline { padding: 26px 8px; color: var(--text-faint); font-size: 10px; text-align: center; }

.back-link { display: inline-block; margin-bottom: 17px; color: var(--text-faint); font-size: 10px; transition: color .2s; }.back-link:hover { color: var(--accent); }
.room-header { align-items: flex-end; }
.room-summary { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(13,18,24,.72); overflow: hidden; }
.room-summary article { min-height: 92px; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 17px; border-right: 1px solid var(--line); }
.room-summary article:last-child { border-right: 0; }
.room-summary span { color: var(--text-faint); font-size: 9px; letter-spacing: .04em; }
.room-summary strong { font-size: 11px; }
.status-text.live { color: var(--success); }.status-text.closed { color: var(--warning); }
.room-grid { display: grid; grid-template-columns: minmax(340px,.72fr) minmax(0,1.28fr); gap: 16px; margin-top: 16px; }
.participant-avatar { width: 37px; height: 37px; }
.file-type { display: grid; place-items: center; width: 39px; height: 39px; border: 1px solid var(--line); border-radius: 10px; color: var(--accent); background: rgba(99,213,210,.04); font-size: 8px; font-weight: 750; letter-spacing: .05em; }
.scan-state { color: var(--success); font-size: 8px; }
.text-link { color: var(--text-faint); font-size: 9px; }.text-link:hover { color: var(--accent); }
.room-activity { margin-top: 16px; }
.two-column-activity { display: grid; grid-template-columns: 1fr 1fr; column-gap: 28px; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 16px; padding: 22px; border: 1px solid rgba(239,123,131,.17); border-radius: var(--radius); background: rgba(239,123,131,.035); }
.danger-zone h2 { margin: 6px 0 5px; font-size: 16px; }.danger-zone p { margin: 0; color: var(--text-faint); font-size: 10px; }

.portal-modal { width: min(620px, calc(100% - 28px)); max-width: none; padding: 0; border: 0; color: var(--text); background: transparent; }
.portal-modal::backdrop { background: rgba(2,4,7,.76); backdrop-filter: blur(8px); }
.portal-modal[open] .modal-card { animation: modalIn .25s ease both; }
.modal-card { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 20px; background: #11171f; box-shadow: 0 35px 100px rgba(0,0,0,.6); }
.modal-card > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 23px 24px; border-bottom: 1px solid var(--line); }
.modal-card h2 { margin: 6px 0 0; font-size: 21px; letter-spacing: -.03em; }
.modal-close { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px; color: var(--text-faint); background: transparent; cursor: pointer; font-size: 20px; }.modal-close:hover { color: var(--text); background: rgba(255,255,255,.04); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 23px 24px; }
.field { display: grid; gap: 8px; }.field-wide { grid-column: 1 / -1; }
.field input, .field select { width: 100%; height: 46px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 10px; outline: 0; color: var(--text); background: #0b1016; font-size: 11px; }
.field input:focus, .field select:focus { border-color: rgba(99,213,210,.55); box-shadow: 0 0 0 3px rgba(99,213,210,.07); }
.modal-card > footer { display: flex; justify-content: flex-end; gap: 9px; padding: 16px 24px; border-top: 1px solid var(--line); background: rgba(0,0,0,.12); }
.code-result { display: grid; justify-items: center; gap: 17px; padding: 32px 24px; text-align: center; }
.code-result > span { color: var(--text-soft); font-size: 11px; }.code-result > strong { padding: 14px 20px; border: 1px solid rgba(99,213,210,.28); border-radius: 12px; color: var(--accent); background: rgba(99,213,210,.055); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: clamp(19px, 4vw, 27px); letter-spacing: .09em; }
.toast-stack { position: fixed; z-index: 20; right: 22px; bottom: 22px; display: grid; gap: 9px; width: min(360px, calc(100% - 44px)); }
.toast { padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 11px; color: var(--text-soft); background: rgba(17,23,31,.96); box-shadow: var(--shadow); font-size: 10px; animation: fadeUp .25s ease both; }.toast.is-error { border-color: rgba(239,123,131,.28); color: #ffabb1; }

@media (max-width: 1180px) {
  .login-stage { grid-template-columns: .8fr 1fr; gap: 45px; padding-inline: 0; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .room-summary { grid-template-columns: repeat(3, 1fr); }.room-summary article:nth-child(3) { border-right: 0; }.room-summary article:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .dashboard-columns, .room-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .login-shell { width: min(100% - 30px, 680px); }
  .login-stage { grid-template-columns: 1fr; padding: 48px 0 58px; }
  .login-context { display: none; }
  .app-shell { display: block; }
  .sidebar { position: relative; width: 100%; height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-nav { grid-template-columns: repeat(4, 1fr); margin-top: 14px; overflow-x: auto; }.nav-item { grid-template-columns: 22px auto; min-width: 118px; }.nav-item b { display: none; }
  .sidebar-system { display: none; }.sidebar-user { position: absolute; right: 16px; top: 12px; width: 190px; margin: 0; border: 0; }.sidebar-user > div:nth-child(2) { display: none; }
  .workspace { padding: 25px 16px 55px; }
  .workspace-header { align-items: flex-start; flex-direction: column; }.header-actions { width: 100%; flex-wrap: wrap; }.header-actions > * { flex: 1; }
  .two-column-activity { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .login-brand { padding: 20px 0; }.system-state { display: none; }.access-panel { padding: 20px; border-radius: 18px; }.access-tabs { grid-template-columns: 1fr; }.access-tab { min-height: 72px; }.access-foot { flex-direction: column; gap: 6px; }.login-footer { align-items: flex-start; flex-direction: column; gap: 15px; }
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 8px; }.metric-card { min-height: 110px; padding: 16px; }.metric-card strong { font-size: 25px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }.search-field { width: 100%; }
  .room-summary { grid-template-columns: 1fr 1fr; }.room-summary article, .room-summary article:nth-child(3) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }.room-summary article:nth-child(2n) { border-right: 0; }.room-summary article:nth-last-child(-n+2) { border-bottom: 0; }
  .danger-zone { align-items: flex-start; flex-direction: column; }.danger-action { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }.field-wide { grid-column: auto; }.modal-card > footer { flex-direction: column-reverse; }.modal-card > footer > * { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Contractor file-room interface */
.contractor-shell { width: min(1320px, calc(100% - 48px)); min-height: 100vh; margin: auto; display: grid; grid-template-rows: auto 1fr auto; }
.contractor-header { display: flex; align-items: center; justify-content: space-between; padding: 26px 0; border-bottom: 1px solid var(--line); }
.contractor-role { display: inline-flex; align-items: center; gap: 8px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 20px; color: var(--text-soft); font-size: 10px; }
.contractor-role span { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }
.contractor-main { padding: 56px 0 70px; }
.contractor-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 42px; margin-bottom: 28px; animation: fadeUp .4s ease both; }
.contractor-title h1 { margin: 8px 0 10px; max-width: 820px; font-size: clamp(36px, 5vw, 66px); line-height: 1; letter-spacing: -.052em; }
.contractor-title p { margin: 0; color: var(--text-faint); font-size: 11px; }
.contractor-usage { width: min(310px, 100%); display: grid; gap: 13px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-solid); }
.contractor-usage > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.contractor-usage span { color: var(--text-faint); font-size: 9px; }.contractor-usage strong { color: var(--text-soft); font-size: 10px; }
.usage-track { height: 4px; overflow: hidden; border-radius: 4px; background: #e8e8ed; }.usage-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: #1d1d1f; transition: width .6s ease; }
.contractor-grid { display: grid; grid-template-columns: minmax(360px,.72fr) minmax(0,1.28fr); gap: 16px; align-items: start; }
.upload-column { display: grid; gap: 14px; }
.contractor-drop { min-height: 410px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 30px; border: 1px dashed #c7c7cc; border-radius: 18px; background: rgba(255,255,255,.88); box-shadow: 0 10px 35px rgba(0,0,0,.055); transition: border-color .2s, transform .2s, background .2s; }
.contractor-drop.dragging { transform: translateY(-1px); border-color: #1d1d1f; background: #fff; }
.contractor-drop.disabled { opacity: .48; }
.drop-signal { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: auto; border: 0; border-radius: 16px; color: #fff; background: #1d1d1f; box-shadow: none; }
.drop-signal span { font-size: 27px; font-weight: 300; }
.contractor-drop h2 { margin: 8px 0 10px; font-size: 30px; letter-spacing: -.04em; }
.contractor-drop p { max-width: 460px; margin: 0 0 22px; color: var(--text-soft); font-size: 11px; line-height: 1.65; }
.contractor-files, .contractor-trash { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.9); box-shadow: 0 8px 28px rgba(0,0,0,.045); }
.contractor-file-list { padding: 10px 17px 17px; }
.file-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 9px; min-height: 67px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.file-row:last-child { border-bottom: 0; }.file-name { display: grid; gap: 5px; min-width: 0; }.file-name strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }.file-name span { color: var(--text-faint); font-size: 9px; }
.file-action { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; color: var(--text-soft); background: #fff; font-size: 9px; cursor: pointer; }.file-action:hover { color: var(--text); border-color: var(--line-strong); background: #f5f5f7; }.file-action.danger { color: var(--danger); }
.contractor-queue { display: grid; gap: 8px; }.upload-item { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 7px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }.upload-item strong,.upload-item span { font-size: 9px; }.upload-item span { color: var(--text-faint); }.upload-item .progress { grid-column: 1/-1; height: 3px; border-radius: 4px; background: #e8e8ed; }.upload-item .progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: #1d1d1f; }.upload-item.upload-error .progress i { background: var(--danger); }
.hidden { display: none !important; }
.contractor-admin-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.9); }.contractor-admin-panel h2 { margin: 5px 0 0; font-size: 15px; }.contractor-admin-actions { display: flex; gap: 8px; }
.contractor-trash { margin-top: 16px; }
.contractor-expired { max-width: 680px; margin: 70px auto; padding: 44px; border: 1px solid rgba(178,80,0,.2); border-radius: 16px; text-align: center; background: #fff8f0; }.contractor-expired > span { color: var(--warning); font-size: 9px; letter-spacing: .14em; }.contractor-expired h2 { margin: 11px 0; }.contractor-expired p { color: var(--text-soft); }
.contractor-footer { display: flex; justify-content: space-between; padding: 23px 0 30px; border-top: 1px solid var(--line); color: var(--text-faint); font-size: 9px; letter-spacing: .04em; }
@media (max-width: 900px) { .contractor-title { align-items: flex-start; flex-direction: column; }.contractor-grid { grid-template-columns: 1fr; }.contractor-drop { min-height: 350px; } }
@media (max-width: 560px) { .contractor-shell { width: calc(100% - 28px); }.contractor-main { padding-top: 38px; }.contractor-role { font-size: 0; padding: 10px; }.contractor-title h1 { font-size: 39px; }.contractor-drop { min-height: 330px; padding: 22px; }.contractor-admin-panel { align-items: flex-start; flex-direction: column; }.contractor-admin-actions { width: 100%; flex-direction: column; }.file-row { grid-template-columns: minmax(0,1fr) auto; }.file-row .file-action.danger { grid-column: 2; }.contractor-footer { flex-direction: column; gap: 8px; } }
.row-actions { display: flex; align-items: center; gap: 6px; }

/* Apple-style neutral product system */
.access-tab { min-height: 82px; border: 0; border-radius: 10px; background: transparent; box-shadow: none; }
.access-tab:hover { transform: none; background: rgba(255,255,255,.58); }
.access-tab.is-active { border: 0; color: var(--text); background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.tab-number { border: 0; border-radius: 7px; color: var(--text-soft); background: #e8e8ed; }
.access-tab.is-active .tab-number { color: #fff; border: 0; background: #1d1d1f; }
.code-field { border-color: var(--line); border-radius: 12px; background: #f5f5f7; }
.code-field:focus-within { border-color: rgba(0,0,0,.28); box-shadow: 0 0 0 3px rgba(0,0,0,.06); background: #fff; }
.code-field input::placeholder, .field input::placeholder, .search-field input::placeholder { color: #9a9aa0; }
.reveal-button { border-radius: 8px; }.reveal-button:hover { background: #e8e8ed; }
.primary-action, .ghost-action, .danger-action { border-radius: 12px; font-weight: 620; }
.primary-action { color: #fff; border-color: #1d1d1f; background: #1d1d1f; box-shadow: none; }
.primary-action:hover { transform: none; background: #000; }
.ghost-action { color: var(--text); border-color: var(--line); background: #fff; }
.ghost-action:hover { border-color: var(--line-strong); background: #f5f5f7; }
.danger-action { color: var(--danger); border-color: rgba(215,0,21,.18); background: #fff; }
.danger-action:hover { background: #fff1f2; }
.notice { border-radius: 11px; color: var(--text-soft); background: #f5f5f7; }
.notice-error { color: var(--danger); border-color: rgba(215,0,21,.16); background: #fff1f2; }
.notice-warning { color: var(--warning); border-color: rgba(178,80,0,.16); background: #fff8f0; }
.login-footer { letter-spacing: .04em; }
.sidebar { border-right-color: var(--line); background: rgba(255,255,255,.82); backdrop-filter: saturate(150%) blur(24px); }
.nav-item { border-radius: 10px; color: var(--text-soft); }
.nav-item:hover { color: var(--text); background: #f5f5f7; }
.nav-item.is-active { color: var(--text); border-color: transparent; background: #e8e8ed; }
.nav-item.is-active .nav-icon { color: var(--text); }
.nav-item b { border: 0; color: var(--text-soft); background: #f2f2f7; }
.sidebar-system { border-radius: 12px; background: #f5f5f7; }
.user-avatar, .participant-avatar { color: #fff; border: 0; border-radius: 10px; background: #1d1d1f; }
.sidebar-user form button:hover { background: #e8e8ed; }
.workspace { padding-top: 38px; }
.workspace-header { animation-duration: .4s; }
.metric-grid { gap: 14px; }
.metric-card { min-height: 126px; border-color: var(--line); border-radius: 16px; background: rgba(255,255,255,.9); box-shadow: 0 8px 28px rgba(0,0,0,.045); }
.metric-card::before { display: none; }
.metric-accent { border-color: var(--line); background: rgba(255,255,255,.9); }
.metric-accent strong { color: var(--text); }
.panel { border-color: var(--line); border-radius: 16px; background: rgba(255,255,255,.9); box-shadow: 0 8px 28px rgba(0,0,0,.04); backdrop-filter: saturate(130%) blur(18px); }
.panel-heading { min-height: 74px; }
.search-field { border-color: var(--line); border-radius: 10px; background: #f5f5f7; }
.data-table th, .data-table td, .activity-item, .admin-row, .participant-row, .file-row-admin { border-color: var(--line); }
.data-table tbody tr:hover { background: #f8f8fa; }
.room-symbol, .file-type { color: var(--text); border-color: var(--line); border-radius: 10px; background: #f5f5f7; }
.status-pill { border-radius: 999px; }
.status-live { color: var(--success); border-color: rgba(36,138,61,.16); background: #f0faf2; }
.status-closed { color: var(--warning); border-color: rgba(178,80,0,.16); background: #fff8f0; }
.table-number, .icon-action { border-radius: 9px; background: #fff; }
.usage-cell i { background: #e8e8ed; }.usage-cell i b { background: #1d1d1f; }
.empty-state span { color: var(--text); }
.activity-marker { border-color: #8e8e93; box-shadow: none; }
.back-link:hover, .text-link:hover { color: var(--text); }
.room-summary { border-radius: 16px; background: rgba(255,255,255,.9); box-shadow: 0 8px 28px rgba(0,0,0,.035); }
.danger-zone { border-radius: 16px; background: #fff8f8; }
.portal-modal::backdrop { background: rgba(0,0,0,.28); backdrop-filter: blur(12px); }
.modal-card { border-color: var(--line); border-radius: 18px; background: #fff; box-shadow: 0 30px 90px rgba(0,0,0,.18); }
.modal-close { border-radius: 9px; background: #f5f5f7; }.modal-close:hover { background: #e8e8ed; }
.field input, .field select { color: var(--text); border-color: var(--line); border-radius: 11px; background: #f5f5f7; }
.field input:focus, .field select:focus { border-color: rgba(0,0,0,.28); box-shadow: 0 0 0 3px rgba(0,0,0,.06); background: #fff; }
.modal-card > footer { background: #fafafa; }
.code-result > strong { color: var(--text); border-color: var(--line); border-radius: 12px; background: #f5f5f7; }
.toast { color: var(--text); border-color: var(--line); border-radius: 12px; background: rgba(255,255,255,.96); box-shadow: 0 16px 46px rgba(0,0,0,.12); }
.toast.is-error { color: var(--danger); border-color: rgba(215,0,21,.16); }
@media (max-width: 560px) { .access-panel { border-radius: 16px; }.metric-card, .panel, .room-summary, .modal-card, .contractor-files, .contractor-trash { border-radius: 14px; } }
