:root {
    --luxury-bg: #f5f7fb;
    --luxury-surface: #ffffff;
    --luxury-border: #e2e7f0;
    --luxury-text: #141c4d;
    --luxury-muted: #5b6472;
    --luxury-accent: #0552c8;
    --luxury-accent-soft: #edf0fb;
    --luxury-ink: #141c4d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    overflow-x: hidden;
    background: linear-gradient(135deg, #fafbfe 0%, var(--luxury-bg) 100%);
    color: var(--luxury-text);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.luxury-body {
    min-height: 100vh;
}

.app-shell {
    min-height: 100vh;
}

#page-content-wrapper {
    width: 100%;
    min-height: 100vh;
}

.sidebar-panel {
    width: 260px;
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    align-self: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfe 100%);
    color: #243041;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.04), 8px 0 24px rgba(17, 24, 39, 0.06);
    z-index: 1040;
}

.sidebar-panel::-webkit-scrollbar {
    width: 6px;
}

.sidebar-panel::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-panel::-webkit-scrollbar-thumb {
    background: rgba(17, 24, 39, 0.12);
    border-radius: 999px;
}

.sidebar-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(17, 24, 39, 0.22);
}

.sidebar-heading {
    padding: 1.35rem 1.4rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid #e2e7f0;
    color: #1f2430;
}

.sidebar-heading i {
    color: var(--luxury-accent);
}

.sidebar-close-btn {
    background: transparent;
    border: 0;
    color: #6b6d73;
    padding: 0.35rem 0.5rem;
}

.sidebar-close-btn:hover {
    color: #1f2430;
    background: #eef2fb;
}

.sidebar-panel .list-group-item {
    border: 0;
    padding: 0.8rem 1rem;
    border-radius: 0.7rem;
    margin: 0.2rem 0.8rem;
    color: #3d4552;
    background: transparent;
    transition: all 0.2s ease;
    font-weight: 500;
}

.sidebar-panel .list-group-item:hover {
    background: #eef2fb;
    color: #1f2430;
    transform: translateX(2px);
}

.sidebar-panel .list-group-item.active {
    background: #dce6fb;
    color: #123a8f;
    box-shadow: inset 0 0 0 1px #b9cdf5;
}

.sidebar-panel .list-group-item i {
    width: 22px;
    text-align: center;
}

.sidebar-divider {
    border-top: 1px solid #e2e7f0;
    margin: 0.8rem 1rem 0.4rem;
}

.sidebar-section-title {
    padding: 0.45rem 1.3rem 0.3rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #8b8f97;
    font-weight: 700;
}

.topbar {
    background: rgba(255,255,255,0.86);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--luxury-border);
    padding: 0.9rem 1.3rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar .container-fluid {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.topbar-toggle {
    background: #fff;
    color: var(--luxury-ink);
    border: 1px solid var(--luxury-border);
    border-radius: 0.7rem;
    padding: 0.55rem 0.8rem;
}

.topbar-toggle:hover {
    background: #eef2fb;
}

.topbar-user {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--luxury-text);
}

.topbar-meta {
    color: var(--luxury-muted);
    font-size: 0.95rem;
}

.role-badge {
    background: var(--luxury-accent-soft);
    color: var(--luxury-ink);
    margin-left: 0.4rem;
}

.main-content {
    padding: 1.4rem 1.4rem 2rem;
}

