/* APerf Core — workspace refresh. Visual-only layer: DOM hooks, data contracts,
   and application behavior stay in styles.css/app.js. */
:root {
  --bg: #0c1213;
  --panel: #141c1e;
  --panel-2: #1b2628;
  --line: #2a393a;
  --line-soft: #223031;
  --text: #f2f7f5;
  --muted: #a6b8b4;
  --dim: #778985;
  --mint: #9fe2c9;
  --mint-dark: #193c33;
  --blue: #91c6ec;
  --green: #9bdfbd;
  --red: #f0a4a2;
  --amber: #e8cb86;
  --surface-raised: #1b2527;
  --surface-muted: #172123;
  --focus-ring: #8be4c856;
  --shadow-soft: 0 18px 48px #00000025;
  --shadow-card: 0 8px 24px #00000018;
  --radius-card: 18px;
  --radius-control: 11px;
  --mono: "DM Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
  --sans: "Manrope", Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  color-scheme: dark;
}

:root[data-theme="obsidian"] {
  color-scheme: dark;
  --bg: #0c1213; --panel: #141c1e; --panel-2: #1b2628;
  --line: #2a393a; --line-soft: #223031; --text: #f2f7f5;
  --muted: #a6b8b4; --dim: #778985; --mint: #9fe2c9;
  --mint-dark: #193c33; --blue: #91c6ec; --green: #9bdfbd;
  --red: #f0a4a2; --amber: #e8cb86;
}
:root[data-theme="liquid"] {
  color-scheme: dark;
  --bg: #0e171a; --panel: #192629d9; --panel-2: #233438d9;
  --line: #9bd6d13b; --line-soft: #9bd6d126; --text: #f1fbf8;
  --muted: #bad0cc; --dim: #83a39f; --mint: #9cebdc;
  --mint-dark: #183d3a; --blue: #a9d7f4; --green: #a4e5c9;
  --red: #f3aaaa; --amber: #f0d89b;
}
:root[data-theme="mist"] {
  color-scheme: dark;
  --bg: #171b22; --panel: #242a32; --panel-2: #303842;
  --line: #d4dce22c; --line-soft: #d4dce21c; --text: #f4f6f8;
  --muted: #c1c9d1; --dim: #929ca8; --mint: #d2dbe3;
  --mint-dark: #343e47; --blue: #b8d2ec; --green: #bbdbc9;
  --red: #f1b1b1; --amber: #e9d5a3;
}
:root[data-theme="aurora"] {
  color-scheme: dark;
  --bg: #0f1714; --panel: #17231e; --panel-2: #21312a;
  --line: #8fc8a536; --line-soft: #8fc8a522; --text: #eff8f1;
  --muted: #b0c6b8; --dim: #849b8c; --mint: #a9e4b4;
  --mint-dark: #1e402b; --blue: #a7d4df; --green: #a9e3a9;
  --red: #f0a7a0; --amber: #e4d08a;
}
:root[data-theme="silver"] {
  color-scheme: light;
  --bg: #f1f4f4; --panel: #ffffff; --panel-2: #f5f8f7;
  --line: #dce4e2; --line-soft: #e9efed; --text: #1e2b2a;
  --muted: #586a67; --dim: #82908d; --mint: #176d58;
  --mint-dark: #d9eee7; --blue: #376f9b; --green: #28764d;
  --red: #b44747; --amber: #8b691c;
  --surface-raised: #f7faf9; --surface-muted: #f3f7f6;
  --shadow-soft: 0 18px 48px #283d3710; --shadow-card: 0 8px 24px #283d370a;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-width: 320px;
  background-color: var(--bg);
  background-image: radial-gradient(ellipse at 78% 0%, color-mix(in srgb, var(--mint) 7%, transparent), transparent 34%),
    radial-gradient(ellipse at 5% 45%, color-mix(in srgb, var(--blue) 4%, transparent), transparent 36%);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible,
textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}
::selection { background: color-mix(in srgb, var(--mint) 35%, transparent); color: var(--text); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 12px; background: color-mix(in srgb, var(--muted) 35%, transparent); background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
.hidden, [hidden] { display: none !important; }

/* Login: a quiet brand canvas with a focused, accessible sign-in surface. */
.login-view {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(440px, .88fr);
  align-items: stretch;
  gap: clamp(32px, 7vw, 120px);
  padding: clamp(28px, 5vw, 76px);
  background: transparent;
}
.login-art {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  padding: 24px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
}
.login-art::before {
  position: absolute; content: ""; inset: 15% 6% 12% 0;
  border: 1px solid color-mix(in srgb, var(--mint) 18%, transparent);
  border-radius: 36px;
  background: radial-gradient(circle at 70% 35%, color-mix(in srgb, var(--mint) 15%, transparent), transparent 38%),
    linear-gradient(145deg, color-mix(in srgb, var(--panel) 70%, transparent), color-mix(in srgb, var(--panel-2) 45%, transparent));
  box-shadow: inset 0 1px #ffffff12, 0 36px 90px #00000024;
}
.login-art::after {
  position: absolute; content: ""; z-index: 1; width: 310px; height: 310px;
  right: 8%; top: 24%; border: 1px solid color-mix(in srgb, var(--mint) 25%, transparent);
  border-radius: 50%; box-shadow: 0 0 0 36px color-mix(in srgb, var(--mint) 3%, transparent),
    0 0 0 72px color-mix(in srgb, var(--blue) 3%, transparent), inset 0 0 70px color-mix(in srgb, var(--mint) 12%, transparent);
  pointer-events: none;
}
.art-grid { z-index: 2; inset: 15% 6% 12% 0; border-radius: 36px; opacity: .19; mask-image: linear-gradient(90deg, #000, transparent 72%); }
.art-orbit { z-index: 2; border-color: color-mix(in srgb, var(--mint) 22%, transparent); }
.login-brand, .login-quote, .login-art-meta { z-index: 3; }
.login-brand { position: relative; top: auto; left: auto; display: flex; align-items: center; gap: 13px; padding: 10px 0; font-size: 15px; letter-spacing: .01em; }
.brand-logo { width: 42px; height: 42px; border-radius: 13px; box-shadow: 0 8px 20px #0003; }
.login-quote { left: clamp(22px, 5vw, 70px); bottom: 23%; max-width: 510px; }
.login-quote p { font-size: clamp(27px, 3vw, 46px); line-height: 1.13; letter-spacing: -.06em; }
.login-quote span { margin-top: 15px; color: var(--muted); font-size: 13px; letter-spacing: .04em; }
.login-art-meta { left: clamp(22px, 5vw, 70px); right: 34px; bottom: 8%; color: var(--muted); font-size: 10px; letter-spacing: .14em; }
.login-panel {
  align-self: center;
  width: min(100%, 490px);
  margin-inline: auto;
  padding: clamp(30px, 4vw, 54px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel);
  box-shadow: var(--shadow-soft), inset 0 1px #ffffff0b;
}
.login-panel .eyebrow, .eyebrow { color: var(--mint); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.login-panel h1 { margin: 9px 0 0; font-size: clamp(30px, 3vw, 38px); letter-spacing: -.05em; line-height: 1.15; }
.login-subtitle { margin: 11px 0 34px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.login-panel .field-label { margin: 19px 0 8px; color: var(--muted); font-size: 12px; }
.login-panel .input-wrap { height: 52px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.login-panel .input-wrap:focus-within { border-color: color-mix(in srgb, var(--mint) 64%, var(--line)); box-shadow: 0 0 0 4px var(--focus-ring); }
.login-panel .input-wrap input { color: var(--text); font-size: 14px; }
.login-row { margin: 18px 0 24px; font-size: 12px; }
.login-row a { color: var(--mint); text-decoration: none; }
.login-panel .full-btn { min-height: 52px; border-radius: 12px; font-size: 14px; }
.form-hint { margin-top: 15px; color: var(--dim); font-size: 11px; }
.mobile-brand { display: none; }

/* Main shell and navigation. */
.app-shell { min-height: 100svh; background: transparent; }
.sidebar {
  width: 258px;
  padding: 22px 15px max(18px, env(safe-area-inset-bottom));
  border-right: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--panel) 96%, var(--bg));
  box-shadow: 12px 0 34px #0000000c;
  scrollbar-width: thin;
}
.sidebar-top { min-height: 62px; padding: 0 8px 18px; border-bottom: 1px solid var(--line-soft); }
.sidebar-top .brand { gap: 11px; }
.sidebar-top .brand-logo { width: 38px; height: 38px; border-radius: 12px; }
.brand strong { color: var(--text); font-size: 14px; letter-spacing: -.025em; }
.brand small { margin-top: 2px; color: var(--dim); font-size: 9px; letter-spacing: .15em; }
.workspace-switch {
  min-height: 62px; margin: 19px 0 26px; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 13px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--mint) 7%, var(--panel-2)), var(--panel-2));
  box-shadow: inset 0 1px #ffffff08;
}
.workspace-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--mint) 14%, transparent); color: var(--mint); font-size: 17px; }
.workspace-switch strong { font-size: 12px; }
.workspace-switch small { margin-top: 3px; font-size: 10px; }
.chevron { color: var(--dim); }
.main-nav { gap: 5px; }
.nav-heading { margin: 0 10px 9px; color: var(--dim); font-size: 10px; font-weight: 800; letter-spacing: .13em; }
.nav-heading.spaced { margin-top: 25px; }
.nav-item {
  position: relative; min-height: 44px; height: auto; gap: 12px; padding: 0 11px;
  border-radius: 11px; color: var(--muted); font-size: 12px; font-weight: 600;
}
.nav-item:hover { transform: translateX(2px); background: color-mix(in srgb, var(--mint) 7%, var(--panel-2)); color: var(--text); }
.nav-item.active { background: color-mix(in srgb, var(--mint) 12%, var(--panel-2)); color: var(--mint); box-shadow: none; }
.nav-item.active::before { position: absolute; content: ""; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 5px 5px 0; background: var(--mint); }
.nav-icon { width: 21px; font-size: 16px; }
.nav-count { padding: 2px 7px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); font: 10px var(--mono); }
.sidebar-bottom { gap: 15px; padding: 18px 5px 0; }
.status-pill { min-height: 38px; border-radius: 10px; background: var(--panel-2); font-size: 10px; }
.user-card { gap: 10px; padding: 9px 7px 0; border-top: 1px solid var(--line-soft); }
.avatar, .top-avatar { width: 36px; height: 36px; border: 1px solid color-mix(in srgb, var(--mint) 32%, transparent); border-radius: 12px; background: color-mix(in srgb, var(--mint) 16%, var(--panel-2)); color: var(--mint); font-size: 12px; }
.user-meta strong { font-size: 12px; }
.user-meta span { font-size: 10px; }
.more-btn { width: 36px; height: 36px; border: 1px solid transparent; border-radius: 10px; }
.more-btn:hover { border-color: var(--line); background: var(--panel-2); color: var(--text); }
.main-content { min-height: 100svh; margin-left: 258px; }
.topbar {
  position: sticky; top: 0; z-index: 8; height: 68px; padding: 0 clamp(22px, 3.3vw, 52px);
  border-bottom: 1px solid var(--line-soft);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(18px) saturate(135%); -webkit-backdrop-filter: blur(18px) saturate(135%);
}
.breadcrumbs { gap: 11px; color: var(--dim); font-size: 11px; }
.breadcrumbs b { color: var(--line); }
.breadcrumbs strong { color: var(--text); font-weight: 700; }
.top-actions { gap: 9px; }
.top-actions .icon-btn { width: 38px; height: 38px; min-width: 38px; min-height: 38px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); color: var(--muted); }
.top-actions .icon-btn:hover { border-color: color-mix(in srgb, var(--mint) 42%, var(--line)); background: var(--panel-2); color: var(--mint); }
.top-actions .top-avatar { width: 38px; height: 38px; }
.menu-btn { width: 40px; height: 40px; border-radius: 11px; }
.content-wrap { width: 100%; max-width: 1640px; padding: clamp(28px, 3.5vw, 52px) clamp(22px, 3.3vw, 52px) 68px; }
.view-section.active { animation: viewEnter .3s cubic-bezier(.2,.75,.2,1) both; }
.page-heading { min-height: 0; align-items: center; gap: 24px; margin-bottom: 28px; }
.page-heading .eyebrow { margin: 0 0 8px; font-size: 10px; }
.page-heading h2 { font-size: clamp(25px, 2.4vw, 32px); font-weight: 750; letter-spacing: -.045em; }
.page-heading p:not(.eyebrow) { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.page-heading > .primary-btn { min-height: 44px; border-radius: 12px; padding-inline: 17px; font-size: 12px; }
.page-heading-actions { gap: 9px; }

/* Reusable surfaces, metrics, dashboard composition and tables. */
.panel, .metric-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--panel);
  box-shadow: var(--shadow-card), inset 0 1px #ffffff06;
}
.panel { overflow: visible; }
.panel-head { align-items: center; gap: 16px; }
.panel-head h3 { color: var(--text); font-size: 14px; font-weight: 700; letter-spacing: -.02em; }
.panel-head p { margin-top: 4px; color: var(--muted); font-size: 11px; }
.step-badge { padding: 6px 10px; border: 1px solid var(--line); border-radius: 99px; background: var(--panel-2); color: var(--muted); font-size: 10px; }
.metric-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.metric-card { min-height: 136px; padding: 20px; transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.metric-card:hover { transform: translateY(-2px); border-color: color-mix(in srgb, var(--mint) 35%, var(--line)); box-shadow: var(--shadow-soft); }
.metric-top { color: var(--muted); font-size: 11px; }
.metric-icon { width: 34px; height: 34px; border: 1px solid color-mix(in srgb, var(--mint) 20%, var(--line)); border-radius: 11px; background: color-mix(in srgb, var(--mint) 11%, var(--panel-2)); color: var(--mint); }
.metric-value { margin-top: 15px; color: var(--text); font-size: clamp(25px, 2.2vw, 33px); font-weight: 750; letter-spacing: -.055em; }
.metric-foot { margin-top: 5px; color: var(--dim); font-size: 10px; }
.dashboard-grid { grid-template-columns: minmax(0, 1.65fr) minmax(300px, .9fr); gap: 18px; margin-bottom: 18px; }
.chart-panel, .quick-panel, .recent-panel { min-width: 0; padding: 22px; }
.chart-panel { min-height: 300px; }
.chart-wrap { height: 224px; margin-top: 7px; }
.chart-wrap canvas { height: 190px; }
.chart-legend { gap: 18px; margin: 17px 0 5px; color: var(--muted); font-size: 11px; }
.legend-dot { width: 8px; height: 8px; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 12%, transparent); }
.quick-list { gap: 8px; margin-top: 18px; }
.quick-item { min-height: 62px; padding: 9px 10px; border: 1px solid transparent; border-radius: 13px; transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.quick-item:first-child { border-top: 1px solid transparent; }
.quick-item:hover { transform: translateX(2px); border-color: var(--line); background: var(--panel-2); }
.quick-icon { width: 38px; height: 38px; border: 1px solid color-mix(in srgb, var(--mint) 20%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--mint) 10%, var(--panel-2)); color: var(--mint); font-size: 17px; }
.quick-item strong { color: var(--text); font-size: 12px; }
.quick-item small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.quick-item > b { color: var(--dim); font-size: 17px; }
.recent-panel { padding-bottom: 10px; }
.recent-panel .panel-head { margin-bottom: 11px; }
.text-btn { color: var(--mint); font-size: 11px; }
.text-btn:hover { color: var(--text); }
.table-scroll, .logs-table-scroll { width: 100%; max-width: 100%; overflow: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
.data-table { border-collapse: separate; border-spacing: 0; }
.data-table th { height: 45px; padding: 0 12px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel-2) 72%, var(--panel)); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .015em; }
.data-table td { height: 60px; padding: 8px 12px; border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; vertical-align: middle; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: color-mix(in srgb, var(--mint) 4%, var(--panel)); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .empty-cell { height: 150px; color: var(--dim); text-align: center; }
.compact-table { min-width: 720px; }
.license-panel, .logs-panel, .app-manager, .team-panel { min-width: 0; overflow: hidden; }
.license-panel .data-table { min-width: 1240px; }
.recycle-table { min-width: 780px; }
.app-table { min-width: 900px; }
.team-table { min-width: 1120px; }
.logs-table { min-width: 1080px; }
.table-footer { min-height: 60px; padding: 10px 18px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; }
.pager button, .pager a { min-width: 34px; min-height: 34px; border-radius: 10px; }
.license-code, .license-ip, .detail-value-code, .log-codes code { font-family: var(--mono); }
.license-code.is-plaintext { color: var(--mint); font-weight: 700; }
.license-ip, .detail-value-code { color: var(--blue); }
.license-location { color: var(--text); }
.license-presence strong { color: var(--mint); }
.device-record { padding: 10px 11px; border-radius: 10px; background: var(--surface-muted); }
.status-tag { padding: 5px 9px; border: 1px solid currentColor; border-radius: 99px; font-size: 10px; font-weight: 700; }
.status-tag.active { color: var(--green); background: color-mix(in srgb, var(--green) 11%, transparent); }
.status-tag.unused { color: var(--blue); background: color-mix(in srgb, var(--blue) 10%, transparent); }
.status-tag.expired, .status-tag.revoked { color: var(--muted); background: color-mix(in srgb, var(--muted) 9%, transparent); }
.status-tag.blocked { color: var(--red); background: color-mix(in srgb, var(--red) 11%, transparent); }
.log-item { border-bottom: 1px solid var(--line-soft); }
.log-action { color: var(--text); }
.log-event { color: var(--dim); }
.log-detail-row td { background: var(--surface-muted); }
.log-detail-grid { gap: 14px; }

/* Inputs and actions: consistent sizes and an obvious primary action. */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 14px; margin-bottom: 14px; border-radius: 16px; }
.toolbar .search-wrap { flex: 2 1 250px; max-width: 420px; min-width: 210px; }
.search-wrap { min-height: 42px; height: 42px; padding: 0 13px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--panel-2); color: var(--muted); }
.search-wrap:focus-within { border-color: color-mix(in srgb, var(--mint) 55%, var(--line)); box-shadow: 0 0 0 4px var(--focus-ring); }
.search-wrap > span { font-size: 17px; }
.search-wrap input { min-width: 0; color: var(--text); font-size: 12px; }
.search-wrap input::placeholder, input::placeholder, textarea::placeholder { color: var(--dim); opacity: .86; }
.select-compact, .text-input { min-height: 42px; border: 1px solid var(--line); border-radius: var(--radius-control); background-color: var(--panel-2); color: var(--text); font-size: 12px; }
.select-compact { padding: 0 34px 0 12px; }
.toolbar .select-compact { min-width: 140px; }
.text-input { width: 100%; padding: 0 13px; }
.text-input option { background: var(--panel); color: var(--text); }
.textarea { min-height: 100px; padding: 12px 13px; resize: vertical; }
.number-input { min-height: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-control); background: var(--panel-2); }
.number-input button { min-width: 42px; color: var(--muted); }
.number-input input { color: var(--text); }
.field-label { margin: 17px 0 8px; color: var(--muted); font-size: 12px; font-weight: 650; }
.optional, .subtext { color: var(--dim); }
.primary-btn, .outline-btn, .row-action {
  min-height: 40px; border-radius: var(--radius-control); font-size: 11px; font-weight: 700;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease, filter .18s ease;
}
.primary-btn { padding: 0 15px; background: var(--mint); color: color-mix(in srgb, var(--bg) 88%, black); box-shadow: 0 6px 18px color-mix(in srgb, var(--mint) 15%, transparent); }
.primary-btn:hover { filter: brightness(1.06); transform: translateY(-1px); box-shadow: 0 9px 24px color-mix(in srgb, var(--mint) 21%, transparent); }
.outline-btn, .row-action { padding: 0 13px; border: 1px solid var(--line); background: var(--panel-2); color: var(--muted); }
.outline-btn:hover, .row-action:hover { border-color: color-mix(in srgb, var(--mint) 42%, var(--line)); background: color-mix(in srgb, var(--mint) 8%, var(--panel-2)); color: var(--text); }
.danger-outline, .danger-action { color: var(--red) !important; border-color: color-mix(in srgb, var(--red) 38%, var(--line)) !important; }
.danger-outline:hover, .danger-action:hover { background: color-mix(in srgb, var(--red) 12%, var(--panel-2)) !important; border-color: var(--red) !important; color: var(--red) !important; }
.full-btn { min-height: 46px; }
.check span { width: 17px; height: 17px; border-radius: 5px; }
.check input:checked + span { background: var(--mint); border-color: var(--mint); }
.row-actions { gap: 7px; }
.row-action { min-height: 33px; padding: 0 10px; font-size: 10px; }
.bulk-toolbar { position: sticky; top: 78px; z-index: 5; margin: 0 0 13px; padding: 14px 16px; border-color: color-mix(in srgb, var(--mint) 38%, var(--line)); border-radius: 14px; background: color-mix(in srgb, var(--panel) 92%, var(--mint-dark)); box-shadow: var(--shadow-card); }
.bulk-toolbar strong { font-size: 12px; }
.bulk-toolbar span { font-size: 10px; }
.bulk-actions { gap: 7px; }

