:root {
    --kv-orange: #f97316;
    --kv-orange-dark: #ea580c;
    --kv-ink: #0f172a;
    --kv-muted: #64748b;
    --kv-surface: #f4f7fb;
    --kv-card: #ffffff;
    --kv-border: rgba(15, 23, 42, 0.08);
    --kv-radius: 1rem;
    --kv-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
    --kv-shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.1);
    --bs-primary: #f97316;
    --bs-primary-rgb: 249, 115, 22;
    --bs-body-font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --bs-body-color: #0f172a;
    --bs-body-bg: #f4f7fb;
    --bs-border-radius: 0.75rem;
    --bs-border-radius-sm: 0.5rem;
    --bs-border-radius-lg: 1rem;
    --bs-link-color: #ea580c;
    --bs-link-hover-color: #c2410c;
    --bs-focus-ring-color: rgba(249, 115, 22, 0.25);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body.admin-body {
    background:
        radial-gradient(ellipse 80% 50% at 100% -10%, rgba(249, 115, 22, 0.08), transparent 55%),
        radial-gradient(ellipse 50% 40% at 0% 100%, rgba(14, 165, 233, 0.05), transparent 50%),
        var(--kv-surface);
    min-height: 100vh;
    color: var(--kv-ink);
    -webkit-font-smoothing: antialiased;
}