@media (max-width: 767.98px) {
    .main-content {
        padding: 1rem 1rem 1.5rem;
    }

    .edition-stats-row > [class*="col-"] {
        margin-bottom: 1rem;
    }

    .edition-stats-row > [class*="col-"]:last-child {
        margin-bottom: 0;
    }

    .analytics-kpi-row > [class*="col-"] {
        margin-bottom: 1rem;
    }

    .analytics-kpi-row > [class*="col-"]:last-child {
        margin-bottom: 0;
    }

    .analytics-card {
        margin-bottom: 1.25rem;
    }

    .analytics-card:last-child {
        margin-bottom: 0;
    }

    .analytics-card .card-body {
        padding: 1rem 1.05rem;
    }

    .analytics-header-actions {
        width: 100%;
        margin-top: 0.75rem;
    }

    .analytics-header-actions .btn {
        flex: 1;
    }

    .subscriber-header-actions {
        width: 100%;
    }

    .subscriber-stats-row > [class*="col-"] {
        margin-bottom: 1rem;
    }

    .subscriber-stats-row > [class*="col-"]:last-child {
        margin-bottom: 0;
    }

    .indication-row > div {
        margin-bottom: 0.75rem;
    }

    .indication-row > div:last-child {
        margin-bottom: 0;
    }

    .article-header-actions {
        width: 100%;
    }

    .article-header-actions .btn {
        flex: 1;
        white-space: nowrap;
    }

    .articles-table .btn-group {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .articles-table .btn-group .btn {
        flex: 1 1 auto;
    }
}

@media (max-width: 767.98px) {
    .preview-header-actions {
        width: 100%;
    }

    .preview-header-actions .btn {
        flex: 1;
        white-space: nowrap;
        padding: 0.35rem 0.4rem;
        font-size: 0.85rem;
    }

    .preview-wrapper {
        padding: 1rem;
    }

    .email-preview {
        max-width: 100%;
    }

    .email-body {
        padding: 1rem;
    }
}

.preview-wrapper {
    background: linear-gradient(135deg, #eef2fb 0%, #e4eaf7 100%);
    border-radius: 1.1rem;
    padding: 1.5rem 1rem;
    border: 1px solid var(--luxury-border);
}

.email-preview {
    max-width: 600px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
    overflow: hidden;
}

.email-header {
    background: linear-gradient(135deg, #284b63 0%, #3f6a8a 100%);
    color: #ffffff;
    padding: 1.25rem 1rem;
    text-align: center;
}

.email-header h2 {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.email-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

.email-body {
    padding: 1.25rem 1rem;
}

.email-opening h3 {
    color: var(--luxury-ink);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.email-summary {
    color: var(--luxury-muted);
    margin-bottom: 0.75rem;
}

.email-content {
    padding: 0.85rem 1rem;
    background: #f3f6fc;
    border-radius: 0.6rem;
    border: 1px solid var(--luxury-border);
    font-size: 0.95rem;
    line-height: 1.6;
}

.email-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.email-tag {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.email-tag-primary {
    background: var(--luxury-accent-soft);
    color: var(--luxury-ink);
}

.email-tag-secondary {
    background: #e9ecef;
    color: #495057;
}

.email-divider {
    border: 0;
    border-top: 1px solid var(--luxury-border);
    margin: 1.25rem 0;
}

.email-section-title {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--luxury-ink);
}

.email-article {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--luxury-border);
}

.email-article:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.email-article h5 {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.email-footer {
    margin-top: 0.5rem;
    padding: 1.25rem 1.5rem;
    background: #f3f6fc;
    text-align: center;
    border-top: 1px solid var(--luxury-border);
}

.email-footer-tagline {
    margin: 0 0 0.35rem;
    font-weight: 600;
    color: var(--luxury-ink);
    font-size: 0.95rem;
}

.email-footer-note {
    margin: 0;
    color: var(--luxury-muted);
    font-size: 0.85rem;
}

.email-footer-note a {
    color: var(--luxury-accent);
    text-decoration: underline;
}

.card {
    border: 1px solid var(--luxury-border);
    border-radius: 1.1rem;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
    background: var(--luxury-surface);
}

.luxury-card {
    border: 1px solid var(--luxury-border);
}

.edition-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.edition-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.1);
}

.edition-card .card-body {
    padding: 1.6rem 1.7rem;
}

.edition-card .edition-name {
    font-size: 1.2rem;
    font-weight: 600;
    word-break: break-word;
}

.edition-card .edition-meta {
    flex: 1;
}

.edition-card .edition-meta .meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--luxury-muted);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.edition-card .edition-meta .meta-row i {
    width: 18px;
    text-align: center;
    color: var(--luxury-accent);
}

.edition-card .edition-actions {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--luxury-border);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--luxury-border);
    padding: 1rem 1.15rem;
}

.card-body {
    padding: 1rem 1.15rem;
}

.dashboard-hero {
    padding: 1.2rem 1.3rem;
    background: linear-gradient(125deg, #ffffff 0%, #dce6fb 100%);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.75rem;
    color: var(--luxury-accent);
    font-weight: 700;
}

.hero-title {
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    font-weight: 700;
    color: var(--luxury-ink);
}

.hero-copy {
    color: var(--luxury-muted);
    max-width: 700px;
}

.hero-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.92);
    color: #fff;
    font-weight: 600;
    white-space: nowrap;
}

