:root {
  color-scheme: dark;
  --bg: #080a0f;
  --surface: #11141b;
  --surface-2: #171b24;
  --sidebar: #05070b;
  --sidebar-soft: #171b25;
  --text: #f4f6fb;
  --muted: #929bad;
  --line: #272c37;
  --primary: #8173ff;
  --primary-dark: #6d5ff0;
  --primary-soft: #211d3d;
  --green: #42d89a;
  --green-soft: #112c25;
  --danger: #ff6b79;
  --danger-soft: #32171d;
  --radius: 16px;
  --shadow: 0 12px 38px rgba(0, 0, 0, .28);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
.boot, .center { min-height: 100vh; display: grid; place-items: center; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border: 0; border-radius: 11px;
  background: var(--primary); color: #fff; font-weight: 750; text-decoration: none;
  cursor: pointer; transition: .16s ease; white-space: nowrap;
}
.button:hover { background: var(--primary-dark); transform: translateY(-1px); }
.button:disabled { opacity: .55; pointer-events: none; }
.button.secondary { color: #e5e8ef; background: var(--surface); border: 1px solid var(--line); }
.button.secondary:hover { color: #fff; border-color: #665caa; background: #1b1e29; }
.button.danger { color: var(--danger); background: var(--danger-soft); }
.button.small { min-height: 34px; padding: 0 11px; font-size: 13px; }
.button.icon-only { width: 36px; padding: 0; }
.button svg, .nav-link svg, .upload-icon svg, .file-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.breadcrumb svg, .logout-button svg, .drop-image svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }

.login-card {
  width: min(440px, calc(100% - 30px)); padding: 44px 38px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 24px; text-align: center; box-shadow: 0 24px 80px #0009;
}
.mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--primary); color: #fff; font-weight: 900; font-size: 24px; }
.login-card .mark { margin: 0 auto 22px; }
.login-logo { width: 86px; height: 86px; margin: 0 auto 18px; display: block; object-fit: contain; }
.login-card h1 { font-size: 32px; line-height: 1.12; letter-spacing: -1.2px; margin: 10px 0 14px; }
.login-card p { color: var(--muted); line-height: 1.65; margin-bottom: 26px; }
.discord { background: #5865f2; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 850; letter-spacing: 1.6px; text-transform: uppercase; }
.error-note { color: var(--danger); font-size: 13px; margin-top: 14px; }

.app-layout { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: fixed; z-index: 10; inset: 0 auto 0 0; width: 248px; height: 100vh; padding: 26px 18px 18px; background: var(--sidebar); color: #fff; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; color: #fff; font-size: 19px; font-weight: 850; text-decoration: none; letter-spacing: -.4px; }
.brand .mark { width: 36px; height: 36px; border-radius: 11px; font-size: 18px; }
.brand-logo { width: 42px; height: 42px; flex: 0 0 auto; object-fit: contain; }
.nav-label { padding: 0 11px 9px; color: #778195; font-size: 10px; font-weight: 850; letter-spacing: 1.3px; text-transform: uppercase; }
.nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 11px 12px; border-radius: 10px; color: #aeb6c5; text-decoration: none; font-size: 14px; font-weight: 650; }
.nav-link:hover, .nav-link.active { color: #fff; background: var(--sidebar-soft); }
.nav-link.active { box-shadow: inset 3px 0 var(--primary); }
.sidebar-spacer { flex: 1; }
.storage-note { margin: 18px 4px; padding: 14px; border: 1px solid #303a4c; border-radius: 12px; color: #9da7b7; font-size: 12px; line-height: 1.5; }
.storage-note strong { display: block; color: #e9edf4; font-size: 13px; margin-bottom: 4px; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 13px 8px 0; border-top: 1px solid #293345; }
.sidebar-user .avatar { width: 35px; height: 35px; border-radius: 10px; background: #303a4c; object-fit: cover; }
.user-copy { min-width: 0; flex: 1; }
.user-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.user-copy span { color: #7f8999; font-size: 11px; }
.logout-button { padding: 6px; border: 0; background: transparent; color: #8d97a8; cursor: pointer; }
.logout-button:hover { color: #fff; }

.main { grid-column: 2; min-width: 0; padding: 34px clamp(24px, 4vw, 54px) 60px; }
.page-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-title h1 { margin-bottom: 7px; font-size: clamp(28px, 3.2vw, 40px); letter-spacing: -1.4px; }
.page-title p { color: var(--muted); margin-bottom: 0; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.mobile-brand { display: none; }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 30px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.stat-icon { width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: var(--primary-soft); color: var(--primary); }
.stat-icon.green { color: var(--green); background: var(--green-soft); }
.stat-icon.slate { color: #aeb8ca; background: #202631; }
.stat-icon svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.stat-copy strong { display: block; font-size: 21px; letter-spacing: -.5px; }
.stat-copy span { color: var(--muted); font-size: 12px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.section-head h2 { margin: 0; font-size: 18px; letter-spacing: -.3px; }
.section-head span { color: var(--muted); font-size: 13px; }
.product-months { display: grid; gap: 32px; }
.month-section { min-width: 0; }
.month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.month-head > div { display: flex; align-items: center; gap: 9px; }
.month-head h2 { margin: 0; color: #e9ecf3; font-size: 15px; }
.month-head > span { color: var(--muted); font-size: 12px; }
.month-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.product-card-wrap { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: .18s ease; }
.product-card-wrap:hover { transform: translateY(-3px); border-color: #554d8d; box-shadow: var(--shadow); }
.product-selector { min-height: 39px; display: flex; align-items: center; gap: 8px; padding: 8px 13px; border-bottom: 1px solid var(--line); color: #aeb6c5; font-size: 11px; font-weight: 650; cursor: pointer; }
.product-selector:hover { color: #fff; background: #151923; }
.product-selector.disabled { opacity: .5; cursor: not-allowed; }
.product-selector.disabled:hover { color: #aeb6c5; background: transparent; }
.product-selector input { position: absolute; opacity: 0; pointer-events: none; }
.checkmark { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid #4a5261; border-radius: 5px; color: transparent; background: #0c0f15; font-size: 11px; transition: .15s; }
.product-selector input:checked + .checkmark { border-color: var(--primary); background: var(--primary); color: #fff; }
.product-card { display: block; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; box-shadow: 0 2px 4px #17203305; transition: .18s ease; }
.product-card-wrap .product-card { border: 0; border-radius: 0; box-shadow: none; }
.product-card:hover { border-color: #554d8d; }
.card-image { position: relative; margin: 7px 7px 0; overflow: hidden; border-radius: 11px; }
.banner { width: 100%; aspect-ratio: 16 / 9; display: block; object-fit: cover; background: #1a1e27; transition: transform .3s ease; }
.product-card:hover .banner { transform: scale(1.025); }
.file-pill { position: absolute; right: 9px; bottom: 9px; padding: 5px 8px; border-radius: 7px; color: #fff; background: #111827cc; backdrop-filter: blur(5px); font-size: 11px; font-weight: 750; }
.card-body { padding: 15px 16px 17px; }
.card-body h3 { margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.meta { color: var(--muted); font-size: 12px; }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card-author { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 7px; text-align: right; }
.card-author .avatar { width: 27px; height: 27px; flex: 0 0 auto; border-radius: 8px; object-fit: cover; background: #272d3a; }
.card-author > div { min-width: 0; display: grid; gap: 2px; }
.card-author strong { max-width: 130px; overflow: hidden; color: #e8ebf2; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.card-author time { color: var(--muted); font-size: 10px; }
.empty { grid-column: 1 / -1; padding: 58px 24px; border: 1px dashed #353b48; border-radius: var(--radius); background: var(--surface); color: var(--muted); text-align: center; }
.empty-icon { width: 52px; height: 52px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 15px; background: var(--primary-soft); color: var(--primary); }
.empty strong { display: block; color: var(--text); margin-bottom: 5px; }

dialog { width: min(540px, calc(100% - 28px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); color: var(--text); box-shadow: 0 30px 100px #20283d3d; }
dialog::backdrop { background: #000c; backdrop-filter: blur(4px); }
.modal { padding: 28px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.modal-head h2 { margin: 0; font-size: 21px; }
.close { width: 36px; height: 36px; border: 0; border-radius: 9px; background: var(--surface-2); color: var(--muted); font-size: 24px; cursor: pointer; }
.field { display: grid; gap: 7px; margin: 16px 0; }
.field label { color: #d6dae3; font-size: 13px; font-weight: 750; }
.field input, .field textarea { width: 100%; padding: 12px 13px; border: 1px solid #353b47; border-radius: 10px; outline: 0; background: #0d1016; color: var(--text); }
.field input:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.field textarea { min-height: 88px; resize: vertical; }
.drop-image { min-height: 112px; display: grid; place-items: center; padding: 18px; border: 1px dashed #3b424f; border-radius: 12px; background: var(--surface-2); color: var(--muted) !important; text-align: center; cursor: pointer; }
.drop-image:hover { border-color: var(--primary); background: #19162c; }
.drop-image #banner-label { width: 100%; display: grid; place-items: center; gap: 5px; }
.banner-preview { width: 100%; height: 145px; display: block; margin-bottom: 6px; border-radius: 9px; object-fit: cover; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 23px; }

.breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 19px; color: var(--muted); font-size: 13px; }
.breadcrumb-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.breadcrumb-row .breadcrumb { margin-bottom: 0; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.product-header { height: 180px; display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); margin-bottom: 18px; }
.product-cover { min-width: 0; width: 100%; height: 180px; object-fit: cover; background: #1a1e27; }
.product-info { min-width: 0; display: flex; flex-direction: column; justify-content: center; padding: 22px 28px; }
.product-info h1 { margin: 6px 0 7px; overflow: hidden; font-size: clamp(25px, 2.5vw, 34px); letter-spacing: -1px; line-height: 1.08; text-overflow: ellipsis; white-space: nowrap; }
.product-info p { display: -webkit-box; overflow: hidden; margin-bottom: 12px; color: var(--muted); line-height: 1.45; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.product-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { padding: 6px 9px; border-radius: 8px; background: var(--surface-2); color: #b3bbca; font-size: 12px; font-weight: 650; }

.workspace { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr); gap: 18px; align-items: start; }
.upload-panel, .files-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.upload-panel { padding: 20px; position: sticky; top: 24px; }
.panel-title { margin-bottom: 15px; }
.panel-title h2 { margin-bottom: 4px; font-size: 17px; }
.panel-title p { color: var(--muted); font-size: 12px; margin-bottom: 0; }
.update-note { display: grid; gap: 7px; margin-bottom: 14px; }
.update-note label { color: #d8dce5; font-size: 12px; font-weight: 750; }
.update-note textarea { width: 100%; min-height: 88px; padding: 11px 12px; resize: vertical; border: 1px solid #353b47; border-radius: 10px; outline: 0; background: #0d1016; color: var(--text); font-size: 13px; line-height: 1.5; }
.update-note textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.update-note textarea::placeholder { color: #687184; }
.dropzone { min-height: 210px; display: grid; place-items: center; padding: 24px; border: 1.5px dashed #3b424f; border-radius: 13px; background: var(--surface-2); text-align: center; transition: .18s ease; }
.dropzone:hover, .dropzone.drag { border-color: var(--primary); background: var(--primary-soft); }
.upload-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto 13px; border-radius: 14px; color: var(--primary); background: var(--primary-soft); }
.upload-icon svg { width: 23px; height: 23px; }
.dropzone strong { display: block; margin-bottom: 6px; font-size: 14px; }
.dropzone span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.picker-actions { display: flex; justify-content: center; gap: 8px; margin: 13px 0 11px; }
.picker-actions .button { min-width: 104px; }
.select-link { color: var(--primary); font-weight: 750; }
.queue { display: grid; gap: 9px; margin-top: 14px; }
.queue-overall { padding: 11px; border: 1px solid var(--line); border-radius: 10px; background: #0d1016; }
.queue-summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 11px; }
.queue-summary strong { color: var(--text); }
.overall-progress { margin-top: 9px; height: 7px; }
.queue-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 10px; }
.queue-errors { color: #ff757f; }
.queue-more { padding: 8px; color: var(--muted); text-align: center; font-size: 11px; }
.queue-item { padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.queue-line { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 11px; }
.queue-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.progress { height: 5px; overflow: hidden; border-radius: 5px; background: #303642; }
.progress i { display: block; height: 100%; width: 0; border-radius: 5px; background: var(--primary); transition: width .2s; }
.files-panel { min-width: 0; overflow: hidden; }
.files-head { display: flex; align-items: center; justify-content: space-between; padding: 19px 20px; border-bottom: 1px solid var(--line); }
.files-head h2 { margin: 0; font-size: 17px; }
.file-list { min-width: 0; }
.file-browser-path { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; min-height: 45px; padding: 9px 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.file-browser-path button { padding: 5px 7px; border: 0; border-radius: 6px; background: transparent; color: #c8ced9; font: inherit; font-weight: 700; cursor: pointer; }
.file-browser-path button:hover { background: var(--primary-soft); color: #fff; }
.folder-summary { margin-left: auto; color: var(--muted); }
.file-row { display: grid; grid-template-columns:minmax(0, 1fr) 90px 120px 154px; align-items: center; gap: 14px; min-height: 68px; padding: 10px 18px; border-bottom: 1px solid var(--line); }
.files-panel .file-row { min-height: 58px; padding-top: 7px; padding-bottom: 7px; }
.file-row:last-child { border-bottom: 0; }
.file-row:hover { background: #151923; }
.folder-row { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--text); font: inherit; text-align: left; cursor: pointer; }
.folder-row:last-child { border-bottom: 0; }
.folder-icon { color: var(--primary); background: var(--primary-soft); }
.folder-open { justify-self: end; color: var(--primary); font-size: 12px; font-weight: 750; }
.file-main { min-width: 0; display: flex; align-items: center; gap: 11px; }
.file-icon { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: #202631; color: #aeb8ca; }
.image-file-icon { color: #8d83ff; background: var(--primary-soft); }
.file-thumbnail { width: 42px; height: 42px; display: block; flex: 0 0 auto; border: 1px solid #343b48; border-radius: 9px; background: #080a0f; object-fit: cover; }
.file-copy { min-width: 0; }
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 700; }
.file-sub { margin-top: 4px; color: var(--muted); font-size: 11px; }
.uploader { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #c3c9d4; font-size: 12px; }
.actions { display: flex; justify-content: flex-end; gap: 7px; }
.files-panel .empty { margin: 18px; padding: 44px 20px; }
.file-browser-more { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 15px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.image-preview-dialog { width: min(1100px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow: hidden; border-radius: 14px; background: #080a0f; }
.image-preview-head { min-height: 55px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 9px 12px 9px 18px; border-bottom: 1px solid var(--line); }
.image-preview-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-preview-stage { height: min(78vh, 820px); display: grid; place-items: center; padding: 18px; }
.image-preview-stage img { display: block; max-width: 100%; max-height: 100%; border-radius: 5px; object-fit: contain; }
.image-preview-stage img[hidden] { display: none; }
.image-preview-stage #preview-status { color: var(--muted); font-size: 13px; }
.history-panel { margin-top: 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.history-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 21px 23px; border-bottom: 1px solid var(--line); }
.history-head h2 { margin: 4px 0 0; font-size: 18px; }
.timeline { padding: 4px 23px; }
.timeline-item { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 13px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.timeline-item:last-child { border-bottom: 0; }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 54px; bottom: -15px; width: 1px; background: #303644; }
.timeline-avatar { position: relative; z-index: 1; }
.timeline-avatar .avatar { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; background: #272d3a; }
.timeline-content { min-width: 0; }
.timeline-top { display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #d8dce5; font-size: 13px; }
.timeline-top strong { color: #fff; }
.timeline-top b { color: #a99fff; }
.timeline-top time { flex: 0 0 auto; color: var(--muted); font-size: 11px; }
.timeline-content p { margin: 8px 0 10px; color: #c4cad6; font-size: 13px; line-height: 1.55; white-space: pre-wrap; }
.history-files { display: flex; flex-wrap: wrap; gap: 7px; }
.history-files span { max-width: 260px; display: inline-flex; align-items: center; gap: 5px; overflow: hidden; padding: 5px 8px; border: 1px solid #2c3240; border-radius: 7px; background: var(--surface-2); color: #aeb6c5; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.history-files svg { width: 13px; height: 13px; flex: 0 0 auto; stroke: currentColor; fill: none; stroke-width: 1.8; }
.history-empty { padding: 42px 15px; color: var(--muted); text-align: center; font-size: 13px; }
.admin-layout { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; }
.member-form, .members-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.member-form { position: sticky; top: 24px; padding: 21px; }
.member-form .button { width: 100%; }
.admin-help { margin-top: 18px; padding: 13px; border: 1px solid #2d3441; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 11px; line-height: 1.55; }
.admin-help strong { display: block; margin-bottom: 3px; color: #dfe3eb; font-size: 12px; }
.members-panel { min-width: 0; overflow: hidden; }
.member-list { min-width: 0; }
.member-row { min-height: 72px; display: grid; grid-template-columns: 40px minmax(150px, 1fr) 70px minmax(110px, .7fr) 38px; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--line); }
.member-row:last-child { border-bottom: 0; }
.member-row:hover { background: #151923; }
.member-row > .avatar { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; background: #272d3a; }
.member-copy { min-width: 0; display: grid; gap: 4px; }
.member-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.member-copy code { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.role-badge { width: max-content; padding: 5px 8px; border-radius: 7px; background: #202631; color: #abb4c4; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.role-badge.admin { color: #b7afff; background: var(--primary-soft); }
.member-added { min-width: 0; display: grid; gap: 3px; }
.member-added span { color: var(--muted); font-size: 10px; }
.member-added strong { overflow: hidden; color: #cdd2dc; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.current-user { justify-self: center; color: var(--green); font-size: 11px; font-weight: 750; }
.download-bar { position: fixed; z-index: 25; left: calc(248px + (100vw - 248px) / 2); bottom: 22px; width: min(560px, calc(100vw - 290px)); display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 13px 12px 17px; border: 1px solid #393f4d; border-radius: 15px; background: #171b24ed; box-shadow: 0 18px 60px #000a; backdrop-filter: blur(12px); opacity: 0; transform: translate(-50%, 90px); pointer-events: none; transition: .22s ease; }
.download-bar.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.download-bar > div { display: grid; gap: 2px; }
.download-bar strong { color: #fff; font-size: 13px; }
.download-bar span { color: var(--muted); font-size: 11px; }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 30; max-width: 390px; padding: 13px 17px; border-radius: 11px; background: #172033; color: #fff; box-shadow: 0 15px 50px #1820333d; opacity: 0; transform: translateY(10px); pointer-events: none; transition: .2s; }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: var(--danger); }

@media (max-width: 1050px) {
  .app-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { width: 210px; padding-left: 13px; padding-right: 13px; }
  .workspace { grid-template-columns: 280px minmax(0, 1fr); }
  .file-row { grid-template-columns: minmax(0, 1fr) 80px 130px; }
  .uploader { display: none; }
  .admin-layout { grid-template-columns: 300px minmax(0, 1fr); }
  .member-row { grid-template-columns: 40px minmax(130px, 1fr) 65px 38px; }
  .member-added { display: none; }
  .download-bar { left: calc(210px + (100vw - 210px) / 2); width: min(540px, calc(100vw - 250px)); }
}

@media (max-width: 760px) {
  .app-layout { display: block; }
  .sidebar { position: static; width: 100%; height: 67px; padding: 0 16px; flex-direction: row; align-items: center; }
  .sidebar .brand { padding: 0; }
  .sidebar .nav, .sidebar .nav-label, .storage-note, .user-copy { display: none; }
  .sidebar-spacer { flex: 1; }
  .sidebar-user { padding: 0; border: 0; }
  .main { grid-column: auto; padding: 24px 16px 44px; }
  .page-top { align-items: center; margin-bottom: 22px; }
  .page-title h1 { font-size: 27px; }
  .page-title p { display: none; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .stat:last-child { grid-column: 1 / -1; }
  .product-header { height: auto; grid-template-columns: 1fr; }
  .product-cover { height: 150px; min-height: 0; }
  .product-info { padding: 20px; }
  .workspace { grid-template-columns: 1fr; }
  .admin-layout { grid-template-columns: 1fr; }
  .member-form { position: static; }
  .upload-panel { position: static; }
  .file-row { grid-template-columns: minmax(0, 1fr) auto; padding: 11px 13px; }
  .file-size, .uploader { display: none; }
  .actions .button { min-width: 36px; font-size: 0; }
  .actions .button svg { margin: 0; }
  .download-bar { left: 16px; right: 16px; width: auto; transform: translateY(90px); }
  .download-bar.show { transform: none; }
  .history-head { align-items: flex-start; flex-direction: column; }
  .timeline { padding-left: 16px; padding-right: 16px; }
  .timeline-top { align-items: flex-start; flex-direction: column; gap: 4px; }
}

@media (max-width: 440px) {
  .stats { grid-template-columns: 1fr; }
  .stats .stat:last-child { grid-column: auto; }
  .grid { grid-template-columns: 1fr; }
  .top-actions .button span { display: none; }
  .login-card { padding: 36px 24px; }
}
