html { font-size: 14px; }
body { background: #f4f6f9; font-family: Tahoma, Arial, sans-serif; }
.navbar { min-height: 58px; }
.sidebar { position: fixed; top: 58px; right: 0; bottom: 0; width: 230px; overflow-y: auto; }
.sidebar .nav-link { color: #d7dce2; border-radius: .4rem; padding: .7rem .9rem; }
.sidebar .nav-link:hover { color: white; background: rgba(255,255,255,.12); }
.main-content { margin-right: 230px; padding: 82px 24px 30px; min-height: 100vh; }
.auth-content { max-width: 520px; padding-top: 10vh; }
.card { border: 0; box-shadow: 0 .125rem .5rem rgba(0,0,0,.07); }
.metric-card { border-right: 4px solid #0d6efd; }
.table { vertical-align: middle; }
.message-cell { max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipient-chip { display: inline-flex; gap: .5rem; align-items: center; background: #e9ecef; border-radius: 1rem; padding: .35rem .7rem; margin: .2rem; }

:root {
  --pr-primary: #3659d9;
  --pr-primary-dark: #243da8;
  --pr-ink: #17213a;
  --pr-muted: #6f7890;
  --pr-surface: #fff;
  --pr-border: #e7eaf2;
}

.page-hero { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 2rem; padding: 2rem 2.25rem; color: #fff; border-radius: 1.25rem; background: linear-gradient(125deg, #172554 0%, #3659d9 60%, #6d5ce7 100%); box-shadow: 0 1rem 2.5rem rgba(39, 62, 145, .22); }
.page-hero::after { content: ""; position: absolute; width: 230px; height: 230px; left: -55px; top: -95px; border-radius: 50%; background: rgba(255,255,255,.09); }
.page-hero h1 { position: relative; margin: .35rem 0 .45rem; font-size: clamp(1.6rem, 3vw, 2.35rem); font-weight: 800; }
.page-hero p { position: relative; margin: 0; color: rgba(255,255,255,.78); max-width: 650px; }
.hero-eyebrow { position: relative; display: inline-block; font-size: .7rem; letter-spacing: .18em; color: #bfc9ff; }
.hero-channel-badge { position: relative; z-index: 1; flex: 0 0 auto; display: flex; align-items: center; gap: .8rem; min-width: 215px; padding: .9rem 1rem; border: 1px solid rgba(255,255,255,.18); border-radius: 1rem; background: rgba(255,255,255,.12); backdrop-filter: blur(8px); }
.hero-channel-badge small, .hero-channel-badge strong { display: block; }
.hero-channel-badge small { margin-top: .2rem; color: #ced5ff; }
.hero-channel-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: .8rem; color: #233ca4; background: #fff; font-size: 1.4rem; }

.reminder-form { padding-bottom: 6rem; }
.form-section-card { padding: 1.5rem; border: 1px solid var(--pr-border); border-radius: 1.15rem; background: var(--pr-surface); box-shadow: 0 .5rem 1.5rem rgba(25, 38, 77, .055); }
.section-heading { display: flex; align-items: center; gap: .9rem; padding-bottom: 1.15rem; margin-bottom: 1.25rem; border-bottom: 1px solid #eef0f5; }
.section-heading h2 { margin: 0 0 .2rem; color: var(--pr-ink); font-size: 1.05rem; font-weight: 800; }
.section-heading p { margin: 0; color: var(--pr-muted); font-size: .82rem; }
.section-number { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: .85rem; color: var(--pr-primary); background: #eef1ff; font-size: .78rem; font-weight: 800; }
.reminder-form .form-label { color: #35405b; font-weight: 700; }
.reminder-form .form-control { border-color: #dfe3ed; border-radius: .8rem; }
.reminder-form .form-control:focus { border-color: #8296eb; box-shadow: 0 0 0 .22rem rgba(54,89,217,.12); }
.message-editor { min-height: 210px; resize: vertical; line-height: 1.9; }
.character-counter { color: var(--pr-muted); font-size: .78rem; direction: ltr; }

.channel-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: .65rem; }
.channel-selector input { position: absolute; opacity: 0; pointer-events: none; }
.channel-selector label { cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: .2rem; min-height: 112px; padding: .8rem .45rem; text-align: center; border: 1px solid #e1e5ef; border-radius: .9rem; background: #fafbfe; transition: .18s ease; }
.channel-selector label:hover { transform: translateY(-2px); border-color: #aeb9e8; }
.channel-selector input:focus-visible + label { outline: 3px solid rgba(54,89,217,.22); }
.channel-selector input:checked + label { color: var(--pr-primary-dark); border-color: var(--pr-primary); background: #eef1ff; box-shadow: inset 0 0 0 1px var(--pr-primary); }
.channel-selector small { color: var(--pr-muted); font-size: .7rem; }
.channel-symbol { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: .2rem; border-radius: 50%; background: #fff; color: var(--pr-primary); box-shadow: 0 .2rem .7rem rgba(45,60,120,.1); }
.delivery-note { display: flex; align-items: flex-start; gap: .65rem; padding: .85rem; color: #536079; border-radius: .8rem; background: #f5f7fc; font-size: .78rem; line-height: 1.75; }
.delivery-note > span { display: grid; place-items: center; width: 20px; height: 20px; flex: 0 0 20px; border-radius: 50%; color: #fff; background: var(--pr-primary); font-family: Georgia, serif; }
.delivery-note p { margin: 0; }

.recipients-heading { position: relative; }
.selected-count-badge { margin-right: auto; padding: .45rem .8rem; color: var(--pr-primary-dark); border-radius: 999px; background: #eef1ff; font-size: .78rem; font-weight: 700; }
.recipient-picker { position: relative; }
.recipient-picker-trigger { width: 100%; min-height: 62px; display: flex; align-items: center; justify-content: space-between; padding: .75rem 1rem; color: var(--pr-ink); text-align: right; border: 1px solid #dfe3ed; border-radius: .9rem; background: #fff; transition: .18s ease; }
.recipient-picker-trigger:hover, .recipient-picker-trigger[aria-expanded="true"] { border-color: #8296eb; box-shadow: 0 0 0 .22rem rgba(54,89,217,.1); }
.recipient-picker-trigger strong, .recipient-picker-trigger small { display: block; }
.recipient-picker-trigger small { margin-top: .2rem; color: var(--pr-muted); font-size: .72rem; }
.picker-chevron { color: var(--pr-primary); font-size: 1.4rem; transition: transform .18s ease; }
.recipient-picker-trigger[aria-expanded="true"] .picker-chevron { transform: rotate(180deg); }
.recipient-picker-panel { position: absolute; z-index: 1050; top: calc(100% + .55rem); right: 0; left: 0; overflow: hidden; border: 1px solid #dfe3ed; border-radius: 1rem; background: #fff; box-shadow: 0 1.2rem 3rem rgba(21,35,80,.18); }
.recipient-search-wrap { display: flex; align-items: center; gap: .65rem; margin: .8rem; padding: 0 .85rem; border: 1px solid #e0e4ed; border-radius: .75rem; background: #f8f9fc; }
.recipient-search-wrap span { color: var(--pr-primary); font-size: 1.4rem; }
.recipient-search-wrap input { width: 100%; padding: .75rem 0; border: 0; outline: 0; background: transparent; }
.recipient-picker-actions { display: flex; gap: .5rem; padding: 0 .8rem .7rem; border-bottom: 1px solid #edf0f5; }
.recipient-picker-actions button { padding: .35rem .65rem; color: var(--pr-primary); border: 0; border-radius: .5rem; background: #eef1ff; font-size: .75rem; }
.recipient-options { max-height: 310px; overflow-y: auto; padding: .45rem; }
.recipient-option { display: flex; align-items: center; gap: .7rem; padding: .65rem .7rem; cursor: pointer; border-radius: .75rem; transition: background .15s ease; }
.recipient-option:hover { background: #f4f6fb; }
.recipient-option input { width: 18px; height: 18px; accent-color: var(--pr-primary); }
.recipient-avatar { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; color: #fff; border-radius: .7rem; background: linear-gradient(135deg, #5977ea, #785dd8); font-weight: 800; }
.recipient-option-main { min-width: 0; flex: 1; }
.recipient-option-main strong, .recipient-option-main small { display: block; }
.recipient-option-main small { overflow: hidden; margin-top: .15rem; color: var(--pr-muted); text-overflow: ellipsis; white-space: nowrap; }
.recipient-email-state { padding: .28rem .5rem; border-radius: 999px; font-size: .65rem; }
.recipient-email-state.has-email { color: #147a52; background: #e5f7ef; }
.recipient-email-state.no-email { color: #a06415; background: #fff2d8; }
.recipient-no-result { padding: 1.5rem; color: var(--pr-muted); text-align: center; }
.recipient-native-select { position: absolute !important; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.selected-recipient-chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .75rem; }
.selected-recipient-chip { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem .65rem; color: #34466e; border: 1px solid #dfe4f3; border-radius: 999px; background: #f5f7fc; font-size: .76rem; }
.selected-recipient-chip b { color: #c33f4c; font-size: 1rem; line-height: 1; }
.recipient-channel-warning { padding: .65rem .8rem; color: #8a570f; border: 1px solid #f0d291; border-radius: .7rem; background: #fff8e8; font-size: .78rem; }
.empty-recipient-state { padding: 2rem; text-align: center; border: 1px dashed #ccd3e5; border-radius: 1rem; background: #fafbfe; }
.empty-recipient-state p { color: var(--pr-muted); }
.empty-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto .7rem; color: var(--pr-primary); border-radius: 1rem; background: #eef1ff; font-size: 1.8rem; }
.form-submit-bar { position: fixed; z-index: 1000; right: 254px; bottom: 16px; left: 24px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 1rem; border: 1px solid rgba(223,227,237,.9); border-radius: 1rem; background: rgba(255,255,255,.92); box-shadow: 0 .75rem 2.5rem rgba(25,38,77,.16); backdrop-filter: blur(12px); }
.form-submit-bar strong, .form-submit-bar small { display: block; }
.form-submit-bar small { margin-top: .15rem; color: var(--pr-muted); }
.validation-summary:empty { display: none; }

.dashboard-hero-actions { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: stretch; gap: .65rem; min-width: 225px; }
.dashboard-hero-actions .btn { color: #263d9d; border: 0; font-weight: 800; }
.service-health { display: flex; align-items: center; justify-content: center; gap: .45rem; padding: .5rem .7rem; border-radius: .7rem; background: rgba(255,255,255,.11); font-size: .75rem; }
.service-health i { width: 8px; height: 8px; border-radius: 50%; }
.service-health.is-ready i { background: #4ee0a2; box-shadow: 0 0 0 4px rgba(78,224,162,.16); }
.service-health.needs-attention i { background: #ffd36b; box-shadow: 0 0 0 4px rgba(255,211,107,.16); }
.dashboard-notice { display: flex; align-items: center; gap: .85rem; padding: .9rem 1rem; color: #78520f; border: 1px solid #eed49b; border-radius: 1rem; background: linear-gradient(90deg, #fff9e9, #fffdf7); }
.dashboard-notice .notice-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; color: #fff; border-radius: .75rem; background: #e5a72f; font-weight: 900; }
.dashboard-notice p { margin: .15rem 0 0; color: #92723a; font-size: .78rem; }
.dashboard-notice a { margin-right: auto; color: #8b5a07; white-space: nowrap; font-weight: 700; }
.dashboard-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.dashboard-metric { position: relative; overflow: hidden; display: flex; align-items: center; gap: .9rem; min-height: 124px; padding: 1.1rem; border: 1px solid var(--pr-border); border-radius: 1rem; background: #fff; box-shadow: 0 .5rem 1.5rem rgba(25,38,77,.05); }
.dashboard-metric::after { content: ""; position: absolute; width: 80px; height: 80px; left: -28px; bottom: -38px; border-radius: 50%; background: currentColor; opacity: .05; }
.dashboard-metric .metric-icon { display: grid; place-items: center; width: 48px; height: 48px; flex: 0 0 48px; color: inherit; border-radius: .9rem; background: currentColor; font-size: 1.3rem; }
.dashboard-metric .metric-icon::first-line { color: #fff; }
.dashboard-metric div { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: .65rem; }
.dashboard-metric small { grid-column: 1 / -1; color: var(--pr-muted); }
.dashboard-metric strong { color: var(--pr-ink); font-size: 2rem; line-height: 1.2; }
.dashboard-metric em { color: var(--pr-muted); font-size: .68rem; font-style: normal; }
.metric-indigo { color: #6958d5; }.metric-blue { color: #3275d5; }.metric-green { color: #22a477; }.metric-red { color: #d75161; }
.metric-indigo .metric-icon { background: #eeeafe; }.metric-blue .metric-icon { background: #e8f1ff; }.metric-green .metric-icon { background: #e4f8f0; }.metric-red .metric-icon { background: #ffeaed; }
.delivery-summary-card { position: relative; overflow: hidden; height: 100%; padding: 1.2rem; color: #fff; border-radius: 1.1rem; box-shadow: 0 .8rem 2rem rgba(25,38,77,.14); }
.sms-summary { background: linear-gradient(120deg, #2757b7, #3c86dc); }
.email-summary { background: linear-gradient(120deg, #6c43bd, #9663d8); }
.delivery-summary-card::after { content: ""; position: absolute; width: 180px; height: 180px; left: -60px; top: -80px; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; }
.delivery-summary-head { position: relative; z-index: 1; display: flex; align-items: center; gap: .75rem; }
.delivery-summary-head h2 { margin: 0 0 .15rem; font-size: 1rem; font-weight: 800; }
.delivery-summary-head p { margin: 0; color: rgba(255,255,255,.7); font-size: .72rem; }
.delivery-summary-head a { margin-right: auto; color: #fff; font-size: .74rem; }
.delivery-summary-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: .75rem; background: rgba(255,255,255,.15); font-size: 1.2rem; }
.delivery-summary-numbers { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.2rem; }
.delivery-summary-numbers div { display: flex; align-items: baseline; gap: .45rem; padding: .8rem; border-radius: .8rem; background: rgba(255,255,255,.11); }
.delivery-summary-numbers strong { font-size: 1.7rem; }.delivery-summary-numbers span { color: rgba(255,255,255,.78); font-size: .75rem; }
.dashboard-panel { overflow: hidden; padding: 1.15rem; border: 1px solid var(--pr-border); border-radius: 1.1rem; background: #fff; box-shadow: 0 .5rem 1.5rem rgba(25,38,77,.05); }
.dashboard-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .9rem; }
.dashboard-panel-head h2 { margin: 0 0 .18rem; color: var(--pr-ink); font-size: 1rem; font-weight: 800; }
.dashboard-panel-head p { margin: 0; color: var(--pr-muted); font-size: .73rem; }
.dashboard-panel-head a { color: var(--pr-primary); font-size: .75rem; font-weight: 700; }
.dashboard-table { margin-bottom: 0; }
.dashboard-table th { color: #8a91a4; border-bottom-color: #edf0f5; font-size: .7rem; font-weight: 500; }
.dashboard-table td { padding-top: .8rem; padding-bottom: .8rem; border-bottom-color: #f0f2f6; }
.channel-pill { padding: .3rem .55rem; color: #4258ac; border-radius: 999px; background: #edf0ff; font-size: .68rem; }
.row-action { display: grid; place-items: center; width: 28px; height: 28px; color: var(--pr-primary); text-decoration: none; border-radius: 50%; background: #eef1ff; }
.dashboard-empty { display: flex; flex-direction: column; align-items: center; padding: 2rem; color: var(--pr-muted); text-align: center; }
.dashboard-empty span { margin-bottom: .5rem; color: #8799df; font-size: 1.8rem; }.dashboard-empty p { margin: .25rem 0; font-size: .75rem; }.dashboard-empty.compact { padding: 1rem; font-size: .78rem; }
.system-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.system-summary-grid div { display: flex; flex-direction: column; justify-content: center; min-height: 92px; padding: .9rem; border: 1px solid #edf0f5; border-radius: .85rem; background: #fafbfe; }
.system-summary-grid span { color: var(--pr-muted); font-size: .72rem; }.system-summary-grid strong { margin-top: .2rem; color: var(--pr-ink); font-size: 1.65rem; }
.activity-panel { min-height: 310px; }
.activity-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: .65rem; padding: .65rem 0; border-top: 1px solid #f0f2f6; }
.activity-status { display: grid; place-items: center; width: 30px; height: 30px; border-radius: .65rem; font-weight: 800; }.activity-status.success { color: #17825b; background: #e5f7ef; }.activity-status.failed { color: #be3f50; background: #ffeaed; }
.activity-row strong { color: var(--pr-ink); font-size: .78rem; }.activity-row p { overflow: hidden; max-width: 330px; margin: .15rem 0 0; color: var(--pr-muted); font-size: .7rem; text-overflow: ellipsis; white-space: nowrap; }.activity-row time { color: #979dad; font-size: .65rem; white-space: nowrap; }
.persian-date-input { text-align: center; letter-spacing: .06em; }
.recurrence-selector { display: grid; grid-template-columns: repeat(2, 1fr); gap: .55rem; }
.recurrence-selector input { position: absolute; opacity: 0; pointer-events: none; }
.recurrence-selector label { cursor: pointer; min-height: 72px; padding: .7rem .8rem; border: 1px solid #e1e5ef; border-radius: .8rem; background: #fafbfe; transition: .18s ease; }
.recurrence-selector label strong, .recurrence-selector label small { display: block; }
.recurrence-selector label small { margin-top: .2rem; color: var(--pr-muted); font-size: .68rem; }
.recurrence-selector input:checked + label { color: var(--pr-primary-dark); border-color: var(--pr-primary); background: #eef1ff; box-shadow: inset 0 0 0 1px var(--pr-primary); }
.recurrence-selector input:focus-visible + label { outline: 3px solid rgba(54,89,217,.2); }
.monthly-day-field { padding: .9rem; border: 1px dashed #cdd5eb; border-radius: .85rem; background: #f8f9fd; }
.recurrence-pill { display: inline-block; padding: .3rem .55rem; color: #5b45ad; border-radius: 999px; background: #eeeafd; font-size: .7rem; white-space: nowrap; }
.theme-toggle { position: relative; display: flex; align-items: center; justify-content: space-between; width: 58px; height: 31px; padding: 3px 7px; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; background: rgba(0,0,0,.15); }
.theme-toggle::after { content: ""; position: absolute; top: 3px; right: 3px; width: 23px; height: 23px; border-radius: 50%; background: #fff; box-shadow: 0 2px 7px rgba(0,0,0,.22); transition: transform .2s ease; }
.theme-toggle span { z-index: 1; font-size: .75rem; }
html[data-theme="dark"] .theme-toggle::after { transform: translateX(-27px); background: #17213a; }

html[data-theme="dark"] {
  color-scheme: dark;
  --pr-ink: #eef1fa;
  --pr-muted: #9da7bd;
  --pr-surface: #171d2b;
  --pr-border: #2a3347;
  --bs-body-color: #e8ebf5;
  --bs-body-bg: #0f1421;
  --bs-border-color: #2a3347;
}
html[data-theme="dark"] body { color: #e8ebf5; background: #0f1421; }
html[data-theme="dark"] .navbar { background: linear-gradient(90deg, #182451, #263f9e) !important; }
html[data-theme="dark"] .sidebar { background: #0a0f19 !important; border-left: 1px solid #222b3c; }
html[data-theme="dark"] .sidebar .nav-link { color: #aeb8cc; }
html[data-theme="dark"] .sidebar .nav-link:hover { color: #fff; background: #1b2435; }
html[data-theme="dark"] .card,
html[data-theme="dark"] .form-section-card,
html[data-theme="dark"] .dashboard-panel,
html[data-theme="dark"] .dashboard-metric { color: #e8ebf5; border-color: #293247; background: #171d2b; box-shadow: 0 .6rem 1.8rem rgba(0,0,0,.18); }
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .form-text { color: #929db3 !important; }
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] .input-group-text { color: #edf0f8; border-color: #333d53; background-color: #111725; }
html[data-theme="dark"] .form-control::placeholder { color: #707b91; }
html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus { color: #fff; border-color: #6179df; background: #141b2a; }
html[data-theme="dark"] .table { --bs-table-color: #dce1ed; --bs-table-bg: transparent; --bs-table-border-color: #293247; --bs-table-hover-color: #fff; --bs-table-hover-bg: #1d2638; }
html[data-theme="dark"] .btn-outline-secondary { color: #bbc3d3; border-color: #59647a; }
html[data-theme="dark"] .bg-light { color: #dce1ed !important; background: #111725 !important; }
html[data-theme="dark"] .section-heading { border-bottom-color: #293247; }
html[data-theme="dark"] .section-number,
html[data-theme="dark"] .channel-pill,
html[data-theme="dark"] .recurrence-pill,
html[data-theme="dark"] .selected-count-badge { color: #b9c5ff; background: #27345f; }
html[data-theme="dark"] .channel-selector label,
html[data-theme="dark"] .recurrence-selector label { color: #dce1ed; border-color: #313b50; background: #121827; }
html[data-theme="dark"] .channel-selector input:checked + label,
html[data-theme="dark"] .recurrence-selector input:checked + label { color: #d9e0ff; border-color: #7085e4; background: #26335e; }
html[data-theme="dark"] .channel-symbol { color: #bdc9ff; background: #1b2437; }
html[data-theme="dark"] .delivery-note,
html[data-theme="dark"] .monthly-day-field,
html[data-theme="dark"] .empty-recipient-state { color: #aeb8cc; border-color: #35405a; background: #121827; }
html[data-theme="dark"] .recipient-picker-trigger,
html[data-theme="dark"] .recipient-picker-panel { color: #e9edf7; border-color: #35405a; background: #171d2b; }
html[data-theme="dark"] .recipient-search-wrap { border-color: #333d53; background: #111725; }
html[data-theme="dark"] .recipient-search-wrap input { color: #fff; }
html[data-theme="dark"] .recipient-picker-actions { border-bottom-color: #293247; }
html[data-theme="dark"] .recipient-picker-actions button { color: #c5d0ff; background: #27345f; }
html[data-theme="dark"] .recipient-option:hover { background: #20293b; }
html[data-theme="dark"] .selected-recipient-chip { color: #ccd4e7; border-color: #35405a; background: #1b2435; }
html[data-theme="dark"] .form-submit-bar { color: #edf0f8; border-color: #313b50; background: rgba(23,29,43,.94); box-shadow: 0 .75rem 2.5rem rgba(0,0,0,.35); }
html[data-theme="dark"] .dashboard-notice { color: #f1ce89; border-color: #5c4927; background: #251f15; }
html[data-theme="dark"] .dashboard-notice p { color: #c7ab75; }
html[data-theme="dark"] .system-summary-grid div { border-color: #293247; background: #121827; }
html[data-theme="dark"] .dashboard-table th,
html[data-theme="dark"] .dashboard-table td,
html[data-theme="dark"] .activity-row { border-color: #293247; }
html[data-theme="dark"] .dashboard-metric strong,
html[data-theme="dark"] .dashboard-panel-head h2,
html[data-theme="dark"] .activity-row strong,
html[data-theme="dark"] .system-summary-grid strong { color: #eef1fa; }
html[data-theme="dark"] .btn-close { filter: invert(1) grayscale(100%) brightness(180%); }
html[data-theme="dark"] .alert-success { color: #a8e6c9; border-color: #285b47; background: #15382c; }
html[data-theme="dark"] .alert-danger { color: #f3b5bd; border-color: #6d3039; background: #3d1e24; }

@media (max-width: 768px) {
  .sidebar { position: static; width: auto; margin-top: 58px; }
  .main-content { margin-right: 0; padding-top: 20px; }
  .page-hero { align-items: flex-start; padding: 1.4rem; flex-direction: column; }
  .hero-channel-badge { width: 100%; }
  .channel-selector { grid-template-columns: 1fr; }
  .channel-selector label { min-height: auto; flex-direction: row; justify-content: flex-start; text-align: right; }
  .form-submit-bar { position: static; flex-direction: column; align-items: stretch; margin-top: 1rem; }
  .form-submit-bar > div:last-child { justify-content: stretch; }
  .form-submit-bar .btn { flex: 1; }
  .recipient-email-state { display: none; }
  .dashboard-hero-actions { width: 100%; }
  .dashboard-notice { align-items: flex-start; flex-wrap: wrap; }
  .dashboard-notice a { width: 100%; margin-right: 52px; }
  .dashboard-metrics { grid-template-columns: 1fr 1fr; }
  .activity-row { grid-template-columns: 34px minmax(0,1fr); }
  .activity-row time { grid-column: 2; }
}

@media (max-width: 480px) {
  .dashboard-metrics { grid-template-columns: 1fr; }
}