.stat-card {
    border: 0;
    color: #fff;
    overflow: hidden;
}

.stat-card .card-body {
    padding: 1.15rem;
}

.stat-card-primary {
    background: linear-gradient(135deg, #284b63 0%, #3f6a8a 100%);
}

.stat-card-success {
    background: linear-gradient(135deg, #2f6f4f 0%, #4f9b70 100%);
}

.stat-card-gold {
    background: linear-gradient(135deg, #1c4fb0 0%, #3b78e6 100%);
}

.stat-card-ink {
    background: linear-gradient(135deg, #1f2430 0%, #2c3445 100%);
}

.stat-card-skin {
    background: linear-gradient(135deg, #b84c3d 0%, #e07a6b 100%);
}

.stat-card-wellness {
    background: linear-gradient(135deg, #8a2b6f 0%, #b84c8a 100%);
}

.stat-card-longevity {
    background: linear-gradient(135deg, #284b63 0%, #4a7c9e 100%);
}

.stat-label {
    margin: 0 0 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    opacity: 0.85;
}

.stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    margin: 0;
}

.stat-subtitle {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0.2rem 0 0.2rem;
}

.stat-meta {
    margin: 0.2rem 0 0;
    opacity: 0.9;
}

.stat-icon {
    min-width: 46px;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.16);
    font-size: 1.05rem;
}

.indication-row .stat-card {
    height: 110px;
}

.agent-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border-radius: 0.8rem;
    background: #f3f6fc;
    margin-bottom: 0.5rem;
}

.agent-status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.agent-status-indicator.running {
    background: #2e8b57;
}

.agent-status-indicator.idle {
    background: #d39a13;
}

.agent-status-indicator.error {
    background: #c74b4b;
}

.badge-soft {
    background: var(--luxury-accent-soft);
    color: var(--luxury-ink);
}

.empty-state {
    padding: 1.4rem;
    text-align: center;
    color: var(--luxury-muted);
}

.luxury-table th {
    font-weight: 700;
    color: var(--luxury-ink);
    border-top: 0;
    border-bottom: 1px solid var(--luxury-border);
    background: #fafbfe;
}

.luxury-table td {
    vertical-align: middle;
}

.recent-editions-scroll {
    display: flex;
    flex-wrap: nowrap;
    gap: 1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 0.5rem 1rem 0.75rem;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.recent-editions-scroll::-webkit-scrollbar {
    height: 6px;
}

.recent-editions-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.recent-editions-scroll::-webkit-scrollbar-thumb {
    background: rgba(17, 24, 39, 0.12);
    border-radius: 999px;
}

.recent-editions-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(17, 24, 39, 0.22);
}

.recent-edition-card {
    flex: 0 0 260px;
    flex-shrink: 0;
    flex-grow: 0;
    scroll-snap-align: start;
    border: 1px solid var(--luxury-border);
    border-radius: 1rem;
    background: var(--luxury-surface);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    max-width: 260px;
    box-sizing: border-box;
}

.recent-edition-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.09);
}

.recent-edition-card .card-inner {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    height: 100%;
}

.recent-edition-card .edition-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.recent-edition-card .edition-name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.35;
    margin: 0;
}

.recent-edition-card .edition-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--luxury-muted);
    font-size: 0.85rem;
}

.recent-edition-card .edition-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.recent-edition-card .edition-meta i {
    color: var(--luxury-accent);
    width: 16px;
    text-align: center;
    font-size: 0.78rem;
}

.recent-edition-card .edition-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--luxury-border);
}

.btn {
    border-radius: 0.7rem;
    font-weight: 600;
}

.progress {
    height: 20px;
    border-radius: 999px;
    background-color: #e4eaf7;
}

.progress-bar {
    line-height: 20px;
    font-size: 0.78rem;
    font-weight: 700;
}

.form-control, .form-select {
    border-radius: 0.8rem;
    border: 1px solid var(--luxury-border);
}

.form-control:focus, .form-select:focus {
    border-color: var(--luxury-accent);
    box-shadow: 0 0 0 0.2rem rgba(5, 82, 200, 0.15);
}

