 :root {
    --sidebar-width: 280px;
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #182033;
    --muted: #73809a;
    --primary: #5b5cf0;
    --primary-dark: #4748d8;
    --sidebar: #111827;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(91, 92, 240, .18), transparent 35%),
        radial-gradient(circle at bottom right, rgba(59, 130, 246, .12), transparent 32%),
        #f8fafc;
}

.brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    font-size: 28px;
    color: #fff;
    background: linear-gradient(135deg, #5b5cf0, #7c3aed);
    box-shadow: 0 16px 40px rgba(91, 92, 240, .28);
}

.brand-mark-sm {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    font-size: 20px;
    flex: 0 0 auto;
}

.form-control {
    border-radius: 12px;
    border-color: #dce2ec;
}

.form-control:focus {
    border-color: rgba(91, 92, 240, .65);
    box-shadow: 0 0 0 .25rem rgba(91, 92, 240, .12);
}

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    border-radius: 12px;
}

.app-shell {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    background: var(--sidebar);
    color: #fff;
    z-index: 1000;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
}

.sidebar-brand strong,
.sidebar-brand span {
    display: block;
}

.sidebar-brand span {
    color: #98a2b3;
    font-size: .85rem;
    margin-top: 2px;
}

.sidebar-nav {
    gap: 6px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #cbd5e1;
    border-radius: 12px;
    padding: 11px 13px;
}

.sidebar-nav .nav-link i {
    width: 20px;
    font-size: 1.05rem;
}

.sidebar-nav .nav-link.active,
.sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

.sidebar-nav .nav-link.disabled {
    opacity: .55;
}

.sidebar-footer {
    margin-top: auto;
    padding: 18px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 16px;
}

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

.topbar {
    min-height: 96px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 34px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e9edf4;
    position: sticky;
    top: 0;
    z-index: 900;
}

.eyebrow {
    color: var(--primary);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.content-wrap {
    padding: 32px 34px 48px;
}

.stat-card,
.panel-card {
    background: var(--card);
    border: 1px solid #e8edf4;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(16, 24, 40, .05);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 22px;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 22px;
    color: var(--primary);
    background: rgba(91, 92, 240, .10);
}

.stat-value {
    font-size: 1.75rem;
    line-height: 1;
    font-weight: 800;
}

.stat-label {
    margin-top: 7px;
    color: var(--muted);
    font-size: .9rem;
}

.panel-card {
    overflow: hidden;
}

.panel-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px;
    border-bottom: 1px solid #edf1f6;
}

.table > :not(caption) > * > * {
    padding: 16px 24px;
    border-color: #edf1f6;
}

.table thead th {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    background: #fbfcfe;
}

.status-list {
    padding: 8px 24px 18px;
}

.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #edf1f6;
}

.status-item:last-child {
    border-bottom: 0;
}

@media (max-width: 991.98px) {
    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .sidebar-footer {
        margin-top: 24px;
    }

    .main-content {
        margin-left: 0;
    }

    .topbar {
        position: static;
        padding: 22px;
    }

    .content-wrap {
        padding: 22px;
    }
}


.empty-state {
    padding: 64px 24px;
    text-align: center;
}

.empty-state-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-size: 30px;
    color: var(--primary);
    background: rgba(91, 92, 240, .10);
}

.site-avatar {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #5b5cf0, #7c3aed);
}

.language-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid #e4e9f1;
    border-radius: 999px;
    background: #fff;
    font-size: .88rem;
}

.language-code {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 24px;
    padding: 0 6px;
    border-radius: 7px;
    color: var(--primary);
    background: rgba(91, 92, 240, .10);
    font-weight: 800;
    font-size: .72rem;
}

.language-info {
    display: flex;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(91, 92, 240, .18);
    border-radius: 14px;
    background: rgba(91, 92, 240, .06);
}

.language-info > i {
    font-size: 1.35rem;
    color: var(--primary);
}

.language-info p {
    color: var(--muted);
    font-size: .9rem;
    margin-top: 3px;
}


.article-filters {
    padding: 22px;
}

.compact-stat-card {
    min-height: 108px;
}

.article-editor {
    min-height: 470px;
    resize: vertical;
    line-height: 1.75;
}

.article-sidebar-card {
    top: 24px;
}

.selected-language-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(91, 92, 240, .18);
    border-radius: 14px;
    background: rgba(91, 92, 240, .06);
}

.selected-language-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.15rem;
    color: var(--primary);
    background: #fff;
}

.article-save-box {
    padding-top: 4px;
}

.planned-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 0;
    color: var(--muted);
    border-bottom: 1px solid #edf0f5;
    font-size: .92rem;
}

.planned-feature:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.planned-feature i {
    color: var(--primary);
}

@media (max-width: 1199.98px) {
    .article-sidebar-card {
        position: static !important;
    }
}


.source-field {
    transition: opacity .2s ease;
}

.image-placeholder {
    min-height: 150px;
    border: 1px dashed #cfd6e4;
    border-radius: 16px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    text-align: center;
    color: var(--muted);
    background: #fafbfc;
    padding: 24px;
}

.image-placeholder i {
    font-size: 2rem;
    color: var(--primary);
}


.site-settings-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 16px 0;
    overflow-x: auto;
    border-bottom: 1px solid #e9edf4;
}

.site-tab {
    border: 0;
    background: transparent;
    color: var(--muted);
    padding: 14px 18px;
    font-weight: 600;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
}

.site-tab i {
    margin-right: 8px;
}

.site-tab:hover,
.site-tab.active {
    color: var(--primary);
}

.site-tab.active {
    border-bottom-color: var(--primary);
}

.site-tab-pane {
    display: none;
}

.site-tab-pane.active {
    display: block;
}

.site-form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 24px;
    border-top: 1px solid #e9edf4;
    background: #fafbfc;
    border-radius: 0 0 18px 18px;
}

.integration-notice {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: rgba(91, 92, 240, .07);
    border: 1px solid rgba(91, 92, 240, .16);
    border-radius: 14px;
}

.integration-notice i {
    color: var(--primary);
    font-size: 1.4rem;
}

.integration-notice p {
    color: var(--muted);
    font-size: .9rem;
}

.integration-switch {
    min-height: 92px;
    padding: 18px 18px 18px 58px;
    border: 1px solid #e5eaf1;
    border-radius: 14px;
    background: #fff;
}

.integration-switch .form-check-input {
    margin-left: -38px;
}

.integration-switch label {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.integration-switch label span {
    color: var(--muted);
    font-size: .86rem;
}

.settings-heading-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: rgba(91, 92, 240, .09);
    color: var(--primary);
    margin-bottom: 14px;
}

.settings-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 13px 0;
    border-bottom: 1px solid #edf0f5;
}

.settings-step:last-child {
    border-bottom: 0;
}

.settings-step > span {
    flex: 0 0 30px;
    height: 30px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: rgba(91, 92, 240, .09);
    color: var(--primary);
    font-weight: 700;
}

.settings-step div {
    display: flex;
    flex-direction: column;
}

.settings-step small {
    color: var(--muted);
}

@media (max-width: 767.98px) {
    .site-form-footer {
        flex-direction: column-reverse;
    }

    .site-form-footer .btn {
        width: 100%;
    }
}
