:root {
  color-scheme: dark;
  --bg: #111413;
  --surface: #191d1b;
  --surface-2: #202622;
  --surface-3: #282f2b;
  --line: #343e37;
  --line-soft: #2a322d;
  --text: #eff4ee;
  --muted: #adb8ae;
  --quiet: #89978b;
  --accent: #bcf4a0;
  --green: #b4e99a;
  --amber: #edc183;
  --red: #f1a0a0;
  --radius: 18px;
  font-family: "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scrollbar-color: #435047 transparent; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, a, input, select, textarea { touch-action: manipulation; outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); }
button:disabled { opacity: .55; cursor: wait; }
::selection { background: #bcf4a0; color: #142010; }
.brand-mark { display: inline-grid; place-items: center; width: 37px; height: 37px; border-radius: 11px; color: #172010; background: var(--accent); font-size: 24px; font-weight: 900; font-style: italic; letter-spacing: -3px; padding-right: 4px; }
.sidebar-brand, .auth-brand { display: flex; align-items: center; gap: 11px; width: fit-content; font-size: 32px; line-height: 1; font-weight: 750; letter-spacing: -1.7px; }
.brand-dot { margin-left: -10px; color: var(--accent); }
.eyebrow { margin: 0 0 12px; color: var(--quiet); font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 236px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; width: 236px; padding: 32px 18px 22px; border-right: 1px solid var(--line-soft); background: #151917; }
.sidebar-brand { margin: 0 12px 44px; }
.nav-caption { margin: 0 14px 13px; color: var(--quiet); font-size: 11px; }
.sidebar nav { display: grid; gap: 5px; }
.nav-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-radius: 10px; color: var(--muted); font-size: 13px; font-weight: 550; transition: background .16s, color .16s; }
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link.active { color: var(--accent); background: #283226; }
.nav-link.active::after { content: ""; width: 5px; height: 5px; margin-left: auto; border-radius: 50%; background: var(--accent); }
.nav-icon { display: grid; place-items: center; width: 20px; font-size: 19px; line-height: 1; }
.sidebar-footer { display: grid; gap: 20px; margin-top: auto; padding-top: 28px; }
.admin-chip { display: flex; align-items: center; gap: 11px; padding: 17px 9px 0; border-top: 1px solid var(--line-soft); min-width: 0; }
.avatar { display: grid; place-items: center; flex: 0 0 auto; width: 37px; height: 37px; border-radius: 50%; color: #d2e1c9; background: #323d30; text-transform: uppercase; font-size: 15px; font-weight: 650; }
.admin-chip div { display: grid; gap: 1px; min-width: 0; }
.admin-chip strong { overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 550; }
.admin-chip small { color: var(--quiet); font-size: 11px; }
.sidebar-footer form { margin: 0; }
.workspace { grid-column: 2; width: 100%; max-width: 1720px; min-width: 0; padding: 0 40px 64px; }
.workspace-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 82px; margin-bottom: 38px; border-bottom: 1px solid var(--line-soft); color: var(--quiet); font-size: 12px; }
.breadcrumb-separator { padding: 0 12px; color: #5b695f; }
.workspace-topbar a { color: var(--muted); }
.workspace-topbar a:hover { color: var(--accent); }
.workspace-topbar a span { margin-left: 8px; }
.workspace-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.workspace-header h1 { margin: 0; font-size: clamp(28px, 3vw, 36px); line-height: 1.2; letter-spacing: -1.1px; font-weight: 600; }
.workspace-header p { max-width: 650px; margin: 10px 0 0; color: var(--quiet); font-size: 13px; }
.primary-button, .secondary-button, .quiet-button, .danger-button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 43px; padding: 11px 16px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 650; line-height: 1.4; transition: background .16s, border-color .16s, box-shadow .16s; }
.primary-button { color: #1c2b14; background: var(--accent); }
.primary-button:hover { background: #cdfab6; box-shadow: 0 4px 20px #bcf4a012; }
.primary-button.compact { flex-shrink: 0; }
.primary-button.compact span { font-size: 19px; font-weight: 400; }
.secondary-button { color: var(--text); border-color: var(--line); background: var(--surface-2); }
.secondary-button:hover { background: #303a33; border-color: #53604f; }
.quiet-button { width: 100%; color: var(--muted); border-color: var(--line-soft); background: transparent; }
.quiet-button:hover { background: var(--surface-2); color: var(--text); }
.danger-button { color: var(--red); border-color: #62403e; background: #382927; }
.danger-button:hover { background: #49312e; }
.text-link { color: var(--accent); font-size: 12px; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.text-link span { margin-left: 8px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { position: relative; min-height: 174px; padding: 22px 24px; overflow: hidden; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.stat-card > span { display: block; color: var(--muted); font-size: 12px; font-weight: 500; }
.stat-card > strong { display: block; margin: 14px 0 9px; font-size: 43px; line-height: 1.1; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -1.5px; }
.stat-card > small { display: flex; align-items: center; gap: 7px; color: var(--quiet); font-size: 11px; }
.stat-card.accent { background: #bcefa5; border-color: #bcefa5; color: #1b2c16; }
.stat-card.accent > span, .stat-card.accent > small { color: #3f5736; }
.stat-card.accent i { width: 5px; height: 5px; border-radius: 50%; background: #3c6830; }
.expired-stat > strong { color: var(--amber); }
.banned-stat > strong { color: #d8bbb5; }
.overview-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 28px; }
.shortcut { display: flex; align-items: center; gap: 14px; padding: 22px; min-height: 106px; border: 1px solid var(--line-soft); border-radius: 15px; background: var(--surface); transition: border-color .16s, background .16s; }
.shortcut:hover { border-color: #62775a; background: #20281f; }
.shortcut-icon { display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px; border: 1px solid #3a4838; border-radius: 12px; color: var(--accent); font-size: 23px; }
.shortcut strong { font-size: 12px; font-weight: 600; }
.shortcut p { margin: 4px 0 0; color: var(--quiet); font-size: 11px; }
.shortcut-arrow { margin-left: auto; color: var(--quiet); font-size: 19px; }
.panel { overflow: hidden; margin-top: 22px; border: 1px solid var(--line-soft); border-radius: var(--radius); background: var(--surface); }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 88px; padding: 22px 26px; border-bottom: 1px solid var(--line-soft); }
.panel-heading h2 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.2px; }
.panel-heading p { max-width: 680px; margin: 7px 0 0; color: var(--quiet); font-size: 12px; line-height: 1.65; }
label { display: grid; gap: 8px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 500; }
label small { color: var(--quiet); font-size: 11px; font-weight: 400; }
input, select, textarea { width: 100%; min-width: 0; padding: 12px 13px; border: 1px solid var(--line); border-radius: 9px; background: #141815; color: var(--text); outline: none; transition: border-color .16s, box-shadow .16s; }
input::placeholder, textarea::placeholder { color: #748078; opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: #90b77c; box-shadow: 0 0 0 3px #bcf4a012; }
input[type="checkbox"] { flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--accent); }
input[type="file"] { padding: 8px; font-size: 11px; }
input[type="file"]::file-selector-button { margin-right: 10px; padding: 6px 9px; border: 0; border-radius: 5px; background: var(--surface-3); color: var(--muted); font: inherit; cursor: pointer; }
textarea { resize: vertical; min-height: 88px; line-height: 1.6; }
.release-form, .product-form { display: grid; align-items: start; gap: 16px; padding: 26px; }
.release-form { grid-template-columns: 1fr .7fr 1.4fr auto; }
.product-form { grid-template-columns: 1fr 1fr 1.4fr auto; }
.release-form > button, .product-form > button { margin-top: 26px; min-height: 44px; }
.script-form { grid-template-columns: 1fr 1fr 1.4fr auto; }
.script-code-field { grid-column: 1 / -1; }
.script-code-field textarea { font-family: Consolas, monospace; font-size: 12px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0 26px 26px; }
.product-card { display: grid; gap: 22px; padding: 22px; border: 1px solid var(--line); border-radius: 13px; background: #1e241f; }
.product-card h3 { margin: 16px 0 5px; font-size: 18px; font-weight: 600; }
.product-card code { color: var(--quiet); font-size: 11px; }
.product-card p { margin: 12px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.product-metrics { display: flex; gap: 22px; color: var(--quiet); font-size: 11px; }
.product-metrics strong { margin-right: 3px; color: var(--text); font-size: 17px; font-weight: 550; }
.product-actions { display: flex; flex-wrap: wrap; gap: 7px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.product-actions form, .release-actions form { margin: 0; }
.product-actions button, .release-actions button { min-height: 34px; padding: 7px 10px; font-size: 11px; white-space: nowrap; }
.product-grid > .empty-state { grid-column: 1 / -1; }
.filters { display: flex; align-items: center; gap: 8px; }
.filters input { width: 215px; }
.filters select { width: 185px; }
.filters input, .filters select { padding: 10px 12px; font-size: 12px; }
.table-wrap { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 15px 22px; background: #171b18; color: var(--quiet); font-size: 11px; font-weight: 500; text-align: left; }
td { height: 82px; padding: 17px 22px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; vertical-align: middle; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #202822; }
.key-hint, .mono { color: #d2dece; font-family: Consolas, "SFMono-Regular", monospace; font-size: 12px; }
.key-hint { padding: 6px 9px; border: 1px solid #374233; border-radius: 6px; background: #20281e; }
.cell-subtitle, .danger-text { display: block; max-width: 230px; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; color: var(--quiet); font-size: 11px; }
.danger-text { color: var(--red); }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid transparent; border-radius: 7px; font-size: 11px; font-weight: 500; }
.status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status.active { color: var(--green); background: #b4e99a10; border-color: #b4e99a1a; }
.status.expired { color: var(--amber); background: #edc18310; border-color: #edc1831a; }
.status.banned { color: var(--red); background: #f1a0a010; border-color: #f1a0a01a; }
.status.inactive { color: var(--quiet); background: #89978b10; border-color: #89978b1a; }
.product-name { color: var(--text); font-size: 13px; font-weight: 550; }
.release-actions { display: flex; align-items: center; gap: 7px; }
.actions-cell { width: 64px; }
.actions-trigger { width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: transparent; letter-spacing: 2px; }
.actions-trigger:hover { color: var(--text); background: var(--surface-3); }
.actions-popover { position: fixed; inset: auto; width: 278px; max-height: min(480px, calc(100dvh - 24px)); margin: 0; padding: 8px; overflow-y: auto; border: 1px solid #4a574a; border-radius: 13px; background: #222a23; color: var(--text); box-shadow: 0 20px 60px #0006; white-space: normal; }
.actions-popover::backdrop { background: transparent; }
.actions-popover form { margin: 0; }
.actions-popover button { width: 100%; padding: 10px; border: 0; border-radius: 6px; color: var(--muted); background: transparent; text-align: left; font-size: 12px; }
.actions-popover button:hover { background: #344032; color: var(--text); }
.actions-popover .warning { color: var(--amber); }
.actions-popover .danger { color: var(--red); }
.extend-form { display: grid; grid-template-columns: 65px 1fr; align-items: center; gap: 5px; padding: 5px 0; }
.extend-form input { padding: 8px; font-size: 12px; }
.access-form { display: grid; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.access-form strong { color: var(--quiet); font-size: 11px; }
.access-form label { display: flex; align-items: center; gap: 8px; }
.empty-state { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: 208px; padding: 28px 16px; text-align: center; white-space: normal; }
.empty-state strong { color: #c8d4c5; font-size: 14px; font-weight: 500; }
.empty-state > span { color: var(--quiet); font-size: 12px; }
.empty-state .empty-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 13px; color: #adbea6; font-size: 24px; }
.event-list { padding: 2px 26px; }
.event { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 16px; min-height: 80px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.event:last-child { border-bottom: 0; }
.event-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--quiet); }
.event-dot.info { background: var(--green); }
.event-dot.warning { background: var(--amber); }
.event-dot.high, .event-dot.critical { background: var(--red); }
.event div { display: grid; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
.event strong { font-size: 12px; font-weight: 500; }
.event small { color: var(--quiet); font-size: 11px; }
.severity { padding: 4px 9px; border-radius: 6px; background: var(--surface-2); color: var(--quiet); font-size: 10px; }
.severity.high, .severity.critical { color: var(--red); background: #f1a0a010; }
.severity.warning { color: var(--amber); background: #edc18310; }
.modal { width: min(510px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 32px; border: 1px solid #495443; border-radius: 20px; background: #1c221d; color: var(--text); box-shadow: 0 30px 100px #0008; }
.modal::backdrop { background: #090d0ab8; backdrop-filter: blur(6px); }
.modal h2 { margin: 0; font-size: 25px; font-weight: 550; letter-spacing: -.6px; }
.modal > p:not(.eyebrow) { margin: 12px 0 0; color: var(--quiet); font-size: 12px; line-height: 1.7; }
.modal-close { position: absolute; top: 15px; right: 16px; width: 32px; height: 32px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 24px; }
.modal-close:hover { background: var(--surface-3); }
.modal-form { display: grid; gap: 18px; margin-top: 26px; }
.form-grid, .modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.product-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.product-picker legend { padding: 0 6px; color: var(--muted); font-size: 12px; }
.product-picker label { display: flex; align-items: center; gap: 8px; padding: 9px; border-radius: 7px; background: #141815; }
.product-picker span { display: grid; gap: 3px; }
.product-picker small { font-size: 10px; }
.select-all-products { grid-column: 1 / -1; border: 1px solid #495e3d; }
.generated-key { margin: 24px 0; padding: 20px 14px; overflow-wrap: anywhere; border: 1px solid #526948; border-radius: 11px; background: #293524; color: var(--accent); font-family: Consolas, monospace; font-size: 20px; text-align: center; letter-spacing: .03em; }
.notice.error, .form-error { padding: 12px 14px; border: 1px solid #69413e; border-radius: 9px; background: #402a28; color: #ffc1b9; font-size: 12px; }
.notice { margin: 0 0 20px; }
.auth-page { display: grid; place-items: center; padding: 40px 24px; background: #111613; }
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; width: min(1020px, 100%); min-height: 660px; overflow: hidden; border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 24px 90px #0003; }
.auth-identity { display: flex; flex-direction: column; justify-content: space-between; position: relative; padding: 42px; overflow: hidden; background: #202d21; }
.auth-identity::after { content: ""; position: absolute; bottom: -180px; right: -200px; width: 540px; height: 540px; border: 1px solid #a9d69e16; border-radius: 50%; box-shadow: 0 0 0 60px #a9d69e06, 0 0 0 120px #a9d69e04; pointer-events: none; }
.auth-intro { position: relative; z-index: 1; margin: 62px 0; }
.auth-intro .eyebrow { color: #a1b49a; }
.auth-intro h2 { margin: 0; font-size: clamp(35px, 4vw, 51px); font-weight: 500; line-height: 1.12; letter-spacing: -1.9px; }
.auth-intro h2 span { color: var(--accent); }
.auth-intro > p:last-child { margin: 22px 0 0; color: #a6b79f; font-size: 13px; line-height: 1.8; }
.auth-channel { display: flex; justify-content: space-between; gap: 20px; position: relative; z-index: 1; color: #b7c7b0; font-size: 12px; }
.auth-channel:hover { color: var(--accent); }
.auth-card { align-self: center; padding: 54px 48px; }
.auth-card h1 { margin: 0; font-size: 29px; font-weight: 550; letter-spacing: -.9px; }
.auth-copy { margin: 10px 0 30px; color: var(--quiet); font-size: 13px; }
.auth-form { display: grid; gap: 20px; }
.auth-form input { min-height: 46px; }
.auth-form label small { font-size: 10px; line-height: 1.6; }
.auth-form .primary-button { justify-content: space-between; margin-top: 4px; padding: 14px 17px; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 25px; color: var(--quiet); font-size: 11px; }
.secure-note i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
@media (min-width: 1800px) { .workspace { margin: 0 auto; } }
@media (max-width: 1250px) {
  .workspace { padding-inline: 28px; }
  .stats-grid { gap: 12px; }
  .stat-card { padding: 20px; }
  .overview-actions { grid-template-columns: 1fr; gap: 10px; }
  .shortcut { min-height: 84px; padding: 16px 22px; }
  .panel-heading { align-items: flex-start; flex-wrap: wrap; }
  .release-form, .product-form, .script-form { grid-template-columns: 1fr 1fr; }
  .release-form > button, .product-form > button { align-self: start; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .app-shell { grid-template-columns: 210px minmax(0, 1fr); }
  .sidebar { width: 210px; padding-inline: 12px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-header { align-items: flex-start; flex-direction: column; gap: 18px; }
  .filters { flex-wrap: wrap; width: 100%; }
  .filters input { flex: 1; width: 100%; }
  .auth-identity { padding: 32px; }
  .auth-card { padding: 38px 30px; }
}
@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { position: relative; width: 100%; padding: 17px 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar-brand { margin: 0 0 20px; font-size: 29px; }
  .brand-mark { width: 32px; height: 32px; font-size: 22px; }
  .nav-caption { display: none; }
  .sidebar nav { display: flex; gap: 5px; margin-inline: -18px; padding: 0 18px 12px; overflow-x: auto; scrollbar-width: thin; }
  .nav-link { flex-shrink: 0; padding: 10px 12px; font-size: 12px; }
  .nav-icon { width: 16px; font-size: 16px; }
  .nav-link.active::after { display: none; }
  .sidebar-footer { position: absolute; top: 18px; right: 18px; display: block; padding: 0; }
  .admin-chip { display: none; }
  .quiet-button { min-height: 32px; padding: 6px 12px; font-size: 11px; }
  .workspace { padding: 0 18px 36px; }
  .workspace-topbar { min-height: 60px; margin-bottom: 26px; font-size: 10px; gap: 10px; }
  .workspace-topbar a { white-space: nowrap; }
  .breadcrumb-separator { padding: 0 6px; }
  .workspace-header { margin-bottom: 22px; }
  .workspace-header p { font-size: 12px; }
  .workspace-header .primary-button { width: 100%; }
  .stat-card { min-height: 153px; padding: 18px; border-radius: 13px; }
  .stat-card > span { font-size: 11px; }
  .stat-card > strong { font-size: 37px; }
  .stat-card > small { font-size: 10px; }
  .panel { border-radius: 13px; }
  .panel-heading { padding: 20px; }
  .release-form, .product-form, .script-form { grid-template-columns: 1fr; padding: 20px; }
  .release-form > button, .product-form > button { margin-top: 0; }
  .product-grid { grid-template-columns: 1fr; padding: 0 20px 20px; }
  .filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .filters input { grid-column: 1 / -1; }
  .filters select { width: 100%; }
  .event-list { padding-inline: 18px; }
  .event { gap: 10px; }
  .event strong { font-size: 11px; }
  .event small { font-size: 10px; }
  .severity { padding: 3px 5px; font-size: 9px; }
  .auth-page { padding: 20px 16px; }
  .auth-shell { display: block; width: min(460px, 100%); min-height: 0; border-radius: 19px; }
  .auth-identity { padding: 24px; }
  .auth-intro, .auth-channel { display: none; }
  .auth-card { padding: 30px 24px; }
  .auth-card h1 { font-size: 27px; }
  .modal { padding: 28px 22px; }
}
@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr; }
  .modal-actions, .product-picker { grid-template-columns: 1fr; }
  .select-all-products { grid-column: auto; }
  .workspace-topbar > span { max-width: 150px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
.developer-badge { display: inline-block; padding: 2px 6px; border: 1px solid #8eb67a44; border-radius: 5px; background: #8eb67a18; color: var(--accent); font-size: 10px; font-weight: 650; }
.disk-id { color: #9eb7cc; }
.event .event-details { margin-top: 2px; color: var(--muted); }