@media (max-width: 992px) {
    .sidebar-panel {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
    }

    .sidebar-panel.mobile-open {
        transform: translateX(0);
        box-shadow: 8px 0 30px rgba(17, 24, 39, 0.15);
    }

    #page-content-wrapper {
        margin-left: 0;
    }

    .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(17, 24, 39, 0.45);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        z-index: 1040;
    }

    .sidebar-backdrop.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 1rem;
    }

    .topbar {
        padding: 0.8rem 0.9rem;
    }

    .topbar .container-fluid {
        flex-wrap: wrap;
        gap: 0.65rem;
    }

    .topbar-user {
        width: 100%;
        order: 3;
    }

    .topbar-meta {
        font-size: 0.82rem;
    }

    .topbar-meta i {
        display: none;
    }

    .hero-title {
        font-size: 1.2rem;
    }

    .table-responsive {
        font-size: 0.95rem;
    }
}

.public-navbar {
    padding: 0;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--luxury-border);
    box-shadow: 0 2px 20px rgba(17, 24, 39, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.public-navbar .container-lg {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.public-navbar-brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, var(--luxury-accent) 0%, #2f72e0 100%);
    color: #fff;
    font-size: 1rem;
}

.public-navbar .navbar-brand {
    font-size: 1.15rem;
    color: var(--luxury-ink) !important;
    letter-spacing: -0.01em;
    font-weight: 800;
}

.public-navbar .navbar-nav {
    gap: 0.25rem;
}

.public-navbar .nav-link {
    color: var(--luxury-muted) !important;
    font-weight: 500;
    padding: 0.55rem 1.2rem;
    border-radius: 0.5rem;
    transition: color 0.2s ease, background-color 0.2s ease;
    font-size: 0.95rem;
}

.public-navbar .nav-link:hover {
    color: var(--luxury-accent) !important;
    background-color: rgba(5, 82, 200, 0.08);
}

.public-navbar .nav-link.active {
    color: var(--luxury-accent) !important;
    background-color: rgba(5, 82, 200, 0.1);
}

.public-footer {
    background: var(--luxury-ink);
    color: rgba(255, 255, 255, 0.85);
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

.public-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
    font-size: 0.9rem;
}

.public-footer a:hover {
    color: var(--luxury-accent);
}

.public-footer h6 {
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    margin-bottom: 1rem;
}

.public-footer .text-muted {
    color: rgba(255, 255, 255, 0.5) !important;
}

.public-footer .form-control {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    border-radius: 0.6rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.public-footer .form-control::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.public-footer .form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--luxury-accent);
    box-shadow: 0 0 0 0.2rem rgba(5, 82, 200, 0.25);
    color: #fff;
}

.public-footer .btn-primary {
    background: var(--luxury-accent);
    border-color: var(--luxury-accent);
    border-radius: 0.6rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.public-footer .btn-primary:hover {
    background: #073e91;
    border-color: #073e91;
}

.public-footer .border-top {
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.public-footer .small {
    font-size: 0.8rem;
}

.public-footer .footer-brand {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.public-footer .footer-desc {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
    line-height: 1.5;
}

.public-footer .footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.public-footer .footer-nav a {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
}

.public-footer .footer-nav a:hover {
    color: var(--luxury-accent);
}

.public-footer .footer-newsletter p {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
    line-height: 1.5;
}

.public-footer .copyright {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.78rem;
}

.public-footer .footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.public-footer .footer-links a {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.8rem;
}

.public-footer .footer-links a:hover {
    color: var(--luxury-accent);
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.breadcrumb-item a {
    color: var(--luxury-accent);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: var(--luxury-muted);
}

.public-form-panel {
    background: var(--luxury-surface);
    border: 1px solid var(--luxury-border);
    border-radius: 1.2rem;
    padding: 2.5rem;
    box-shadow: 0 4px 20px rgba(17, 24, 39, 0.05);
}

/* ===== Public Magazine Styles ===== */

.public-body {
    --luxury-bg: #f8f9fa;
    --luxury-border: #d5d8e0;
    --luxury-accent: #141C4D;
    --luxury-accent-soft: #edf0fb;
    --luxury-ink: #141C4D;
    background: #f8f9fa;
    min-height: 100vh;
}

.public-hero {
    background: linear-gradient(135deg, #141C4D 0%, #2e376d 62%, #3F3F3F 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.public-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 70% 20%, rgba(255, 255, 255, 0.12) 0%, transparent 60%);
}

.public-hero .container-lg {
    position: relative;
    z-index: 1;
}

.public-title {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: #fff;
}

.public-hero .lead {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    max-width: 500px;
}

.public-hero .eyebrow {
    color: #fff;
    font-size: 0.8rem;
    letter-spacing: 0.22em;
}

.public-search {
    max-width: 420px;
}

.public-search .form-control {
    border-radius: 0.7rem 0 0 0.7rem;
    border: none;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.public-search .form-control:focus {
    box-shadow: none;
    border-color: var(--luxury-accent);
}

.public-search .btn {
    border-radius: 0 0.7rem 0.7rem 0;
    padding: 0.75rem 1.2rem;
}

.public-filter {
    background: var(--luxury-surface);
    border: 1px solid var(--luxury-border);
    border-radius: 1rem;
    padding: 1.25rem;
}

.section-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--luxury-ink);
    position: relative;
    padding-bottom: 0.5rem;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--luxury-accent);
    border-radius: 2px;
}

.public-card {
    background: var(--luxury-surface);
    border: 1px solid var(--luxury-border);
    border-radius: 1rem;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 8px rgba(17, 24, 39, 0.04);
}

.public-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(17, 24, 39, 0.1);
}

.public-card h3 a {
    color: var(--luxury-ink);
    text-decoration: none;
    transition: color 0.2s ease;
}

.public-card h3 a:hover {
    color: var(--luxury-accent);
}

.public-card p {
    color: var(--luxury-muted);
    line-height: 1.6;
}

.public-feature {
    background: var(--luxury-surface);
    border: 1px solid var(--luxury-border);
    border-radius: 1.2rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(17, 24, 39, 0.06);
}

.public-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--luxury-accent);
}