/* Create-key workflow and generated plaintext. */
.generate-layout { grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr); gap: 20px; align-items: start; }
.generate-form, .preview-panel { padding: clamp(22px, 2.4vw, 34px); border-radius: 20px; }
.generate-form .panel-head, .preview-panel .panel-head { margin-bottom: 16px; }
.generate-form .field-label { margin-top: 20px; }
.form-row { gap: 16px; }
.preview-card { margin-top: 20px; padding: 25px; border: 1px solid color-mix(in srgb, var(--mint) 33%, var(--line)); border-radius: 18px; background: radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--mint) 24%, transparent), transparent 36%), linear-gradient(145deg, color-mix(in srgb, var(--panel-2) 78%, var(--mint-dark)), var(--panel)); box-shadow: inset 0 1px #ffffff13, 0 20px 44px #00000024; }
.preview-card > strong { display: block; margin: 27px 0 22px; color: var(--text); font: 700 19px var(--mono); letter-spacing: .025em; overflow-wrap: anywhere; }
.preview-label, .preview-foot { color: var(--muted); letter-spacing: .12em; }
.preview-chip { border: 1px solid color-mix(in srgb, var(--blue) 40%, transparent); border-radius: 99px; background: color-mix(in srgb, var(--blue) 10%, transparent); color: var(--blue); }
.preview-meta { gap: 20px; }
.preview-meta small { color: var(--muted); font-size: 10px; }
.preview-meta b { color: var(--text); font-size: 12px; }
.preview-divider { border-color: color-mix(in srgb, var(--text) 13%, transparent); }
.tip-box { margin-top: 15px; padding: 14px; border: 1px solid color-mix(in srgb, var(--amber) 26%, var(--line)); border-radius: 13px; background: color-mix(in srgb, var(--amber) 6%, var(--panel-2)); }
.tip-box > span { color: var(--amber); }
.tip-box p { color: var(--muted); font-size: 11px; line-height: 1.65; }
.result-panel { margin-top: 16px; padding: 17px; border-radius: 16px; }
.generated-license-panel { padding: 17px; border-radius: 16px; border-color: color-mix(in srgb, var(--mint) 35%, var(--line)); }
.generated-panel-code { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); }
.generated-panel-code code { color: var(--mint); font: 11px var(--mono); }

