[hidden] { display: none !important; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.dashboard-grid, .folder-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.dashboard-panel, .folder-admin-card { min-width: 0; min-height: 150px; padding: 20px; }
.dashboard-panel h3, .folder-admin-card h3 { margin: 0 0 14px; overflow-wrap: anywhere; }
.dashboard-panel > p { font-size: 12px; }
.dashboard-row { display: block; width: 100%; border: 0; border-top: 1px solid #2b3d52; padding: 13px 0; background: transparent; color: #dcebf4; text-align: left; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
.dashboard-row:hover { color: #8ef0df; }
.folder-admin-card p { margin: 8px 0; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.folder-add-panel { min-height: 0; padding: 22px; margin-bottom: 16px; display: grid; grid-template-columns: minmax(180px, .7fr) minmax(0, 1.3fr); gap: 20px; }
.folder-add-panel h3 { margin: 0 0 10px; font-size: 19px; }
.folder-add-panel p { font-size: 12px; line-height: 1.5; }
.folder-add-panel form { display: grid; gap: 9px; }
.folder-add-panel label { color: #a9bdd0; font-size: 12px; font-weight: 700; }
.folder-add-panel input, .folder-add-panel select { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #38516a; border-radius: 9px; background: #0e1826; color: #e8f4ff; }
.folder-add-panel button { justify-self: start; }
.folder-sync-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.folder-sync-bar p { margin: 0; font-size: 12px; }
.folder-ok { color: #81ddbd; }
.folder-warning { color: #f1c184; }
.folder-error { color: #ffad9f; }
.account-health-summary { margin: -4px 0 18px; padding: 12px 15px; border: 1px solid #30465b; border-radius: 11px; background: #152334; color: #b7cbda; font-size: 12px; line-height: 1.5; }
.account-health { font-weight: 800; }
.account-health.healthy { color: #81ddbd; }
.account-health.attention, .account-pending { color: #f6cc78; }
.account-health.error, .account-health.disconnected { color: #ffad9f; }
.mini-status.pending, .status-pill.pending { background: #4b391c; color: #ffdc88; }
.mini-status.issue, .status-pill.issue { background: #4a2927; color: #ffb5a6; }
.folder-card.pending, .manual-detail .manual-folder.pending { border-color: #a27632; background: #2c261b; }
.folder-card.issue, .manual-detail .manual-folder.issue { border-color: #ad6058; background: #30201f; }
.manual-detail .manual-status.pending, .manual-detail .manual-folder.pending span { color: #ffdc88; }
.manual-item .manual-pending { color: #ffdc88; }
.manual-detail .manual-status.issue, .manual-detail .manual-folder.issue span,
.manual-item .manual-issue { color: #ffb5a6; }
.account-panel { max-width: 560px; min-height: 0; padding: 24px; }
.account-panel p { margin-top: 0; font-size: 13px; line-height: 1.5; }
.account-panel form { display: grid; gap: 10px; }
.account-panel label { color: #a9bdd0; font-size: 12px; font-weight: 700; }
.account-panel input { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #38516a; border-radius: 9px; background: #0e1826; color: #e8f4ff; }
.account-panel button { margin-top: 8px; }
.stat-button { color: inherit; text-align: left; font: inherit; cursor: pointer; }
.stat-button:hover { border-color: #69d8c5; background: #183042; }
.stat-button strong { color: #ffd28a; }
.filters { flex-wrap: wrap; }
.filters input { flex: 1 1 180px; }
.filters select { flex: 1 1 130px; max-width: none; }
.list-count { margin: -5px 17px 14px; color: #8ea3b8; font-size: 11px; }
.issue-button { display: block; width: 100%; border: 0; background: transparent; text-align: left; cursor: pointer; }
.issue-button:hover { color: #fff; text-decoration: underline; }
.detail-remaining { margin: 10px 24px 0; color: #98dacf; font-size: 12px; font-weight: 700; }
.manage-divider { height: 1px; background: #355268; margin: 8px 0; }
.ticket-filters { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.ticket-filters input, .ticket-filters select { min-width: 0; padding: 10px 12px; border: 1px solid #2b3b51; border-radius: 9px; background: #0c1420; color: #edf3fb; }
.ticket-filters input { flex: 1 1 230px; }
.ticket-filters select { flex: 0 1 190px; }
.ticket-filters span { color: #8ea3b8; font-size: 11px; }
.ticket-subscriber { margin: 10px 0 4px; }
.manual-intro { max-width: 760px; margin: -4px 0 18px; color: #9eb2c7; font-size: 13px; line-height: 1.55; }
.manual-summary { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.manual-summary span { border: 1px solid #2b3d52; border-radius: 9px; background: #142536; padding: 10px 13px; color: #9eb2c7; font-size: 12px; }
.manual-summary strong { color: #d8f8ee; }
.manual-grid { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); gap: 16px; }
.manual-list, .manual-detail { min-height: 220px; min-width: 0; }
.manual-item { display: grid; gap: 5px; width: 100%; padding: 16px 18px; border: 0; border-bottom: 1px solid #2b3d52; background: transparent; color: #e4edf8; text-align: left; }
.manual-item:hover, .manual-item.selected { background: #1b2d40; }
.manual-item strong { overflow-wrap: anywhere; font-size: 13px; }
.manual-item span { color: #9eb2c7; font-size: 12px; }
.manual-detail { padding: 22px; }
.manual-detail h3 { margin: 0; overflow-wrap: anywhere; }
.manual-detail .manual-email { margin: 6px 0 0; color: #a9bdd0; font-size: 13px; overflow-wrap: anywhere; }
.manual-detail .manual-status { margin: 8px 0 18px; color: #a9bdd0; font-size: 12px; }
.manual-detail .manual-folder { display: grid; gap: 4px; padding: 10px 12px; border: 1px solid #355268; border-radius: 9px; margin: 8px 0; font-size: 12px; }
.manual-detail .manual-folder span { color: #a9bdd0; }
.manual-detail .manual-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 17px 0; }
.manual-detail .manual-note { display: grid; gap: 8px; margin-top: 16px; }
.manual-detail .manual-note label { color: #a9bdd0; font-size: 12px; font-weight: 700; }
.manual-detail .manual-note textarea { width: 100%; min-height: 75px; resize: vertical; border: 1px solid #38516a; border-radius: 9px; background: #0e1826; color: #e8f4ff; padding: 11px; font: inherit; }
.manual-detail .manual-note input { width: 100%; min-height: 44px; padding: 11px; border: 1px solid #38516a; border-radius: 9px; background: #0e1826; color: #e8f4ff; font: inherit; }
.manual-detail .danger-button { margin-top: 16px; }
.panel-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 20px; }
.panel-tabs button { min-width: 0; min-height: 44px; border: 1px solid #2b3d52; border-radius: 10px; background: #142536; color: #93a9bf; padding: 9px 10px; font-size: 12px; line-height: 1.25; font-weight: 700; }
.panel-tabs button.active { border-color: #78dfd0; background: #173b3e; color: #d9fff9; }
.panel-tabs span { display: inline-block; margin-left: 4px; border-radius: 12px; background: #345060; padding: 1px 6px; font-size: 10px; }
.list-tools, .manage-inline, .manage-buttons, .dialog-actions { display: flex; gap: 8px; align-items: center; }
.list-tools .primary-button { white-space: nowrap; }
.manage-card { margin: 24px; padding: 20px; border: 1px solid #355268; border-radius: 14px; background: #142536; display: grid; gap: 11px; }
.manage-card h3 { margin: 0; font-size: 16px; }
.manage-card p { margin: 0 0 5px; color: #9eb2c7; font-size: 12px; line-height: 1.5; }
.manage-card label, .action-dialog label, .ticket-reply-form label { display: block; color: #a9bdd0; font-size: 12px; font-weight: 700; }
.manage-card input { width: 100%; min-width: 0; }
.manage-card textarea { width: 100%; resize: vertical; min-height: 70px; background: #0e1826; color: #e8f4ff; border: 1px solid #38516a; border-radius: 9px; padding: 11px; font: inherit; }
.manage-card #save-note { justify-self: start; }
.advanced-actions { border-top: 1px solid #355268; margin-top: 4px; padding-top: 10px; }
.advanced-actions summary { color: #c7e4e0; font-size: 13px; font-weight: 700; cursor: pointer; }
.advanced-actions-content { display: grid; gap: 11px; padding-top: 15px; }
.advanced-actions-content .danger-button { justify-self: start; }
.manage-inline input { flex: 1; }
.manage-inline button, .manage-buttons button { white-space: nowrap; }
.danger-button { justify-self: start; margin-top: 7px; padding: 11px 15px; border: 1px solid #c56b64; border-radius: 10px; background: #452d32; color: #ffc6bc; font-weight: 800; }
.danger-button:hover { background: #61343a; }
button:disabled { opacity: .55; cursor: not-allowed; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 12px 0 16px; }
.section-heading h2 { margin: 2px 0 0; font-size: 23px; }
.support-grid { display: grid; grid-template-columns: minmax(270px, .8fr) minmax(0, 1.2fr); gap: 16px; }
.ticket-list, .ticket-detail, .audit-list { min-height: 350px; }
.ticket-item { display: grid; gap: 6px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #2b3d52; background: transparent; color: #e4edf8; padding: 16px 18px; }
.ticket-item:hover, .ticket-item.selected { background: #1b2d40; }
.ticket-item strong { font-size: 13px; overflow-wrap: anywhere; }
.ticket-item span { color: #b5c7d9; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ticket-item small, .ticket-date { color: #8ea3b8; font-size: 11px; }
.ticket-detail { padding: 24px; }
.ticket-detail h3 { margin: 6px 0; overflow-wrap: anywhere; }
.ticket-message, .ticket-reply { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; line-height: 1.55; padding: 14px; border-radius: 10px; background: #1b2e3f; }
.ticket-reply { border-left: 3px solid #67cabb; background: #1a353b; }
.ticket-reply-form { display: grid; gap: 10px; margin-top: 24px; }
.ticket-reply-form textarea { width: 100%; resize: vertical; min-height: 90px; background: #0e1826; color: #e8f4ff; border: 1px solid #38516a; border-radius: 9px; padding: 12px; font: inherit; }
.ticket-reply-form button { justify-self: start; }
.ticket-delete { margin-top: 22px; }
.audit-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid #2b3d52; padding: 15px 20px; font-size: 12px; }
.audit-row strong { min-width: 170px; color: #d8f8ee; }
.audit-row span { flex: 1; overflow-wrap: anywhere; }
.audit-row small { color: #8ea3b8; }
.system-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.system-panel { min-height: 210px; padding: 22px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.system-grid, .system-panel { min-width: 0; }
.system-panel h3 { margin: 0; font-size: 19px; }
.system-panel p { margin: 0; line-height: 1.55; }
.system-panel label { font-size: 12px; font-weight: 700; color: #a9bdd0; }
.system-panel select { width: 100%; max-width: 420px; padding: 11px 12px; border: 1px solid #38516a; border-radius: 9px; background: #0e1826; color: #e8f4ff; }
.system-panel strong { overflow-wrap: anywhere; }
.system-folder-list { width: 100%; display: grid; gap: 9px; }
.system-folder { display: grid; gap: 4px; padding: 11px 13px; border: 1px solid #355268; border-radius: 9px; background: #142536; }
.system-folder span, .system-meta { color: #9eb2c7; font-size: 12px; }
.action-dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); overflow-y: auto; padding: 0; border: 1px solid #3d5f70; border-radius: 18px; background: #142435; color: #e8f4ff; box-shadow: 0 25px 100px #000a; }
.action-dialog::backdrop { background: #020a12bf; }
.action-dialog form { display: grid; gap: 11px; padding: 26px; }
#create-avito-field:not([hidden]) { display: grid; gap: 11px; }
.action-dialog h2 { margin: 0; }
.action-dialog p { margin: 0 0 5px; font-size: 12px; line-height: 1.5; color: #9fb4c7; }
.action-dialog input, .action-dialog select { width: 100%; }
.action-dialog input, .action-dialog select { min-width: 0; padding: 11px 12px; border: 1px solid #38516a; border-radius: 9px; background: #0e1826; color: #e8f4ff; }
.action-dialog input:focus, .action-dialog select:focus { outline: 2px solid #66d9c9; outline-offset: 1px; }
.subscription-preview { padding: 12px; border: 1px solid #356656; border-radius: 10px; background: #183b36; color: #d8fff4 !important; }
.create-status { padding: 12px; border: 1px solid #4a7188; border-radius: 10px; background: #193244; color: #d9efff !important; }
.create-status.error { border-color: #a35d56; background: #422a2a; color: #ffe0da !important; }
.dialog-actions { justify-content: flex-end; margin-top: 12px; }
@media (max-width: 1000px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .main-area { min-width: 0; }
  .folder-add-panel { grid-template-columns: 1fr; }
}
@media (max-width: 730px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .panel-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 18px; border: 0; overflow: visible; }
  .panel-tabs button { min-width: 0; min-height: 44px; padding: 8px 10px; border: 1px solid #2b3d52; border-radius: 10px; background: #142536; font-size: 12px; white-space: normal; }
  .panel-tabs button.active { border-color: #78dfd0; background: #173b3e; }
  .dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dashboard-grid, .folder-admin-grid { grid-template-columns: 1fr; }
  .dashboard-panel, .folder-admin-card { min-height: 0; padding: 17px; }
  .folder-add-panel { padding: 17px; }
  .folder-add-panel input, .folder-add-panel select { font-size: 16px; }
  .folder-add-panel button, .folder-sync-bar button { width: 100%; }
  .list-tools .primary-button { padding: 9px 10px; font-size: 11px; }
  .filters input { flex: 1 1 100%; }
  .filters select { flex: 1 1 calc(50% - 4px); }
  .list-panel, .ticket-list, .ticket-detail, .audit-list, .manual-list, .manual-detail { min-height: 160px; }
  .manage-card { margin: 16px; padding: 15px; }
  .manage-inline, .manage-buttons { flex-direction: column; align-items: stretch; }
  .manage-inline button, .manage-buttons button, .danger-button { width: 100%; }
  .support-grid { grid-template-columns: 1fr; }
  .manual-grid { grid-template-columns: 1fr; }
  .ticket-detail { padding: 18px; }
  .ticket-filters select { flex: 1 1 140px; }
  .system-grid { grid-template-columns: 1fr; }
  .action-dialog { width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
  .action-dialog form { padding: 18px; }
  .dialog-actions { flex-direction: column-reverse; align-items: stretch; }
  .dialog-actions button { width: 100%; }
  .action-dialog input, .action-dialog select, .ticket-filters input, .ticket-filters select,
  .filters input, .filters select, .manage-card input, .manage-card textarea,
  .ticket-reply-form textarea, .manual-note textarea { font-size: 16px; }
  .primary-button, .secondary-button, .ghost-button, .danger-button,
  .icon-button, .ticket-item, .manual-item { min-height: 44px; }
  .account-panel input { font-size: 16px; }
}
@media (max-width: 420px) {
  .section-heading { align-items: stretch; flex-direction: column; }
  .section-heading > button { width: 100%; }
  .topbar { gap: 10px; }
  .topbar h1 { font-size: 24px; overflow-wrap: anywhere; }
  .panel-head { padding: 18px 16px 14px; }
  .detail-info { grid-template-columns: 1fr; }
  .detail-info > div + div { border-left: 0; border-top: 1px solid #2a394d; }
  .manual-detail { padding: 16px; }
  .manual-detail .manual-actions button, .manual-detail .manual-note button { width: 100%; }
}

/* Consistent type and spacing across the dashboard and forms. */
:root { font-family: "Segoe UI Variable", "Segoe UI", Arial, sans-serif; font-synthesis: none; }
body { line-height: 1.45; }
button, input, select, textarea { font-family: inherit; }
button { line-height: 1.35; }
.main-area { max-width: 1540px; }
.topbar { margin-bottom: 22px; }
.topbar h1 { line-height: 1.15; }
.auto-refresh-status { margin: 7px 0 0; color: #92a9bc; font-size: 11px; line-height: 1.4; }
.auto-refresh-status.error { color: #ffb5a6; }
.panel-tabs button { font-size: 13px; line-height: 1.35; }
.section-heading h2, .panel-head h2, .dashboard-panel h3, .folder-admin-card h3 { line-height: 1.25; }
.manual-intro, .dashboard-row, .dashboard-panel > p, .folder-admin-card p,
.folder-add-panel p, .folder-sync-bar p, .account-panel p, .manage-card p,
.system-panel p, .ticket-message, .ticket-reply { font-size: 13px; line-height: 1.55; }
.folder-add-panel label, .account-panel label, .manage-card label,
.action-dialog label, .ticket-reply-form label, .system-panel label { font-size: 13px; }
.stat-card span { font-size: 13px; }
.stat-card small, .list-count, .ticket-filters span, .ticket-item small,
.ticket-date, .system-folder span, .system-meta, .action-note { font-size: 12px; }
.primary-button, .secondary-button, .ghost-button, .danger-button { font-size: 13px; }
.sidebar-bottom, .nav-caption, .brand-row span { line-height: 1.4; }
.folder-add-panel { grid-template-columns: minmax(220px, .6fr) minmax(0, 1.4fr); }
.folder-add-panel form { gap: 10px; }
.folder-add-panel input, .folder-add-panel select, .account-panel input,
.system-panel select, .action-dialog input, .action-dialog select { min-height: 44px; }
.workspace { grid-template-columns: minmax(360px, 410px) minmax(0, 1fr); }
.list-panel .panel-head { flex-wrap: wrap; }
.list-panel .panel-head > div:first-child { min-width: 0; }
.list-panel .list-tools { width: 100%; justify-content: flex-start; }
.list-panel .list-tools .primary-button { min-width: 180px; }
.list-panel .list-tools .icon-button { flex: 0 0 44px; width: 44px; height: 44px; }
.list-panel .filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.list-panel .filters input { grid-column: 1 / -1; }
.list-panel .filters select { width: 100%; max-width: none; }
.subscriber-copy small { font-size: 12px; line-height: 1.4; }
.subscriber-copy strong, .manual-item strong, .ticket-item strong { font-size: 14px; }
.mini-status { font-size: 11px; }
.filters select { text-overflow: ellipsis; }
button:focus-visible, a:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid #78dfd0;
  outline-offset: 2px;
}
@media (max-width: 1100px) {
  .dashboard-stats, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .folder-add-panel { grid-template-columns: 1fr; }
  .main-area { padding: 26px 22px 48px; }
}
@media (max-width: 860px) {
  .workspace { display: block; }
  .workspace .list-panel { min-height: 0; }
  .workspace .detail-panel { display: none; }
  .workspace.show-detail .list-panel { display: none; }
  .workspace.show-detail .detail-panel { display: block; }
  .mobile-close { display: grid; }
  .dashboard-grid, .folder-admin-grid, .system-grid,
  .manual-grid, .support-grid { grid-template-columns: 1fr; }
}
@media (max-width: 730px) {
  .main-area { padding: 20px 14px 38px; }
  .panel-tabs button { font-size: 13px; }
  .stat-card { min-height: 118px; padding: 16px; }
  .stat-card span { font-size: 12px; }
  .stat-card small { font-size: 11px; line-height: 1.35; }
  .dashboard-panel, .folder-admin-card, .folder-add-panel { padding: 18px; }
  .list-tools .primary-button { font-size: 13px; }
  .filters input, .filters select { font-size: 16px; }
  .list-panel .panel-head { padding: 20px 18px 16px; }
}
@media (max-width: 420px) {
  .topbar h1 { font-size: 23px; }
  .panel-tabs { gap: 8px; }
  .panel-tabs button { padding: 9px 7px; }
  .stat-card { padding: 14px; }
  .subscriber-item { display: grid; grid-template-columns: 37px minmax(0, 1fr); }
  .subscriber-avatar { grid-row: 1 / span 2; }
  .subscriber-copy strong { white-space: normal; overflow-wrap: anywhere; }
  .mini-status { grid-column: 2; justify-self: start; }
  .list-panel .list-tools .primary-button { flex: 1; min-width: 0; }
}
@media (max-width: 360px) {
  .list-panel .filters { grid-template-columns: 1fr; }
  .list-panel .filters input { grid-column: auto; }
}

/* Login card uses one clear type scale on both desktop and narrow phones. */
.login-screen { min-height: 100dvh; padding: 20px; }
.login-card {
  width: min(420px, 100%);
  min-width: 0;
  padding: 30px;
  font-family: "Segoe UI", Arial, sans-serif;
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.login-brand .brand-mark { flex: 0 0 52px; width: 52px; height: 52px; border-radius: 15px; }
.login-brand-copy { min-width: 0; }
.login-brand-copy strong { display: block; font-size: 20px; line-height: 1.15; letter-spacing: -.025em; }
.login-brand-copy span { display: block; margin-top: 4px; color: #a9bdd0; font-size: 11px; font-weight: 700; letter-spacing: .08em; line-height: 1.35; }
.login-card h1 { margin: 0; font-size: 26px; line-height: 1.2; letter-spacing: -.025em; }
.login-card form { gap: 0; margin-top: 24px; }
.login-card label { margin-bottom: 7px; font-size: 14px; line-height: 1.35; }
.login-card input { height: 48px; margin-bottom: 18px; padding: 0 14px; font-size: 16px; }
.login-card button { min-height: 48px; margin-top: 2px; font-size: 15px; }
.login-card .error-text { min-height: 0; margin: 14px 0 0; font-size: 13px; }
.login-card .error-text:empty { display: none; }
@media (max-width: 420px) {
  .login-screen { padding: 14px; }
  .login-card { padding: 24px; }
  .login-brand { gap: 12px; margin-bottom: 24px; }
  .login-brand-copy strong { font-size: 19px; }
  .login-card h1 { font-size: 23px; }
}

/* Add a Yandex folder by account and browser address. */
.folder-add-guide ol { margin: 18px 0; padding-left: 22px; color: #d5e5f0; font-size: 14px; line-height: 1.55; }
.folder-add-guide li { padding-left: 4px; margin-bottom: 10px; }
.folder-add-guide li::marker { color: #7de2d4; font-weight: 800; }
.folder-guide-note { padding: 12px 14px; border: 1px solid #48526a; border-radius: 10px; background: #1a2938; color: #c8d8e9; }
.folder-add-panel form > p { margin: 0; }
.folder-field-hint { color: #a7bad0; }
.folder-preview { min-width: 0; padding: 13px 14px; border: 1px solid #36685e; border-radius: 10px; background: #16332f; color: #d6f8ed; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.folder-preview-warning { border-color: #745b3e; background: #31271f; color: #f4d2a0; }
.folder-add-impact { color: #b5c7d9; font-size: 13px; line-height: 1.5; }
.folder-add-panel .error-text { padding: 11px 13px; border: 1px solid #885153; border-radius: 9px; background: #39272d; }

.account-add-panel { min-height: 0; padding: 22px; margin-bottom: 16px; display: grid; grid-template-columns: minmax(220px, .6fr) minmax(0, 1.4fr); gap: 20px; }
.account-add-panel h3 { margin: 0 0 10px; font-size: 19px; }
.account-add-panel p { margin: 0; font-size: 13px; line-height: 1.55; }
.account-add-panel form { display: grid; align-content: start; gap: 10px; }
.account-add-panel label { color: #a9bdd0; font-size: 13px; font-weight: 700; }
.account-add-panel input { width: 100%; min-width: 0; min-height: 44px; padding: 11px 12px; border: 1px solid #38516a; border-radius: 9px; background: #0e1826; color: #e8f4ff; }
.account-add-panel button { justify-self: start; }
.account-email { color: #d8f8ee; overflow-wrap: anywhere; }
.account-connect-button { margin-top: 12px; }
.account-login-content { display: grid; justify-items: center; gap: 14px; padding: 26px; text-align: center; }
.account-login-content .eyebrow { margin: 0; }
.account-login-content h2 { margin: 0; font-size: 22px; line-height: 1.25; overflow-wrap: anywhere; }
.account-login-content p { margin: 0; max-width: 410px; font-size: 13px; line-height: 1.55; color: #b7cbe0; }
.account-login-content img { display: block; width: min(312px, 100%); height: auto; padding: 8px; border-radius: 14px; background: #fff; }
.account-login-content button { width: 100%; max-width: 312px; }
@media (max-width: 1000px) {
  .account-add-panel { grid-template-columns: 1fr; }
}
@media (max-width: 730px) {
  .account-add-panel { padding: 18px; }
  .account-add-panel input { font-size: 16px; }
  .account-add-panel button, .account-connect-button { width: 100%; }
  .account-login-content { padding: 18px; }
}

/* Layout and type system for the working area. */
:root {
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}
html { font-size: 14px; }
body { font-size: 14px; line-height: 1.5; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; }
.app-shell { display: block; }
.main-area { max-width: 1440px; padding: 30px 32px 64px; }
.topbar { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid #24354a; }
.topbar-identity { display: flex; align-items: center; min-width: 0; gap: 16px; }
.topbar-identity > div:last-child { min-width: 0; }
.topbar-identity .brand-mark { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px; }
.topbar .eyebrow { margin-bottom: 4px; }
.topbar h1 { font-size: clamp(24px, 2.3vw, 30px); font-weight: 730; line-height: 1.18; letter-spacing: -.025em; }
.auto-refresh-status { margin-top: 5px; font-size: 12px; }
.eyebrow { color: #91abc2; font-size: 11px; letter-spacing: .11em; }
.top-actions { flex: 0 0 auto; }
.mobile-navigation, .mobile-list-back { display: none; }
.panel-tabs {
  display: flex; gap: 7px; overflow-x: auto; margin: 0 0 28px; padding: 0 0 11px;
  border-bottom: 1px solid #24354a; scrollbar-color: #3a6573 transparent;
}
.panel-tabs button {
  flex: 0 0 auto; min-height: 44px; padding: 10px 14px; border-radius: 10px;
  color: #b9ccdc; font-size: 13px; font-weight: 650; white-space: nowrap;
}
.panel-tabs button:hover { border-color: #6db8b1; color: #f2fffc; }
.panel-tabs button.active { background: #174345; border-color: #6bd2c4; color: #edfffa; }
.panel-tabs span { margin-left: 5px; }
.section-heading { margin: 4px 0 18px; }
.section-heading h2 { font-size: clamp(21px, 2vw, 25px); font-weight: 700; letter-spacing: -.02em; }
.panel, .stat-card { border-color: #2a3b50; }
.panel { min-width: 0; }
.dashboard-grid, .folder-admin-grid, .manual-grid, .support-grid, .system-grid { gap: 18px; }
.dashboard-panel, .folder-admin-card { padding: 22px; }
.dashboard-panel h3, .folder-admin-card h3 { font-size: 18px; font-weight: 700; }
.dashboard-row { font-size: 14px; line-height: 1.5; }
.stat-card { min-height: 112px; padding: 19px 21px; }
.stat-card span { font-size: 13px; line-height: 1.4; }
.stat-card strong { font-size: 30px; line-height: 1.15; }
.stat-card small { font-size: 12px; line-height: 1.4; }
.workspace { grid-template-columns: minmax(330px, 390px) minmax(0, 1fr); gap: 18px; }
.panel-head h2 { font-size: 20px; }
.subscriber-item, .manual-item, .ticket-item { padding: 16px 18px; }
.subscriber-copy strong, .manual-item strong, .ticket-item strong { font-size: 14px; line-height: 1.4; }
.subscriber-copy small, .manual-item span, .ticket-item span { font-size: 13px; line-height: 1.45; }
.ticket-item small, .ticket-date, .list-count, .action-note { font-size: 12px; line-height: 1.45; }
.mini-status { flex: 0 0 auto; font-size: 10px; letter-spacing: .02em; }
.manual-intro, .folder-admin-card p, .folder-add-panel p, .account-panel p,
.manage-card p, .system-panel p, .ticket-message, .ticket-reply { font-size: 14px; line-height: 1.55; }
.primary-button, .secondary-button, .ghost-button, .danger-button { font-size: 14px; font-weight: 700; }
.primary-button, .secondary-button, .ghost-button { min-height: 42px; }
.ticket-filters input, .ticket-filters select, .filters input, .filters select,
.account-panel input, .manage-card input, .manage-card textarea,
.action-dialog input, .action-dialog select { font-size: 14px; }
.account-panel label, .manage-card label, .folder-add-panel label,
.action-dialog label, .ticket-reply-form label, .system-panel label { font-size: 13px; }
.action-dialog { width: min(560px, calc(100vw - 28px)); }
.action-dialog form { gap: 12px; padding: 28px; }
.action-dialog h2 { font-size: 23px; line-height: 1.25; }
.action-dialog p { font-size: 13px; line-height: 1.55; }
.ticket-detail, .manual-detail { min-width: 0; }
.ticket-detail h3, .manual-detail h3 { font-size: 19px; }
.ticket-message, .ticket-reply { margin: 10px 0; }
.login-screen { background: radial-gradient(circle at 50% 0%, #1b3b4a 0, #0b101a 52%); }
.login-card { border-color: #345064; background: #111e2d; box-shadow: 0 28px 70px #0008; }
.login-card h1 { font-size: 27px; }
.login-card label { font-size: 13px; }
.login-card input { border-color: #38516a; }

@media (max-width: 900px) {
  .main-area { padding: 24px 22px 52px; }
  .dashboard-stats, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-grid, .folder-admin-grid, .manual-grid, .support-grid, .system-grid { grid-template-columns: 1fr; }
}
@media (max-width: 730px) {
  .main-area { padding: 18px 14px 42px; }
  .topbar { align-items: flex-start; padding-bottom: 16px; margin-bottom: 16px; }
  .topbar-identity .brand-mark { display: none; }
  .topbar h1 { font-size: 24px; }
  .topbar .ghost-button { padding: 9px 12px; }
  .panel-tabs { display: none; }
  .mobile-navigation { display: grid; gap: 7px; margin: 0 0 22px; color: #a9c0d3; font-size: 12px; font-weight: 700; }
  .mobile-navigation select {
    width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid #588f91;
    border-radius: 11px; background: #142c37; color: #edfffa; font-size: 16px; font-weight: 700;
  }
  .section-heading { gap: 10px; }
  .section-heading h2 { font-size: 21px; }
  .section-heading > button { min-width: 96px; }
  .dashboard-stats, .stats { gap: 10px; }
  .stat-card { min-height: 104px; padding: 15px; }
  .stat-card strong { font-size: 27px; }
  .dashboard-panel, .folder-admin-card, .folder-add-panel, .account-add-panel { padding: 18px; }
  .dashboard-panel h3, .folder-admin-card h3 { font-size: 18px; }
  .support-grid.show-detail .ticket-list, .manual-grid.show-detail .manual-list { display: none; }
  .support-grid.show-detail .ticket-detail, .manual-grid.show-detail .manual-detail { display: block; }
  .mobile-list-back { display: inline-flex; align-items: center; margin: 0 0 18px; }
  .ticket-filters { display: grid; grid-template-columns: 1fr auto; }
  .ticket-filters input { grid-column: 1 / -1; width: 100%; }
  .ticket-filters select { width: 100%; }
  .ticket-filters span { align-self: center; }
  .action-dialog { width: calc(100vw - 20px); max-height: calc(100dvh - 20px); }
  .action-dialog form { padding: 20px; }
  .action-dialog input, .action-dialog select, .ticket-filters input, .ticket-filters select,
  .filters input, .filters select, .manage-card input, .manage-card textarea,
  .ticket-reply-form textarea, .manual-note textarea { font-size: 16px; }
  .login-card { padding: 26px; }
}
@media (max-width: 420px) {
  .topbar h1 { font-size: 22px; }
  .top-actions { gap: 0; }
  .section-heading { align-items: flex-start; }
  .ticket-filters { grid-template-columns: 1fr; }
  .ticket-filters input { grid-column: auto; }
  .ticket-filters span { justify-self: start; }
}
