:root {
    --bg: #f4f8fc;
    --surface: rgba(255, 255, 255, 0.9);
    --surface-solid: #ffffff;
    --ink: #17304a;
    --muted: #6d7d91;
    --line: rgba(23, 48, 74, 0.1);
    --accent: #1d75e5;
    --accent-soft: rgba(29, 117, 229, 0.1);
    --success: #0f7f59;
    --error: #b0404f;
    --danger-soft: rgba(176, 64, 79, 0.08);
    --shadow: 0 18px 40px rgba(46, 78, 110, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html.theme-dark {
    color-scheme: dark;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top center, rgba(29, 117, 229, 0.08), transparent 32%),
        linear-gradient(180deg, #fbfdff 0%, #f4f8fc 45%, #eef3f8 100%);
}

html.theme-dark body {
    color: #dbe3ff;
    background:
        radial-gradient(circle at top center, rgba(84, 110, 255, 0.18), transparent 28%),
        linear-gradient(180deg, #101522 0%, #0e1420 48%, #0b111c 100%);
}

body.dashboard-page {
    background:
        radial-gradient(circle at top right, rgba(90, 114, 255, 0.08), transparent 26%),
        linear-gradient(180deg, #f7f7fc 0%, #f1f3fb 100%);
    color: #434f86;
}

html.theme-dark body.dashboard-page {
    background:
        radial-gradient(circle at top right, rgba(99, 112, 255, 0.16), transparent 24%),
        linear-gradient(180deg, #0f1421 0%, #121826 100%);
    color: #cfd7ff;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select {
    font: inherit;
}

.site-shell {
    min-height: 100vh;
    padding: 14px;
}

.topbar,
.hero,
.showcase-section,
.pricing-section,
.pricing-grid,
.auth-layout,
.dashboard-layout,
.settings-layout {
    max-width: 1160px;
    margin: 0 auto;
}

.topbar {
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.topnav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-toggle {
    display: none !important;
}

.topnav a {
    color: var(--muted);
    font-size: 0.88rem;
    font-weight: 600;
}

html.theme-dark .brand,
html.theme-dark .topnav a {
    color: #b7c3ea;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    cursor: pointer;
    background: var(--surface-solid);
    color: var(--ink);
    font-weight: 700;
    font-size: 0.87rem;
}

.button-primary {
    border-color: transparent;
    background: var(--accent);
    color: #fff;
}

a.button-primary {
    color: #fff;
}

.button-secondary {
    background: rgba(255, 255, 255, 0.75);
}

html.theme-dark .button {
    border-color: rgba(161, 176, 224, 0.18);
    background: #172033;
    color: #dbe3ff;
}

html.theme-dark .button-primary {
    background: linear-gradient(180deg, #6280ff 0%, #5871f3 100%);
    color: #ffffff;
}

html.theme-dark .button-secondary,
html.theme-dark .button-ghost {
    background: #141d2d;
    color: #cfd7ff;
}

.button-ghost {
    min-height: 30px;
    padding: 0 10px;
    background: transparent;
}

.button-full {
    width: 100%;
}

.hero {
    padding: 30px 0 16px;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(29, 117, 229, 0.12);
    background: rgba(255, 255, 255, 0.7);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 700;
}

.hero h1 {
    max-width: 860px;
    margin: 14px auto 10px;
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-copy {
    max-width: 860px;
    margin: 28px auto 40px;
    color: var(--muted);
    font-size: clamp(0.92rem, 1.6vw, 1.16rem);
    line-height: 1.5;
}

.pill-cloud {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 20px auto 0;
    max-width: 920px;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(29, 117, 229, 0.14);
    background: rgba(255, 255, 255, 0.7);
    font-size: 0.86rem;
    font-weight: 600;
}

.pill-muted {
    color: var(--muted);
}

html.theme-dark .pill {
    border-color: rgba(161, 176, 224, 0.18);
    background: rgba(22, 31, 49, 0.88);
    color: #d3ddff;
}

.feature-grid,
.pricing-grid,
.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.showcase-section {
    margin-top: 18px;
}

.feature-card,
.price-card,
.auth-panel,
.dashboard-card,
.modal-card {
    background: var(--surface);
    border: 1px solid transparent;
    border-radius: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

html.theme-dark .feature-card,
html.theme-dark .price-card,
html.theme-dark .auth-panel,
html.theme-dark .dashboard-card,
html.theme-dark .modal-card {
    background: rgba(19, 27, 42, 0.92);
    border-color: rgba(161, 176, 224, 0.12);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.feature-card,
.price-card,
.dashboard-card {
    padding: 16px;
}

.feature-card h2,
.price-card h3,
.dashboard-card h2,
.auth-form h2 {
    margin: 8px 0 6px;
    font-size: 1.1rem;
    line-height: 1.2;
}

.feature-card p,
.price-card p,
.dashboard-card p,
.auth-panel p,
.auth-footer,
.small-note,
.timeline-content p,
.subscribed-copy p,
.modal-item p,
.plan-row p {
    font-size: 0.84rem;
    line-height: 1.45;
}

.feature-card p,
.price-card p,
.dashboard-card p,
.auth-panel p,
.auth-footer,
.small-note {
    color: var(--muted);
}

html.theme-dark .feature-card h2,
html.theme-dark .price-card h3,
html.theme-dark .dashboard-card h2,
html.theme-dark .auth-form h2,
html.theme-dark .auth-panel h1,
html.theme-dark .timeline-content h3,
html.theme-dark .subscribed-copy strong,
html.theme-dark .readonly-row strong {
    color: #f3f6ff;
}

html.theme-dark .feature-card p,
html.theme-dark .price-card p,
html.theme-dark .dashboard-card p,
html.theme-dark .auth-panel p,
html.theme-dark .auth-footer,
html.theme-dark .small-note,
html.theme-dark .section-header p,
html.theme-dark .timeline-date,
html.theme-dark .timeline-content p,
html.theme-dark .subscribed-list-head span,
html.theme-dark .readonly-row span,
html.theme-dark .empty-state {
    color: #9eabd2;
}

.pricing-grid {
    margin-top: 14px;
    padding-bottom: 24px;
}

.pricing-heading {
    margin: 12px 0 10px;
    font-size: clamp(1.55rem, 3vw, 2.5rem);
    line-height: 1.04;
    letter-spacing: -0.05em;
}

.pricing-cta p {
    margin: 0;
    color: var(--muted);
    font-size: 0.96rem;
    line-height: 1.55;
}

html.theme-dark .pricing-heading {
    color: #f3f6ff;
}

html.theme-dark .pricing-cta p {
    color: #9eabd2;
}

.showcase-media {
    margin-top: 18px;
    display: flex;
    justify-content: center;
}

html.theme-dark .showcase-media {
    padding: 20px;
    border-radius: 24px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 45%, #eef3f8 100%);
}

.showcase-media img {
    display: block;
    width: 100%;
    max-width: 800px;
    height: auto;
}

.pricing-section {
    padding: 18px 0 24px;
}

.pricing-heading {
    text-align: center;
    margin: 0;
    padding: 18px 0 22px;
}

.price-card {
    display: grid;
    align-content: start;
    gap: 8px;
    min-height: 100%;
}

.price-card-featured {
    border-color: transparent;
}

html.theme-dark .price-card-featured {
    border-color: transparent;
}

.pricing-cta {
    margin-top: 14px;
    padding: 18px 24px 22px;
    display: grid;
    justify-items: center;
    gap: 10px;
    text-align: center;
}

.pricing-cta-button {
    min-height: 46px;
    padding: 0 24px;
    font-size: 0.96rem;
}

.price {
    margin-top: 10px;
    font-size: clamp(1.7rem, 3.2vw, 2.7rem);
    font-weight: 800;
    letter-spacing: -0.05em;
}

.auth-layout {
    display: flex;
    justify-content: center;
    padding-top: 40px;
}

.auth-panel {
    padding: 20px;
}

.auth-panel-single {
    width: min(560px, 100%);
}

.auth-panel-highlight {
    background:
        radial-gradient(circle at top right, rgba(29, 117, 229, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(243, 248, 255, 0.94));
}

html.theme-dark .auth-panel-highlight {
    background:
        radial-gradient(circle at top right, rgba(94, 128, 255, 0.2), transparent 34%),
        linear-gradient(180deg, rgba(22, 30, 46, 0.95), rgba(17, 25, 39, 0.98));
}

.auth-panel h1,
.dashboard-hero h1 {
    margin: 10px 0 8px;
    font-size: clamp(1.55rem, 3vw, 2.3rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.auth-form,
.settings-form {
    display: grid;
    gap: 10px;
}

.admin-login-form,
.admin-plan-form {
    display: grid;
    gap: 10px;
}

label {
    display: grid;
    gap: 4px;
}

label span {
    font-size: 0.82rem;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink);
}

textarea {
    min-height: 180px;
    padding: 12px;
    resize: vertical;
}

html.theme-dark input,
html.theme-dark select,
html.theme-dark textarea {
    border-color: rgba(161, 176, 224, 0.14);
    background: #11192a;
    color: #edf2ff;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 12px;
    border-top: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.admin-table td strong {
    color: var(--ink);
}

.admin-table form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-table select {
    min-width: 140px;
}

.admin-actions-cell {
    white-space: nowrap;
}

.admin-feed-form {
    display: grid;
    gap: 16px;
}

.admin-feed-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.admin-feed-toggles {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.checkbox-field {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.checkbox-field input {
    width: auto;
    min-height: 0;
}

.feed-page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 430px;
    gap: 32px;
    align-items: start;
}

.feed-page-content {
    margin-top: 18px;
}

.feed-page-content > :first-child {
    margin-top: 0;
}

.feed-page-card {
    padding: 32px;
}

.feed-page-card h1 {
    margin-top: 0;
}

.feed-page-promo {
    padding: 26px;
    border: 1px solid #eceef8;
    border-radius: 24px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fc 45%, #eef3f8 100%);
}

.feed-page-promo-media {
    margin-bottom: 18px;
}

.feed-page-promo-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 16px;
}

.feed-page-promo h2 {
    margin: 0 0 12px;
    font-size: 1.3rem;
}

.feed-page-promo p {
    margin-bottom: 18px;
    font-size: 0.92rem;
}

.feed-page-promo-button {
    display: inline-flex;
    min-height: 42px;
    padding: 0 18px;
    font-size: 0.88rem;
}

html.theme-dark .feed-page-promo {
    border-color: #202a40;
    background: linear-gradient(180deg, #1a2336 0%, #141d2d 100%);
}

.supported-api-list {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.supported-api-item {
    padding-bottom: 18px;
    border-bottom: 1px solid #eceef8;
}

.supported-api-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.supported-api-item h2 {
    margin: 0 0 6px;
}

.supported-api-item h2 a {
    color: inherit;
    text-decoration: none;
}

.supported-api-item h2 a:hover {
    text-decoration: underline;
}

.admin-empty {
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-popover {
    position: relative;
}

.admin-popover summary {
    list-style: none;
}

.admin-popover summary::-webkit-details-marker {
    display: none;
}

.admin-popover-card {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 5;
    min-width: 220px;
    max-width: 280px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface-solid);
    box-shadow: var(--shadow);
}

.admin-popover-card strong {
    display: block;
    margin-bottom: 8px;
}

.admin-popover-list {
    margin: 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 0.88rem;
}

.admin-popover-list li + li {
    margin-top: 4px;
}

html.theme-dark .admin-table td strong {
    color: #dbe3ff;
}

html.theme-dark .admin-table th,
html.theme-dark .admin-table td {
    border-top-color: rgba(161, 176, 224, 0.18);
}

html.theme-dark .admin-popover-card {
    border-color: rgba(161, 176, 224, 0.18);
    background: #172033;
}

.alert {
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 0.86rem;
    font-weight: 600;
}

.alert-error {
    background: rgba(176, 64, 79, 0.08);
    color: var(--error);
}

.alert-success {
    background: rgba(15, 127, 89, 0.08);
    color: var(--success);
}

.demo-banner,
.demo-pagination-note {
    border-radius: 16px;
    border: 1px solid #e6ebf7;
    background: #f7f9ff;
    color: #5a648f;
}

.demo-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 14px;
    margin-bottom: 14px;
}

.demo-banner strong {
    color: #46517f;
}

.demo-banner span {
    flex: 1;
    font-size: 0.84rem;
    line-height: 1.4;
}

.demo-pagination-note {
    margin-top: 18px;
    padding: 12px 14px;
    font-size: 0.84rem;
    line-height: 1.45;
    text-align: center;
}

html.theme-dark .alert-error {
    background: rgba(176, 64, 79, 0.16);
    color: #ffb7c1;
}

html.theme-dark .alert-success {
    background: rgba(15, 127, 89, 0.16);
    color: #97efc7;
}

html.theme-dark .demo-banner,
html.theme-dark .demo-pagination-note {
    border-color: #24314d;
    background: #182234;
    color: #aab6dc;
}

html.theme-dark .demo-banner strong {
    color: #edf2ff;
}

.demo-credentials {
    display: inline-grid;
    gap: 4px;
    margin-top: 14px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(29, 117, 229, 0.1);
}

.compact-layout {
    padding-bottom: 20px;
}

.compact-layout > .dashboard-card + .dashboard-card {
    margin-top: 28px;
}

.compact-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.dashboard-meta {
    min-width: 180px;
    display: grid;
    gap: 4px;
}

.dashboard-meta span {
    color: var(--muted);
    font-size: 0.88rem;
}

.dashboard-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 10px;
    align-items: start;
}

.dashboard-card-wide {
    min-width: 0;
}

.admin-users-card {
    position: relative;
    z-index: 2;
}

.dashboard-table-card {
    padding: 12px 14px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.section-header-compact {
    margin-bottom: 10px;
}

.section-header p {
    margin: 4px 0 0;
    font-size: 0.82rem;
    color: var(--muted);
}

.table-tools {
    display: flex;
    gap: 6px;
}

.timeline-table {
    display: grid;
    gap: 6px;
}

.timeline-row {
    display: grid;
    grid-template-columns: 94px 28px minmax(0, 1fr);
    gap: 8px;
    align-items: start;
    padding: 8px 0;
}

.timeline-date {
    padding-top: 5px;
    font-size: 0.82rem;
    font-weight: 700;
}

.timeline-line {
    position: relative;
    min-height: 100%;
    display: flex;
    justify-content: center;
}

.timeline-line::before {
    content: "";
    position: absolute;
    top: 14px;
    bottom: -14px;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: #dce6f1;
}

.timeline-line span {
    position: relative;
    z-index: 1;
    display: block;
    width: 10px;
    height: 10px;
    margin-top: 8px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #111;
}

.timeline-row:last-child .timeline-line::before {
    display: none;
}

.timeline-content {
    padding: 8px 10px 10px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.66);
}

.timeline-top {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.timeline-tag,
.mini-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 700;
}

.mini-badge[hidden] {
    display: none !important;
}

.timeline-tag {
    background: #eef2f6;
}

.mini-badge {
    background: var(--accent-soft);
    color: var(--accent);
}

html.theme-dark .timeline-tag {
    background: #1a2437;
    color: #cfd7ff;
}

html.theme-dark .mini-badge {
    background: rgba(88, 113, 243, 0.18);
    color: #9cb0ff;
}

.timeline-content h3 {
    margin: 0 0 6px;
    font-size: 0.94rem;
    line-height: 1.35;
}

.change-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.compact-actions {
    margin-top: 8px;
}

.text-link {
    color: var(--accent);
    font-weight: 700;
    font-size: 0.84rem;
}

html.theme-dark .text-link {
    color: #9cb0ff;
}

.filter-rail {
    padding: 12px;
}

.filter-list,
.subscribed-list,
.modal-list,
.plan-stack {
    display: grid;
    gap: 8px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    color: #33485f;
    font-size: 0.86rem;
}

.filter-option input {
    width: 18px;
    min-height: 18px;
    margin: 0;
}

.subscribed-list {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

.subscribed-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.subscribed-list-head h3,
.modal-item h3 {
    margin: 0;
    font-size: 0.9rem;
}

.subscribed-list-head span {
    color: var(--muted);
    font-size: 0.8rem;
}

.subscribed-item,
.modal-item,
.plan-row {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}

.modal-item-highlight {
    padding: 16px 18px;
    border: 1px solid #dbe3f7;
    border-radius: 20px;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f8ff 100%);
}

.subscribed-item:first-of-type,
.modal-item:first-of-type,
.plan-row:first-of-type {
    border-top: none;
}

.readonly-stack {
    display: grid;
    gap: 8px;
    width: 100%;
}

.profile-password-form {
    margin-top: 12px;
    padding-top: 10px;
}

.readonly-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 8px 0;
    border-top: 1px solid var(--line);
}

.readonly-row:first-child {
    border-top: none;
}

.readonly-row span {
    color: var(--muted);
    font-size: 0.82rem;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal:target {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(19, 35, 52, 0.45);
}

html.theme-dark .modal-backdrop {
    background: rgba(3, 6, 13, 0.68);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(720px, 100%);
    padding: 14px;
}

.empty-state {
    padding: 12px 0;
    color: var(--muted);
    font-size: 0.84rem;
}

.settings-grid {
    margin-top: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.compact-form {
    max-width: 320px;
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.plan-grid .plan-row {
    display: grid;
    gap: 10px;
    align-content: start;
    min-height: 100%;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.52);
}

html.theme-dark .plan-grid .plan-row {
    border-color: rgba(143, 161, 205, 0.22);
    background: rgba(255, 255, 255, 0.09);
    color: rgba(232, 238, 255, 0.72);
}

.plan-grid .plan-row:first-of-type {
    border-top: 1px solid var(--line);
}

.plan-row-active {
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(29, 117, 229, 0.06);
}

.plan-grid .plan-row-active {
    padding: 16px;
    border-color: rgba(29, 117, 229, 0.2);
    background: rgba(29, 117, 229, 0.08);
}

html.theme-dark .plan-grid .plan-row-active {
    padding: 16px;
    border-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.09);
    color: #edf2ff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.plan-price {
    font-weight: 800;
    padding-left: 0;
}

html.theme-dark .plan-grid .plan-row strong,
html.theme-dark .plan-grid .plan-price {
    color: inherit;
}

html.theme-dark .plan-grid .plan-row p {
    color: rgba(190, 202, 236, 0.72);
}

html.theme-dark .plan-grid .plan-row-active p {
    color: rgba(219, 227, 255, 0.9);
}

.small-note {
    margin-top: 10px;
    font-size: 0.8rem;
}

.modal-note {
    margin-top: 10px;
}

.modal-search {
    display: grid;
    gap: 8px;
}

.modal-search-label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.modal-search-input {
    width: 100%;
}

body.dashboard-page .topbar {
    margin-bottom: 18px;
}

body.dashboard-page .dashboard-shell {
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) 250px;
}

body.dashboard-page .dashboard-card,
body.dashboard-page .modal-card {
    background: #ffffff;
    border: 1px solid #eceef8;
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(91, 104, 154, 0.08);
}

html.theme-dark body.dashboard-page .dashboard-card,
html.theme-dark body.dashboard-page .modal-card {
    background: #141b2b;
    border-color: #202a40;
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

body.dashboard-page .dashboard-table-card {
    padding: 18px 20px;
}

body.dashboard-page .filter-rail {
    padding: 18px 16px;
}

body.dashboard-page .section-header h2,
body.dashboard-page .subscribed-list-head h3,
body.dashboard-page .modal-item h3 {
    color: #4d588d;
    font-size: 1rem;
    font-weight: 700;
}

html.theme-dark body.dashboard-page .section-header h2,
html.theme-dark body.dashboard-page .subscribed-list-head h3,
html.theme-dark body.dashboard-page .modal-item h3,
html.theme-dark body.dashboard-page .subscribed-copy strong {
    color: #e8eeff;
}

body.dashboard-page .section-header p,
body.dashboard-page .subscribed-list-head span,
body.dashboard-page .timeline-date,
body.dashboard-page .small-note,
body.dashboard-page .empty-state,
body.dashboard-page .timeline-content p {
    color: #66719e;
}

html.theme-dark body.dashboard-page .section-header p,
html.theme-dark body.dashboard-page .subscribed-list-head span,
html.theme-dark body.dashboard-page .timeline-date,
html.theme-dark body.dashboard-page .small-note,
html.theme-dark body.dashboard-page .empty-state,
html.theme-dark body.dashboard-page .timeline-content p,
html.theme-dark body.dashboard-page .filter-option {
    color: #aab6dc;
}

body.dashboard-page .button {
    border-radius: 14px;
    min-height: 38px;
    padding: 0 14px;
}

body.dashboard-page .topbar .button {
    border-radius: 999px;
    min-height: 34px;
    padding: 0 12px;
}

body.dashboard-page .button-primary {
    background: linear-gradient(180deg, #5e73f1 0%, #5a70ee 100%);
    box-shadow: 0 10px 22px rgba(90, 112, 238, 0.2);
}

body.dashboard-page .button-secondary,
body.dashboard-page .button-ghost {
    border-color: #dfe4f4;
    background: #ffffff;
    color: #4f5a89;
}

html.theme-dark body.dashboard-page .button-secondary,
html.theme-dark body.dashboard-page .button-ghost {
    border-color: #24314d;
    background: #182234;
    color: #d3dcff;
}

body.dashboard-page .timeline-row {
    grid-template-columns: 100px 28px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 0;
}

body.dashboard-page .timeline-line::before {
    background: #e2e6f4;
}

body.dashboard-page .timeline-line span {
    background: #ffffff;
    border-color: #5f74ef;
}

html.theme-dark body.dashboard-page .timeline-line::before {
    background: #2a3550;
}

html.theme-dark body.dashboard-page .timeline-line span {
    background: #111826;
    border-color: #8ea2ff;
}

body.dashboard-page .timeline-content {
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid #edf0f8;
    background: #ffffff;
}

html.theme-dark body.dashboard-page .timeline-content {
    border-color: #222d43;
    background: #111827;
}

body.dashboard-page .timeline-content h3 {
    color: #46517f;
    font-size: 1rem;
    font-weight: 700;
}

html.theme-dark body.dashboard-page .timeline-content h3 {
    color: #edf2ff;
}

body.dashboard-page .timeline-tag,
body.dashboard-page .mini-badge {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 10px;
}

body.dashboard-page .timeline-tag {
    background: #f1f3fb;
    color: #55608f;
}

html.theme-dark body.dashboard-page .timeline-tag {
    background: #1b2437;
    color: #d3dcff;
}

body.dashboard-page .mini-badge {
    background: #eef1ff;
    color: #5f74ef;
}

html.theme-dark body.dashboard-page .mini-badge {
    background: rgba(95, 116, 239, 0.18);
    color: #9cb0ff;
}

body.dashboard-page .text-link {
    color: #5f74ef;
}

body.dashboard-page .filter-list {
    gap: 10px;
}

body.dashboard-page .filter-option {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid transparent;
    background: transparent;
    color: #4f5a89;
}

body.dashboard-page .filter-option:has(input:checked) {
    background: #f2f4fc;
    border-color: #e7eaf7;
}

html.theme-dark body.dashboard-page .filter-option:has(input:checked) {
    background: #1b2437;
    border-color: #263250;
}

body.dashboard-page .filter-option input {
    accent-color: #5f74ef;
}

body.dashboard-page .subscribed-list {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #edf0f8;
}

html.theme-dark body.dashboard-page .subscribed-list {
    border-top-color: #202a40;
}

body.dashboard-page .subscribed-item {
    align-items: center;
    padding: 10px 0;
    border-top: none;
}

html.theme-dark body.dashboard-page .subscribed-item,
html.theme-dark body.dashboard-page .modal-item,
html.theme-dark body.dashboard-page .readonly-row,
html.theme-dark body.dashboard-page .plan-row {
    border-top-color: #202a40;
}

body.dashboard-page .subscribed-copy strong {
    color: #46517f;
    font-size: 0.92rem;
}

body.dashboard-page .subscribed-item .button {
    min-height: 32px;
    padding: 0 12px;
    font-size: 0.8rem;
}

body.dashboard-page .modal-card {
    width: min(760px, 100%);
    min-height: min(78vh, 860px);
    max-height: min(78vh, 860px);
    padding: 18px;
    overflow: auto;
}

body.dashboard-page .modal-item,
body.dashboard-page .plan-row,
body.dashboard-page .readonly-row {
    border-top-color: #edf0f8;
}

body.dashboard-page .plan-grid .plan-row {
    border-color: #e6ebf7;
    background: #ffffff;
}

html.theme-dark body.dashboard-page .plan-grid .plan-row {
    border-color: rgba(143, 161, 205, 0.22);
    background: rgba(255, 255, 255, 0.09);
    color: rgba(232, 238, 255, 0.72);
}

body.dashboard-page .plan-grid .plan-row-active {
    border-color: #d9e1fb;
    background: #f2f5ff;
}

html.theme-dark body.dashboard-page .plan-grid .plan-row-active {
    padding: 16px;
    border-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.09);
    color: #edf2ff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}

html.theme-dark body.dashboard-page .plan-grid .plan-row strong,
html.theme-dark body.dashboard-page .plan-grid .plan-price {
    color: inherit;
}

html.theme-dark body.dashboard-page .plan-grid .plan-row p {
    color: rgba(190, 202, 236, 0.72);
}

html.theme-dark body.dashboard-page .plan-grid .plan-row-active p {
    color: rgba(219, 227, 255, 0.9);
}

body.dashboard-page .modal-list {
    gap: 12px;
}

body.dashboard-page .modal-search {
    padding: 2px 2px 0;
}

body.dashboard-page .modal-search-input {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid #dfe4f4;
    border-radius: 14px;
    background: #ffffff;
    color: #46517f;
}

body.dashboard-page .modal-search-input::placeholder {
    color: #8a95bc;
}

body.dashboard-page .demo-banner,
body.dashboard-page .demo-pagination-note {
    border-color: #e6ebf7;
    background: #f5f7ff;
    color: #66719e;
}

body.dashboard-page .demo-banner strong {
    color: #46517f;
}

body.dashboard-page .modal-item {
    padding: 16px 18px;
    border-top: none;
    border: 1px solid #e6ebf7;
    border-radius: 20px;
    background: #ffffff;
}

body.dashboard-page .modal-item h3 {
    font-size: 0.96rem;
}

body.dashboard-page .modal-item p {
    max-width: 430px;
}

body.dashboard-page .modal-item-highlight {
    border-color: #d8e1f5;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

html.theme-dark body.dashboard-page .modal-item {
    border-color: #24314d;
    background: #182234;
}

html.theme-dark body.dashboard-page .modal-search-input {
    border-color: #24314d;
    background: #182234;
    color: #edf2ff;
}

html.theme-dark body.dashboard-page .modal-search-input::placeholder {
    color: #8fa0d1;
}

html.theme-dark body.dashboard-page .modal-item-highlight {
    border-color: #2a3856;
    background: linear-gradient(180deg, #192338 0%, #151d2f 100%);
}

html.theme-dark body.dashboard-page .demo-banner,
html.theme-dark body.dashboard-page .demo-pagination-note {
    border-color: #24314d;
    background: #182234;
    color: #aab6dc;
}

html.theme-dark body.dashboard-page .demo-banner strong {
    color: #edf2ff;
}

body.dashboard-page .pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 22px;
}

body.dashboard-page .pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid #dfe4f4;
    background: #ffffff;
    color: #6670a5;
    font-size: 0.86rem;
    font-weight: 700;
}

html.theme-dark body.dashboard-page .pagination-link {
    border-color: #24314d;
    background: #182234;
    color: #d3dcff;
}

body.dashboard-page .pagination-link-active {
    border-color: transparent;
    background: linear-gradient(180deg, #5e73f1 0%, #5a70ee 100%);
    color: #ffffff;
}

.danger-card {
    border-color: rgba(176, 64, 79, 0.18);
}

.danger-button {
    color: var(--error);
    border-color: rgba(176, 64, 79, 0.2);
    background: var(--danger-soft);
}

@media (max-width: 980px) {
    .pricing-grid,
    .plan-grid,
    .settings-grid,
    .auth-layout,
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    body.dashboard-page .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .compact-hero,
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }

    .demo-banner {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-shell {
        gap: 14px;
    }

    .filter-rail,
    .dashboard-table-card,
    .auth-panel,
    .price-card {
        padding: 16px;
    }

    .modal-card {
        width: min(680px, 100%);
    }

    .subscribed-item,
    .modal-item,
    .change-actions {
        align-items: stretch;
    }

    .pricing-cta {
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 720px) {
    .site-shell {
        padding: 10px;
    }

    .change-actions,
    .table-tools,
    .subscribed-item,
    .modal-item {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
    }

    .nav-toggle {
        display: inline-flex !important;
        margin-left: auto;
        flex-shrink: 0;
    }

    .topnav {
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
        margin-top: 10px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.82);
    }

    .topnav.topnav-open {
        display: flex;
    }

    .topnav a,
    .topnav .button {
        width: 100%;
        justify-content: center;
    }

    html.theme-dark .topnav {
        border-color: rgba(161, 176, 224, 0.18);
        background: rgba(20, 29, 45, 0.94);
    }

    .timeline-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    body.dashboard-page .timeline-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .timeline-line {
        display: none;
    }

    .timeline-date {
        padding-top: 0;
    }

    body.dashboard-page .timeline-date {
        padding-top: 0;
    }

    .timeline-content {
        padding: 12px;
        border-radius: 16px;
        width: 100%;
        min-width: 0;
    }

    body.dashboard-page .timeline-content {
        padding: 12px;
        border-radius: 16px;
        width: 100%;
        min-width: 0;
    }

    .timeline-top {
        flex-wrap: wrap;
    }

    .change-actions,
    .table-tools,
    .subscribed-item,
    .modal-item,
    .section-header {
        gap: 10px;
    }

    .change-actions > *,
    .modal-item > * {
        width: 100%;
    }

    .change-actions .button,
    .modal-item .button,
    .modal-item form,
    .change-actions form {
        width: 100%;
    }

    .dashboard-meta {
        min-width: 0;
    }

    .dashboard-card-wide {
        order: 1;
    }

    .filter-rail {
        order: 2;
    }

    .dashboard-card,
    .filter-rail,
    .modal-card {
        border-radius: 20px;
    }

    .filter-rail,
    .dashboard-table-card,
    .modal-card,
    .auth-panel {
        padding: 14px;
    }

    .filter-option {
        align-items: flex-start;
    }

    .subscribed-item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .admin-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-table,
    .admin-table thead,
    .admin-table tbody,
    .admin-table tr,
    .admin-table th,
    .admin-table td {
        display: block;
    }

    .admin-table thead {
        display: none;
    }

    .admin-table tr {
        padding: 12px 0;
        border-top: 1px solid var(--line);
    }

    .admin-table td {
        padding: 6px 0;
        border-top: 0;
    }

    .admin-table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 4px;
        color: var(--muted);
        font-size: 0.8rem;
        font-weight: 700;
    }

    .admin-table form {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-feed-grid {
        grid-template-columns: 1fr;
    }

    .admin-feed-toggles {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .feed-page-layout {
        grid-template-columns: 1fr;
    }

    .subscribed-item > * {
        width: auto;
    }

    .subscribed-item form,
    .subscribed-item .button {
        width: auto;
    }

    .table-tools {
        flex-direction: row;
        justify-content: flex-end;
        align-items: center;
    }

    .table-tools > * {
        width: auto;
    }

    .table-tools .button {
        width: auto;
    }

    .readonly-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .compact-form,
    .settings-form,
    .profile-password-form {
        max-width: 100%;
    }

    .pagination-link {
        width: 100%;
    }

    .price-card {
        border-radius: 18px;
    }

    .showcase-media {
        margin-top: 16px;
    }
}