/* Applications, logs, team, settings and modal surfaces. */
.app-manager { border-radius: 18px; }
.app-form { padding: 24px; border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--panel-2) 42%, var(--panel)); }
.app-form-title { margin-bottom: 17px; }
.app-form-title h3 { font-size: 14px; }
.app-form-title p { color: var(--muted); font-size: 11px; }
.logs-panel { border-radius: 18px; }
.logs-filter { gap: 9px; padding: 14px; border-bottom-color: var(--line-soft); background: color-mix(in srgb, var(--panel-2) 42%, var(--panel)); }
.logs-filter .search-wrap { min-height: 42px; border-radius: var(--radius-control); }
.logs-filter .select-compact { min-height: 42px; border-radius: var(--radius-control); }
.logs-field { min-height: 42px; border-color: var(--line); border-radius: var(--radius-control); background: var(--panel-2); }
.logs-field > span { color: var(--muted); font-size: 10px; }
.logs-field input { color: var(--text); font-size: 11px; }
.logs-date-field input { color-scheme: dark; }
:root[data-theme="silver"] .logs-date-field input { color-scheme: light; }
.logs-count { color: var(--muted); font-size: 10px; }
.logs-table td { height: 66px; }
.log-time { color: var(--text); font: 10px var(--mono); }
.log-actor { color: var(--text); font-size: 11px; }
.log-detail-grid { padding: 16px; }
.log-detail-grid small { color: var(--dim); }
.log-detail-grid span, .log-detail-grid code { color: var(--text); font: 10px var(--mono); }
.team-summary { gap: 14px; margin-bottom: 16px; }
.team-stat { min-height: 90px; padding: 18px 20px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow-card); }
.team-stat strong { color: var(--text); font: 700 25px var(--mono); }
.team-panel-head { padding: 18px 20px; }
.team-panel-head strong { font-size: 13px; }
.team-panel-head span { font-size: 10px; }
.team-avatar { width: 36px; height: 36px; border-radius: 12px; }
.team-identity strong { font-size: 11px; }
.team-actions { gap: 7px; }
.team-global-permission { display: inline-flex; align-items: center; gap: 6px; color: var(--mint); font-size: 10px; white-space: nowrap; }
.team-global-permission i { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; background: color-mix(in srgb, var(--mint-dark) 35%, transparent); font-style: normal; }
.team-acl-open { white-space: nowrap; }
.team-acl-modal { width: min(100%, 720px); }
.team-acl-modal .modal-head { align-items: flex-start; }
.team-acl-modal .modal-head small { display: block; margin-top: 5px; }
.team-acl-content { display: grid; gap: 14px; padding-top: 16px; }
.team-acl-notice { display: grid; gap: 5px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--mint) 24%, var(--line)); border-radius: 12px; background: color-mix(in srgb, var(--mint-dark) 10%, var(--panel-2)); }
.team-acl-notice strong { color: var(--text); font-size: 11px; }
.team-acl-notice span { color: var(--muted); font-size: 10px; line-height: 1.65; }
.team-acl-notice.legacy { border-color: color-mix(in srgb, #e8b65a 32%, var(--line)); background: color-mix(in srgb, #e8b65a 8%, var(--panel-2)); }
.team-acl-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.team-acl-tools > span { margin-right: 3px; color: var(--muted); font-size: 10px; }
.team-acl-tools .row-action { min-height: 31px; }
.team-acl-list { display: grid; gap: 7px; max-height: min(42dvh, 390px); overflow: auto; padding-right: 3px; }
.team-acl-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 58px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 11px; background: color-mix(in srgb, var(--panel-2) 70%, transparent); }
.team-acl-row > span { display: grid; min-width: 0; gap: 4px; }
.team-acl-row strong { overflow: hidden; color: var(--text); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.team-acl-row small { color: var(--muted); font-size: 9px; }
.team-acl-row code { color: var(--dim); font: 9px var(--mono); }
.team-acl-row select { flex: 0 0 190px; width: 190px; min-width: 0; }
.team-acl-content form { margin: 0; }
.team-acl-content .modal-actions { padding-top: 2px; }
.settings-grid { gap: 16px; }
.settings-card, .theme-settings { padding: 23px; border-radius: 18px; }
.settings-title h3 { font-size: 14px; }
.settings-title p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.theme-grid { gap: 12px; }
.theme-option { min-height: 78px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel-2); }
.theme-option strong { color: var(--text); font-size: 12px; }
.theme-option small { color: var(--muted); font-size: 10px; }
.theme-option.selected { border-color: var(--mint); background: color-mix(in srgb, var(--mint-dark) 38%, var(--panel-2)); box-shadow: 0 0 0 3px var(--focus-ring); }
.theme-swatch { min-height: 35px; border-radius: 9px; }
.security-actions { gap: 9px; padding-top: 18px; }
.security-actions .outline-btn { min-height: 40px; border-radius: 11px; }
.modal-backdrop { z-index: 40; padding: 24px; background: #05090bd1; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal { width: min(100%, 620px); max-height: min(86dvh, 850px); padding: 27px; border: 1px solid var(--line); border-radius: 22px; background: var(--panel); box-shadow: 0 30px 100px #0008, inset 0 1px #ffffff09; }
.modal-head { gap: 15px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.modal-head h3 { color: var(--text); font-size: 17px; }
.modal-copy { color: var(--muted); font-size: 12px; line-height: 1.75; }
.modal-actions { gap: 9px; margin-top: 22px; }
.modal-actions .primary-btn, .modal-actions .outline-btn { min-height: 42px; }
.toast-region { z-index: 70; }
.toast { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--text); box-shadow: var(--shadow-soft); }
.toast.success { border-color: color-mix(in srgb, var(--green) 42%, var(--line)); }
.toast.error { border-color: color-mix(in srgb, var(--red) 42%, var(--line)); }

/* Theme finishes. Preserve the existing theme selector values and LiquidGlass
   tone adaptation while letting every component consume the same tokens. */
:root[data-theme="liquid"] body { background-image: radial-gradient(ellipse at 78% 0%, #5fd2ba16, transparent 36%), radial-gradient(ellipse at 8% 52%, #83b7e713, transparent 40%); }
:root[data-theme="mist"] body { background-image: radial-gradient(ellipse at 82% -8%, #9baec31b, transparent 39%), linear-gradient(130deg, #ffffff03, transparent 55%); }
:root[data-theme="aurora"] body { background-image: radial-gradient(ellipse at 80% 0%, #5bd59012, transparent 38%), radial-gradient(ellipse at 15% 65%, #bddc7310, transparent 34%); }
:root[data-theme="silver"] body { background-image: radial-gradient(ellipse at 78% 0%, #62a89112, transparent 37%), linear-gradient(145deg, #f7faf9, #edf2f0 68%, #eaf0ee); }
:root[data-theme="silver"] .sidebar { background: #fbfdfc; box-shadow: 10px 0 30px #253b350a; }
:root[data-theme="silver"] .topbar { background: #f1f5f3e8; }
:root[data-theme="silver"] .nav-item.active { background: #e5f2ed; color: #176d58; }
:root[data-theme="silver"] .workspace-switch { background: linear-gradient(135deg, #eff8f4, #f7faf9); }
:root[data-theme="silver"] .preview-card { color: #eff8f1; }
:root[data-theme="silver"] .preview-card > strong, :root[data-theme="silver"] .preview-meta b { color: #f6fffb; }
:root[data-theme="silver"] .preview-label, :root[data-theme="silver"] .preview-meta small, :root[data-theme="silver"] .preview-foot { color: #d0e4dd; }
:root[data-theme="silver"] .login-art::before { background: radial-gradient(circle at 70% 35%, #176d5818, transparent 38%), linear-gradient(145deg, #ffffff, #e9f2ee); }
:root[data-theme="silver"] .login-art::after { border-color: #176d5830; box-shadow: 0 0 0 36px #176d5808, 0 0 0 72px #376f9b07, inset 0 0 70px #176d5810; }
:root[data-theme="silver"] .danger-outline:hover, :root[data-theme="silver"] .danger-action:hover { background: #fff1f1 !important; }
:root[data-theme="silver"] .status-tag.active { background: #e7f5ec; }
:root[data-theme="silver"] .status-tag.unused { background: #edf5fa; }
:root[data-theme="silver"] .status-tag.blocked { background: #fff0f0; }
:root[data-theme="silver"] .logs-date-field input { color-scheme: light; }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  :root[data-theme="liquid"] .panel, :root[data-theme="liquid"] .metric-card,
  :root[data-theme="liquid"] .sidebar, :root[data-theme="liquid"] .topbar,
  :root[data-theme="liquid"] .login-panel, :root[data-theme="liquid"] .modal { background-color: var(--panel); }
}

/* Tablet and mobile: keep navigation drawer behavior and constrain horizontal
   overflow to data tables so phone-width pages never acquire a body scrollbar. */
@media (max-width: 1200px) {
  .sidebar { width: 238px; }
  .main-content { margin-left: 238px; }
  .content-wrap { padding-inline: 30px; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: minmax(0, 1.45fr) minmax(270px, .9fr); }
  .toolbar { flex-wrap: wrap; }
  .toolbar .search-wrap { flex: 1 1 280px; max-width: none; }
  .toolbar .select-compact { flex: 1 1 145px; }
  .logs-filter { flex-wrap: wrap; }
  .logs-filter .search-wrap { flex: 1 1 260px; max-width: none; }
}
@media (max-width: 900px) {
  .login-view { grid-template-columns: minmax(0, .95fr) minmax(390px, 1.05fr); gap: 28px; padding: 28px; }
  .login-art { min-height: 560px; }
  .login-quote p { font-size: 29px; }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .chart-panel { min-height: 0; }
  .generate-layout { grid-template-columns: minmax(0, 1fr) minmax(0, .95fr); gap: 14px; }
  .logs-filter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .logs-filter .search-wrap { grid-column: 1 / -1; max-width: none; }
  .logs-filter .logs-count { grid-column: 1 / -1; margin-left: 0; }
  .team-summary { gap: 10px; }
  .team-stat { padding: 14px; }
}
@media (max-width: 960px) {
  .sidebar { width: min(320px, 88vw); transform: translateX(-105%); transition: transform .26s cubic-bezier(.2,.8,.2,1); box-shadow: 22px 0 60px #0006; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: block; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel-2); color: var(--muted); }
  .backdrop.show { display: block; position: fixed; inset: 0; z-index: 9; background: #05090ba8; backdrop-filter: blur(3px); }
  .main-content { margin-left: 0; }
  .menu-btn { display: grid; }
  .topbar { height: 62px; padding-inline: 18px; }
  .content-wrap { padding: 28px 20px max(44px, env(safe-area-inset-bottom)); }
  .generate-layout { grid-template-columns: 1fr; }
  .preview-panel { order: 2; }
  .generate-form { order: 1; }
  .bulk-toolbar { position: static; }
  .team-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .team-table { min-width: 1120px; }
  .logs-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logs-filter .logs-field { min-width: 0; width: 100%; }
  .log-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .login-view { min-height: 100svh; grid-template-columns: 1fr; align-items: center; padding: 24px; }
  .login-art { display: none; }
  .login-panel { width: min(100%, 480px); }
  .mobile-brand { display: flex; align-items: center; gap: 11px; margin: 0 0 34px; color: var(--text); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
  .mobile-brand .brand-logo { width: 40px; height: 40px; border-radius: 12px; }
}
@media (max-width: 640px) {
  .login-view { min-height: 100svh; display: grid; grid-template-columns: 1fr; align-items: center; padding: max(20px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .login-art { display: none; }
  .login-panel { width: min(100%, 480px); padding: 27px 23px; border-radius: 22px; }
  .mobile-brand { display: flex; align-items: center; gap: 11px; margin: 0 0 34px; color: var(--text); font-size: 13px; font-weight: 800; letter-spacing: .02em; }
  .mobile-brand .brand-logo { width: 40px; height: 40px; border-radius: 12px; }
  .login-panel h1 { font-size: 30px; }
  .login-subtitle { margin-bottom: 27px; font-size: 13px; }
  .topbar { height: 58px; padding-left: max(13px, env(safe-area-inset-left)); padding-right: max(13px, env(safe-area-inset-right)); }
  .breadcrumbs { gap: 7px; margin-left: 7px; font-size: 10px; }
  .breadcrumbs span { display: none; }
  .top-actions { gap: 6px; }
  .top-actions .icon-btn, .top-actions .top-avatar { width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
  .content-wrap { padding: 23px 14px max(36px, env(safe-area-inset-bottom)); }
  .page-heading { align-items: flex-start; gap: 12px; margin-bottom: 20px; }
  .page-heading h2 { font-size: 24px; }
  .page-heading p:not(.eyebrow) { max-width: 37ch; font-size: 12px; }
  .page-heading > .primary-btn { min-height: 40px; gap: 7px; padding-inline: 11px; font-size: 10px; }
  .page-heading-actions { flex-direction: row; flex-wrap: wrap; justify-content: flex-start; width: 100%; }
  .page-heading:has(.page-heading-actions) { align-items: flex-start; flex-direction: column; }
  .page-heading-actions .outline-btn { min-height: 38px; }
  .row-actions .row-action, .team-actions .row-action, .team-role-control .row-action { min-height: 38px; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
  .metric-card { min-height: 110px; padding: 13px; border-radius: 15px; }
  .metric-top { gap: 7px; font-size: 10px; }
  .metric-icon { width: 29px; height: 29px; border-radius: 9px; }
  .metric-value { margin-top: 9px; font-size: 24px; }
  .metric-foot { font-size: 9px; }
  .dashboard-grid { gap: 11px; margin-bottom: 12px; }
  .chart-panel, .quick-panel, .recent-panel { padding: 15px; border-radius: 16px; }
  .chart-wrap { height: 192px; }
  .chart-wrap canvas { height: 162px; }
  .chart-legend { flex-wrap: wrap; gap: 12px; font-size: 10px; }
  .quick-list { gap: 5px; }
  .quick-item { min-height: 56px; padding: 7px; }
  .quick-icon { width: 34px; height: 34px; }
  .quick-item strong { font-size: 11px; }
  .toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; margin-bottom: 11px; border-radius: 15px; }
  .toolbar .search-wrap { flex: 1 1 100%; min-width: 100%; max-width: none; }
  .toolbar .select-compact { min-width: 0; flex: 1 1 calc(50% - 5px); }
  .toolbar .outline-btn { min-height: 40px; flex: 1 1 calc(33.3% - 6px); padding-inline: 8px; }
  .license-panel, .logs-panel, .app-manager { border-radius: 15px; }
  .license-panel .table-footer { align-items: flex-start; flex-direction: column; gap: 10px; padding: 12px; }
  .license-panel .table-footer > span { max-width: 100%; }
  .pager { max-width: 100%; flex-wrap: wrap; }
  .bulk-toolbar { padding: 12px; border-radius: 14px; }
  .bulk-toolbar > div:first-child { display: block; }
  .bulk-toolbar > div:first-child span { display: block; margin-top: 4px; }
  .bulk-actions { width: 100%; flex-wrap: wrap; }
  .bulk-actions .outline-btn { min-height: 40px; flex: 1 1 calc(50% - 6px); padding-inline: 8px; }
  .bulk-actions .text-btn { margin-left: auto; padding: 8px; }
  .generate-form, .preview-panel, .settings-card, .theme-settings { padding: 17px; border-radius: 16px; }
  .form-row { grid-template-columns: 1fr; gap: 3px; }
  .form-row > div { min-width: 0; }
  .preview-card { padding: 19px; border-radius: 15px; }
  .preview-card > strong { font-size: 16px; }
  .preview-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .preview-meta b { font-size: 10px; }
  .generated-panel-head { align-items: flex-start; flex-direction: column; }
  .generated-panel-actions { width: 100%; flex-wrap: wrap; }
  .generated-panel-actions .outline-btn { flex: 1; }
  .generated-panel-codes { grid-template-columns: 1fr; }
  .logs-filter { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 10px; }
  .logs-filter .search-wrap, .logs-filter .logs-count { grid-column: 1 / -1; width: 100%; max-width: none; margin: 0; }
  .logs-filter .select-compact { min-width: 0; width: 100%; }
  .logs-field, .logs-date-field { min-width: 0; width: 100%; padding-inline: 8px; }
  .logs-field > span { font-size: 9px; }
  .logs-field input { min-width: 0; font-size: 10px; }
  .logs-table { min-width: 1080px; }
  .log-detail-grid { grid-template-columns: 1fr; gap: 9px; padding: 13px; }
  .team-summary { grid-template-columns: 1fr; gap: 8px; }
  .team-stat { min-height: 72px; padding: 13px 15px; }
  .team-stat strong { font-size: 20px; }
  .team-panel-head { align-items: flex-start; flex-direction: column; padding: 14px; }
  .team-panel-head .outline-btn { width: 100%; }
  .team-table { min-width: 1120px; }
  .theme-grid { grid-template-columns: 1fr; }
  .theme-option:last-child { grid-column: auto; }
  .app-form { padding: 16px; }
  .app-form .form-row { grid-template-columns: 1fr; gap: 0; }
  .app-form-actions .primary-btn { width: 100%; }
  .security-actions { display: grid; grid-template-columns: 1fr; }
  .security-actions .outline-btn { width: 100%; }
  .modal-backdrop { align-items: center; padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)); }
  .modal { width: 100%; max-height: calc(100dvh - 20px); padding: 19px; border-radius: 18px; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions > * { min-width: 120px; flex: 1; }
  .toast-region { top: max(10px, env(safe-area-inset-top)); left: 12px; right: 12px; }
  .toast { max-width: 100%; overflow-wrap: anywhere; }
  .notification { display: none; }
}

/* Keep license text inside its own column. The previous auto table layout let
   long notes widen the key cell and visually collide with the application cell. */
.license-panel .data-table {
  width: 100%;
  min-width: 1955px;
  table-layout: fixed;
}
.license-panel .data-table th:nth-child(1),
.license-panel .data-table td:nth-child(1) { width: 50px; }
.license-panel .data-table th:nth-child(2),
.license-panel .data-table td:nth-child(2) { width: 330px; }
.license-panel .data-table th:nth-child(3),
.license-panel .data-table td:nth-child(3) { width: 160px; }
.license-panel .data-table th:nth-child(4),
.license-panel .data-table td:nth-child(4) { width: 115px; }
.license-panel .data-table th:nth-child(5),
.license-panel .data-table td:nth-child(5) { width: 190px; }
.license-panel .data-table th:nth-child(6),
.license-panel .data-table td:nth-child(6) { width: 115px; }
.license-panel .data-table th:nth-child(7),
.license-panel .data-table td:nth-child(7) { width: 160px; }
.license-panel .data-table th:nth-child(8),
.license-panel .data-table td:nth-child(8) { width: 150px; }
.license-panel .data-table th:nth-child(9),
.license-panel .data-table td:nth-child(9) { width: 150px; }
.license-panel .data-table th:nth-child(10),
.license-panel .data-table td:nth-child(10) { width: 110px; }
.license-panel .data-table th:nth-child(11),
.license-panel .data-table td:nth-child(11) { width: 155px; }
.license-panel .data-table th:nth-child(12),
.license-panel .data-table td:nth-child(12) { width: 360px; }
.license-panel .data-table td { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.license-panel .data-table td:nth-child(2) { white-space: normal; }
.license-panel .data-table td:nth-child(2) .license-code {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
  font-size: 11px;
  line-height: 1.45;
}
.license-panel .data-table td:nth-child(2) .subtext {
  display: -webkit-box;
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  line-height: 1.4;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.license-panel .data-table td:nth-child(2) .license-code,
.license-panel .data-table td:nth-child(2) .subtext { text-overflow: clip; }
.license-panel .data-table th:nth-child(2) { white-space: normal; }
.license-panel .row-actions { min-width: 0; flex-wrap: wrap; }
.user-card { min-width: 0; }
.user-card .avatar {
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  line-height: 1;
  text-align: center;
}
.user-card .user-meta { flex: 1 1 auto; min-width: 0; }
.user-card .user-meta strong { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-card .more-btn { flex: 0 0 32px; }
.workspace-switch { cursor: default; }
.workspace-switch:hover { transform: none; }

@media (max-width: 760px) {
  .license-panel .data-table { min-width: 1955px; }
  .user-card .avatar { flex-basis: 36px; }
}
@media (max-width: 370px) {
  .content-wrap { padding-inline: 11px; }
  .page-heading { gap: 8px; }
  .page-heading h2 { font-size: 22px; }
  .page-heading > .primary-btn { padding-inline: 8px; font-size: 9px; }
  .metric-card { padding: 11px; }
  .metric-top { font-size: 9px; }
  .top-actions { gap: 3px; }
  .search-wrap input { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .metric-card:hover, .quick-item:hover, .nav-item:hover, .primary-btn:hover { transform: none; }
}

/* API key governance, runtime monitoring and webhook delivery surfaces. */
.app-key-caption,.api-key-caption{display:block;margin-top:5px;color:var(--muted);font-size:9px;line-height:1.45;white-space:normal}
.ops-health{display:flex;align-items:center;gap:10px;min-height:52px;padding:12px 16px;margin-bottom:14px;border-radius:14px;color:var(--text)}
.ops-health-dot{width:9px;height:9px;flex:none;border-radius:50%;background:#62d6ae;box-shadow:0 0 0 4px color-mix(in srgb,#62d6ae 16%,transparent)}
.ops-health.is-degraded .ops-health-dot{background:#ee8a8a;box-shadow:0 0 0 4px color-mix(in srgb,#ee8a8a 16%,transparent)}
.ops-health>span:nth-child(2){font-size:11px;font-weight:700;min-width:0;overflow-wrap:anywhere}
.ops-health small{margin-left:auto;color:var(--muted);font-size:9px;text-align:right}
.ops-metric-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-bottom:15px}
.ops-metric-card{min-width:0;min-height:116px;padding:15px 16px}
.ops-metric-card .metric-value{font-size:clamp(18px,2vw,25px);overflow-wrap:anywhere}
.ops-metric-card .metric-foot{display:block;max-width:100%;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
.ops-grid{display:grid;grid-template-columns:minmax(260px,.78fr) minmax(0,1.5fr);align-items:start;gap:14px}
.ops-panel{min-width:0;overflow:hidden;border-radius:16px}
.ops-panel>.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid var(--line-soft)}
.ops-panel .panel-head h3{font-size:13px}
.ops-panel .panel-head p{font-size:10px;line-height:1.5}
.ops-head-actions{display:flex;align-items:center;gap:8px;flex:none}
.ops-head-actions .select-compact{min-height:34px;min-width:95px}
.ops-alert-list{display:grid;gap:0;padding:0 15px}
.ops-alert-item{display:grid;grid-template-columns:28px minmax(0,1fr);gap:10px;padding:14px 2px;border-bottom:1px solid var(--line-soft)}
.ops-alert-item:last-child{border-bottom:0}
.ops-alert-mark{display:grid;place-items:center;width:26px;height:26px;border:1px solid var(--line);border-radius:9px;color:var(--muted);font-size:12px;font-weight:800}
.ops-alert-item.severity-critical .ops-alert-mark{color:#ff9b9b;border-color:#8c4e56;background:#5a2932}
.ops-alert-item.severity-warning .ops-alert-mark{color:#f1c57a;border-color:#7c633e;background:#483a25}
.ops-alert-content{min-width:0}
.ops-alert-title-row{display:flex;justify-content:space-between;align-items:center;gap:7px}
.ops-alert-title-row strong{min-width:0;color:var(--text);font-size:10px;overflow-wrap:anywhere}
.ops-alert-title-row .status-tag{flex:none;font-size:8px}
.ops-alert-content p{margin:6px 0;color:var(--muted);font-size:10px;line-height:1.55;overflow-wrap:anywhere}
.ops-alert-content>small{color:var(--muted-2);font-size:8px;line-height:1.5;white-space:normal}
.webhook-panel>.panel-head .primary-btn{min-height:34px;padding-inline:11px;font-size:10px;white-space:nowrap}
.webhook-form{padding:16px 18px;border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--panel-2) 42%,var(--panel))}
.webhook-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.webhook-form-grid>label{min-width:0}
.webhook-form-grid .field-label{display:block;margin:0 0 6px;font-size:10px}
.webhook-form-grid .text-input{min-width:0;width:100%;font-size:10px}
.webhook-form-hint{display:block;margin-top:10px;white-space:normal}
.webhook-form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:12px}
.webhook-table{min-width:930px}
.webhook-table td{vertical-align:middle}
.webhook-url{display:block;max-width:230px;margin-top:4px;color:var(--muted);font:9px var(--mono);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.webhook-events{display:flex;flex-wrap:wrap;gap:4px;max-width:180px}
.webhook-events span,.api-scope-tags span{padding:3px 6px;border:1px solid var(--line);border-radius:99px;color:var(--muted);font:8px var(--mono);overflow-wrap:anywhere}
.webhook-table .row-actions{flex-wrap:wrap;max-width:230px}
.webhook-table .row-action{min-height:28px;padding:4px 7px;font-size:8px}
.key-manager-modal{width:min(1080px,calc(100vw - 36px));max-height:calc(100dvh - 32px);overflow:auto}
.key-manager-modal>.modal-head{align-items:flex-start}
.key-manager-modal>.modal-head>div{min-width:0}
.key-manager-modal>.modal-head small{display:block;margin-top:5px;font-size:9px;overflow-wrap:anywhere}
.api-key-settings{padding:14px;border:1px solid var(--line);border-radius:14px;background:color-mix(in srgb,var(--panel-2) 44%,var(--panel))}
.api-key-section-head,.api-key-usage-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.api-key-section-head strong,.api-key-usage-head strong{display:block;color:var(--text);font-size:11px}
.api-key-section-head small,.api-key-usage-head small{display:block;margin-top:4px;color:var(--muted);font-size:9px;line-height:1.5}
.api-scope-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;margin:13px 0}
.api-scope-option{display:flex;align-items:flex-start;gap:7px;min-width:0;padding:9px;border:1px solid var(--line);border-radius:10px;background:var(--panel);cursor:pointer}
.api-scope-option input{flex:none;margin:2px 0 0;accent-color:var(--mint)}
.api-scope-option span{display:grid;gap:4px;min-width:0}
.api-scope-option strong{font-size:9px;line-height:1.4}
.api-scope-option code{color:var(--muted);font:8px var(--mono);overflow-wrap:anywhere}
.api-grace-field{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:9px}
.api-grace-field .select-compact{min-height:32px;min-width:130px}
.api-key-actions{display:flex;align-items:center;gap:10px;margin-top:12px}
.api-key-actions .primary-btn{min-height:34px;padding-inline:12px;font-size:10px}
.api-key-actions small{color:var(--muted);font-size:9px;line-height:1.5}
.api-key-usage-head{align-items:flex-end;margin:17px 0 10px}
.api-usage-range{display:flex;align-items:flex-end;gap:7px}
.api-usage-range label{display:grid;gap:4px;color:var(--muted);font-size:8px}
.api-usage-range input{min-height:32px;padding:4px 7px;border:1px solid var(--line);border-radius:8px;background:var(--panel-2);color:var(--text);font:9px var(--mono)}
.api-usage-range .outline-btn{min-height:32px;padding-inline:10px;font-size:9px}
.api-usage-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.api-usage-summary article{display:grid;gap:5px;min-width:0;padding:9px;border:1px solid var(--line-soft);border-radius:10px;background:var(--panel-2)}
.api-usage-summary span{color:var(--muted);font-size:8px}
.api-usage-summary strong{font:700 15px var(--mono);overflow-wrap:anywhere}
.api-usage-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px}
.api-usage-subtitle{display:block;margin-bottom:6px;color:var(--muted);font-size:9px}
.api-usage-key-list,.api-usage-breakdown{display:grid;gap:5px;max-height:160px;overflow:auto}
.api-usage-key-list>div,.api-usage-breakdown>div{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 8px;border:1px solid var(--line-soft);border-radius:8px;background:var(--panel-2);font-size:8px}
.api-usage-key-list>div>span,.api-usage-breakdown>div>span{min-width:0;color:var(--text);overflow-wrap:anywhere}
.api-usage-key-list small,.api-usage-breakdown small{display:block;margin-top:3px;color:var(--muted);font-size:8px}
.api-usage-key-list b,.api-usage-breakdown b{flex:none;font:9px var(--mono)}
.api-key-list-head{margin-top:17px;padding-top:12px;border-top:1px solid var(--line-soft)}
.api-key-table-scroll{max-height:300px;margin-top:8px}
.api-key-table{min-width:990px}
.api-key-table td{vertical-align:middle}
.api-key-last4{display:block;margin-top:4px;color:var(--muted);font:9px var(--mono)}
.api-scope-tags{display:flex;flex-wrap:wrap;gap:4px;max-width:180px}
.http-code{font:9px var(--mono);color:#75d9b0}
.http-code.warn{color:#e4bd71}
.http-code.error{color:#ee9292}
.webhook-secret-modal{width:min(520px,calc(100vw - 28px))}
.webhook-secret-code{display:block;max-width:100%;white-space:normal;overflow-wrap:anywhere;word-break:break-all}
.webhook-deliveries-modal{width:min(960px,calc(100vw - 30px));max-height:calc(100dvh - 30px);overflow:auto}
.webhook-delivery-scroll{max-height:min(55dvh,480px);overflow:auto}
.webhook-delivery-table{min-width:800px}
.delivery-error{display:block;max-width:160px;margin-top:4px;color:#e58b8b;font-size:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ops-error{grid-column:1/-1;padding:18px;color:var(--muted);font-size:10px}
@media(max-width:1100px){.ops-metric-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.ops-grid{grid-template-columns:minmax(0,.9fr) minmax(0,1.3fr)}}
@media(max-width:900px){.ops-grid{grid-template-columns:1fr}.ops-metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.api-scope-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:640px){.ops-health{align-items:flex-start;flex-wrap:wrap;padding:11px 12px}.ops-health small{width:100%;margin-left:19px;text-align:left}.ops-panel>.panel-head{align-items:flex-start;flex-direction:column;padding:13px}.ops-head-actions{width:100%;justify-content:space-between}.ops-metric-grid{gap:7px}.ops-metric-card{min-height:98px;padding:11px}.ops-metric-card .metric-value{font-size:19px}.ops-metric-card .metric-foot{font-size:8px}.webhook-form{padding:13px}.webhook-form-grid{grid-template-columns:1fr;gap:9px}.webhook-form-actions>*{flex:1}.webhook-panel>.panel-head .primary-btn{width:100%;justify-content:center}.key-manager-modal{width:calc(100vw - 18px);max-height:calc(100dvh - 18px);padding:13px}.api-key-section-head,.api-key-usage-head{align-items:flex-start;flex-direction:column}.api-scope-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.api-grace-field{align-items:flex-start;flex-direction:column;gap:6px}.api-key-actions{align-items:flex-start;flex-direction:column}.api-key-actions .primary-btn{width:100%;justify-content:center}.api-usage-range{width:100%;flex-wrap:wrap}.api-usage-range label{flex:1;min-width:100px}.api-usage-range input{width:100%;min-width:0}.api-usage-range .outline-btn{flex:1}.api-usage-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.api-usage-columns{grid-template-columns:1fr}.key-manager-modal .modal-head h3{font-size:13px}.webhook-deliveries-modal{width:calc(100vw - 18px);padding:13px}.webhook-secret-modal{width:calc(100vw - 20px);padding:15px}}

/* Tenant-based business workspace */
.tenant-workspace-switch{align-items:center;gap:8px;min-width:0}
.tenant-workspace-label{display:grid;gap:3px;min-width:0;flex:1}
.tenant-workspace-label strong,.tenant-workspace-label small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tenant-switch-select{width:100%;max-width:160px;min-width:0;height:26px;padding:0 18px 0 0;border:0;border-radius:0;background:transparent;color:var(--text);font-size:9px;font-weight:700;outline:none}
.tenant-switch-select:disabled{opacity:.75;cursor:default}
.tenant-workspace-label small{color:var(--muted);font-size:8px}
.business-heading-actions{display:flex;align-items:center;gap:8px;flex:none}
.business-heading-actions .primary-btn,.business-heading-actions .outline-btn{white-space:nowrap}
.business-module-notice{display:grid;gap:4px;padding:13px 15px;margin-bottom:12px;border:1px solid color-mix(in srgb,#edb965 44%,var(--line));border-radius:13px;background:color-mix(in srgb,#edb965 9%,var(--panel));color:var(--text)}
.business-module-notice strong{font-size:10px}
.business-module-notice span{font-size:9px;line-height:1.55;color:var(--muted)}
.business-context-bar{display:flex;align-items:center;gap:11px;min-width:0;padding:13px 16px;margin-bottom:12px;border-radius:14px}
.business-context-icon{display:grid;place-items:center;width:32px;height:32px;flex:none;border:1px solid color-mix(in srgb,var(--mint) 35%,var(--line));border-radius:10px;color:var(--mint);font-size:16px}
.business-context-bar>div{display:grid;gap:4px;min-width:0}
.business-context-bar>div strong{color:var(--text);font-size:11px;overflow-wrap:anywhere}
.business-context-bar>div small{color:var(--muted);font-size:8px}
.business-context-id{margin-left:auto;padding:5px 8px;border:1px solid var(--line);border-radius:8px;color:var(--muted);font:9px var(--mono);overflow-wrap:anywhere}
.business-tabs{display:flex;gap:5px;max-width:100%;margin-bottom:12px;padding:5px;overflow-x:auto;border:1px solid var(--line);border-radius:13px;background:var(--panel-2);scrollbar-width:thin}
.business-tab{flex:none;min-height:34px;padding:0 12px;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted);font-size:9px;font-weight:700;white-space:nowrap}
.business-tab:hover{color:var(--text);background:var(--surface-hover)}
.business-tab.active{border-color:var(--line);background:var(--panel);color:var(--text);box-shadow:0 3px 10px #0002}
.business-content{display:grid;gap:12px;min-width:0}
.business-empty,.business-loading{display:flex;align-items:center;justify-content:center;gap:9px;min-height:130px;padding:20px;color:var(--muted);font-size:10px;text-align:center;line-height:1.6}
.business-loading .spinner{width:14px;height:14px;border:2px solid var(--line-strong);border-right-color:transparent;border-radius:50%;animation:spin .7s linear infinite}
.business-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.business-stat{display:grid;gap:8px;min-width:0;min-height:105px;padding:15px;border-radius:14px}
.business-stat>span{color:var(--muted);font-size:9px}
.business-stat>strong{color:var(--text);font:700 22px var(--mono);overflow-wrap:anywhere}
.business-stat>small{color:var(--muted);font-size:8px;line-height:1.45;overflow-wrap:anywhere}
.business-panel{min-width:0;overflow:hidden;border-radius:15px}
.business-panel>.panel-head{padding:15px 17px;border-bottom:1px solid var(--line-soft)}
.business-panel>.panel-head h3,.business-toolbar h3{color:var(--text);font-size:12px}
.business-panel>.panel-head p,.business-toolbar p{margin-top:5px;color:var(--muted);font-size:9px;line-height:1.5}
.business-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px}
.business-toolbar>div:first-child{min-width:0}
.business-toolbar-controls{display:flex;align-items:center;justify-content:flex-end;gap:8px;min-width:0;flex-wrap:wrap}
.business-toolbar-controls .primary-btn{min-height:35px;padding:0 11px;font-size:9px;white-space:nowrap}
.business-toolbar-controls .select-compact{min-height:35px;min-width:110px;font-size:9px}
.business-search{width:min(240px,40vw);min-height:35px;height:35px;border-radius:9px}
.business-search input{font-size:9px}
.business-table-panel{padding-bottom:0}
.business-table-scroll{min-width:0;overflow:auto;overscroll-behavior-x:contain}
.business-table{min-width:860px}
.business-table th{height:40px;font-size:8px}
.business-table td{height:56px;padding-block:8px;font-size:9px;vertical-align:middle}
.business-table td strong{color:var(--text);font-size:9px}
.business-table td small{display:block;margin-top:4px;color:var(--muted);font-size:8px;line-height:1.4;overflow-wrap:anywhere}
.business-table code{font:9px var(--mono);color:var(--mint);overflow-wrap:anywhere}
.business-table .row-actions{flex-wrap:wrap;max-width:240px;gap:5px}
.business-table .row-action{min-height:28px;padding:4px 7px;font-size:8px}
.business-cell-wrap{display:block;max-width:190px;white-space:normal;overflow-wrap:anywhere;line-height:1.45}
.business-pager{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 14px;border-top:1px solid var(--line-soft);color:var(--muted);font-size:9px}
.business-pager>div{display:flex;gap:6px}
.business-pager button{width:30px;height:30px;border:1px solid var(--line);border-radius:8px;background:var(--panel-2);color:var(--text)}
.business-pager button:disabled{opacity:.38;cursor:default}
.business-quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}
.business-quick-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px 8px;align-items:center;padding:13px;border:1px solid var(--line);border-radius:13px;background:var(--panel);color:var(--text);text-align:left}
.business-quick-card strong{font-size:10px}
.business-quick-card span{grid-column:1;color:var(--muted);font-size:8px;line-height:1.45}
.business-quick-card:hover{border-color:var(--line-strong);transform:translateY(-1px)}
.business-subtabs{display:flex;gap:6px;margin-top:-3px}
.business-subtabs button{min-height:31px;padding:0 11px;border:1px solid var(--line);border-radius:8px;background:var(--panel-2);color:var(--muted);font-size:9px}
.business-subtabs button.active{border-color:color-mix(in srgb,var(--mint) 38%,var(--line));background:color-mix(in srgb,var(--mint) 10%,var(--panel));color:var(--text)}
.business-negative{color:#e78e8e!important}
.business-form-modal{width:min(620px,calc(100vw - 30px));max-height:calc(100dvh - 30px);overflow:auto}
.business-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 12px}
.business-field{display:grid;gap:6px;min-width:0;color:var(--muted);font-size:9px}
.business-field>span{color:var(--text);font-size:9px;font-weight:700}
.business-field>span i{color:#e98c8c;font-style:normal}
.business-field .text-input{width:100%;min-width:0;min-height:37px;padding:8px 10px;font-size:10px}
.business-field .textarea{min-height:76px}
.business-field>small{color:var(--muted);font-size:8px;line-height:1.4}
.business-field-wide{grid-column:1/-1}
.business-record-form>.modal-actions{margin-top:16px}
.business-order-detail-modal{width:min(880px,calc(100vw - 28px));max-height:calc(100dvh - 28px);overflow:auto}
.business-order-detail-modal h4{margin:16px 0 7px;color:var(--text);font-size:10px}
.business-order-summary,.business-customer-details{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:10px;border:1px solid var(--line-soft);border-radius:11px;background:var(--panel-2)}
.business-order-summary>span,.business-customer-details>span{display:grid;gap:5px;min-width:0;color:var(--muted);font-size:8px}
.business-order-summary strong,.business-customer-details strong{color:var(--text);font-size:9px;overflow-wrap:anywhere}
.business-customer-details{grid-template-columns:repeat(2,minmax(0,1fr));margin-top:12px}
.business-customer-details>span:last-child{grid-column:1/-1}
@media(max-width:1000px){.business-stat-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.business-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.business-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.business-toolbar{align-items:flex-start;flex-direction:column}.business-toolbar-controls{width:100%;justify-content:flex-start}.business-toolbar-controls .primary-btn{margin-left:auto}.business-search{width:100%;max-width:none;flex:1 1 100%}.business-table{min-width:780px}.business-heading-actions{flex-direction:column;align-items:stretch}.business-heading-actions>*{min-height:34px}}
@media(max-width:520px){.tenant-workspace-switch{padding-inline:8px}.tenant-switch-select{max-width:125px;font-size:8px}.business-context-bar{align-items:flex-start;padding:11px}.business-context-id{max-width:104px;font-size:8px}.business-stat-grid{gap:7px}.business-stat{min-height:88px;padding:11px}.business-stat>strong{font-size:18px}.business-quick-actions{grid-template-columns:1fr 1fr;gap:7px}.business-quick-card{padding:10px}.business-toolbar-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.business-toolbar-controls .primary-btn{grid-column:1/-1;width:100%;justify-content:center;margin:0}.business-toolbar-controls .select-compact{width:100%;min-width:0}.business-search{grid-column:1/-1}.business-form-modal,.business-order-detail-modal{width:calc(100vw - 18px);max-height:calc(100dvh - 18px);padding:14px}.business-form-grid{grid-template-columns:1fr;gap:9px}.business-field-wide{grid-column:auto}.business-order-summary,.business-customer-details{grid-template-columns:repeat(2,minmax(0,1fr))}.business-order-summary>span:first-child{grid-column:1/-1}.business-tabs{margin-inline:-2px}.business-tab{padding-inline:10px}}

/* Notifications, saved preferences, and mobile-first license cards. */
.top-actions { position: relative; }
.notification { display: inline-flex !important; position: relative; align-items: center; justify-content: center; }
.notification-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; display: grid; place-items: center; border: 2px solid var(--panel); border-radius: 999px; background: #e36b79; color: #fff; font: 700 9px/1 var(--sans); }
.notification-badge[hidden], .notification-panel[hidden] { display: none !important; }
.notification-panel { position: absolute; z-index: 80; top: calc(100% + 10px); right: 43px; width: min(390px, calc(100vw - 28px)); max-height: min(520px, calc(100dvh - 90px)); padding: 0; overflow: hidden; box-shadow: 0 20px 60px #0007; }
.notification-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; border-bottom: 1px solid var(--line); }
.notification-panel-head > div, .notification-item > span, .preference-row > span, .help-api-base > span { min-width: 0; display: grid; gap: 4px; }
.notification-panel-head strong, .notification-item strong, .preference-row strong, .help-guide-list strong { color: var(--text); font-size: 11px; }
.notification-panel-head small, .notification-item small, .notification-detail, .preference-row small, .preference-save-status { color: var(--muted); font-size: 10px; line-height: 1.45; }
.notification-list { max-height: min(390px, calc(100dvh - 190px)); overflow: auto; }
.notification-item { width: 100%; display: grid; grid-template-columns: 8px minmax(0, 1fr); gap: 10px; padding: 13px 16px; border: 0; border-bottom: 1px solid var(--line-soft); background: transparent; color: var(--text); text-align: left; cursor: pointer; }
.notification-item:hover { background: var(--panel-2); }
.notification-item > i { width: 7px; height: 7px; margin-top: 5px; border-radius: 50%; background: transparent; }
.notification-item.is-unread > i { background: var(--mint); box-shadow: 0 0 10px color-mix(in srgb, var(--mint) 50%, transparent); }
.notification-item > span { gap: 4px; }
.notification-detail { overflow-wrap: anywhere; }
.notification-footer { width: 100%; display: flex; justify-content: space-between; padding: 12px 16px; border: 0; background: var(--panel-2); color: var(--mint); font-size: 11px; cursor: pointer; }
.filter-presets { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; padding: 10px 14px; margin: -5px 0 14px; border-radius: 13px; }
.filter-presets > label { color: var(--muted); font-size: 11px; font-weight: 650; }
.filter-presets > select { min-width: 190px; flex: 1 1 220px; }
.filter-presets .outline-btn { min-height: 38px; }
.filter-presets .text-btn:disabled { opacity: .45; cursor: not-allowed; }
.license-view-mode { max-width: 150px; }
.license-card-list { display: none; }
.license-mobile-select-all { display: none; padding: 12px 14px 0; }
.license-mobile-select-all .check { display: inline-flex; align-items: center; gap: 7px; }
.license-mobile-select-all small { color: var(--muted); font-size: 10px; }
.license-panel[data-list-view="cards"] #license-table-scroll { display: none; }
.license-panel[data-list-view="cards"] .license-card-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 14px; }
.license-panel[data-list-view="cards"] .license-mobile-select-all { display: block; }
.license-mobile-card { min-width: 0; padding: 15px; border: 1px solid var(--line); border-radius: 15px; background: color-mix(in srgb, var(--panel-2) 72%, transparent); }
.license-mobile-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.license-mobile-card-head .check { display: inline-flex; align-items: center; gap: 7px; }
.license-mobile-card-head .check small { color: var(--muted); font-size: 10px; }
.license-mobile-code { min-width: 0; margin: 13px 0; padding: 11px; border-radius: 10px; background: color-mix(in srgb, var(--panel) 80%, transparent); }
.license-mobile-code .license-code { display: block; overflow-wrap: anywhere; word-break: break-word; color: var(--text); font: 700 12px/1.5 var(--mono); }
.license-mobile-code .license-code.is-plaintext { color: var(--mint); }
.license-mobile-code p { margin: 6px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.license-mobile-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px 14px; }
.license-mobile-meta > div { min-width: 0; display: grid; gap: 4px; }
.license-mobile-meta small { color: var(--muted); font-size: 9px; }
.license-mobile-meta strong { min-width: 0; color: var(--text); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; font-weight: 600; }
.license-mobile-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; padding-top: 11px; border-top: 1px solid var(--line-soft); }
.license-mobile-actions .row-action { min-height: 34px; padding: 0 9px; }
.license-cards-empty { grid-column: 1 / -1; padding: 28px 10px; text-align: center; }
.preference-card { display: grid; gap: 4px; }
.preference-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); cursor: pointer; }
.preference-row:last-of-type { border-bottom: 0; }
.preference-row strong { font-weight: 650; }
.preference-row select { flex: 0 0 150px; min-height: 38px; }
.preference-save-status { margin: 5px 0 0; }
:root[data-density="compact"] .data-table th, :root[data-density="compact"] .data-table td { padding-block: 9px; }
:root[data-density="compact"] .license-mobile-card { padding: 11px; }
:root[data-density="compact"] .license-mobile-meta { gap: 8px 12px; }
.help-modal { width: min(100%, 650px); }
.help-api-base { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); }
.help-api-base small { color: var(--muted); font-size: 9px; }
.help-api-base code { max-width: 100%; color: var(--mint); font: 11px var(--mono); overflow-wrap: anywhere; }
.help-guide-list { display: grid; gap: 9px; max-height: min(52vh, 450px); overflow: auto; margin-top: 13px; }
.help-guide-list article { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 11px; padding: 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: color-mix(in srgb, var(--panel-2) 55%, transparent); }
.help-guide-list article > span { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; background: color-mix(in srgb, var(--mint) 14%, transparent); color: var(--mint); font: 700 10px var(--mono); }
.help-guide-list p { margin: 5px 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.help-guide-list .text-btn { min-height: 28px; padding: 0; color: var(--mint); font-size: 10px; }
@media (max-width: 760px) {
  .license-panel[data-list-view="cards"] .license-card-list { grid-template-columns: 1fr; padding: 10px; }
  .filter-presets { gap: 7px; padding: 9px; }
  .filter-presets > label { width: 100%; }
  .filter-presets > select { flex: 1 1 100%; min-width: 0; }
  .filter-presets .outline-btn, .filter-presets .text-btn { flex: 1 1 calc(50% - 6px); min-height: 40px; }
  .notification-panel { right: 40px; }
}
@media (max-width: 640px) {
  .notification { display: inline-flex !important; }
  .notification-panel { position: fixed; top: calc(58px + env(safe-area-inset-top)); right: 12px; width: calc(100vw - 24px); }
  .license-panel[data-list-view="cards"] .license-card-list { grid-template-columns: 1fr; }
  .preference-row { align-items: flex-start; flex-direction: column; gap: 8px; }
  .preference-row select { width: 100%; flex-basis: auto; }
  .help-modal { max-height: calc(100dvh - 20px); }
}
@media (max-width: 520px) {
  .team-acl-modal { width: calc(100vw - 18px); max-height: calc(100dvh - 18px); padding: 15px; }
  .team-acl-row { align-items: stretch; flex-direction: column; gap: 9px; }
  .team-acl-row select { flex: 0 0 auto; width: 100%; }
  .team-acl-tools > span { flex: 0 0 100%; }
  .team-acl-tools .row-action { flex: 1 1 calc(50% - 6px); }
}
.notification[hidden] { display: none !important; }
.notification-head-actions { display: flex; align-items: center; gap: 9px; }
.notification-head-actions .text-btn { min-height: 30px; padding-inline: 5px; font-size: 10px; }
.notification-preference input { width: 19px; height: 19px; accent-color: var(--mint); flex: 0 0 auto; }
.help-modal { overflow-y: auto; }
