:root {
  color-scheme: dark;
  --bg: #090909;
  --panel: #111111;
  --panel-raised: #171717;
  --panel-hover: #1d1d1d;
  --border: #292929;
  --border-light: #363636;
  --text: #f2f2f2;
  --muted: #929292;
  --soft: #c4c4c4;
  --white: #fff;
  --danger: #d3a5a5;
  --success: #c2cec2;
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--text); background-color: var(--bg); background-image: linear-gradient(rgba(9, 9, 9, .56), rgba(9, 9, 9, .68)), url("/brand-background.png"); background-position: center; background-repeat: no-repeat; background-size: 100% 100%, min(100vw, 680px) auto; background-attachment: fixed; font-size: 14px; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid #d5d5d5; outline-offset: 2px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 0 0 auto; z-index: 3; display: flex; flex-direction: column; width: 250px; padding: 28px 18px 18px; border-left: 1px solid var(--border); background: #0c0c0c; }
.brand { display: flex; align-items: center; gap: 12px; margin: 0 8px 42px; color: var(--text); text-decoration: none; }
.brand b { display: block; font-size: 16px; letter-spacing: .3px; }
.brand small { display: block; margin-top: 3px; color: #777; font-size: 9px; letter-spacing: 1.5px; }
.brand-mark { display: grid; width: 54px; height: 54px; place-items: center; border: 1px solid #4b4b4b; border-radius: 17px; background: linear-gradient(145deg, #303030, #101010); color: #fff; font-weight: 700; letter-spacing: -1px; box-shadow: inset 0 1px rgba(255,255,255,.13), 0 10px 24px #0008; }
.brand-mark.small { width: 43px; height: 43px; border-radius: 14px; font-size: 13px; }
.side-label, .eyebrow { color: #858585; font-size: 10px; font-weight: 600; letter-spacing: 1.4px; }
.side-label { margin: 0 12px 12px; }
.navigation { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 13px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #999; text-align: right; cursor: pointer; transition: .18s ease; }
.nav-link:hover { background: #161616; color: #eee; }
.nav-link.active { border-color: #303030; background: linear-gradient(90deg, #1a1a1a, #111); color: #fff; box-shadow: inset -2px 0 #ddd; }
.nav-icon { display: inline-grid; width: 20px; place-items: center; color: #aaa; font-size: 17px; }
.sidebar-footer { display: grid; gap: 12px; margin-top: auto; }
.security-note { display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--border); border-radius: 11px; color: #d0d0d0; font-size: 12px; }
.security-note small { color: #777; }
.status-dot, .live-pill i { display: inline-block; flex: 0 0 auto; width: 7px; height: 7px; border-radius: 50%; background: #cfcfcf; box-shadow: 0 0 10px #ddd6; }
.logout-button { color: #888; }

.main-content { max-width: 1600px; min-height: 100vh; margin-right: 250px; padding: 30px clamp(22px, 4vw, 58px) 20px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 29px; padding: 0 0 24px; border-bottom: 1px solid var(--border); }
.topbar h1 { margin: 3px 0 0; font-size: 27px; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }
.live-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #303030; border-radius: 99px; color: #bcbcbc; font-size: 11px; }
.live-pill i { width: 6px; height: 6px; }
.live-pill.offline { border-color: #514040; color: #d3a5a5; }
.live-pill.offline i { background: #b87e7e; box-shadow: 0 0 10px #b87e7e66; }
.icon-button { display: inline-grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); color: #bbb; cursor: pointer; font-size: 18px; }
.icon-button:hover { border-color: #555; color: white; }
.page-section { display: none; animation: appear .2s ease; }
.page-section.active { display: block; }
@keyframes appear { from { opacity: .4; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }

.welcome-panel { position: relative; display: flex; min-height: 188px; align-items: center; justify-content: space-between; overflow: hidden; margin-bottom: 20px; padding: 30px 34px; border: 1px solid #303030; border-radius: 17px; background: radial-gradient(ellipse at 86% 12%, #40404066, transparent 34%), linear-gradient(115deg, #191919, #0d0d0d 72%); }
.welcome-panel h2 { margin: 10px 0 7px; font-size: 24px; }
.welcome-panel p { margin: 0; color: var(--muted); }
.welcome-decoration { position: absolute; left: 7%; width: 150px; height: 150px; border: 1px solid #ffffff19; border-radius: 24px; background: url("/brand-background.png") center / cover no-repeat; opacity: .8; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 36px; }
.stat-card { position: relative; overflow: hidden; min-height: 137px; padding: 19px; border: 1px solid var(--border); border-radius: 13px; background: linear-gradient(150deg, #171717, #101010); }
.stat-label { display: block; color: #aaa; font-size: 12px; }
.stat-card strong { display: block; margin: 10px 0 4px; font-size: 31px; font-weight: 600; letter-spacing: .4px; }
.stat-card small { color: #777; font-size: 11px; }
.stat-icon { position: absolute; top: 16px; left: 17px; display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #373737; border-radius: 9px; background: #ffffff08; color: #ccc; font-size: 15px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 30px 0 16px; }
.section-heading h2 { margin: 4px 0 3px; font-size: 19px; font-weight: 600; }
.section-heading p { margin: 4px 0 0; }
.section-actions { display: flex; align-items: center; gap: 8px; }
.muted { color: var(--muted); font-size: 12px; }
.button { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; gap: 9px; padding: 8px 14px; border: 1px solid var(--border-light); border-radius: 9px; background: #1a1a1a; color: #eee; cursor: pointer; transition: .16s ease; white-space: nowrap; }
.button:hover { border-color: #666; background: #242424; }
.button-primary { border-color: #ddd; background: #ededed; color: #101010; font-weight: 600; }
.button-primary:hover { border-color: white; background: white; }
.button-quiet { border-color: transparent; background: transparent; color: #aaa; }
.button-danger { border-color: #514040; color: var(--danger); }
.button-small { min-height: 30px; padding: 5px 9px; font-size: 11px; }

.table-wrap { overflow: auto; border: 1px solid var(--border); border-radius: 12px; background: #101010; }
table { width: 100%; min-width: 740px; border-collapse: collapse; text-align: right; }
th { padding: 13px 15px; border-bottom: 1px solid var(--border); background: #151515; color: #818181; font-size: 10px; font-weight: 500; white-space: nowrap; }
td { padding: 14px 15px; border-bottom: 1px solid #202020; color: #d3d3d3; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #ffffff04; }
.code { color: #f0f0f0; font-family: ui-monospace, Consolas, monospace; }
.subtle-id { color: #aaa; direction: ltr; unicode-bidi: plaintext; }
.table-subline { display: block; margin-top: 3px; color: #777; font-size: 10px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border: 1px solid #393939; border-radius: 99px; color: #d0d0d0; font-size: 10px; white-space: nowrap; }
.status-badge::before { width: 5px; height: 5px; border-radius: 50%; background: #ddd; content: ""; }
.status-badge.expired { border-color: #473b3b; color: #c89b9b; }
.status-badge.expired::before { background: #b87e7e; }
.empty-state { padding: 35px 15px; color: #777; text-align: center; }
.row-actions { display: flex; gap: 5px; }

.toolbar { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; }
.search-box { display: flex; width: min(390px, 100%); align-items: center; gap: 8px; padding: 0 11px; border: 1px solid var(--border); border-radius: 9px; background: #111; color: #888; }
.search-box input { width: 100%; height: 39px; border: 0; outline: 0; background: transparent; color: #eee; }
.toolbar select, input, .form-panel select, .bot-card select { min-height: 39px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #141414; color: var(--text); }
.toolbar select { color: #aaa; }
.form-panel, .shortcut-panel { margin: 15px 0; padding: 20px; border: 1px solid var(--border); border-radius: 13px; background: linear-gradient(135deg, #171717, #101010); }
.hidden { display: none !important; }
.form-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.form-heading h3 { margin: 0 0 4px; }
.form-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 12px; }
.form-grid label, .bot-card label { display: grid; gap: 7px; color: #a9a9a9; font-size: 11px; }
.form-grid input, .bot-card input, .bot-card select { width: 100%; color: #eee; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 17px; }

.notice { display: flex; align-items: flex-start; gap: 10px; margin: 15px 0; padding: 12px 14px; border: 1px solid #303030; border-radius: 10px; background: #151515; color: #bbb; }
.notice > span { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border: 1px solid #555; border-radius: 50%; color: #ddd; font-size: 11px; }
.notice p { margin: 1px 0; font-size: 11px; line-height: 1.8; }
.bot-overview { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 15px 0; }
.bot-overview-card { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 13px 15px; border: 1px solid var(--border); border-radius: 11px; background: #121212; }
.bot-overview-card span { color: #aaa; font-size: 11px; }
.bot-overview-card strong { font-size: 21px; font-weight: 600; }
.bot-toolbar { display: flex; align-items: center; gap: 10px; margin: 14px 0; }
.bot-toolbar .search-box { flex: 1; }
.bot-toolbar select { min-height: 39px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #141414; color: var(--text); }
.bot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 13px; }
.bot-card { min-width: 0; padding: 17px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(140deg, #171717, #101010); }
.bot-card-offline { border-color: #413737; }
.bot-card-head { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.bot-avatar { display: grid; width: 40px; height: 40px; flex: 0 0 auto; place-items: center; border: 1px solid #3b3b3b; border-radius: 13px; background: #222; color: #e5e5e5; font-weight: 600; }
.bot-identity { min-width: 0; }
.bot-card-head strong { display: block; max-width: 220px; overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.bot-card-head small { display: block; margin-top: 3px; color: #888; font-size: 10px; }
.bot-state { margin-right: auto; }
.bot-meta { display: grid; gap: 7px; padding: 10px 11px; border: 1px solid #242424; border-radius: 9px; background: #0c0c0c; }
.bot-meta span { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; color: #888; font-size: 10px; }
.bot-meta code { overflow: hidden; color: #bdbdbd; direction: ltr; font-size: 10px; text-overflow: ellipsis; }
.bot-playback { display: grid; gap: 10px; margin-top: 11px; padding: 12px; border: 1px solid #a99aff26; border-radius: 12px; background: linear-gradient(145deg, #a99aff0b, #ffffff03); }
.bot-playback-track { display: grid; min-width: 0; gap: 3px; }
.bot-playback-track .eyebrow { font-size: 8px; }
.bot-playback-track strong, .bot-playback-track small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-playback-track strong { color: #f0effa; font-size: 12px; }
.bot-playback-track small { color: #9297ad; font-size: 10px; }
.bot-playback-meta { display: flex; flex-wrap: wrap; gap: 7px; color: #a7abc0; font-size: 9px; }
.bot-playback-meta span { padding: 3px 7px; border: 1px solid #ffffff0d; border-radius: 99px; background: #ffffff05; }
.bot-playback-actions, .bot-playback-options, .bot-seek-control { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.bot-playback-options label, .bot-seek-control label { display: flex; min-width: 115px; flex: 1 1 125px; align-items: center; gap: 8px; color: #aeb2c4; font-size: 10px; }
.bot-playback-options input[type="range"], .bot-seek-control input[type="range"] { min-width: 60px; height: 20px; flex: 1; accent-color: var(--accent-strong); }
.bot-playback-options select { min-width: 80px; min-height: 31px; padding: 4px 7px; font-size: 10px; }
.bot-playback-offline { color: #858aa0; font-size: 10px; line-height: 1.8; }
.bot-quick-actions { display: flex; flex-wrap: wrap; gap: 7px; margin: 10px 0 15px; }
.bot-quick-actions .button { min-height: 32px; }
.bot-card input:disabled { cursor: not-allowed; opacity: .55; }
.bot-form { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.bot-form .wide { grid-column: 1 / -1; }
.bot-form-actions { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 8px; padding-top: 4px; }
.bot-form-actions .check-label { display: flex; align-items: center; gap: 7px; color: #aaa; }
.bot-form-actions .check-label input { width: auto; min-height: auto; accent-color: #ddd; }

.analytics-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.analytics-card, .health-card { display: flex; min-width: 0; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: linear-gradient(145deg, #171717, #101010); }
.analytics-card { display: grid; gap: 5px; }
.analytics-card span, .health-card small { color: #999; font-size: 11px; }
.analytics-card strong { font-size: 25px; font-weight: 600; }
.analytics-card small { color: #777; font-size: 10px; }
.expiry-chart { display: grid; gap: 15px; }
.expiry-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(100px, 3fr) 42px; align-items: center; gap: 13px; border: 0; background: transparent; color: inherit; text-align: right; }
.expiry-label { display: flex; justify-content: space-between; gap: 8px; color: #aaa; font-size: 11px; }
.expiry-label strong { color: #eee; }
.expiry-track { height: 10px; overflow: hidden; border-radius: 99px; background: #252525; }
.expiry-fill { display: block; height: 100%; min-width: 0; border-radius: inherit; background: #b5b5b5; }
.expiry-fill.expired { background: #775c5c; }
.expiry-fill.urgent { background: #d3a5a5; }
.expiry-fill.soon { background: #c7b38c; }
.expiry-fill.later { background: #91aa98; }
.expiry-row > small { color: #777; text-align: left; }
.health-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin: 16px 0 28px; }
.health-card { min-height: 78px; }
.health-card div { display: grid; gap: 5px; min-width: 0; }
.health-card strong { overflow: hidden; font-size: 13px; font-weight: 500; text-overflow: ellipsis; white-space: nowrap; }
.health-indicator { width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; }
.health-indicator.healthy { background: #a9c5ad; box-shadow: 0 0 12px #a9c5ad44; }
.health-indicator.unhealthy { background: #bf8585; box-shadow: 0 0 12px #bf858544; }

.shortcut-row { display: grid; grid-template-columns: 1fr 1fr auto auto; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #262626; }
.shortcut-row:last-child { border-bottom: 0; }
.shortcut-row input, .shortcut-row select { width: 100%; }
.switch { position: relative; width: 34px; height: 19px; border: 1px solid #4a4a4a; border-radius: 99px; background: #242424; cursor: pointer; }
.switch::after { position: absolute; top: 3px; right: 3px; width: 11px; height: 11px; border-radius: 50%; background: #777; content: ""; transition: .15s ease; }
.switch.on { background: #ddd; }
.switch.on::after { right: 18px; background: #111; }
.remove-shortcut { width: 31px; height: 31px; border: 1px solid #3c3030; border-radius: 8px; background: transparent; color: #c49a9a; cursor: pointer; }

.appearance-panel { display: grid; max-width: 720px; gap: 12px; }
.appearance-panel > label { color: #aaa; font-size: 12px; }
.appearance-controls { display: flex; align-items: center; gap: 10px; }
.appearance-controls input[type="color"] { width: 52px; height: 42px; padding: 4px; border: 1px solid var(--border-light); border-radius: 9px; background: var(--panel); cursor: pointer; }
.appearance-controls input[type="text"] { width: 145px; direction: ltr; text-align: center; font-family: ui-monospace, Consolas, monospace; }
.color-presets { display: flex; flex-wrap: wrap; gap: 9px; }
.color-preset { width: 28px; height: 28px; border: 2px solid #ffffff44; border-radius: 50%; background: #0b0e0e; cursor: pointer; }
.color-preset[data-color="#5865f2" i] { background: #5865f2; }
.color-preset[data-color="#22a06b" i] { background: #22a06b; }
.color-preset[data-color="#e67e22" i] { background: #e67e22; }
.color-preset[data-color="#e84393" i] { background: #e84393; }
.color-preset[data-color="#e74c3c" i] { background: #e74c3c; }
.color-preset[data-color="#3498db" i] { background: #3498db; }
.color-preset[data-color="#9b59b6" i] { background: #9b59b6; }
.color-preset:hover { outline: 2px solid #fff; outline-offset: 2px; }
.embed-preview { display: grid; gap: 8px; max-width: 480px; padding: 17px 19px; border: 1px solid #ffffff26; border-right: 5px solid #0b0e0e; border-radius: 11px; background: #101010; }
.embed-preview[data-color="#5865f2" i] { border-right-color: #5865f2; }
.embed-preview[data-color="#22a06b" i] { border-right-color: #22a06b; }
.embed-preview[data-color="#e67e22" i] { border-right-color: #e67e22; }
.embed-preview[data-color="#e84393" i] { border-right-color: #e84393; }
.embed-preview[data-color="#e74c3c" i] { border-right-color: #e74c3c; }
.embed-preview[data-color="#3498db" i] { border-right-color: #3498db; }
.embed-preview[data-color="#9b59b6" i] { border-right-color: #9b59b6; }
.embed-preview span, .embed-preview small { color: var(--muted); font-size: 11px; }
.embed-preview strong { font-size: 14px; }

.audit-list { display: grid; gap: 9px; }
.audit-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--border); border-radius: 10px; background: #121212; }
.audit-icon { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid #3a3a3a; border-radius: 10px; color: #d1d1d1; }
.audit-item strong { display: block; font-size: 12px; }
.audit-item small { color: #818181; font-size: 10px; }
.audit-time { color: #888; font-size: 10px; white-space: nowrap; }
.footer { display: flex; justify-content: space-between; margin-top: 42px; padding: 15px 0 5px; border-top: 1px solid #202020; color: #606060; font-size: 9px; letter-spacing: .8px; }
.toast { position: fixed; right: 50%; bottom: 24px; z-index: 8; max-width: min(90vw, 480px); padding: 12px 18px; border: 1px solid #444; border-radius: 10px; background: #e8e8e8; color: #111; opacity: 0; pointer-events: none; transform: translate(50%, 12px); transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(50%, 0); }
.toast.error { border-color: #684848; background: #2a1c1c; color: #f0dada; }

.login-page { display: grid; min-height: 100vh; place-items: center; padding: 20px; }
.login-card { width: min(420px, 100%); padding: 32px; border: 1px solid #333; border-radius: 18px; background: linear-gradient(145deg, #171717, #0e0e0e); box-shadow: 0 24px 80px #0008; }
.login-card .brand-mark { margin-bottom: 24px; }
.login-card h1 { margin: 5px 0; font-size: 27px; }
.login-card > .muted { margin: 8px 0 24px; }
.login-card form { display: grid; gap: 10px; }
.login-card form label { color: #aaa; font-size: 12px; }
.login-card input { height: 43px; }
.full-width { width: 100%; margin-top: 6px; }
.oauth-button { text-decoration: none; }
.oauth-button.disabled { cursor: not-allowed; opacity: .48; pointer-events: none; }
.form-error { min-height: 17px; margin: 0; color: #d29d9d; font-size: 11px; }
.login-card .security-note { margin-top: 13px; }
.customer-page { padding: 28px 18px; }
.customer-shell { width: min(920px, 100%); margin: 0 auto; }
.customer-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.customer-header h1 { margin: 4px 0; font-size: 28px; }
.customer-card { margin-bottom: 16px; padding: 24px; border: 1px solid var(--border); border-radius: 14px; background: linear-gradient(145deg, #171717, #0f0f0f); }
.customer-card h2 { margin: 0 0 10px; }
.customer-login-form { display: grid; max-width: 460px; gap: 12px; margin: 18px 0; }
.customer-login-form label { display: grid; gap: 7px; color: #aaa; font-size: 12px; }
.customer-login-form input { width: 100%; color: #eee; }
.customer-login-form button { justify-self: start; min-width: 160px; }
.customer-subscription { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.customer-subscription h2 { margin: 4px 0; }
.customer-bots { display: grid; gap: 14px; margin-top: 18px; }
.customer-bot { padding: 18px; border: 1px solid var(--border); border-radius: 12px; background: #111; }
.customer-bot-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.customer-bot > .muted { font-size: 12px; }
.customer-bot-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.customer-bot-form label { display: grid; gap: 7px; color: #aaa; font-size: 12px; }
.customer-bot-form input { width: 100%; color: #eee; }
.customer-bot-form .customer-clear-channel { display: flex; align-items: center; gap: 8px; }
.customer-bot-form .customer-clear-channel input { width: auto; min-height: auto; accent-color: #ddd; }
.customer-bot-form button { align-self: end; }
.customer-expiry { margin: 20px 0 0; font-size: 12px; }
.customer-page .form-error { min-height: 20px; margin: 12px 0; }
.customer-page .form-error.error { color: #d29d9d; }

@media (max-width: 980px) {
  .sidebar { width: 210px; }
  .main-content { margin-right: 210px; padding-inline: 22px; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analytics-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .sidebar { position: sticky; inset: 0 0 auto; width: 100%; height: auto; padding: 10px 12px; border-left: 0; border-bottom: 1px solid var(--border); }
  .brand { margin: 0 4px 10px; }
  .brand-mark.small { width: 35px; height: 35px; border-radius: 11px; }
  .side-label, .sidebar-footer { display: none; }
  .navigation { display: flex; gap: 5px; overflow-x: auto; }
  .nav-link { flex: 0 0 auto; width: auto; gap: 6px; padding: 8px 10px; font-size: 11px; }
  .nav-icon { width: auto; font-size: 14px; }
  .main-content { margin: 0; padding: 20px 13px; }
  .topbar { margin-bottom: 18px; padding-bottom: 17px; }
  .topbar h1 { font-size: 22px; }
  .live-pill { padding: 7px 9px; font-size: 9px; }
  .welcome-panel { min-height: 160px; padding: 23px 20px; }
  .welcome-panel h2 { max-width: 250px; font-size: 19px; }
  .welcome-panel p { max-width: 260px; font-size: 11px; line-height: 1.8; }
  .welcome-decoration { left: -25px; width: 90px; height: 90px; opacity: .7; }
  .stats-grid { gap: 8px; margin-bottom: 28px; }
  .analytics-summary, .health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .analytics-card { padding: 12px; }
  .analytics-card strong { font-size: 21px; }
  .expiry-row { grid-template-columns: 1fr minmax(60px, 1.4fr) 32px; gap: 8px; }
  .expiry-label { flex-direction: column; gap: 2px; font-size: 10px; }
  .health-card { gap: 8px; padding: 11px; }
  .health-card strong { font-size: 11px; }
  .stat-card { min-height: 118px; padding: 13px; }
  .stat-card strong { font-size: 27px; }
  .stat-icon { top: 11px; left: 11px; width: 26px; height: 26px; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 16px; }
  .section-heading > .button { min-height: 34px; padding-inline: 9px; font-size: 10px; }
  .section-actions { align-items: flex-end; flex-direction: column; }
  .form-grid, .bot-grid { grid-template-columns: 1fr; }
  .bot-overview { gap: 6px; }
  .bot-overview-card { align-items: flex-start; flex-direction: column-reverse; gap: 4px; padding: 10px; }
  .bot-overview-card span { font-size: 9px; }
  .bot-toolbar { align-items: stretch; flex-direction: column; }
  .bot-toolbar select { width: 100%; }
  .toolbar { align-items: stretch; }
  .search-box { flex: 1; }
  .toolbar select { max-width: 105px; }
  .bot-form { grid-template-columns: 1fr; }
  .bot-form .wide, .bot-form-actions { grid-column: auto; }
  .shortcut-row { grid-template-columns: 1fr 1fr auto; }
  .shortcut-row .switch { grid-column: 2; justify-self: start; }
  .remove-shortcut { grid-column: 3; grid-row: 1; }
  .customer-bot-form { grid-template-columns: 1fr; }
  .appearance-controls { flex-wrap: wrap; }
  .customer-card { padding: 17px; }
  .audit-item { grid-template-columns: 32px 1fr; }
  .audit-time { grid-column: 2; }
  .footer { gap: 12px; font-size: 8px; }
}

:root {
  --bg: #090a12;
  --panel: #11131e;
  --panel-raised: #171a28;
  --panel-hover: #202437;
  --border: #262a3b;
  --border-light: #343950;
  --text: #f3f2fb;
  --muted: #9297ad;
  --soft: #c4c6d6;
  --accent: #a99aff;
  --accent-strong: #8d7bff;
  --mint: #72e0cb;
  --danger: #ff9fba;
  --success: #72e0cb;
  font-feature-settings: "ss01" on;
  scrollbar-color: #3a3d54 #0b0c14;
}

body {
  overflow-x: hidden;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse at 12% 8%, #6555bf20, transparent 30rem),
    radial-gradient(ellipse at 88% 40%, #329b9a11, transparent 30rem),
    linear-gradient(135deg, #090a12, #0c0e18 55%, #090b13);
  background-size: auto;
  background-attachment: fixed;
  color: var(--text);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: linear-gradient(#ffffff04 1px, transparent 1px), linear-gradient(90deg, #ffffff04 1px, transparent 1px);
  background-size: 56px 56px;
  content: "";
  mask-image: linear-gradient(to bottom, #0008, transparent 82%);
  pointer-events: none;
}

::selection { background: #8d7bff66; color: #fff; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline-color: var(--accent); }

.sidebar {
  border-color: #ffffff10;
  background: linear-gradient(180deg, #11131ef2, #0c0e17f5);
  box-shadow: 20px 0 70px #0002;
  backdrop-filter: blur(18px);
}

.brand { gap: 13px; margin-bottom: 38px; }
.brand-mark.small {
  width: 43px;
  height: 43px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  box-shadow: 0 8px 26px #8d7bff22;
  object-fit: cover;
}
.brand b { font-size: 15px; letter-spacing: .1px; }
.brand small { color: #777e96; font-size: 8px; letter-spacing: 1.7px; }
.side-label, .eyebrow { color: #838aa4; }
.nav-link { border-radius: 12px; color: #a2a6b9; }
.nav-link:hover { background: #ffffff08; color: #fff; }
.nav-link.active {
  border-color: #9c8bff28;
  background: linear-gradient(100deg, #8d7bff21, #ffffff06);
  color: #eeebff;
  box-shadow: inset -2px 0 var(--accent);
}
.nav-link.active .nav-icon { color: var(--accent); }
.nav-icon { color: #8790aa; }
.security-note { border-color: #ffffff12; background: #ffffff04; color: #d7d9e7; }
.security-note small { color: #8389a0; }
.status-dot, .live-pill i { background: var(--mint); box-shadow: 0 0 12px #72e0cb88; }

.main-content { max-width: 1700px; padding-top: 27px; }
.topbar { border-color: #ffffff13; }
.topbar h1 { font-size: clamp(24px, 2vw, 30px); letter-spacing: -.5px; }
.topbar-actions { gap: 10px; }
.command-trigger {
  display: inline-flex;
  min-width: 182px;
  height: 39px;
  align-items: center;
  gap: 9px;
  padding: 0 10px;
  border: 1px solid #ffffff14;
  border-radius: 11px;
  background: #ffffff05;
  color: #aeb2c4;
  cursor: pointer;
  font-size: 11px;
  text-align: right;
  transition: .18s ease;
}
.command-trigger:hover { border-color: #a99aff70; background: #a99aff0d; color: #f4f1ff; }
.command-trigger-icon { color: var(--accent); font-size: 19px; line-height: 1; }
kbd {
  display: inline-grid;
  min-width: 22px;
  min-height: 20px;
  place-items: center;
  padding: 1px 5px;
  border: 1px solid #ffffff19;
  border-radius: 5px;
  background: #ffffff08;
  color: #9ca2bb;
  font: 10px ui-monospace, Consolas, monospace;
}
.command-trigger kbd { margin-right: auto; }
.live-pill {
  border-color: #72e0cb28;
  background: #72e0cb08;
  color: #b7d9d4;
}
.icon-button {
  border-color: #ffffff15;
  border-radius: 11px;
  background: #ffffff07;
  color: #c6c8d8;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.icon-button:hover { transform: translateY(-1px); border-color: #a99aff70; background: #a99aff12; color: #fff; }

.welcome-panel {
  min-height: 210px;
  margin-bottom: 18px;
  border-color: #a99aff2a;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 82% 10%, #a99aff25, transparent 35%),
    radial-gradient(ellipse at 100% 100%, #72e0cb12, transparent 42%),
    linear-gradient(115deg, #171827, #10121e 68%, #11141e);
  box-shadow: 0 22px 65px #0002, inset 0 1px #ffffff0b;
}
.welcome-panel h2 { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -.7px; }
.welcome-panel p { color: #a1a6bc; font-size: 13px; }
.welcome-decoration {
  position: relative;
  left: auto;
  display: grid;
  width: 126px;
  height: 126px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #ffffff12;
  border-radius: 32px;
  background: linear-gradient(145deg, #ffffff0b, #ffffff02);
  box-shadow: 0 22px 60px #0003, inset 0 1px #ffffff0b;
  opacity: 1;
  transform: rotate(-5deg);
}
.welcome-decoration img { width: 84px; height: 84px; filter: drop-shadow(0 10px 24px #8d7bff42); }
.stats-grid { gap: 14px; margin-bottom: 32px; }
.stat-card {
  min-height: 144px;
  border-color: #ffffff12;
  border-radius: 16px;
  background: linear-gradient(145deg, #171a29e8, #10121de8);
  box-shadow: inset 0 1px #ffffff09, 0 15px 40px #00012;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.stat-card:hover { transform: translateY(-3px); border-color: #a99aff45; box-shadow: inset 0 1px #ffffff0e, 0 20px 44px #0003; }
.stat-card strong { color: #f5f2ff; font-size: 34px; }
.stat-label { color: #b3b7c9; }
.stat-card small { color: #8389a1; }
.stat-icon {
  border-color: #a99aff30;
  border-radius: 11px;
  background: #a99aff10;
  color: var(--accent);
}

.section-heading { margin-top: 32px; }
.section-heading h2 { letter-spacing: -.25px; }
.section-heading p { line-height: 1.8; }
.button { border-color: #ffffff19; border-radius: 10px; background: #ffffff08; }
.button:hover { border-color: #a99aff70; background: #a99aff12; }
.button-primary {
  border-color: transparent;
  background: linear-gradient(112deg, #b2a5ff, #8877ff 72%, #76dccd);
  box-shadow: 0 8px 22px #8d7bff26;
  color: #10111a;
}
.button-primary:hover { border-color: transparent; background: linear-gradient(112deg, #c0b7ff, #9b8cff 72%, #8de8d9); box-shadow: 0 10px 28px #8d7bff44; }
.button-quiet { color: #afb3c5; }
.button-danger { border-color: #fa9bb22b; color: #f1a3b6; }
.table-wrap, .form-panel, .shortcut-panel, .bot-card, .analytics-card, .health-card, .audit-item, .customer-card {
  border-color: #ffffff12;
  border-radius: 15px;
  background: linear-gradient(145deg, #151725ed, #10121ced);
  box-shadow: 0 16px 42px #00015, inset 0 1px #ffffff08;
}
th { border-color: #ffffff12; background: #1a1d2b; color: #9298b1; }
td { border-color: #ffffff0c; color: #d4d7e5; }
tbody tr:hover { background: #a99aff08; }
.status-badge { border-color: #72e0cb3d; background: #72e0cb0c; color: #95d8cd; }
.status-badge::before { background: var(--mint); }
.status-badge.expired { border-color: #fa9bb233; background: #fa9bb20c; color: #f0a3b7; }
.status-badge.expired::before { background: #f095ae; }
.toolbar select, input, .form-panel select, .bot-card select {
  border-color: #ffffff18;
  border-radius: 10px;
  background: #0c0f19;
  color: #e7e8f1;
}
.search-box { border-color: #ffffff18; border-radius: 11px; background: #0c0f19; }
.search-box:focus-within { border-color: #a99aff85; box-shadow: 0 0 0 3px #a99aff15; }
.form-panel, .shortcut-panel { padding: 22px; }
.bot-card { padding: 19px; }
.bot-card-offline { border-color: #fa9bb23d; }
.bot-avatar { border-color: #a99aff30; background: linear-gradient(145deg, #292741, #171a29); color: #d7d0ff; }
.bot-meta { border-color: #ffffff0e; background: #0b0d17; }
.notice { border-color: #a99aff25; border-radius: 12px; background: #a99aff09; color: #b8bdd1; }
.notice > span { border-color: #a99aff50; color: #beb3ff; }
.analytics-panel, .appearance-panel { box-shadow: 0 18px 48px #0002; }
.expiry-track { background: #24283a; }
.expiry-fill { background: linear-gradient(90deg, #9284ff, #72e0cb); }
.expiry-fill.expired { background: #96707d; }
.expiry-fill.urgent { background: #f095ae; }
.expiry-fill.soon { background: #d9b677; }
.expiry-fill.later { background: #72cbb9; }
.expiry-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  appearance: none;
  border: 0;
  border-radius: 99px;
  background: #24283a;
  color: #9284ff;
}
.expiry-progress::-webkit-progress-bar { border-radius: 99px; background: #24283a; }
.expiry-progress::-webkit-progress-value { border-radius: 99px; background: linear-gradient(90deg, #9284ff, #72e0cb); }
.expiry-progress::-moz-progress-bar { border-radius: 99px; background: linear-gradient(90deg, #9284ff, #72e0cb); }
.expiry-progress.expired { color: #96707d; }
.expiry-progress.expired::-webkit-progress-value, .expiry-progress.expired::-moz-progress-bar { background: #96707d; }
.expiry-progress.urgent { color: #f095ae; }
.expiry-progress.urgent::-webkit-progress-value, .expiry-progress.urgent::-moz-progress-bar { background: #f095ae; }
.expiry-progress.soon { color: #d9b677; }
.expiry-progress.soon::-webkit-progress-value, .expiry-progress.soon::-moz-progress-bar { background: #d9b677; }
.expiry-progress.later { color: #72cbb9; }
.expiry-progress.later::-webkit-progress-value, .expiry-progress.later::-moz-progress-bar { background: #72cbb9; }
.health-indicator.healthy { background: var(--mint); box-shadow: 0 0 14px #72e0cb66; }
.health-indicator.unhealthy { background: #f095ae; box-shadow: 0 0 14px #f095ae55; }
.embed-preview { border-color: #ffffff18; background: #0c0f19; }
.footer { border-color: #ffffff12; color: #777d95; }
.toast { border-color: #d8d1ff44; border-radius: 13px; background: #e8e4ff; box-shadow: 0 12px 40px #0005; }

.palette-backdrop {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: min(17vh, 130px) 18px 24px;
  background: #05060bb8;
  backdrop-filter: blur(12px);
}
.palette-backdrop.hidden { display: none; }
.command-palette {
  width: min(620px, 100%);
  overflow: hidden;
  border: 1px solid #a99aff3b;
  border-radius: 18px;
  background: #11131e;
  box-shadow: 0 32px 100px #0009, 0 0 0 1px #ffffff08 inset;
  animation: palette-in .16s ease-out;
}
@keyframes palette-in { from { opacity: 0; transform: translateY(-8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.palette-search { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border-bottom: 1px solid #ffffff12; color: var(--accent); }
.palette-search > span { font-size: 22px; }
.palette-search input { width: 100%; min-height: 39px; padding: 6px 0; border: 0; outline: 0; background: transparent; color: #f5f3ff; font-size: 14px; }
.palette-search input:focus-visible { outline: 0; }
.palette-caption { display: flex; justify-content: space-between; margin: 0; padding: 12px 18px 7px; color: #8f95ad; font-size: 10px; }
.palette-caption span { color: #69718a; }
.palette-results { display: grid; max-height: min(56vh, 460px); gap: 3px; overflow: auto; padding: 6px 9px 10px; }
.palette-result { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: #dfe1ed; cursor: pointer; text-align: right; }
.palette-result:hover, .palette-result.selected { border-color: #a99aff30; background: #a99aff12; }
.palette-result-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid #a99aff25; border-radius: 10px; background: #a99aff0c; color: #b8adff; }
.palette-result-copy { display: grid; gap: 2px; min-width: 0; }
.palette-result-copy strong { font-size: 12px; font-weight: 600; }
.palette-result-copy small { overflow: hidden; color: #888fa8; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.palette-result kbd { margin-right: auto; }
.palette-empty { padding: 28px 14px; color: #8e94aa; font-size: 12px; text-align: center; }
.palette-footer { display: flex; justify-content: flex-start; gap: 18px; padding: 11px 16px; border-top: 1px solid #ffffff10; color: #8389a0; font-size: 9px; }
.palette-footer span { display: inline-flex; align-items: center; gap: 4px; }
.palette-footer kbd { min-width: 17px; min-height: 17px; font-size: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; clip-path: inset(50%); }
.nav-link[hidden] { display: none !important; }
.nav-customizer {
  width: min(560px, 100%);
  overflow: hidden;
  border: 1px solid #a99aff3b;
  border-radius: 18px;
  background: #11131e;
  box-shadow: 0 32px 100px #0009, 0 0 0 1px #ffffff08 inset;
  animation: palette-in .16s ease-out;
}
.nav-customizer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 21px 22px 14px; border-bottom: 1px solid #ffffff12; }
.nav-customizer-header .eyebrow { margin: 0 0 4px; }
.nav-customizer-header h2 { margin: 0; color: #f0effa; font-size: 17px; }
.nav-customizer-header .muted { margin: 5px 0 0; font-size: 10px; line-height: 1.8; }
.nav-customizer-list { display: grid; max-height: min(54vh, 430px); gap: 5px; overflow-y: auto; padding: 10px 14px; }
.nav-customizer-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 45px; padding: 5px 9px; border: 1px solid #ffffff0d; border-radius: 10px; background: #ffffff04; }
.nav-customizer-label { display: flex; min-width: 0; align-items: center; gap: 10px; color: #dfe1ed; font-size: 11px; cursor: pointer; }
.nav-customizer-label input { width: 16px; height: 16px; accent-color: var(--accent-strong); }
.nav-customizer-label input:disabled { cursor: not-allowed; opacity: .6; }
.nav-customizer-controls { display: flex; gap: 5px; }
.nav-customizer-controls .icon-button { width: 30px; height: 30px; font-size: 13px; }
.nav-customizer-controls .icon-button:disabled { cursor: not-allowed; opacity: .4; }
.nav-customizer-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 17px; border-top: 1px solid #ffffff12; }
.nav-customizer-footer .muted { font-size: 9px; }
.nav-customizer-footer .button { min-height: 32px; padding: 5px 8px; font-size: 9px; }

.login-page { min-height: 100vh; padding: clamp(16px, 4vw, 52px); }
.login-shell {
  display: grid;
  width: min(1080px, 100%);
  min-height: 640px;
  grid-template-columns: 1fr minmax(390px, .82fr);
  overflow: hidden;
  border: 1px solid #ffffff17;
  border-radius: 28px;
  background: #10121df2;
  box-shadow: 0 36px 100px #0007, inset 0 1px #ffffff09;
  backdrop-filter: blur(18px);
}
.login-story {
  position: relative;
  display: flex;
  min-height: 100%;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 36px;
  border-left: 1px solid #ffffff12;
  background:
    radial-gradient(ellipse at 15% 14%, #a99aff22, transparent 35%),
    radial-gradient(ellipse at 78% 78%, #72e0cb17, transparent 34%),
    linear-gradient(150deg, #17192a, #10131d 70%);
}
.login-brand, .customer-brand { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.login-brand img { filter: drop-shadow(0 8px 22px #8d7bff34); }
.login-brand span, .customer-brand span { display: grid; gap: 2px; }
.login-brand strong, .customer-brand strong { font-size: 16px; letter-spacing: .1px; }
.login-brand small, .customer-brand small { color: #8990a9; font-size: 9px; letter-spacing: 1.7px; }
.login-story-copy { position: relative; z-index: 1; max-width: 470px; margin-block: 70px; }
.login-story-copy .eyebrow { color: #b3a8ff; }
.login-story-copy h2 { margin: 16px 0; font-size: clamp(36px, 5vw, 58px); font-weight: 700; line-height: 1.32; letter-spacing: -1.6px; }
.login-story-copy h2 span { color: #a99aff; }
.login-story-copy > p:last-child { max-width: 390px; color: #a1a7be; font-size: 13px; line-height: 2; }
.login-story-footer { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color: #b1b7cb; font-size: 11px; }
.login-orbit { position: absolute; width: 330px; height: 330px; border: 1px solid #a99aff13; border-radius: 50%; pointer-events: none; }
.login-orbit::before, .login-orbit::after { position: absolute; border: 1px solid #72e0cb13; border-radius: 50%; content: ""; }
.login-orbit::before { inset: 24px; }
.login-orbit::after { inset: 52px; }
.login-orbit-one { right: -120px; bottom: -132px; }
.login-orbit-two { right: 38px; bottom: -234px; width: 420px; height: 420px; }
.login-card {
  display: flex;
  width: auto;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 58px);
  border: 0;
  border-radius: 0;
  background: linear-gradient(145deg, #131522, #0f111b);
  box-shadow: none;
}
.login-card-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 31px; }
.login-card-brand img { display: none; }
.login-card-brand .eyebrow { font-size: 9px; }
.login-card h1 { margin: 0; font-size: 29px; letter-spacing: -.5px; }
.login-card > .muted { margin: 8px 0 25px; line-height: 1.8; }
.login-card form { gap: 15px; }
.login-card form label { display: grid; gap: 7px; color: #b8bdd0; font-size: 11px; }
.login-card input { width: 100%; height: 47px; padding-inline: 13px; border-color: #ffffff18; border-radius: 11px; background: #0b0d16; color: #f2f1f8; }
.login-card input::placeholder { color: #70778e; }
.login-card input:focus { border-color: #a99aff88; box-shadow: 0 0 0 3px #a99aff16; outline: 0; }
.login-card .button-primary { min-height: 47px; margin-top: 8px; border-radius: 12px; }
.login-card .form-error { min-height: 22px; margin-top: 10px; }
.login-card .security-note { align-items: flex-start; margin-top: 14px; padding: 13px; border-color: #72e0cb25; background: #72e0cb07; color: #b8ded6; font-size: 10px; line-height: 1.8; }
.login-card .security-note .status-dot { margin-top: 5px; }
.login-card .security-note small { display: block; margin-top: 2px; color: #8d9cab; }
.login-card-footer { margin-top: 30px; color: #69718a; font-size: 8px; letter-spacing: 1.3px; }
.login-card-footer span { padding-inline: 6px; color: var(--accent); }

.customer-page { padding: 38px 20px; }
.customer-shell { width: min(980px, 100%); }
.customer-header { padding-bottom: 20px; border-bottom: 1px solid #ffffff13; }
.customer-brand img { filter: drop-shadow(0 7px 20px #8d7bff33); }
.customer-header-actions { display: flex; align-items: center; gap: 12px; }
.customer-secure { display: inline-flex; align-items: center; gap: 8px; color: #a6d9ce; font-size: 10px; }
.customer-secure .status-dot { width: 6px; height: 6px; }
.customer-header h1 { font-size: 30px; }
.customer-card { padding: clamp(20px, 3vw, 30px); }
.customer-card h2 { letter-spacing: -.3px; }
.customer-login-form { max-width: 520px; }
.customer-login-form input { height: 45px; }
.customer-login-form button { min-height: 44px; }
.customer-bot { border-color: #ffffff12; border-radius: 14px; background: #0d1019; }
.customer-bot .bot-avatar { border-radius: 12px; }

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f3fa;
  --panel: #fff;
  --panel-raised: #f7f7fc;
  --panel-hover: #eeeff8;
  --border: #e1e3ee;
  --border-light: #d3d6e5;
  --text: #25283a;
  --muted: #747a92;
  --soft: #4a5067;
  color: var(--text);
}
:root[data-theme="light"] body {
  background-image: radial-gradient(ellipse at 12% 8%, #a99aff20, transparent 30rem), radial-gradient(ellipse at 88% 40%, #72e0cb16, transparent 30rem), linear-gradient(135deg, #f8f8fc, #f0f2f9);
}
:root[data-theme="light"] .sidebar { border-color: #dfe1ec; background: #f9f9fdee; box-shadow: 8px 0 40px #4048730c; }
:root[data-theme="light"] .brand, :root[data-theme="light"] .nav-link.active { color: #262a3d; }
:root[data-theme="light"] .nav-link { color: #646b84; }
:root[data-theme="light"] .nav-link:hover { background: #8d7bff10; color: #33364a; }
:root[data-theme="light"] .nav-link.active { border-color: #8d7bff2a; background: #8d7bff10; }
:root[data-theme="light"] .main-content { color: #282b3c; }
:root[data-theme="light"] .topbar, :root[data-theme="light"] .footer { border-color: #dfe1eb; }
:root[data-theme="light"] .command-trigger, :root[data-theme="light"] .icon-button, :root[data-theme="light"] .button { border-color: #dfe1ed; background: #ffffffb8; color: #535972; }
:root[data-theme="light"] .button-primary { border-color: transparent; background: linear-gradient(112deg, #a89aff, #8877ff 72%, #76dccc); color: #151522; }
:root[data-theme="light"] .welcome-panel { border-color: #d8d5fa; background: radial-gradient(ellipse at 82% 10%, #a99aff29, transparent 35%), linear-gradient(115deg, #fff, #f3f1ff); }
:root[data-theme="light"] .welcome-panel p, :root[data-theme="light"] .stat-label, :root[data-theme="light"] .section-heading .muted { color: #696f88; }
:root[data-theme="light"] .stat-card, :root[data-theme="light"] .table-wrap, :root[data-theme="light"] .form-panel, :root[data-theme="light"] .shortcut-panel, :root[data-theme="light"] .bot-card, :root[data-theme="light"] .analytics-card, :root[data-theme="light"] .health-card, :root[data-theme="light"] .audit-item, :root[data-theme="light"] .customer-card { border-color: #e0e2ed; background: #ffffffd9; box-shadow: 0 10px 35px #4850780c; }
:root[data-theme="light"] .stat-card strong, :root[data-theme="light"] .analytics-card strong, :root[data-theme="light"] .expiry-label strong, :root[data-theme="light"] .section-heading h2, :root[data-theme="light"] .customer-card h2 { color: #282b3e; }
:root[data-theme="light"] th { border-color: #e6e7ef; background: #f5f5fa; color: #737991; }
:root[data-theme="light"] .expiry-progress, :root[data-theme="light"] .expiry-progress::-webkit-progress-bar { background: #e5e6f0; }
:root[data-theme="light"] td { border-color: #ececf3; color: #44495f; }
:root[data-theme="light"] .toolbar select, :root[data-theme="light"] input, :root[data-theme="light"] .form-panel select, :root[data-theme="light"] .bot-card select, :root[data-theme="light"] .search-box { border-color: #dfe1ec; background: #fff; color: #303449; }
:root[data-theme="light"] .notice { border-color: #dedafa; background: #f3f1ff; color: #595f77; }
:root[data-theme="light"] .bot-meta, :root[data-theme="light"] .customer-bot { border-color: #e7e8f0; background: #f7f8fc; }
:root[data-theme="light"] .bot-playback { border-color: #8d7bff30; background: linear-gradient(145deg, #f3f1ff, #ffffff); }
:root[data-theme="light"] .bot-playback-track strong { color: #292c40; }
:root[data-theme="light"] .bot-playback-meta { color: #646b84; }
:root[data-theme="light"] .bot-playback-options label, :root[data-theme="light"] .bot-seek-control label { color: #555b73; }
:root[data-theme="light"] .bot-playback-offline { color: #747a92; }
:root[data-theme="light"] .palette-backdrop { background: #22263a77; }
:root[data-theme="light"] .command-palette { border-color: #dcd7ff; background: #fff; }
:root[data-theme="light"] .palette-search { border-color: #e8e8f1; }
:root[data-theme="light"] .palette-search input { background: transparent; color: #25283a; }
:root[data-theme="light"] .palette-result { color: #383c52; }
:root[data-theme="light"] .nav-customizer { border-color: #dcd7ff; background: #fff; }
:root[data-theme="light"] .nav-customizer-header { border-color: #e8e8f1; }
:root[data-theme="light"] .nav-customizer-header h2 { color: #292c40; }
:root[data-theme="light"] .nav-customizer-row { border-color: #e8e8f1; background: #f8f8fc; }
:root[data-theme="light"] .nav-customizer-label { color: #383c52; }
:root[data-theme="light"] .nav-customizer-footer { border-color: #e8e8f1; }
:root[data-theme="light"] .login-shell { border-color: #e0e2ed; background: #fff; box-shadow: 0 30px 90px #40487316; }
:root[data-theme="light"] .login-card { background: #fff; }
:root[data-theme="light"] .login-card h1, :root[data-theme="light"] .customer-header h1 { color: #292c40; }
:root[data-theme="light"] .login-card form label { color: #565c74; }
:root[data-theme="light"] .login-card input, :root[data-theme="light"] .customer-login-form input { border-color: #dfe1ec; background: #f8f8fc; color: #262a3c; }
:root[data-theme="light"] .customer-header { border-color: #dfe1ec; }
:root[data-theme="light"] .customer-brand, :root[data-theme="light"] .login-brand { color: #262a3c; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr minmax(350px, .9fr); }
  .login-story { padding: 28px; }
  .login-story-copy h2 { font-size: 42px; }
  .command-trigger { min-width: 42px; width: 42px; justify-content: center; padding: 0; }
  .command-trigger > span:not(.command-trigger-icon), .command-trigger kbd { display: none; }
}
@media (max-width: 700px) {
  body::before { background-size: 38px 38px; }
  .sidebar { position: sticky; padding: 10px 12px; backdrop-filter: blur(16px); }
  .brand { margin: 0 4px 10px; }
  .brand-mark.small { width: 36px; height: 36px; border-radius: 12px; }
  .main-content { padding: 18px 13px 26px; }
  .topbar { align-items: flex-start; gap: 10px; }
  .topbar-actions { gap: 6px; }
  .topbar-actions .muted { display: none; }
  .live-pill { max-width: 120px; padding: 7px 8px; font-size: 8px; }
  .command-trigger { height: 36px; width: 36px; min-width: 36px; }
  .icon-button { width: 36px; height: 36px; }
  .welcome-panel { min-height: 168px; padding: 22px 18px; }
  .welcome-panel h2 { max-width: 235px; }
  .welcome-decoration { width: 76px; height: 76px; border-radius: 22px; }
  .welcome-decoration img { width: 54px; height: 54px; }
  .stat-card { min-height: 123px; border-radius: 13px; }
  .palette-backdrop { padding: 9vh 11px 20px; }
  .palette-footer { justify-content: space-between; gap: 5px; }
  .nav-customizer-header { padding: 17px 15px 12px; }
  .nav-customizer-footer { align-items: flex-start; flex-direction: column; gap: 7px; padding-inline: 14px; }
  .login-page { display: block; padding: 12px; }
  .login-shell { display: flex; min-height: calc(100vh - 24px); flex-direction: column; border-radius: 22px; }
  .login-story { min-height: 190px; padding: 19px 21px; border-left: 0; border-bottom: 1px solid #ffffff12; }
  .login-brand img { width: 42px; height: 42px; }
  .login-story-copy { margin: 25px 0 6px; }
  .login-story-copy .eyebrow { font-size: 8px; }
  .login-story-copy h2 { margin: 8px 0; font-size: 25px; line-height: 1.25; letter-spacing: -.5px; }
  .login-story-copy > p:last-child, .login-story-footer { display: none; }
  .login-orbit-one { right: auto; left: -120px; bottom: -220px; }
  .login-orbit-two { right: auto; left: 0; bottom: -310px; }
  .login-card { flex: 1; padding: 25px 21px; }
  .login-card-brand { margin-bottom: 21px; }
  .login-card-brand img { display: block; width: 34px; height: 34px; }
  .login-card h1 { font-size: 24px; }
  .login-card > .muted { margin-bottom: 18px; }
  .login-card-footer { margin-top: auto; padding-top: 20px; }
  .customer-page { padding: 20px 13px; }
  .customer-header { align-items: flex-start; }
  .customer-brand img { width: 36px; height: 36px; }
  .customer-brand strong { font-size: 13px; }
  .customer-brand small { font-size: 8px; }
  .customer-header-actions { align-items: flex-end; flex-direction: column-reverse; gap: 5px; }
  .customer-secure { font-size: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f1f1f1;
  --panel: #fff;
  --panel-raised: #fafafa;
  --panel-hover: #ededed;
  --border: #dedede;
  --border-light: #d1d1d1;
  --text: #171717;
  --muted: #6b6b6b;
  --soft: #444;
  --accent: #171717;
  --danger: #775f5f;
  --success: #505050;
  color: var(--text);
}
:root[data-theme="light"] body {
  background-color: #f2f2f2;
  background-image: radial-gradient(ellipse at 10% 0, #fff 0, transparent 34rem), linear-gradient(145deg, #f8f8f8, #ededed);
  transition: background-color .35s ease, color .25s ease;
}
:root[data-theme="light"] .sidebar { border-color: #dedede; background: #fafafaee; box-shadow: 8px 0 32px #00000008; }
:root[data-theme="light"] .brand, :root[data-theme="light"] .main-content { color: #171717; }
:root[data-theme="light"] .brand small, :root[data-theme="light"] .side-label, :root[data-theme="light"] .eyebrow { color: #707070; }
:root[data-theme="light"] .nav-link { color: #656565; }
:root[data-theme="light"] .nav-link:hover { background: #eaeaea; color: #111; }
:root[data-theme="light"] .nav-link.active { border-color: #dedede; background: #e9e9e9; color: #111; box-shadow: inset -2px 0 #111; }
:root[data-theme="light"] .nav-icon { color: #555; }
:root[data-theme="light"] .topbar, :root[data-theme="light"] .footer { border-color: #dedede; }
:root[data-theme="light"] .live-pill { border-color: #d7d7d7; background: #fafafa; color: #555; }
:root[data-theme="light"] .live-pill i, :root[data-theme="light"] .status-dot { background: #222; box-shadow: 0 0 0 3px #22222212; }
:root[data-theme="light"] .security-note { border-color: #dedede; background: #fafafa; color: #333; }
:root[data-theme="light"] .security-note small { color: #777; }
:root[data-theme="light"] .command-trigger,
:root[data-theme="light"] .icon-button,
:root[data-theme="light"] .button { border-color: #d6d6d6; background: #fff; color: #252525; }
:root[data-theme="light"] .command-trigger:hover,
:root[data-theme="light"] .icon-button:hover,
:root[data-theme="light"] .button:hover { border-color: #999; background: #f2f2f2; color: #111; }
:root[data-theme="light"] .button-primary { border-color: #111; background: #171717; color: #fff; }
:root[data-theme="light"] .button-primary:hover { border-color: #333; background: #333; color: #fff; }
:root[data-theme="light"] .button-quiet { border-color: transparent; background: transparent; color: #555; }
:root[data-theme="light"] .welcome-panel { border-color: #d8d8d8; background: linear-gradient(115deg, #fff, #e8e8e8); box-shadow: 0 16px 40px #00000008; }
:root[data-theme="light"] .welcome-panel p,
:root[data-theme="light"] .stat-label,
:root[data-theme="light"] .section-heading .muted { color: #666; }
:root[data-theme="light"] .welcome-decoration { filter: grayscale(1); opacity: .14; }
:root[data-theme="light"] .stat-card,
:root[data-theme="light"] .table-wrap,
:root[data-theme="light"] .form-panel,
:root[data-theme="light"] .shortcut-panel,
:root[data-theme="light"] .bot-card,
:root[data-theme="light"] .analytics-card,
:root[data-theme="light"] .health-card,
:root[data-theme="light"] .audit-item,
:root[data-theme="light"] .customer-card {
  border-color: #dedede;
  background: #fff;
  box-shadow: 0 8px 24px #00000008;
}
:root[data-theme="light"] .stat-card strong,
:root[data-theme="light"] .analytics-card strong,
:root[data-theme="light"] .expiry-label strong,
:root[data-theme="light"] .section-heading h2,
:root[data-theme="light"] .customer-card h2 { color: #171717; }
:root[data-theme="light"] .stat-icon { border-color: #dedede; background: #f3f3f3; color: #333; }
:root[data-theme="light"] th { border-color: #e2e2e2; background: #f1f1f1; color: #626262; }
:root[data-theme="light"] td { border-color: #e9e9e9; color: #3e3e3e; }
:root[data-theme="light"] tbody tr:hover { background: #f7f7f7; }
:root[data-theme="light"] .code { color: #171717; }
:root[data-theme="light"] .subtle-id { color: #555; }
:root[data-theme="light"] .table-subline { color: #777; }
:root[data-theme="light"] .status-badge { border-color: #d9d9d9; background: #f6f6f6; color: #383838; }
:root[data-theme="light"] .status-badge::before { background: #333; }
:root[data-theme="light"] .expiry-progress,
:root[data-theme="light"] .expiry-progress::-webkit-progress-bar { background: #e5e5e5; }
:root[data-theme="light"] .expiry-progress::-webkit-progress-value { background: #555; }
:root[data-theme="light"] .expiry-progress::-moz-progress-bar { background: #555; }
:root[data-theme="light"] .toolbar select,
:root[data-theme="light"] input,
:root[data-theme="light"] .form-panel select,
:root[data-theme="light"] .bot-card select,
:root[data-theme="light"] .search-box {
  border-color: #d7d7d7;
  background: #fff;
  color: #171717;
}
:root[data-theme="light"] .notice { border-color: #dedede; background: #f5f5f5; color: #444; }
:root[data-theme="light"] .bot-meta,
:root[data-theme="light"] .customer-bot { border-color: #e0e0e0; background: #f7f7f7; }
:root[data-theme="light"] .palette-backdrop { background: #11111166; }
:root[data-theme="light"] .command-palette { border-color: #d8d8d8; background: #fff; box-shadow: 0 24px 80px #0002; }
:root[data-theme="light"] .palette-search { border-color: #e5e5e5; }
:root[data-theme="light"] .palette-search input { background: transparent; color: #171717; }
:root[data-theme="light"] .palette-result { color: #333; }
:root[data-theme="light"] .palette-result:hover,
:root[data-theme="light"] .palette-result.selected { background: #f0f0f0; color: #111; }
:root[data-theme="light"] .palette-result-copy small,
:root[data-theme="light"] .palette-empty,
:root[data-theme="light"] .palette-footer { color: #707070; }
:root[data-theme="light"] .login-page,
:root[data-theme="light"] .customer-page { background-color: #f2f2f2; }
:root[data-theme="light"] .login-shell { border-color: #dedede; background: #fff; box-shadow: 0 28px 80px #00000012; }
:root[data-theme="light"] .login-story {
  border-color: #dedede;
  background: radial-gradient(ellipse at 12% 10%, #ffffffcc, transparent 42%), linear-gradient(145deg, #ededed, #e2e2e2);
}
:root[data-theme="light"] .login-brand,
:root[data-theme="light"] .customer-brand { color: #171717; }
:root[data-theme="light"] .login-brand img,
:root[data-theme="light"] .customer-brand img { filter: drop-shadow(0 6px 12px #00000018); }
:root[data-theme="light"] .login-brand small,
:root[data-theme="light"] .customer-brand small { color: #666; }
:root[data-theme="light"] .login-story-copy .eyebrow { color: #555; }
:root[data-theme="light"] .login-story-copy h2 { color: #171717; }
:root[data-theme="light"] .login-story-copy h2 span { color: #555; }
:root[data-theme="light"] .login-story-copy > p:last-child,
:root[data-theme="light"] .login-story-footer { color: #555; }
:root[data-theme="light"] .login-orbit,
:root[data-theme="light"] .login-orbit::before,
:root[data-theme="light"] .login-orbit::after { border-color: #11111112; }
:root[data-theme="light"] .login-card { background: linear-gradient(145deg, #fff, #fafafa); }
:root[data-theme="light"] .login-card h1,
:root[data-theme="light"] .customer-header h1 { color: #171717; }
:root[data-theme="light"] .login-card form label { color: #444; }
:root[data-theme="light"] .login-card input,
:root[data-theme="light"] .customer-login-form input { border-color: #d8d8d8; background: #f7f7f7; color: #171717; }
:root[data-theme="light"] .login-card input::placeholder { color: #888; }
:root[data-theme="light"] .login-card input:focus,
:root[data-theme="light"] input:focus { border-color: #555; box-shadow: 0 0 0 3px #11111110; }
:root[data-theme="light"] .login-card .security-note { border-color: #dedede; background: #f4f4f4; color: #333; }
:root[data-theme="light"] .login-card .security-note small { color: #666; }
:root[data-theme="light"] .login-card-footer { color: #777; }
:root[data-theme="light"] .customer-header { border-color: #dedede; }
:root[data-theme="light"] .customer-secure { color: #444; }
:root[data-theme="light"] .toast { border-color: #d6d6d6; background: #fff; color: #171717; box-shadow: 0 12px 36px #0002; }
:root[data-theme="light"] .form-error.error { color: #6a3f3f; }

.login-shell { animation: cc-enter .65s cubic-bezier(.2, .75, .25, 1) both; }
.login-orbit-one { animation: cc-drift 16s ease-in-out infinite alternate; }
.login-orbit-two { animation: cc-drift 20s ease-in-out infinite alternate-reverse; }
.welcome-decoration { animation: cc-float 7s ease-in-out infinite; }
.stat-card,
.bot-card,
.analytics-card,
.health-card,
.audit-item,
.customer-card { transition: transform .24s ease, border-color .24s ease, box-shadow .24s ease; }
.stat-card:hover,
.bot-card:hover,
.analytics-card:hover,
.health-card:hover,
.audit-item:hover,
.customer-card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px #00000012; }
.stat-card:nth-child(2) { animation-delay: .06s; }
.stat-card:nth-child(3) { animation-delay: .12s; }
.stat-card:nth-child(4) { animation-delay: .18s; }
.button,
.icon-button,
.nav-link,
.command-trigger { transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease; }
.button:active,
.icon-button:active { transform: scale(.97); }
@keyframes cc-enter {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cc-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-8px) rotate(0); }
}
@keyframes cc-drift {
  from { transform: translate(0, 0); }
  to { transform: translate(-12px, -10px); }
}

.quick-tools { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.quick-tool {
  display: grid;
  min-height: 124px;
  align-content: start;
  gap: 8px;
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  color: var(--text);
  text-align: right;
  text-decoration: none;
  cursor: pointer;
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease, background-color .24s ease;
}
.quick-tool > span { display: grid; width: 31px; height: 31px; place-items: center; border: 1px solid var(--border-light); border-radius: 10px; background: var(--panel-raised); font-size: 17px; }
.quick-tool strong { font-size: 12px; }
.quick-tool small { color: var(--muted); font-size: 10px; }
.quick-tool:hover { transform: translateY(-4px); border-color: #9c9c9c; box-shadow: 0 14px 28px #00000012; }
.owner-nav-link { margin-top: 5px; border-color: #ffffff20; background: #ffffff08; }
.host-health-grid { margin-bottom: 24px; }
.host-health-card { min-width: 0; }
.host-health-card strong { overflow-wrap: anywhere; }
.host-health-icon { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--panel-raised); color: var(--text); font-size: 15px; }
.guide-hero {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 18px;
  padding: 25px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(120deg, var(--panel), var(--panel-raised));
}
.guide-hero h3 { margin: 4px 0 7px; font-size: 20px; }
.guide-hero p { max-width: 680px; margin: 0; color: var(--muted); line-height: 1.9; }
.guide-hero-mark { display: grid; width: 72px; height: 72px; flex: 0 0 auto; place-items: center; border: 1px solid var(--border); border-radius: 20px; background: var(--panel-raised); }
.guide-hero-mark img { width: 54px; height: 54px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.guide-card { position: relative; display: flex; min-height: 220px; flex-direction: column; align-items: flex-start; padding: 20px; border: 1px solid var(--border); border-radius: 14px; background: var(--panel); }
.guide-card h3 { margin: 13px 0 6px; font-size: 15px; }
.guide-card p { flex: 1; margin: 0 0 16px; color: var(--muted); font-size: 12px; line-height: 1.9; }
.guide-card code, .guide-card kbd { direction: ltr; unicode-bidi: isolate; }
.guide-step { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--border-light); border-radius: 9px; color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 10px; }
.guide-notice { margin-top: 16px; }
.public-owner-link { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 9px; align-self: flex-start; margin-top: 16px; padding: 9px 13px; border: 1px solid #ffffff50; border-radius: 999px; background: #ffffff55; color: #242424; font-size: 11px; font-weight: 700; text-decoration: none; backdrop-filter: blur(12px); transition: transform .2s ease, background-color .2s ease; }
.public-owner-link:hover { transform: translateY(-2px); background: #ffffffa8; }
.public-owner-link > span { color: #555; font-size: 15px; }
.public-owner-link small { color: #696969; font-size: 9px; font-weight: 500; }
.owner-public-button { min-height: 34px; }
.owner-page { min-height: 100vh; padding: clamp(18px, 4vw, 52px); background: linear-gradient(145deg, #f8f8f8, #e8e8e8); color: #191919; }
.owner-shell { width: min(840px, 100%); margin: 0 auto; animation: cc-enter .6s cubic-bezier(.2, .75, .25, 1) both; }
.owner-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.owner-hero { position: relative; overflow: hidden; padding: clamp(24px, 5vw, 48px); border: 1px solid #fff; border-radius: 25px; background: linear-gradient(145deg, #ffffffed, #e9e9e9ed); box-shadow: 0 24px 70px #00000012, inset 0 1px #fff; }
.owner-hero::before, .owner-hero::after { position: absolute; z-index: 0; width: 360px; height: 360px; border: 1px solid #1717170b; border-radius: 50%; content: ""; pointer-events: none; }
.owner-hero::before { top: -240px; left: -100px; box-shadow: 0 0 0 24px #17171705, 0 0 0 50px #17171704; }
.owner-hero::after { right: -230px; bottom: -270px; box-shadow: 0 0 0 24px #17171705, 0 0 0 50px #17171704; }
.owner-profile, .owner-intro, .owner-actions, .owner-details { position: relative; z-index: 1; }
.owner-profile { display: flex; align-items: center; gap: 20px; }
.owner-avatar-wrap { position: relative; display: grid; width: 106px; height: 106px; flex: 0 0 auto; place-items: center; border: 1px solid #d5d5d5; border-radius: 50%; background: linear-gradient(145deg, #fff, #dedede); box-shadow: 0 12px 30px #00000012; }
.owner-avatar, .owner-avatar-fallback { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.owner-avatar-fallback { display: grid; place-items: center; background: #222; color: #fff; font-size: 35px; font-weight: 700; }
.owner-crown { position: absolute; top: -12px; right: 50%; display: grid; width: 34px; height: 30px; place-items: center; border: 1px solid #ffffffd9; border-radius: 10px; background: #fff9; color: #292929; font-size: 17px; box-shadow: 0 6px 16px #00000012; transform: translateX(50%); backdrop-filter: blur(10px); }
.owner-identity { min-width: 0; }
.owner-label { display: inline-flex; align-items: center; gap: 8px; color: #626262; font-size: 9px; font-weight: 700; letter-spacing: 1.3px; }
.owner-label .status-dot { width: 6px; height: 6px; }
.owner-identity h1 { margin: 8px 0 0; color: #171717; font-size: clamp(26px, 6vw, 42px); line-height: 1.2; overflow-wrap: anywhere; }
.owner-username { margin: 4px 0 0; color: #707070; direction: ltr; text-align: right; }
.owner-intro { margin: 27px 0 20px; color: #555; font-size: 13px; line-height: 1.9; }
.owner-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.owner-actions .button-primary { border-color: #171717; background: #171717; color: #fff; }
.owner-actions .button-primary:hover { background: #333; }
.owner-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 24px; }
.owner-details > div { display: grid; min-width: 0; gap: 7px; padding: 13px 15px; border: 1px solid #dedede; border-radius: 12px; background: #ffffff99; }
.owner-details span { color: #777; font-size: 10px; }
.owner-details strong { color: #242424; font-size: 11px; overflow-wrap: anywhere; }
.owner-id { direction: ltr; text-align: right; font-family: ui-monospace, Consolas, monospace; }
.owner-note { display: flex; align-items: center; gap: 13px; margin-top: 14px; padding: 17px; border: 1px solid #dedede; border-radius: 15px; background: #ffffffa8; }
.owner-note img { flex: 0 0 auto; }
.owner-note strong { font-size: 12px; }
.owner-note p { margin: 4px 0 0; color: #6a6a6a; font-size: 10px; line-height: 1.8; }
.owner-footer { display: flex; align-items: center; gap: 18px; margin-top: 22px; color: #777; font-size: 10px; }
.owner-footer span { margin-left: auto; letter-spacing: 1.2px; }
.owner-footer a { color: #555; text-decoration: none; }
.owner-footer a:hover { color: #111; text-decoration: underline; }
.owner-page .button:disabled, .owner-page .icon-button:disabled { cursor: progress; opacity: .6; }
.reveal-on-scroll { opacity: 0; filter: blur(4px); transform: translateY(28px) scale(.98); transition: opacity .65s ease, filter .65s ease, transform .65s cubic-bezier(.2, .75, .25, 1); }
.reveal-on-scroll.is-visible { opacity: 1; filter: none; transform: translateY(0) scale(1); }

@media (max-width: 1050px) {
  .quick-tools { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .quick-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .quick-tool { min-height: 108px; padding: 13px; }
  .guide-grid { grid-template-columns: 1fr; }
  .guide-card { min-height: 0; }
  .guide-hero { align-items: flex-start; padding: 18px; }
  .guide-hero-mark { width: 52px; height: 52px; border-radius: 14px; }
  .guide-hero-mark img { width: 40px; height: 40px; }
  .guide-hero h3 { font-size: 16px; }
  .guide-hero p { font-size: 11px; }
  .owner-page { padding: 16px 12px 28px; }
  .owner-header { margin-bottom: 15px; }
  .owner-hero { padding: 23px 18px; border-radius: 20px; }
  .owner-profile { gap: 14px; }
  .owner-avatar-wrap { width: 78px; height: 78px; }
  .owner-avatar, .owner-avatar-fallback { width: 64px; height: 64px; }
  .owner-crown { top: -10px; width: 28px; height: 25px; font-size: 14px; }
  .owner-intro { margin-top: 22px; font-size: 12px; }
  .owner-details { grid-template-columns: 1fr; margin-top: 19px; }
  .owner-footer { gap: 12px; }
  .host-health-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll { opacity: 1; filter: none; transform: none; transition: none; }
  .owner-shell { animation: none; }
}

.owner-page {
  min-height: 100vh;
  padding: 0;
  background: #0e0f12;
  color: #e7e8eb;
}
.owner-site-header {
  display: flex;
  height: 72px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 3vw, 48px);
  border-bottom: 1px solid #ffffff0a;
  background: #17181c;
}
.owner-site-brand { display: inline-flex; align-items: center; gap: 10px; color: #e7e8eb; font-size: 15px; font-weight: 700; text-decoration: none; }
.owner-site-brand img { width: 30px; height: 30px; }
.owner-language-link { padding: 8px 13px; border: 1px solid #ffffff12; border-radius: 9px; background: #222329; color: #d7d8dc; font-size: 11px; text-decoration: none; }
.owner-language-link:hover { background: #2a2b31; }
.owner-shell { width: min(810px, calc(100% - 32px)); margin: 30px auto 42px; animation: cc-enter .6s cubic-bezier(.2, .75, .25, 1) both; }
.owner-profile-card { overflow: hidden; border: 1px solid #2a2b30; border-radius: 20px; background: #18191e; box-shadow: 0 20px 70px #00000035; }
.owner-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 52% 12%, #f5f2e7 0 1%, #d7d6d3 1.2% 12%, #aeb0b6 12.5%, transparent 36%),
    radial-gradient(ellipse at 54% 0, #9da5b3 0, transparent 53%),
    linear-gradient(180deg, #697487 0%, #394150 62%, #22252d 100%);
}
.owner-cover::before,
.owner-cover::after { position: absolute; right: -3%; bottom: -1px; left: -3%; height: 55%; content: ""; pointer-events: none; }
.owner-cover::before {
  z-index: 1;
  background: linear-gradient(155deg, #303541, #191b21 76%);
  clip-path: polygon(0 74%, 12% 41%, 24% 68%, 39% 25%, 51% 66%, 66% 33%, 82% 72%, 92% 43%, 100% 69%, 100% 100%, 0 100%);
}
.owner-cover::after {
  z-index: 2;
  height: 32%;
  background: linear-gradient(180deg, #15171c, #111216);
  clip-path: polygon(0 42%, 15% 72%, 31% 29%, 48% 65%, 62% 24%, 79% 70%, 91% 33%, 100% 57%, 100% 100%, 0 100%);
}
.owner-cover-has-image::before, .owner-cover-has-image::after, .owner-cover-has-image .owner-cover-orbit { display: none; }
.owner-cover-orbit { position: absolute; z-index: 1; top: -98px; right: 24%; width: 260px; height: 260px; border: 1px solid #ffffff12; border-radius: 50%; box-shadow: 0 0 0 22px #ffffff08, 0 0 0 50px #ffffff05; }
.owner-banner-image { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center; }
.owner-banner-image:not(.hidden) ~ .owner-cover-orbit { opacity: .25; }
.owner-card-body { position: relative; z-index: 3; padding: 0 clamp(20px, 3.5vw, 30px) 25px; }
.owner-profile { display: flex; align-items: flex-end; gap: 16px; margin-top: -52px; direction: ltr; text-align: left; }
.owner-avatar-wrap { width: 132px; height: 132px; border: 6px solid #18191e; background: #18191e; box-shadow: none; }
.owner-avatar, .owner-avatar-fallback { width: 100%; height: 100%; border: 1px solid #303138; }
.owner-avatar-fallback { background: linear-gradient(145deg, #f3f3f3, #babcc2); color: #24252a; font-size: 39px; }
.owner-identity { flex: 1; padding-bottom: 9px; }
.owner-name-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.owner-identity h1 { margin: 0; color: #f0f1f3; font-family: "Inter", "Segoe UI", Arial, sans-serif; font-size: clamp(26px, 4.2vw, 32px); line-height: 1.25; }
.owner-developer-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid #8a743b66; border-radius: 999px; background: #5e4d271f; color: #d9c17b; font-size: 10px; font-weight: 600; white-space: nowrap; }
.owner-developer-badge span { font-size: 12px; }
.owner-username { margin: 5px 0 0; color: #a7afc1; direction: ltr; text-align: left; font-family: "Inter", "Segoe UI", Arial, sans-serif; font-size: 12px; }
.owner-intro { margin: 15px 0 17px; color: #e0e1e4; direction: ltr; text-align: left; font-family: "Inter", "Segoe UI", Arial, sans-serif; font-size: 14px; line-height: 1.9; }
.owner-highlights { display: grid; gap: 8px; margin: 0 0 19px; padding: 0; list-style: none; }
.owner-highlights li { display: flex; align-items: center; gap: 10px; color: #cdd0d8; font-size: 12px; line-height: 1.7; }
.owner-highlights li > span { width: 17px; flex: 0 0 17px; color: #a797ff; font-size: 15px; text-align: center; }
.owner-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.owner-actions .button { min-height: 45px; border-color: #363840; border-radius: 11px; background: #25272e; color: #e4e5e9; font-size: 12px; text-decoration: none; }
.owner-actions .button-primary { border-color: #7060db; background: #7060db; color: #fff; }
.owner-actions .button-primary:hover { border-color: #8171ed; background: #8171ed; }
.owner-actions .button:not(.button-primary):hover { border-color: #4a4c55; background: #2c2e36; }
.owner-profile-meta { display: flex; align-items: center; gap: 12px; margin-top: 17px; padding-top: 13px; border-top: 1px solid #ffffff0c; color: #858995; font-size: 9px; }
.owner-id { direction: ltr; font-family: ui-monospace, Consolas, monospace; }
.owner-profile-meta #owner-sync-state { margin-right: auto; }
.owner-refresh-button { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid #ffffff12; border-radius: 8px; background: #202127; color: #c8c9ce; cursor: pointer; }
.owner-refresh-button:hover { background: #2b2c33; }
.owner-refresh-button:disabled { cursor: progress; opacity: .55; }
.owner-footer { margin-top: 18px; color: #656770; }
.owner-footer a { color: #9b9da7; }
.owner-footer a:hover { color: #fff; }
@media (max-width: 700px) {
  .owner-site-header { height: 62px; }
  .owner-shell { width: calc(100% - 24px); margin-top: 20px; }
  .owner-profile-card { border-radius: 16px; }
  .owner-card-body { padding-inline: 17px; padding-bottom: 20px; }
  .owner-profile { gap: 11px; margin-top: -43px; }
  .owner-avatar-wrap { width: 108px; height: 108px; border-width: 5px; }
  .owner-name-row { gap: 7px; }
  .owner-identity h1 { font-size: 26px; }
  .owner-developer-badge { padding: 4px 7px; font-size: 9px; }
  .owner-intro { margin-top: 14px; font-size: 13px; }
  .owner-highlights { gap: 7px; }
  .owner-highlights li { font-size: 11px; }
  .owner-profile-meta { flex-wrap: wrap; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .owner-shell { animation: none; }
}
