:root { font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #f5eef2; background: #100d12; font-synthesis: none; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
button, input, select { font: inherit; }
a { color: inherit; }
.page { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(ellipse at 80% 30%, #2c192a 0, transparent 46%), #100d12; }
.topbar { width: min(1120px, calc(100% - 40px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0; }
.private-label, .eyebrow { color: #d8b999; font-size: 11px; font-weight: 750; letter-spacing: .17em; }
.access-main { width: min(480px, calc(100% - 40px)); margin: auto; padding: 32px 0 64px; }
.access-card { padding: clamp(24px, 5vw, 36px); background: #1b161e; border: 1px solid #423343; border-radius: 24px; box-shadow: 0 24px 80px #040a164d; }
.eyebrow { margin-bottom: 20px; }
h1 { margin: 0 0 16px; font-size: clamp(30px, 6vw, 39px); font-weight: 730; line-height: 1.12; letter-spacing: -.045em; }
.intro { margin: 0 0 24px; color: #bcaebb; font-size: 15px; line-height: 1.6; }
.intro strong { color: #f5eef2; }
.status { margin: 0 0 20px; color: #d8b999; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.status:empty { display: none; }
.status.is-error { color: #ffb8cb; }
.field { display: grid; gap: 9px; margin-bottom: 20px; }
label { font-size: 14px; font-weight: 650; }
input, select { width: 100%; padding: 13px 14px; color: #f5eef2; background: #100d12; border: 1px solid #897287; border-radius: 11px; min-height: 46px; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid #d8b999; outline-offset: 4px; }
.field-help { margin: 0; color: #bcaebb; font-size: 12px; line-height: 1.6; }
.button { display: block; width: 100%; min-height: 46px; padding: 13px 16px; border-radius: 11px; cursor: pointer; font-weight: 650; font-size: 14px; line-height: 1.4; text-align: center; text-decoration: none; overflow-wrap: anywhere; }
.button-primary { color: #f5eef2; background: #71354f; border: 1px solid #b37894; }
.button-primary:hover { background: #85415e; }
.button-secondary { color: #d8b999; background: transparent; border: 1px solid #897287; }
.button-secondary:hover { background: #2b202d; }
.button:disabled { opacity: .65; cursor: wait; }
.connection { display: flex; align-items: center; gap: 9px; margin: 0 0 18px; color: #d8b999; font-size: 14px; }
.connection-dot { width: 8px; height: 8px; border-radius: 50%; background: #d8b999; }
.session-note { margin: 0 0 24px; color: #bcaebb; font-size: 14px; line-height: 1.7; }
.actions { display: grid; gap: 12px; }
.admin-shortcuts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 16px 0 28px; }
.has-access .access-main { width: min(760px, calc(100% - 40px)); }
#access-tools { margin: 24px 0; }
.access-section { border-top: 1px solid #423343; padding-top: 24px; margin-top: 24px; }
h2 { font-size: 19px; line-height: 1.4; margin: 0 0 18px; color: #f5eef2; }
.form-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.checkbox-field { display: flex; align-items: flex-start; gap: 12px; line-height: 1.6; margin-bottom: 20px; }
.checkbox-field input { width: 20px; min-height: 20px; margin: 1px 0 0; accent-color: #71354f; flex-shrink: 0; }
.new-invitation { display: grid; gap: 12px; padding: 20px; margin-top: 20px; background: #100d12; border: 1px solid #897287; border-radius: 12px; }
.invitation-result-field { display: grid; gap: 12px; min-width: 0; }
.invitation-payment-help { margin: 0 0 18px; }
#invitation-code-result { font-family: ui-monospace, monospace; font-size: clamp(.65rem, 2.8vw, .93rem); letter-spacing: .025em; }
.access-list { display: grid; gap: 12px; margin: 16px 0 24px; }
.access-item { padding: 18px; border: 1px solid #423343; border-radius: 12px; background: #100d12; overflow-wrap: anywhere; }
.access-item h3 { font-size: 15px; margin: 0 0 8px; color: #f5eef2; }
.access-item p, .empty-list { margin: 0 0 12px; color: #bcaebb; line-height: 1.6; font-size: 13px; }
.access-item .button { width: auto; max-width: 100%; margin-top: 12px; }
#connected > .actions { margin-top: 24px; padding-top: 24px; border-top: 1px solid #423343; }
.footer { width: min(1120px, calc(100% - 40px)); margin: 0 auto; border-top: 1px solid #423343; padding: 20px 0 28px; color: #bcaebb; font-size: 12px; }
@media (max-width: 480px) { .topbar { padding: 20px 0; } .private-label { font-size: 9px; letter-spacing: .1em; } .access-main { padding-top: 24px; padding-bottom: 40px; } .footer { text-align: center; } }
@media (max-width: 560px) { .form-pair { grid-template-columns: 1fr; gap: 0; } }

.access-pagination { display: grid; gap: 12px; margin: -8px 0 24px; }
.pagination-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pagination-actions .button { flex: 1 1 180px; width: auto; }
.renewal-form { display: grid; gap: 8px; margin-top: 16px; max-width: 320px; }
.renewal-form label { display: grid; gap: 8px; font-size: 13px; }
.renewal-form .button { margin-top: 0; width: 100%; }

#admin-chat-link, #client-chat-link { margin-bottom: 20px; }
.account-settings { margin-top: 28px; padding-top: 22px; border-top: 1px solid #554353; }
.account-settings summary, #devices-panel summary { color: #d8b999; cursor: pointer; min-height: 44px; padding: 10px 0; line-height: 1.6; }
.account-settings summary:focus-visible { outline: 2px solid #d8b999; outline-offset: 4px; }
.account-settings > .field-help, #devices-panel > .field-help { margin-bottom: 16px; }
.account-settings .actions { margin-top: 20px; }
#devices-panel { margin: 18px 0; }
.text-button { background: transparent; color: #d8b999; border: 0; padding: 10px 0; text-align: left; cursor: pointer; min-height: 44px; font-size: 13px; }
#session-retry, #access-retry { margin-bottom: 20px; }

.is-admin-home .access-main { width: min(1000px, calc(100% - 40px)); margin: 24px auto auto; }
.is-admin-home .access-card { padding: clamp(24px, 4vw, 44px); }
.admin-dashboard { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 30px 0; }
.dashboard-tool { display: flex; flex-direction: column; align-items: flex-start; gap: 9px; min-height: 160px; padding: 22px; border: 1px solid #554353; border-radius: 16px; background: #211a24; text-decoration: none; transition: background .15s ease, border-color .15s ease; }
.dashboard-tool:hover { background: #302333; border-color: #b37894; }
.dashboard-tool strong { font-size: 16px; line-height: 1.4; }
.dashboard-tool > span:last-child { color: #c7b9c4; font-size: 13px; line-height: 1.6; }
.tool-icon { color: #e6c8a7; font-size: 23px; line-height: 1; margin-bottom: 6px; }
.is-admin-home #admin-chat-link { max-width: 340px; padding: 17px 22px; }
.is-admin-home #account-settings { margin-top: 30px; }
.is-admin-clients .access-main { width: min(840px, calc(100% - 40px)); }
.is-admin-clients #admin-session-note, .is-admin-clients .connection, .is-admin-clients #connected > .intro { display: none; }
@media (max-width: 760px) { .admin-dashboard { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .admin-dashboard { grid-template-columns: 1fr; gap: 12px; margin-top: 24px; } .dashboard-tool { min-height: 120px; padding: 20px; } .is-admin-home .access-main { margin-top: 8px; } }

.access-list { max-height: min(65dvh, 640px); overflow-y: auto; overscroll-behavior: contain; padding: 3px; }
details.access-item { padding: 0 14px; }.access-summary { cursor: pointer; min-height: 54px; padding: 12px 0; color: #f5eef2; }.access-summary h3 { display: inline; margin: 0; }.access-summary-note { display: block; margin: 4px 0 0 16px; color: #bcaebb; font-size: 12px; }.access-item[open] { padding-bottom: 14px; }.access-item[open] .access-summary { margin-bottom: 8px; border-bottom: 1px solid #423343; }.access-summary:focus-visible,.access-list:focus-visible { outline: 2px solid #d8b999; outline-offset: 2px; }.access-filter { display: grid; gap: 8px; max-width: 300px; margin-bottom: 18px; }.access-pagination { margin: 8px 0 12px; }.pagination-actions .button { flex-basis: 120px; }