.public-feature h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--luxury-ink);
}

.public-feature h2 a {
    color: inherit;
    text-decoration: none;
}

.public-feature h2 a:hover {
    color: var(--luxury-accent);
}

.public-subscribe-panel {
    background: #ffffff;
    border: 1px solid var(--luxury-border);
    border-radius: 1.2rem;
    padding: 2rem;
}

.public-subscribe-panel h3 {
    font-weight: 700;
    color: var(--luxury-ink);
}

.public-edition-list {
    border: 1px solid var(--luxury-border);
    border-radius: 1rem;
    overflow: hidden;
}

.public-edition-list .list-group-item {
    border: 0;
    border-bottom: 1px solid var(--luxury-border);
    padding: 1rem 1.25rem;
    transition: background 0.2s ease;
}

.public-edition-list .list-group-item:last-child {
    border-bottom: 0;
}

.public-edition-list .list-group-item:hover {
    background: #fdfaf5;
}

.public-article {
    max-width: 780px;
    margin: 0 auto;
}

.public-article h1 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--luxury-ink);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.public-article .article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--luxury-text);
}

.public-article .article-body p {
    margin-bottom: 1.2rem;
}

.article-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.article-actions .btn {
    border-radius: 0.7rem;
    font-weight: 600;
}

.public-edition-header {
    border-bottom: 2px solid var(--luxury-accent);
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.public-edition-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--luxury-ink);
}

.badge.bg-primary {
    background-color: var(--luxury-accent) !important;
    color: #fff;
}

.badge.bg-secondary {
    background-color: var(--luxury-accent-soft) !important;
    color: var(--luxury-ink);
}

@media (max-width: 768px) {
    .public-title {
        font-size: 1.8rem;
    }

    .public-hero .lead {
        font-size: 1rem;
    }

    .public-feature {
        padding: 1.25rem;
    }

    .public-card {
        padding: 1rem;
    }

    .public-search {
        max-width: 100%;
    }
}

::-webkit-scrollbar-track {
    background: #e7ecf8;
}

::-webkit-scrollbar-thumb {
    background: #9fb3e8;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a3fa0;
}

.agent-status-indicator.running {
    background: #28a745;
}

.agent-status-indicator.idle {
    background: #ffc107;
}

.agent-status-indicator.error {
    background: #dc3545;
}

.public-body {
    background: #f7f8fb;
    color: #1f2430;
}

.public-hero {
    background: #ffffff;
    border-bottom: 1px solid #e6e9ef;
}

.public-title {
    font-size: 3rem;
    font-weight: 800;
    letter-spacing: 0;
}