/* Buttons */
.btn {
    font-weight: 600;
    letter-spacing: -0.01em;
    border-radius: 0.75rem;
    padding: 0.55rem 1rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:active {
    transform: scale(0.98);
}

.btn-sm {
    border-radius: 0.65rem;
    padding: 0.35rem 0.75rem;
}

.btn-primary {
    --bs-btn-bg: var(--kv-orange);
    --bs-btn-border-color: var(--kv-orange);
    --bs-btn-hover-bg: var(--kv-orange-dark);
    --bs-btn-hover-border-color: var(--kv-orange-dark);
    --bs-btn-active-bg: var(--kv-orange-dark);
    --bs-btn-active-border-color: var(--kv-orange-dark);
    --bs-btn-disabled-bg: var(--kv-orange);
    --bs-btn-disabled-border-color: var(--kv-orange);
    box-shadow: 0 8px 20px rgba(var(--bs-primary-rgb), 0.25);
}

.btn-primary:hover {
    box-shadow: 0 10px 24px rgba(var(--bs-primary-rgb), 0.3);
}

.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-danger {
    background: #fff;
}

.btn-outline-secondary {
    --bs-btn-color: #475569;
    --bs-btn-border-color: #e2e8f0;
    --bs-btn-hover-bg: #f8fafc;
    --bs-btn-hover-border-color: #cbd5e1;
    --bs-btn-hover-color: #0f172a;
}

.btn-outline-primary {
    --bs-btn-color: var(--kv-orange-dark);
    --bs-btn-border-color: #fed7aa;
    --bs-btn-hover-bg: #fff7ed;
    --bs-btn-hover-border-color: #fdba74;
    --bs-btn-hover-color: var(--kv-orange-dark);
}

.btn-outline-danger {
    --bs-btn-color: #dc2626;
    --bs-btn-border-color: #fecaca;
    --bs-btn-hover-bg: #fef2f2;
    --bs-btn-hover-border-color: #fca5a5;
    --bs-btn-hover-color: #b91c1c;
}

/* Forms */
.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.form-control,
.form-select {
    border-color: #e2e8f0;
    border-radius: 0.75rem;
    padding: 0.65rem 0.9rem;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
}

.form-control-sm,
.form-select-sm {
    border-radius: 0.65rem;
    padding: 0.4rem 0.7rem;
}

.form-check-input:checked {
    background-color: var(--kv-orange);
    border-color: var(--kv-orange);
}

.input-group-text {
    border-color: #e2e8f0;
    background: #f8fafc;
    color: #94a3b8;
    border-radius: 0.75rem;
}

/* Cards */
.card {
    border: 1px solid var(--kv-border);
    border-radius: var(--kv-radius);
    box-shadow: var(--kv-shadow);
    background: var(--kv-card);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--kv-border);
    padding: 1rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* Tables */
.table {
    --bs-table-hover-bg: rgba(248, 250, 252, 0.9);
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    vertical-align: middle;
    padding: 0.9rem 1.1rem;
    border-bottom-color: #f1f5f9;
}

.table thead th {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #94a3b8;
    background: #f8fafc !important;
    border-bottom: 1px solid #eef2f7;
    white-space: nowrap;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
}

.table tbody tr {
    transition: background-color 0.15s ease;
}

.table a {
    color: var(--kv-ink);
    font-weight: 600;
}

.table a:hover {
    color: var(--kv-orange-dark);
}

/* Badges */
.badge {
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 0.4em 0.7em;
}

.badge-soft-success {
    background: #ecfdf5;
    color: #047857;
}

.badge-soft-warning {
    background: #fff7ed;
    color: #c2410c;
}

.badge-soft-danger {
    background: #fef2f2;
    color: #b91c1c;
}

.badge-soft-info {
    background: #eff6ff;
    color: #1d4ed8;
}

.badge-soft-secondary {
    background: #f1f5f9;
    color: #475569;
}

/* Toasts */
.admin-toast-container {
    z-index: 1090;
}

.admin-toast {
    min-width: 280px;
    max-width: 360px;
    border-radius: 0.85rem;
    box-shadow: var(--kv-shadow-lg);
    overflow: hidden;
}

.admin-toast .toast-body {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.85rem 0.35rem 0.85rem 1rem;
}

.admin-toast-success {
    background: #ecfdf5;
    color: #065f46;
}

.admin-toast-success .bi {
    color: #059669;
    font-size: 1.05rem;
}

.admin-toast-danger {
    background: #fef2f2;
    color: #991b1b;
}

.admin-toast-danger .bi {
    color: #dc2626;
    font-size: 1.05rem;
}

.admin-toast .btn-close {
    font-size: 0.7rem;
}

/* Alerts (login / fallback) */
.alert {
    --bs-alert-padding-y: 0.45rem;
    --bs-alert-padding-x: 0.7rem;
    border: none;
    border-radius: 0.55rem;
    box-shadow: none;
    padding: 0.45rem 0.7rem;
    font-size: 0.8125rem;
    line-height: 1.35;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

/* Sidebar */
.admin-sidebar {
    width: 272px;
    height: 100vh;
    max-height: 100vh;
    min-height: 0;
    background:
        radial-gradient(ellipse 90% 40% at 0% 0%, rgba(249, 115, 22, 0.22), transparent 55%),
        linear-gradient(175deg, #111827 0%, #0b1220 48%, #020617 100%);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 8px 0 32px rgba(2, 6, 23, 0.18);
    transition: width 0.25s ease;
}

.admin-sidebar .brand {
    height: 64px;
    flex-shrink: 0;
    padding: 0 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-sidebar .brand-mark,
.admin-sidebar .brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
}

.admin-sidebar .brand-mark {
    background: linear-gradient(135deg, var(--kv-orange), var(--kv-orange-dark));
    color: #fff;
    font-weight: 800;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(var(--bs-primary-rgb), 0.35);
}

.admin-sidebar .brand-logo {
    object-fit: cover;
    background: #fff;
}

.admin-sidebar .brand-title {
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
    line-height: 1.2;
}

.admin-sidebar .brand-subtitle {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.admin-sidebar > nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.45) transparent;
}

.admin-sidebar > nav::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar > nav::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.4);
    border-radius: 999px;
}

.admin-sidebar .nav-section {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #64748b;
    padding: 0.9rem 0.85rem 0.4rem;
}

.admin-sidebar .nav-link {
    color: #cbd5e1;
    border-radius: 0.55rem;
    padding: 0.6rem 0.7rem;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.25;
    min-height: 0;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.admin-sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    transform: translateX(2px);
}

.admin-sidebar .nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, #fb923c, #ea580c);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.22);
    padding-top: 0.48rem;
    padding-bottom: 0.48rem;
}

.admin-sidebar .nav-link i {
    font-size: 0.95rem;
    width: 1.15rem;
    text-align: center;
    opacity: 0.9;
}

/* Collapsed sidebar (desktop) */
@media (min-width: 992px) {
    body.sidebar-collapsed .admin-sidebar {
        width: 84px;
    }

    body.sidebar-collapsed .admin-main {
        margin-left: 84px;
    }

    body.sidebar-collapsed .admin-sidebar .brand {
        justify-content: center;
        padding: 0 0.5rem;
    }

    body.sidebar-collapsed .admin-sidebar .brand-text,
    body.sidebar-collapsed .admin-sidebar .nav-section,
    body.sidebar-collapsed .admin-sidebar .nav-label {
        display: none;
    }

    body.sidebar-collapsed .admin-sidebar .sidebar-collapse-btn {
        display: none !important;
    }

    body.sidebar-collapsed .admin-sidebar .nav-link {
        justify-content: center;
        padding: 0.45rem;
        gap: 0;
    }

    body.sidebar-collapsed .admin-sidebar .nav-link:hover {
        transform: none;
    }

    body.sidebar-collapsed .admin-topbar .sidebar-expand-btn {
        display: inline-flex !important;
    }
}

