/* The administration workspace has its own neutral identity. Status colors remain semantic. */
:root {
  --surface: #202329;
  --surface-raised: #292d34;
  --line: #444a53;
  --text: #f1f2f4;
  --secondary: #b5bac2;
  --accent: #9cc4e4;
  --amber: #edc582;
  color: var(--text);
  background: #15171b;
}
html { background: #15171b; }
body {
  color: var(--text);
  background: radial-gradient(ellipse 850px 410px at 9% -110px, #2c3139 0, transparent 70%),
    linear-gradient(180deg, #191c21 0, #14161a 510px);
}
.muted, .manual-intro, .auto-refresh-status, .action-note, .list-count,
.archive-toolbar span, .site-visit-note { color: var(--secondary); }
.eyebrow, .topbar .eyebrow, .section-heading .eyebrow { color: #9fc4e0; }
.topbar, .panel-tabs { border-color: var(--line); }
.topbar h1, .section-heading h2 { color: #f6f7f8; }
.brand-mark {
  color: #f7f8f9;
  background: linear-gradient(145deg, #829bb2, #465767);
  border: 1px solid #a1b7c9;
  box-shadow: 0 10px 28px #06070a55;
}
.panel, .stat-card, .site-account-card, .archive-summary, .site-visit-summary {
  background: linear-gradient(155deg, #272b32, #1e2127 76%);
  border-color: var(--line);
  box-shadow: 0 14px 36px #08090c33;
}
.stat-card::before { background: #8397ab; }
.stat-card:first-child::before { background: #93c1e4; }
.stat-card:nth-child(2)::before { background: #a9cbe5; }
.stat-card:nth-child(3)::before { background: #edc582; }
.stat-card:nth-child(4)::before { background: #e3a499; }
.dashboard-stats .stat-card:nth-child(2)::before { background: #edc582; }
.dashboard-stats .stat-card:nth-child(3)::before { background: #e3a499; }
.dashboard-stats .stat-card:nth-child(4)::before { background: #aaa8d8; }
.stat-card span, .stat-card small, .dashboard-panel .empty-note { color: #bac0c9; }
.stat-card strong { color: #f0f2f4; }
.stat-card:nth-child(2) strong { color: #c6ddf1; }
.stat-card:nth-child(3) strong { color: #f0ce98; }
.stat-card:nth-child(4) strong { color: #e7b4aa; }
.dashboard-stats .stat-card:nth-child(2) strong { color: #f0ce98; }
.dashboard-stats .stat-card:nth-child(3) strong { color: #e7b4aa; }
.dashboard-stats .stat-card:nth-child(4) strong { color: #cbc9ed; }
.stat-button:hover { border-color: #92b7d4; background: #303c49; }
.capacity-card progress { accent-color: #94c1e4; }
.capacity-card progress::-webkit-progress-bar { background: #353c45; }
.capacity-card progress::-webkit-progress-value { background: #94c1e4; }
.dashboard-panel h3, .manual-item strong, .subscriber-copy strong,
.ticket-item strong { color: #f0f2f4; }
.dashboard-row, .manual-item, .subscriber-item, .ticket-item { border-color: #3d424b; }
.dashboard-row:hover, .manual-item:hover, .manual-item.selected,
.subscriber-item:hover, .subscriber-item.selected,
.ticket-item:hover, .ticket-item.selected { background: #30353d; }
.manual-item.selected, .subscriber-item.selected, .ticket-item.selected {
  box-shadow: inset 3px 0 #9cc4e4;
}
.subscriber-item.is-checking, .manual-item.is-checking { background: #2b4052; }
.is-checking .mini-status { color: #d8edfc; background: #36536a; }
.is-checking .mini-status::before { border-color: #b9dcf3; border-top-color: transparent; }
.subscriber-avatar { background: #31485d; color: #c0e4fc; }
.detail-empty .empty-icon { color: #a9d2ef; border-color: #688ba7; }
.check-progress { color: #d6e8f5; }
.check-spinner { border-color: #49657a; border-top-color: #a8d2ef; box-shadow: 0 0 0 5px #8bbbe011; }
.manual-item span, .ticket-item span, .manual-item small,
.subscriber-copy small, .ticket-item small { color: #b6bdc7; }
.primary-button {
  background: #a8cde9;
  border-color: #c9e4f7;
  color: #172531;
}
.primary-button:hover { background: #c7e2f5; }
.secondary-button, .ghost-button, .icon-button {
  background: #30363f;
  border-color: #545d69;
  color: #f0f2f4;
}
.secondary-button:hover, .ghost-button:hover, .icon-button:hover { background: #3d4550; }
.panel-tabs button { border-color: #4c5560; background: #292f37; color: #d3d8de; }
.panel-tabs button:hover { border-color: #9bc3e1; background: #344454; color: #fff; }
.panel-tabs button.active, .panel-tabs button.active:hover {
  border-color: #a9d2ef;
  background: #354f66;
  color: #f6faff;
  box-shadow: 0 0 0 2px #8cb9dc30, 0 8px 18px #08090b50;
}
.panel-tabs button.active::before { background: #a8d5f2; }
.panel-tabs button.active span { color: #f6faff; }
.panel-tabs span { background: #414954; }
.global-search, .manage-card, .account-health-summary,
.access-summary span, .site-visit-stats > div,
.archive-summary-counts > div, .folder-card, .manual-detail .manual-folder {
  background: #252a31;
  border-color: #48515d;
}
.global-search label, .dashboard-panel h3, .site-visit-heading h3,
.archive-summary h3 { color: #f1f3f5; }
.global-search-result { background: #2a3038; border-color: #48515d; color: #f3f4f6; }
.global-search-result:hover, .global-search-result:focus-visible {
  background: #31475a; border-color: #9fc9e8;
}
.global-search-results { border-color: #48515d; }
.dashboard-mailing-link { background: #283846; border-color: #6688a2; color: #f2f7fb; }
.dashboard-mailing-link:hover, .dashboard-mailing-link:focus-visible {
  background: #354c60; border-color: #a7cdeb;
}
.dashboard-mailing-link small { color: #c0c6ce; }
.mailing-sender { background: #2c453e; border-color: #5c9583; color: #d6f1e5; }
.mailing-panel a, .mailing-preview strong { color: #a9cfe9; }
.mailing-recipient-row { background: #252b32; border-color: #48515d; }
.mailing-recipient-row:hover, .mailing-recipient-row:has(input:checked) {
  background: #30485b; border-color: #9bc4e3;
}
.mailing-recipient-row input { accent-color: #9bc4e3; }
.telegram-subtabs button {
  background: #29323c;
  border-color: #536373;
  color: #d6e0e9;
}
.telegram-subtabs button:hover { border-color: #a8cde9; color: #fff; }
.telegram-subtabs button.active {
  background: #354f66;
  border-color: #a9d2ef;
  color: #fff;
  box-shadow: 0 0 0 2px #8cb9dc30;
}
.promo-panel input, .payment-settings select, .passkey-panel input,
.system-panel input, .site-account-detail input {
  background: #1a1e24;
  border-color: #566371;
  color: #f0f2f4;
}
.promo-card, .promo-redemption { background: #252d36; border-color: #4c6174; }
.promo-code, .promo-redemption strong { color: #f2f7fb; }
.promo-redemption-code { color: #add2ee; }
.payment-settings input[type="checkbox"] { accent-color: #9cc4e4; }
.payment-settings summary { color: #f1f5f8; }
.create-operation:not(.error) {
  background: #2b4559; border-color: #94c0e2; color: #f3f8fc;
}
.create-operation:not(.error) .create-operation-spinner {
  border-color: #aacde644; border-top-color: #c3e0f4;
}
.global-search-control input, .filters input, .filters select,
.ticket-filters input, .ticket-filters select, .folder-add-panel input,
.folder-add-panel select, .account-panel input, .account-add-panel input,
.manual-detail input, .manual-detail textarea, .manage-card input,
.manage-card textarea, .ticket-reply-form textarea, .action-dialog input,
.action-dialog select, .site-account-detail .advanced-actions-content input,
.mailing-panel input, .mailing-panel select, .mailing-panel textarea {
  background-color: #1a1e24;
  border-color: #4b5460;
  color: #f0f2f4;
}
.global-search-control input::placeholder, input::placeholder,
textarea::placeholder { color: #929ba8; }
.list-panel .filters select, #view-manual .ticket-filters select {
  background-color: #1a222c;
  border-color: #5a7186;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='10' viewBox='0 0 14 10'%3E%3Cpath d='m2 3 5 5 5-5' fill='none' stroke='%23a9d2ef' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.list-panel .filters select:hover, #view-manual .ticket-filters select:hover {
  background-color: #2b3c4e;
  border-color: #9cc4e4;
}
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, summary:focus-visible { outline-color: #b1d6f1; }
.filters input:focus, .filters select:focus, .login-card input:focus {
  border-color: #9cc4e4;
  box-shadow: 0 0 0 3px #9cc4e430;
}
.action-dialog input:focus, .action-dialog select:focus {
  outline: 2px solid #a9d2ef;
  outline-offset: 1px;
}
.access-state.pending { background: #2b475b; color: #b6dcf5; }
.runtime-toggle, .runtime-time {
  background: #30363e;
  border-color: #69737e;
  color: #f4f5f7;
}
.runtime-toggle:hover, .runtime-widget[open] .runtime-toggle {
  background: #404852;
  border-color: #a9b2bc;
}
.runtime-toggle::after { border-color: #d7dce1; }
.runtime-compact-cpu { border-color: #626c77; color: #cbd1d8; }
.runtime-mobile-label, .runtime-item span, .runtime-time strong { color: #c4daeb; }
.runtime-bar { background: #20252c; border-color: #626c78; }
.runtime-item { background: #2b3139; border-color: #49525e; }
.runtime-indicator { background: #87c6a5; box-shadow: 0 0 0 3px #87c6a530; }
.login-screen {
  background: radial-gradient(ellipse 550px 390px at 50% 10%, #343a43 0, transparent 70%), #15171b;
}
.login-card { background: linear-gradient(155deg, #2a2f37, #1e2229); border-color: #606975; }
.login-brand-copy span, .login-card label { color: #c6ccd4; }
.login-card input { background: #191d23; border-color: #5a6470; color: #f3f5f6; }
.passkey-autofill-hint { color: #bfc6cf; }
.login-card .login-passkey { color: #c6e1f3; border-color: #8baec8; }
.passkey-animation {
  background: radial-gradient(circle at 50% 37%, #39414b 0, #292f37 43%, #1e2229 100%);
}
.passkey-animation-icon {
  border-color: #9bc4e3;
  background: #31485d;
  box-shadow: 0 0 0 8px #a9d2ef18, 0 0 42px #8bbbe055;
  animation-name: admin-passkey-glow;
}
.passkey-animation-icon svg { stroke: #d6edfd; }
.passkey-scan-line { background: #e9f5fd; box-shadow: 0 0 14px 3px #9bc4e3; }
.passkey-animation-brand { color: #b8d8ef; }
.passkey-animation-dots i { background: #a8cde9; }
.passkey-animation.is-success .passkey-animation-icon { animation-name: admin-passkey-success; }
@keyframes admin-passkey-glow {
  50% { box-shadow: 0 0 0 12px #a9d2ef22, 0 0 54px #8bbbe088; }
}
@keyframes admin-passkey-success {
  to { border-color: #a2d1b8; background: #315b49; box-shadow: 0 0 0 12px #a2d1b822, 0 0 55px #a2d1b877; }
}
.action-dialog, .mobile-sections-dialog { background: #242a32; border-color: #66707c; }
.site-visit-stats > div:first-child, .archive-summary-counts .archive-total {
  background: #2a4155; border-color: #87b7d8;
}
.site-visit-stats > div:first-child strong,
.archive-summary-counts .archive-total strong { color: #d2e9fa; }
.site-visit-plot { background: #1a1e24; }
.site-visit-bar { background: linear-gradient(180deg, #a9d4f1, #628fb1); }
.search-highlight { border-color: #a9d4f1 !important; box-shadow: 0 0 0 3px #a9d4f144 !important; }

/* System settings use neutral controls so they do not look like the public site. */
#view-system { --accent: #cbd1d8; }
#view-system .eyebrow { color: #b9c0c8; }
#view-system .system-panel h3 { color: #f1f3f5; }
#view-system .system-panel label,
#view-system .system-folder span,
#view-system .system-meta,
#view-system .passkey-item small { color: #b9c0c8; }
#view-system input,
#view-system select,
#view-system #system-audience {
  background-color: #1d2127;
  border-color: #59616b;
  color: #f0f2f4;
}
#view-system select:not([multiple]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m3 6 5 5 5-5' fill='none' stroke='%23c8cdd4' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
#view-system input:focus,
#view-system select:focus {
  border-color: #b9c0c8;
  outline-color: #dce1e6;
  box-shadow: 0 0 0 3px #cbd1d826;
}
#view-system .primary-button {
  background: #cbd1d8;
  border-color: #e0e4e9;
  color: #20252b;
}
#view-system .primary-button:hover { background: #e7eaee; }
#view-system .system-folder,
#view-system .passkey-item {
  background: #282d34;
  border-color: #515a65;
}
@media (max-width: 730px) {
  .topbar {
    background: linear-gradient(145deg, #303e4d, #252d37 65%, #20242a);
    border-color: #6785a0;
  }
  .topbar-mobile-brand { color: #f2f4f6; }
  .auto-refresh-status { color: #b9c0c8; }
  .mobile-bottom-nav { background: #202833f7; border-color: #607b93; }
  .mobile-bottom-nav button { color: #b5bec8; }
  .mobile-bottom-nav button.active {
    background: #36536c;
    border-color: #a7d0ed;
    color: #fff;
  }
  .mobile-sections-grid button { background: #303740; border-color: #56616d; color: #eef0f2; }
  .mobile-sections-grid button.active { background: #36536c; border-color: #a7d0ed; color: #fff; }
  .mobile-sections-heading button { background: #3a424c; border-color: #69747f; }
  .mobile-navigation select { background: #2c4153; border-color: #89b5d5; box-shadow: none; }
  .mobile-current-view { background: #30485b; border-color: #79a7c6; color: #edf5fb; }
}

/* The remaining term is a separate, readable value in every subscription detail. */
.manual-detail .manual-status:has(+ .subscription-countdown) { margin-bottom: 10px; }
.manual-detail .subscription-countdown {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 5px 14px; min-width: 0; margin: 0 0 18px; padding: 13px 16px;
  border: 1px solid #68737e; border-radius: 12px; background: #303740;
}
.subscription-countdown-label {
  color: #c3cbd3; font-size: 11px; font-weight: 800; letter-spacing: .12em;
}
.manual-detail .subscription-countdown strong {
  color: #f5f7f8; font-size: clamp(24px, 3vw, 32px); line-height: 1.1; letter-spacing: -.04em;
}
.manual-detail .subscription-countdown.urgent { border-color: #b9915b; background: #40362c; }
.manual-detail .subscription-countdown.urgent .subscription-countdown-label { color: #f0c98e; }

/* Show the remaining time directly in Telegram, Avito and Web lists. */
.subscriber-copy .subscription-list-countdown,
.manual-item-copy .subscription-list-countdown {
  display: inline-flex; align-items: center; width: fit-content; max-width: 100%;
  margin-top: 7px; padding: 6px 10px; border: 1px solid #6d7b89;
  border-radius: 9px; background: #303b46; color: #f4f7f9;
  font-size: 15px; font-weight: 800; line-height: 1.2;
}
.subscriber-copy .subscription-list-countdown.urgent,
.manual-item-copy .subscription-list-countdown.urgent {
  border-color: #bd965e; background: #44382b; color: #ffe0a8;
}