.public-search .form-control {
    min-height: 46px;
}

.public-feature,
.public-subscribe-panel,
.public-card,
.public-form-panel {
    background: #ffffff;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.05);
}

.public-feature h2,
.public-card h3,
.public-article h1,
.public-edition-header h1,
.public-form-panel h1 {
    letter-spacing: 0;
}

.public-card h3 {
    font-size: 1.1rem;
    line-height: 1.35;
}

.public-card a,
.public-feature a {
    color: #151b2d;
    text-decoration: none;
}

.public-card a:hover,
.public-feature a:hover {
    text-decoration: underline;
}

.section-heading {
    font-size: 1.25rem;
    font-weight: 750;
}

.public-article {
    max-width: 820px;
}

.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
}

.public-form-panel {
    max-width: 560px;
}

.public-footer {
    background: #ffffff;
    border-top: 1px solid #e6e9ef;
}

@media (max-width: 768px) {
    .public-title {
        font-size: 2.1rem;
    }
}

/* ===== Public Editorial Refresh ===== */

.public-body {
    font-family: 'Manrope', sans-serif;
    background: linear-gradient(180deg, #f7f8fb 0%, #f3f5f9 100%);
    color: #1f2430;
}

.public-body h1,
.public-body h2,
.public-body h3,
.public-body h4,
.public-body h5,
.public-body h6,
.public-title,
.public-feature h2,
.public-card h3,
.public-article h1,
.public-edition-header h1 {
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: -0.015em;
}

.public-hero {
    position: relative;
    background:
        radial-gradient(circle at top right, rgba(20, 28, 77, 0.08), transparent 40%),
        linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
    border-bottom: 1px solid #e4e8f0;
    padding-top: 3.5rem;
    padding-bottom: 2rem;
}

.public-masthead {
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(20, 28, 77, 0.06);
    position: relative;
}

.public-masthead::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 64px;
    height: 3px;
    background: var(--luxury-accent);
    border-radius: 2px;
}

.public-title {
    font-size: clamp(2.5rem, 5vw, 4.25rem);
    line-height: 0.95;
    color: #141c4d;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: -0.02em;
}

.public-title-block {
    max-width: 42rem;
}

.public-hero .lead {
    color: #53607a;
    font-size: 1.08rem;
    max-width: 760px;
    font-weight: 500;
}

.public-hero .eyebrow {
    color: var(--luxury-accent);
    font-size: 0.8rem;
    letter-spacing: 0.22em;
    font-weight: 700;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding-bottom: 0.5rem;
}

.public-hero .eyebrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 32px;
    height: 2px;
    background: var(--luxury-accent);
    border-radius: 1px;
}

.eyebrow-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--luxury-accent);
    display: inline-block;
    flex-shrink: 0;
}

.public-header-grid {
    align-items: end;
}

.public-header-signals {
    margin-top: 0.25rem;
}

.public-signal-chip {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    background: rgba(20, 28, 77, 0.06);
    border: 1px solid rgba(20, 28, 77, 0.08);
    color: #141c4d;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.public-search-panel {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid #e2e7f0;
    border-radius: 1.2rem;
    padding: 1.25rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.public-search-label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-weight: 800;
    color: #141c4d;
}

.public-search-copy {
    color: #6a7286;
    font-size: 0.92rem;
    line-height: 1.4;
}

.public-search-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #edf0fb;
    color: #141c4d;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

.public-search {
    width: 100%;
}

.public-search .form-control {
    min-height: 52px;
    border: 1px solid #d9deea;
    border-right: 0;
    background: #ffffff;
}

.public-search .btn {
    min-height: 52px;
}

.public-feature,
.public-subscribe-panel,
.public-card,
.public-form-panel,
.public-metadata-panel {
    background: #ffffff;
    border: 1px solid #e2e7f0;
    border-radius: 1.15rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.05);
}