/* Main shell */
.admin-main {
    margin-left: 272px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.25s ease;
}

.sidebar-expand-btn {
    display: none !important;
}

.admin-topbar {
    height: 58px;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--kv-border);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.admin-topbar .topbar-title {
    font-size: 1rem;
    font-weight: 650;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--kv-ink);
}

.admin-topbar .topbar-subtitle {
    font-size: 0.72rem;
    line-height: 1.2;
    color: #94a3b8;
    margin-top: 0.1rem;
}

.topbar-profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 220px;
}

.topbar-profile-avatar {
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, #fb923c, #ea580c);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topbar-profile-name {
    max-width: 110px;
}

.topbar-profile-menu {
    min-width: 220px;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    padding: 0.35rem;
}

.topbar-profile-menu .dropdown-header {
    padding: 0.55rem 0.75rem 0.35rem;
}

.topbar-profile-menu .dropdown-item {
    border-radius: 0.55rem;
    font-size: 0.875rem;
    padding: 0.45rem 0.7rem;
}

.topbar-profile-menu .dropdown-divider {
    margin: 0.25rem 0.35rem;
}

.admin-content {
    flex: 1;
    padding: 1.5rem;
}

@media (min-width: 992px) {
    .admin-content {
        padding: 1.75rem 2rem 2rem;
    }
}

/* Stats */
.stat-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card .card-body {
    padding: 0.85rem 1rem;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--kv-shadow-lg);
}

.stat-card::after {
    content: '';
    position: absolute;
    right: -18%;
    bottom: -40%;
    width: 5rem;
    height: 5rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.1), transparent 70%);
    pointer-events: none;
}

.stat-card .stat-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--kv-muted);
    letter-spacing: 0.01em;
}

.stat-card .stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.15;
    margin-top: 0.2rem;
}

.stat-card .stat-hint {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 0.15rem;
}

.stat-card .stat-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
}

.stat-icon-orange { background: #fff7ed; color: #ea580c; }
.stat-icon-green { background: #ecfdf5; color: #059669; }
.stat-icon-slate { background: #f1f5f9; color: #475569; }
.stat-icon-sky { background: #f0f9ff; color: #0284c7; }
.stat-icon-violet { background: #f5f3ff; color: #7c3aed; }
.stat-icon-rose { background: #fff1f2; color: #e11d48; }

/* Dashboard */
.dash-hero {
    background:
        linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(249, 115, 22, 0.02) 42%, #fff 70%),
        #fff;
    overflow: hidden;
    position: relative;
}

.dash-hero::before {
    content: '';
    position: absolute;
    right: -4rem;
    top: -3rem;
    width: 12rem;
    height: 12rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249, 115, 22, 0.16), transparent 70%);
    pointer-events: none;
}

.dash-hero-kicker {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ea580c;
    margin-bottom: 0.35rem;
}

.dash-hero-sep {
    margin: 0 0.35rem;
    opacity: 0.65;
}

.dash-hero-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--kv-ink);
}

.dash-action {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--kv-shadow-lg);
}

.dash-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff7ed;
    color: #ea580c;
    flex-shrink: 0;
}

.dash-list .list-group-item {
    border-color: #f1f5f9;
    padding: 0.9rem 1.15rem;
}

.dash-list .list-group-item-action:hover {
    background: #f8fafc;
}

.dash-article-row {
    border: 0;
}

.dash-thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
}

.dash-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    background: linear-gradient(135deg, #fff7ed, #f1f5f9);
}