.public-feature--lead {
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.public-feature--lead h2 {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.02;
}

.featured-summary {
    color: #54617d;
    font-size: 1.05rem;
    line-height: 1.75;
    max-width: 68ch;
}

.public-side-rail {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.public-subscribe-panel,
.public-metadata-panel {
    padding: 1.4rem;
}

.public-metadata-panel h3 {
    font-size: 1.6rem;
    color: #141c4d;
    margin-bottom: 0.5rem;
}

.public-card {
    padding: 1.45rem;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.public-card h3 {
    font-size: 1.45rem;
    line-height: 1.08;
}

.public-card p {
    font-size: 0.98rem;
    color: #5c6782;
    line-height: 1.7;
}

.public-card:hover,
.public-feature:hover,
.public-metadata-panel:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.public-card a,
.public-feature a,
.public-related-item a {
    color: #141c4d;
    text-decoration: none;
}

.public-feature .btn {
    text-decoration: none;
    color: #fff;
}

.public-feature .btn-outline-dark {
    color: #141c4d;
}

.public-feature .btn-dark:hover {
    color: #fff;
    background-color: #141c4d;
    border-color: #141c4d;
}

.public-feature .btn-outline-dark:hover {
    color: #fff;
    background-color: #141c4d;
    border-color: #141c4d;
}

.public-feature .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(20, 28, 77, 0.18);
    text-decoration: none;
}

.public-card a:hover,
.public-feature a:hover,
.public-related-item a:hover {
    text-decoration: underline;
}

.public-breadcrumb {
    font-size: 0.95rem;
}

.public-article-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    align-items: start;
}

.public-article-main {
    min-width: 0;
}

.public-article-hero {
    padding: 0.2rem 0 1.25rem;
    border-bottom: 1px solid #e4e8f0;
}

.public-article-hero h1 {
    font-size: clamp(2.5rem, 4.6vw, 4.25rem);
    line-height: 0.98;
    max-width: none;
}

.public-article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    color: #6a7286;
    font-size: 0.95rem;
}

.public-article-meta span + span::before {
    content: '•';
    margin-right: 0.8rem;
    color: #b4bccd;
}

.public-article-summary {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #4f5b75;
    max-width: 74ch;
}

.public-article {
    max-width: 900px;
}

.public-article .article-body {
    font-size: 1.08rem;
    line-height: 1.95;
    color: #1f2430;
    max-width: 76ch;
}

.public-article .article-body p {
    margin-bottom: 1.35rem;
}

.public-article .article-body p:first-child {
    font-size: 1.14rem;
}

.public-article .article-body p:first-child::first-letter {
    float: left;
    font-size: 4rem;
    line-height: 0.85;
    padding-right: 0.22rem;
    padding-top: 0.18rem;
    font-family: 'Cormorant Garamond', serif;
    color: #141c4d;
}

.public-article-sidebar {
    position: sticky;
    top: 5.5rem;
}

.public-fact-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.9rem;
}

.public-fact-list li {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #edf1f6;
}

.public-fact-list li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.public-fact-list span {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #7a8397;
}

.public-fact-list strong {
    color: #141c4d;
    font-weight: 700;
}

.public-related-list {
    display: grid;
    gap: 1rem;
}

.public-related-item h4 {
    font-size: 1.2rem;
    line-height: 1.15;
    margin-bottom: 0.45rem;
}

.public-related-item p {
    margin: 0;
    color: #5c6782;
    line-height: 1.65;
    font-size: 0.94rem;
}

.article-actions .btn {
    border-radius: 0.85rem;
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .public-article-layout {
        grid-template-columns: 1fr;
    }

    .public-article-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .public-title {
        font-size: 2rem;
    }

    .public-hero .lead {
        font-size: 1rem;
    }

    .public-hero {
        padding-top: 2.5rem;
        padding-bottom: 1.5rem;
    }

    .public-masthead {
        padding-bottom: 1.5rem;
    }

    .public-masthead::after {
        width: 48px;
        height: 2px;
    }

    .public-search {
        margin-top: 1rem;
    }

    .public-feature--lead,
    .public-subscribe-panel,
    .public-metadata-panel,
    .public-card {
        padding: 1.15rem;
    }

    .public-article-hero h1 {
        max-width: none;
    }

    .public-search {
        max-width: 100%;
    }

    .public-search-panel {
        padding: 1rem;
    }
}

.public-navbar {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid #e4e8f0;
    box-shadow: 0 2px 18px rgba(15, 23, 42, 0.04);
}

.public-navbar .navbar-brand,
.public-navbar .nav-link {
    color: #141c4d !important;
}

.public-navbar .nav-link {
    border-radius: 0.55rem;
    font-weight: 600;
}

.public-navbar .nav-link:hover {
    background: rgba(20, 28, 77, 0.05);
}

.public-footer {
    background: #141c4d;
    color: rgba(255, 255, 255, 0.85);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.public-footer .footer-brand,
.public-footer h6 {
    color: #ffffff;
}

.public-footer .footer-desc,
.public-footer .footer-newsletter p,
.public-footer .copyright {
    color: rgba(255, 255, 255, 0.72);
}

.public-footer a,
.public-footer .footer-nav a,
.public-footer .footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

.public-footer a:hover,
.public-footer .footer-nav a:hover,
.public-footer .footer-links a:hover {
    color: #f1c97d;
}

.public-footer .form-control {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.public-footer .form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.public-footer .form-control:focus {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}



/* Regenecist logo lockup (added) */
.sidebar-brand-logo {
    height: 34px;
    width: auto;
    display: block;
}

.navbar-brand-logo {
    height: 38px;
    width: auto;
    display: block;
}

/* ==========================================================================
   UI consistency polish (applies across admin, doctor & public pages)
   ========================================================================== */

/* Accent for form checkboxes/radios/range to match the theme */
.form-check-input:checked { background-color: var(--luxury-accent); border-color: var(--luxury-accent); }
.form-check-input:focus { border-color: var(--luxury-accent); box-shadow: 0 0 0 0.2rem rgba(5,82,200,.15); }

/* Buttons: subtle, consistent interaction feedback everywhere */
.btn { transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease, color .12s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-group .btn:hover { transform: none; }   /* keep grouped icon buttons steady */

/* Tables: uniform, professional headers + comfortable rows */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding-top: .85rem; padding-bottom: .85rem; vertical-align: middle; }
.table thead th,
.table > thead > tr > th {
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .74rem;
    font-weight: 700;
    color: var(--luxury-muted);
    background: #f7f9fd;
    border-bottom: 1px solid var(--luxury-border);
    white-space: nowrap;
}
.table-hover > tbody > tr:hover > * { background-color: var(--luxury-accent-soft); }

/* Card headers: consistent weight/size and vertical rhythm */
.card-header h5, .card-header h6 { font-weight: 700; color: var(--luxury-ink); }
.card + .card, .row + .row { margin-top: 0; }

/* Badges: a touch more breathing room, pill style for status chips */
.badge { padding: .4em .65em; font-weight: 600; letter-spacing: .01em; }

/* Modals: match card rounding & spacing */
.modal-content { border: 1px solid var(--luxury-border); border-radius: 1rem; box-shadow: 0 24px 60px rgba(17,24,39,.18); }
.modal-header, .modal-footer { border-color: var(--luxury-border); }
.modal-header .modal-title { font-weight: 700; color: var(--luxury-ink); }

/* Stat tiles / icons shared by admin & doctor dashboards */
.stat-tile { border: 1px solid var(--luxury-border); border-radius: 14px; padding: 18px 20px; background: #fff; height: 100%; box-shadow: 0 8px 22px rgba(17,24,39,.05); transition: transform .15s ease, box-shadow .15s ease; }
.stat-tile:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(17,24,39,.09); }
.stat-tile .stat-ico, .stat-icon { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.15rem; flex-shrink: 0; }
.stat-tile .stat-num { font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--luxury-ink); }
.avatar-circle, .doctor-avatar { width: 42px; height: 42px; border-radius: 50%; color: #fff; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25); }
.brand-swatch { width: 18px; height: 18px; border-radius: 5px; border: 1px solid rgba(0,0,0,.15); display: inline-block; }

/* Consistent page-heading rhythm */
main .main-content > h2:first-child,
.main-content > .d-flex > div > h2 { color: var(--luxury-ink); }
h2 { font-weight: 700; }

/* Empty states: centered, muted, consistent */
.empty-state { color: var(--luxury-muted); text-align: center; padding: 1.25rem; }

/* Icon-only action buttons keep a comfortable tap target */
.btn-group-sm > .btn, .btn-sm { padding: .34rem .6rem; }

/* Public: align section spacing with app rhythm */
.public-body .container-lg { padding-left: 1rem; padding-right: 1rem; }
.pagination .page-link { color: var(--luxury-accent); border-radius: .5rem; margin: 0 .12rem; border-color: var(--luxury-border); }
.pagination .page-item.active .page-link { background: var(--luxury-accent); border-color: var(--luxury-accent); }