.dash-rank {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Table actions */
.table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.btn-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    border: 1px solid transparent;
    background: #f8fafc;
    color: #475569;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-icon:hover {
    background: #fff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

.btn-icon-edit {
    color: #ea580c;
    background: #fff7ed;
    border-color: #ffedd5;
}

.btn-icon-edit:hover {
    color: #c2410c;
    background: #ffedd5;
    border-color: #fed7aa;
}

.btn-icon-delete {
    color: #dc2626;
    background: #fef2f2;
    border-color: #fecaca;
}

.btn-icon-delete:hover {
    color: #b91c1c;
    background: #fee2e2;
    border-color: #fca5a5;
}

.btn-icon-reset {
    color: #475569;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.btn-icon-reset:hover {
    color: #0f172a;
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.admin-table {
    min-width: 780px;
    --bs-table-bg: #fff;
    --bs-table-accent-bg: transparent;
    --bs-table-striped-bg: #fff;
    --bs-table-hover-bg: #f8fafc;
}

.admin-table > tbody > tr > * {
    background-color: #fff;
    box-shadow: none;
}

.admin-table > tbody > tr:hover > * {
    background-color: #f8fafc;
}

.admin-table tbody td {
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f1f5f9;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table .col-sr {
    width: 56px;
    text-align: center;
    color: #94a3b8;
}

.admin-table .sr-no {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
}

.admin-table .table-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
}

.admin-table .table-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.1rem;
}

.admin-table .badge {
    font-size: 0.68rem;
    padding: 0.3em 0.55em;
}

.table-card .card-header {
    background: #fff;
}

.table-footer {
    border-top: 1px solid #eef2f7;
    padding: 0.85rem 1.1rem;
}

.table-footer-info {
    font-size: 0.8rem;
    color: #64748b;
}

.table-pagination .pagination {
    margin-bottom: 0;
}

.table-pagination .page-link {
    min-width: 34px;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
}

/* Icon picker */
.icon-picker {
    position: relative;
}

.icon-picker-preview {
    min-width: 2.5rem;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
}

.icon-picker-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.35rem);
    left: 0;
    right: 0;
    max-width: 28rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.85rem;
    box-shadow: var(--kv-shadow-lg);
    padding: 0.65rem;
}

.icon-picker-search {
    position: relative;
    margin-bottom: 0.55rem;
}

.icon-picker-search > i {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.8rem;
    pointer-events: none;
}

.icon-picker-search .form-control {
    padding-left: 1.85rem;
}

.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 0.35rem;
    max-height: 220px;
    overflow: auto;
    padding-right: 0.15rem;
}

.icon-picker-item {
    height: 2.15rem;
    border: 1px solid transparent;
    border-radius: 0.55rem;
    background: #f8fafc;
    font-size: 1.15rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, transform 0.12s ease;
}

.icon-picker-item:hover {
    background: #fff7ed;
    border-color: #fdba74;
    transform: translateY(-1px);
}

.icon-picker-item.is-selected {
    background: #ffedd5;
    border-color: #fb923c;
}

.icon-picker-empty {
    font-size: 0.8rem;
    color: #94a3b8;
    text-align: center;
    padding: 1rem 0.5rem;
}

/* Color picker */
.color-picker-swatch {
    width: 2.5rem;
    min-height: 31px;
    padding: 0.2rem;
    cursor: pointer;
}

.color-picker-select {
    max-width: 11rem;
}

.color-picker-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.color-picker-preset {
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 999px;
    border: 2px solid #fff;
    background-color: transparent;
    box-shadow: 0 0 0 1px #e2e8f0;
    padding: 0;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.color-picker-preset:hover {
    transform: scale(1.08);
}

.color-picker-preset.is-selected {
    box-shadow: 0 0 0 2px #fb923c;
}

@media (max-width: 575.98px) {
    .icon-picker-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .color-picker-select {
        max-width: none;
    }
}

.filter-search {
    width: 220px;
    max-width: 100%;
}

.filter-status {
    width: 150px;
    max-width: 100%;
}

.filter-per-page {
    width: 110px;
    max-width: 100%;
}

.modern-search {
    position: relative;
    width: min(280px, 100%);
}

.modern-search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.9rem;
    pointer-events: none;
}

.modern-search-input {
    width: 100%;
    height: 38px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #f8fafc;
    padding: 0 2.4rem 0 2.35rem;
    font-size: 0.875rem;
    color: #0f172a;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.modern-search-input::-webkit-search-decoration,
.modern-search-input::-webkit-search-cancel-button,
.modern-search-input::-webkit-search-results-button,
.modern-search-input::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.modern-search-input::placeholder {
    color: #94a3b8;
}

.modern-search-input:focus {
    background: #fff;
    border-color: #fb923c;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.modern-search-clear {
    position: absolute;
    right: 0.55rem;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    text-decoration: none;
    font-size: 0.7rem;
}

.modern-search-clear:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.form-label-sm {
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
    color: #334155;
}

.form-section-card {
    border: 1px solid #e8eef5;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.form-section-header {
    background: linear-gradient(180deg, #fbfcfe 0%, #f8fafc 100%);
    border-bottom: 1px solid #eef2f7;
    padding: 0.85rem 1rem;
}

.form-section-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
}

.form-section-desc {
    margin: 0.15rem 0 0;
    font-size: 0.72rem;
    color: #94a3b8;
}

.flag-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.flag-chip {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    padding: 0.45rem 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #f8fafc;
    font-size: 0.8rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
}

.flag-chip:hover {
    border-color: #fdba74;
    background: #fff7ed;
}

.flag-chip .form-check-input {
    margin: 0;
}

.sticky-actions {
    position: sticky;
    bottom: 0.75rem;
    z-index: 5;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e8eef5;
    border-radius: 0.85rem;
    backdrop-filter: blur(8px);
}

.js-autosize {
    overflow: hidden;
    resize: none;
    min-height: 56px;
}

.featured-image-card {
    position: relative;
    width: 112px;
    height: 112px;
    border-radius: 0.75rem;
    border: 1.5px dashed #cbd5e1;
    background: #f8fafc;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.featured-image-card:hover {
    border-color: #fb923c;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.featured-image-card.has-image {
    border-style: solid;
    border-color: #e2e8f0;
}

.featured-image-preview {
    position: absolute;
    inset: 0;
}

.featured-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.featured-image-empty {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.15rem;
    color: #94a3b8;
    text-align: center;
    padding: 0.5rem 0.5rem 1.75rem;
    pointer-events: none;
}

.featured-image-empty i {
    font-size: 1.25rem;
    color: #cbd5e1;
}

.featured-image-empty small {
    font-size: 0.62rem;
    line-height: 1;
}

.featured-image-actions {
    position: absolute;
    inset: auto 0 0 0;
    display: flex;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.3rem;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.55), transparent);
    opacity: 1;
}

.featured-image-card:not(.has-image) .featured-image-actions {
    background: transparent;
}

.featured-image-action {
    width: 1.55rem;
    height: 1.55rem;
    border: 0;
    border-radius: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.75rem;
    line-height: 1;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.featured-image-action:hover {
    background: #f97316;
    transform: translateY(-1px);
}

.featured-image-action-danger:hover {
    background: #dc2626;
}

.featured-image-card:not(.has-image) .featured-image-action {
    background: #fff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.featured-image-card:not(.has-image) .featured-image-action:hover {
    color: #ea580c;
    border-color: #fdba74;
    background: #fff7ed;
}

.featured-image-card.is-avatar {
    border-radius: 999px;
}

.featured-image-card.is-avatar .featured-image-preview img {
    border-radius: 999px;
}

.featured-image-card.is-avatar .featured-image-actions {
    border-radius: 0 0 999px 999px;
}

.featured-image-card.is-video-thumb {
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 0.75rem;
}

.featured-image-card.is-video-thumb .featured-image-actions {
    border-radius: 0;
}

.featured-image-card.is-short-thumb {
    width: 140px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 9 / 16;
    border-radius: 0.85rem;
}

.featured-image-card.is-short-thumb .featured-image-actions {
    border-radius: 0;
}

.author-form-top {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 0.35rem;
}

.author-form-avatar {
    flex: 0 0 auto;
}

.author-form-avatar .mb-3 {
    margin-bottom: 0;
}

.author-form-main {
    flex: 1 1 auto;
    min-width: 0;
}

@media (max-width: 767.98px) {
    .author-form-top {
        flex-direction: column;
        align-items: stretch;
    }

    .author-form-avatar .featured-image-card {
        margin-inline: auto;
    }
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 1.25rem;
    box-shadow: var(--kv-shadow-lg);
}

.modal-header,
.modal-footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.modal-body {
    padding: 1rem 1.5rem;
}

/* Pagination */
.pagination {
    --bs-pagination-border-radius: 0.65rem;
    gap: 0.25rem;
}

.page-link {
    border-radius: 0.65rem !important;
    border-color: #e2e8f0;
    color: #475569;
    font-weight: 600;
}

.page-item.active .page-link {
    background: var(--kv-orange);
    border-color: var(--kv-orange);
}

/* Empty states */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
    color: #94a3b8;
}

/* Responsive sidebar */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

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

    .admin-content {
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    .filter-search,
    .filter-status,
    .filter-per-page,
    .modern-search {
        width: 100%;
        max-width: 100%;
    }
}
