/* ============================================================
   ORESHNIK.BY — ADMIN PANEL PRO DARK BENTO GLASS THEME v1.0.0
   Clean architecture, deep dark obsidian canvas, amber gold accents.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================================
   DESIGN TOKENS
   ============================================================ */
:root {
    --brand-primary:    #f59e0b;
    --brand-deep:       #060a12;
    --brand-accent:     #d4af37;
    --brand-gradient:   linear-gradient(135deg, #f59e0b 0%, #d4af37 100%);

    --sidebar-w:        272px;
    --sidebar-bg:       #060a12;
    --sidebar-border:   rgba(255,255,255,0.08);
    --sidebar-link:     #94a3b8;
    --sidebar-link-hover: #ffffff;

    --bg-app:           #090d16;
    --bg-card:          rgba(30, 41, 59, 0.75);
    --border-soft:      rgba(255, 255, 255, 0.1);
    --border-light:     rgba(255, 255, 255, 0.05);
    --text-primary:     #f8fafc;
    --text-secondary:   #cbd5e1;
    --text-muted:       #64748b;

    --radius-sm:        8px;
    --radius-md:        12px;
    --radius-lg:        20px;
    --radius-xl:        24px;

    --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
    --shadow-md:  0 8px 24px rgba(0,0,0,0.4);
    --shadow-lg:  0 16px 40px rgba(0,0,0,0.5);
    --shadow-xl:  0 24px 60px rgba(0,0,0,0.6);

    --topbar-h:         64px;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-app) !important;
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    margin: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #ffffff;
}

/* Custom dark scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #090d16; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(245, 158, 11, 0.5); }

/* ============================================================
   SHELL & LAYOUT
   ============================================================ */
.admin-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg-app);
}

.admin-layout {
    display: flex;
    flex: 1;
    min-height: 100vh;
}

/* ============================================================
   DESKTOP SIDEBAR
   ============================================================ */
.admin-sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    border-right: 1px solid var(--sidebar-border);
    z-index: 200;
    flex-shrink: 0;
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        display: none !important;
    }
    .admin-desktop-topbar {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .admin-sidebar {
        display: flex !important;
    }
    .admin-desktop-topbar {
        display: flex !important;
    }
}

.sidebar-logo {
    padding: 1.5rem 1.5rem 1.25rem;
    border-bottom: 1px solid var(--sidebar-border);
    flex-shrink: 0;
}

.sidebar-logo .brand-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1.35rem;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.badge-admin {
    font-size: 0.6rem;
    font-weight: 800;
    background: linear-gradient(135deg, #f59e0b 0%, #d4af37 100%);
    color: #000000;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0 1.5rem;
}

.sidebar-section-title {
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 1.3px;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.55);
    padding: 0 1.25rem;
    margin: 1.15rem 0 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-section-title:first-child {
    margin-top: 0.25rem;
}

.sidebar-section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.56rem 0.9rem;
    margin: 0.12rem 0.65rem;
    color: var(--sidebar-link);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.855rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
    position: relative;
}

.sidebar-link i {
    font-size: 1rem;
    flex-shrink: 0;
    width: 18px;
    text-align: center;
    opacity: 0.8;
    transition: opacity 0.16s ease, color 0.16s ease;
}

.sidebar-link span.sidebar-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--sidebar-link-hover);
}

.sidebar-link:hover i {
    opacity: 1;
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    color: #fbbf24;
    font-weight: 700;
    border-color: rgba(245, 158, 11, 0.35);
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.12);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: -0.65rem;
    top: 20%;
    bottom: 20%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #f59e0b;
}

.sidebar-link.active i {
    color: #fbbf24;
    opacity: 1;
}

/* Collapsible sidebar groups */
.sidebar-group-btn {
    width: calc(100% - 1.3rem);
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.sidebar-group-btn .sidebar-chevron {
    font-size: 0.72rem;
    width: auto;
    color: #64748b;
    transition: transform 0.2s ease, color 0.2s ease;
    margin-left: auto;
}

.sidebar-group-btn[aria-expanded="true"] {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.035);
}

.sidebar-group-btn[aria-expanded="true"] .sidebar-chevron {
    transform: rotate(90deg);
    color: #f59e0b;
}

.sidebar-group-btn.has-active-child {
    color: #fbbf24;
    font-weight: 600;
}

.sidebar-submenu {
    margin: 0.1rem 0.65rem 0.3rem 1.35rem;
    padding-left: 0.6rem;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.42rem 0.75rem;
    margin: 0.08rem 0;
    color: #94a3b8;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.81rem;
    font-weight: 500;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-sublink i {
    font-size: 0.85rem;
    width: 16px;
    text-align: center;
    opacity: 0.75;
    flex-shrink: 0;
}

.sidebar-sublink:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.sidebar-sublink.active {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
    font-weight: 700;
}

.sidebar-sublink.active i {
    color: #fbbf24;
    opacity: 1;
}

.sidebar-counter {
    margin-left: auto;
    padding: 0.18rem 0.5rem;
    border-radius: 9999px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.1;
    flex-shrink: 0;
}

.sidebar-counter-amber {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.sidebar-counter-emerald {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.sidebar-counter-sky {
    background: rgba(56, 189, 248, 0.16);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.35);
}

.sidebar-counter-danger {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.45);
}

.sidebar-counter-muted {
    background: rgba(255, 255, 255, 0.07);
    color: #94a3b8;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ============================================================
   DESKTOP TOPBAR, BREADCRUMBS & COMMAND PALETTE
   ============================================================ */
.admin-desktop-topbar {
    background: rgba(10, 15, 28, 0.88) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.82rem;
    color: #64748b;
    min-width: 0;
}

.topbar-breadcrumb-section {
    color: #94a3b8;
    font-weight: 500;
    white-space: nowrap;
}

.topbar-breadcrumb-current {
    color: #f8fafc;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-cmdk-trigger {
    background: rgba(30, 41, 59, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    border-radius: 11px;
    padding: 0.42rem 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.16s ease;
    min-width: 210px;
}

.admin-cmdk-trigger:hover {
    border-color: rgba(245, 158, 11, 0.45);
    color: #f8fafc;
    background: rgba(30, 41, 59, 0.95);
}

.admin-cmdk-kbd {
    margin-left: auto;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    font-weight: 700;
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    padding: 0.1rem 0.4rem;
}

.topbar-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.16s ease;
    text-decoration: none;
}

.topbar-icon-btn:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.45);
    color: #fbbf24;
}

.topbar-dot-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 800;
    font-family: 'JetBrains Mono', monospace;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #090d16;
}

.admin-dropdown-menu {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 16px !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7) !important;
    min-width: 290px;
    padding: 0.5rem !important;
}

.admin-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 10px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.83rem;
    font-weight: 500;
    transition: background-color 0.15s ease;
}

.admin-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.admin-cmdk-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.65rem 0.9rem;
    border-radius: 11px;
    color: #e2e8f0;
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.12s ease;
}

.admin-cmdk-result:hover,
.admin-cmdk-result.is-selected {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.35);
    color: #ffffff;
}

.admin-kpi-link {
    display: block;
    text-decoration: none;
    color: inherit;
    height: 100%;
}

.admin-kpi-link:hover .stat-card-premium {
    border-color: rgba(245, 158, 11, 0.45) !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35) !important;
}

.stat-card-premium {
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ============================================================
   MAIN CONTENT CONTAINER
   ============================================================ */
.admin-content {
    flex: 1;
    overflow-y: auto;
    min-width: 0;
    background: var(--bg-app);
}

.admin-content-inner {
    padding: 2rem;
    max-width: 1600px;
}

@media (min-width: 992px) {
    .admin-content-inner {
        padding: 2.5rem 3rem;
    }
}

/* ============================================================
   STAT CARDS & BENTO CARDS
   ============================================================ */
.card {
    background: rgba(30, 41, 59, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px !important;
    color: #ffffff;
}

.stat-card {
    background: rgba(30, 41, 59, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(245, 158, 11, 0.3);
}

/* ============================================================
   GLOBAL DARK BENTO OVERRIDES FOR BOOTSTRAP UTILITIES IN ADMIN
   ============================================================ */
.admin-shell .bg-white {
    background: rgba(30, 41, 59, 0.75) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.admin-shell .bg-light {
    background: rgba(15, 23, 42, 0.6) !important;
    color: #cbd5e1 !important;
}

.admin-shell .text-dark {
    color: #f8fafc !important;
}

.admin-shell .text-muted {
    color: #94a3b8 !important;
}

.admin-shell .card-header {
    background: rgba(15, 23, 42, 0.7) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.admin-shell .card-footer {
    background: rgba(15, 23, 42, 0.7) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.admin-shell .form-control,
.admin-shell .form-select {
    background-color: rgba(30, 41, 59, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    color: #ffffff !important;
    border-radius: 12px;
    font-size: 0.9rem;
}

.admin-shell input::placeholder,
.admin-shell textarea::placeholder,
.admin-shell .form-control::placeholder {
    color: #cbd5e1 !important;
    opacity: 0.9 !important;
    font-size: 0.88rem;
}

.admin-shell .form-control:focus,
.admin-shell .form-select:focus {
    background-color: rgba(30, 41, 59, 0.95) !important;
    border-color: #fbbf24 !important;
    color: #ffffff !important;
    box-shadow: 0 0 0 0.25rem rgba(251, 191, 36, 0.25) !important;
}

.admin-shell .btn-outline-dark {
    border-color: rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
}

.admin-shell .btn-outline-dark:hover {
    background: rgba(245, 158, 11, 0.2) !important;
    border-color: #f59e0b !important;
    color: #f59e0b !important;
}

/* Badge overrides for high-contrast crisp text in admin */
.admin-shell .badge.bg-info {
    background-color: rgba(56, 189, 248, 0.2) !important;
    border: 1px solid rgba(56, 189, 248, 0.4) !important;
    color: #38bdf8 !important;
}

.admin-shell .badge.bg-danger {
    background-color: rgba(239, 68, 68, 0.2) !important;
    border: 1px solid rgba(239, 68, 68, 0.4) !important;
    color: #f87171 !important;
}

.admin-shell .badge.bg-success {
    background-color: rgba(52, 211, 153, 0.2) !important;
    border: 1px solid rgba(52, 211, 153, 0.4) !important;
    color: #34d399 !important;
}

.admin-shell .badge.bg-warning {
    background-color: rgba(245, 158, 11, 0.2) !important;
    border: 1px solid rgba(245, 158, 11, 0.4) !important;
    color: #f59e0b !important;
}

/* ============================================================
   TABLES DARK STYLING (Universal Admin Dark Theme)
   ============================================================ */
.admin-shell .table {
    --bs-table-bg: transparent !important;
    --bs-table-accent-bg: transparent !important;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.02) !important;
    --bs-table-striped-color: #f8fafc !important;
    --bs-table-active-bg: rgba(255, 255, 255, 0.04) !important;
    --bs-table-active-color: #f8fafc !important;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.04) !important;
    --bs-table-hover-color: #f8fafc !important;
    --bs-table-color: #f8fafc !important;
    --bs-table-border-color: rgba(255, 255, 255, 0.08) !important;
    color: #f8fafc !important;
    background-color: transparent !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

.admin-shell .table > :not(caption) > * > * {
    background-color: transparent !important;
    color: #f8fafc !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 1.1rem 1.25rem !important;
    vertical-align: middle;
}

.admin-shell .table thead th {
    background: rgba(15, 23, 42, 0.95) !important;
    color: #e2e8f0 !important;
    font-size: 0.76rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.8px !important;
    text-transform: uppercase !important;
    border-bottom: 2px solid rgba(255, 255, 255, 0.12) !important;
}

.admin-shell .table tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.04) !important;
}

/* ============================================================
   PAGINATION DARK GLASS THEME
   ============================================================ */
.admin-shell .pagination,
.pagination {
    margin-bottom: 0 !important;
    gap: 5px !important;
    display: inline-flex !important;
    align-items: center !important;
}

.admin-shell .page-item .page-link,
.pagination .page-item .page-link {
    background: rgba(30, 41, 59, 0.85) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
    color: #f1f5f9 !important;
    border-radius: 10px !important;
    padding: 7px 14px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25) !important;
    text-decoration: none !important;
    min-width: 38px;
    text-align: center;
}

.admin-shell .page-item .page-link:hover,
.pagination .page-item .page-link:hover {
    background: rgba(245, 158, 11, 0.25) !important;
    border-color: #f59e0b !important;
    color: #fde68a !important;
    transform: translateY(-1px) !important;
}

.admin-shell .page-item.active .page-link,
.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #f59e0b 0%, #d4af37 100%) !important;
    border-color: #f59e0b !important;
    color: #111827 !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4) !important;
}

.admin-shell .page-item.disabled .page-link,
.pagination .page-item.disabled .page-link {
    background: rgba(15, 23, 42, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.25) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

/* Entity Tabs / Category Pills */
.entity-tab-pill {
    background: rgba(30, 41, 59, 0.75);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    color: #f1f5f9;
    font-weight: 600;
    font-size: 13px;
    padding: 7px 15px;
    border-radius: 50px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.entity-tab-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-1px);
}

.entity-tab-pill.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d4af37 100%) !important;
    border-color: #f59e0b !important;
    color: #111827 !important;
    font-weight: 800 !important;
    box-shadow: 0 3px 12px rgba(245, 158, 11, 0.35) !important;
}

.entity-tab-pill.active .badge {
    background-color: #111827 !important;
    color: #ffffff !important;
}

.entity-tab-pill:not(.active) .badge {
    background-color: rgba(255, 255, 255, 0.12) !important;
    color: #e2e8f0 !important;
}

.admin-shell .modal {
    z-index: 1060 !important;
}
.admin-shell .modal-backdrop,
.modal-backdrop {
    z-index: 1050 !important;
    background-color: rgba(2, 6, 23, 0.85) !important;
    backdrop-filter: blur(6px) !important;
}
.modal {
    z-index: 1060 !important;
}
.modal-dialog,
.admin-shell .modal-dialog {
    margin: 1.5rem auto !important;
    max-width: 580px !important;
    max-height: calc(100vh - 3rem) !important;
}
.modal-dialog.modal-lg,
.admin-shell .modal-dialog.modal-lg {
    max-width: 820px !important;
}
.modal-dialog.modal-xl,
.admin-shell .modal-dialog.modal-xl {
    max-width: 1080px !important;
}
@media (max-width: 576px) {
    .modal-dialog,
    .admin-shell .modal-dialog,
    .modal-dialog.modal-lg,
    .admin-shell .modal-dialog.modal-lg {
        max-width: calc(100% - 1rem) !important;
        margin: 0.5rem auto !important;
        max-height: calc(100vh - 1rem) !important;
    }
}
.modal-content,
form.modal-content,
.admin-shell .modal-content {
    background: #0f172a !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 25px 60px rgba(0,0,0,0.85) !important;
    max-height: calc(100vh - 3rem) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}
@media (max-width: 576px) {
    .modal-content,
    form.modal-content,
    .admin-shell .modal-content {
        max-height: calc(100vh - 1rem) !important;
        border-radius: 16px !important;
    }
}
.modal-content > form,
form.modal-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: hidden !important;
}
.modal-header {
    flex-shrink: 0 !important;
    background: rgba(15, 23, 42, 0.98) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 1rem 1.5rem !important;
}
.modal-body {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem 1.5rem !important;
    background: #0b1120 !important;
    min-height: 0 !important;
}
.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(245, 158, 11, 0.4);
    border-radius: 3px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(245, 158, 11, 0.7);
}
.modal-footer {
    flex-shrink: 0 !important;
    position: sticky !important;
    bottom: 0 !important;
    background: rgba(15, 23, 42, 0.98) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 1rem 1.5rem !important;
    z-index: 5 !important;
}
.modal .form-control,
.modal .form-select {
    background-color: #162033 !important;
    border: 1px solid rgba(148, 163, 184, 0.34) !important;
    color: #f8fafc !important;
    -webkit-text-fill-color: #f8fafc;
}
.modal input::placeholder,
.modal textarea::placeholder,
.modal .form-control::placeholder {
    color: #a5b4cb !important;
    -webkit-text-fill-color: #a5b4cb !important;
    opacity: 1 !important;
}
.modal .form-control:focus,
.modal .form-select:focus {
    background-color: #1c2942 !important;
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.22) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
}
.modal .input-group-text {
    background-color: #202d44 !important;
    border: 1px solid rgba(148, 163, 184, 0.34) !important;
    color: #f1f5f9 !important;
    font-weight: 600 !important;
}
.modal .form-label {
    color: #e2e8f0 !important;
}
.modal .form-text {
    color: #b4c3d8 !important;
}

/* ============================================================
   FOOTER
   ============================================================ */
.admin-page-footer {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.admin-page-footer .footer-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 0.9rem;
    color: #cbd5e1;
}

.admin-page-footer .footer-version {
    font-size: 0.78rem;
    color: #94a3b8;
}

.admin-page-footer .footer-version .version-chip {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    padding: 2px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #f59e0b;
}

/* ============================================================
   ORESHNIK.BY SPECIALIZED BENTO UTILITIES
   ============================================================ */
.pulse-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulseActive 1.8s infinite;
}

@keyframes pulseActive {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pulse-indicator-danger {
    background: #ef4444;
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    animation: pulseDanger 1.8s infinite;
}

@keyframes pulseDanger {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.stat-card-premium {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.stat-card-premium:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5) !important;
}

.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.text-muted-light {
    color: #cbd5e1 !important;
}

.x-small {
    font-size: 0.75rem;
}

/* ============================================================
   BULLETPROOF SVG & ICON SIZING SAFETY (Prevents SVGs from exploding)
   ============================================================ */
svg.w-3 { width: 0.75rem !important; height: 0.75rem !important; flex-shrink: 0; }
svg.w-3\.5 { width: 0.875rem !important; height: 0.875rem !important; flex-shrink: 0; }
svg.w-4 { width: 1rem !important; height: 1rem !important; flex-shrink: 0; }
svg.w-5 { width: 1.25rem !important; height: 1.25rem !important; flex-shrink: 0; }
svg.w-6 { width: 1.5rem !important; height: 1.5rem !important; flex-shrink: 0; }
svg.w-7 { width: 1.75rem !important; height: 1.75rem !important; flex-shrink: 0; }
svg.w-8 { width: 2rem !important; height: 2rem !important; flex-shrink: 0; }
svg.w-9 { width: 2.25rem !important; height: 2.25rem !important; flex-shrink: 0; }
svg.w-10 { width: 2.5rem !important; height: 2.5rem !important; flex-shrink: 0; }
svg.w-12 { width: 3rem !important; height: 3rem !important; flex-shrink: 0; }
svg.w-16 { width: 4rem !important; height: 4rem !important; flex-shrink: 0; }

/* Any raw inline SVG inside admin panels without explicit dimensions */
.admin-shell svg:not([width]):not([height]):not(.w-full):not([class*="w-"]) {
    max-width: 1.5rem;
    max-height: 1.5rem;
}

/* ============================================================
   ENTERPRISE DARK BENTO FORM CONTROLS & INPUTS
   ============================================================ */
.admin-shell .form-control,
.admin-shell .form-select {
    background-color: rgba(15, 23, 42, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border-radius: 12px;
    padding: 0.65rem 0.95rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.admin-shell .form-control:focus,
.admin-shell .form-select:focus {
    background-color: rgba(15, 23, 42, 0.95) !important;
    border-color: rgba(245, 158, 11, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
    color: #ffffff !important;
    outline: none !important;
}

.admin-shell .form-control::placeholder {
    color: #64748b !important;
    font-weight: 400;
}

.admin-shell .input-group-text {
    background-color: rgba(30, 41, 59, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: #cbd5e1 !important;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 600;
}

.admin-shell .form-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #cbd5e1;
    margin-bottom: 0.4rem;
    display: block;
}

.admin-shell .form-text {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.35rem;
}

.admin-shell .form-check-input {
    background-color: rgba(15, 23, 42, 0.9) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.admin-shell .form-switch .form-check-input {
    width: 2.35rem;
    height: 1.28rem;
    border-radius: 9999px;
}

.admin-shell .form-check-input:checked {
    background-color: #10b981 !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2) !important;
}

.admin-shell .form-check-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    user-select: none;
}

/* Bento Form Card Styling */
.bento-card {
    background: rgba(30, 41, 59, 0.75) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 20px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.bento-card-header {
    padding: 1.15rem 1.5rem;
    background: rgba(15, 23, 42, 0.75);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bento-card-body {
    padding: 1.5rem;
}

.bento-inner-box {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 1.15rem;
}

/* Breadcrumbs & Navigation Back Button */
.admin-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.admin-breadcrumb a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.admin-breadcrumb a:hover {
    color: #f59e0b;
}

.admin-breadcrumb-divider {
    color: #64748b;
    font-size: 0.75rem;
}

/* SERP Snippet Preview Box */
.serp-preview-box {
    background: #090d16;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 1.25rem;
}

.serp-preview-url {
    font-size: 0.75rem;
    color: #10b981;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.serp-preview-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #60a5fa;
    margin-bottom: 0.4rem;
    line-height: 1.35;
    cursor: pointer;
}

.serp-preview-title:hover {
    text-decoration: underline;
}

.serp-preview-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* Sticky Form Bottom Action Bar */
.sticky-form-actions {
    position: sticky;
    bottom: 1.5rem;
    z-index: 100;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   BENTO GLASS PAGINATION (Adapted from D:\KAZ v1.32.0)
   ============================================================ */
.dark-glass-pagination-wrap {
    margin: 0 !important;
}

.pagination {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

.pagination .page-item .page-link,
.dark-glass-page-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 38px !important;
    height: 38px !important;
    padding: 0 12px !important;
    background: rgba(30, 41, 59, 0.85) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.14) !important;
    border-radius: 10px !important;
    color: #f1f5f9 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    font-family: 'JetBrains Mono', monospace !important;
    text-decoration: none !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    backdrop-filter: blur(10px) !important;
}

.pagination .page-item .page-link:hover,
.dark-glass-page-link:hover:not(.disabled-glass):not(.active-glass) {
    background: rgba(51, 65, 85, 1) !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.25) !important;
}

.pagination .page-item.active .page-link,
.dark-glass-page-link.active-glass {
    background: linear-gradient(135deg, #f59e0b 0%, #d4af37 100%) !important;
    border-color: #f59e0b !important;
    color: #0f172a !important;
    font-weight: 800 !important;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45) !important;
    transform: translateY(-1px) !important;
}

.pagination .page-item.disabled .page-link,
.dark-glass-page-link.disabled-glass {
    background: rgba(15, 23, 42, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
    color: rgba(148, 163, 184, 0.4) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    transform: none !important;
}

.dark-glass-page-link.dots-glass {
    background: transparent !important;
    border: none !important;
    color: #94a3b8 !important;
    box-shadow: none !important;
}

/* ============================================================
   UI FACTORY HIGH-CONTRAST BADGE STANDARDS (from D:\KAZ)
   ============================================================ */
.badge {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.375rem !important;
    padding: 0.35rem 0.65rem !important;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    border-radius: 9999px !important;
    vertical-align: middle !important;
    text-shadow: none !important;
}

.badge.bg-success,
.badge.bg-success-subtle,
.badge[class*="bg-success"],
.badge-success {
    color: #a7f3d0 !important;
    background: rgba(16, 185, 129, 0.2) !important;
    border: 1.5px solid #10b981 !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.2) !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
}

.badge.bg-warning,
.badge.bg-warning-subtle,
.badge[class*="bg-warning"],
.badge-warning {
    color: #fde68a !important;
    background: rgba(245, 158, 11, 0.2) !important;
    border: 1.5px solid #f59e0b !important;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2) !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
}

.badge.bg-danger,
.badge.bg-danger-subtle,
.badge[class*="bg-danger"],
.badge-danger {
    color: #fca5a5 !important;
    background: rgba(239, 68, 68, 0.2) !important;
    border: 1.5px solid #ef4444 !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2) !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
}

.badge.bg-info,
.badge.bg-info-subtle,
.badge[class*="bg-info"],
.badge-info {
    color: #93c5fd !important;
    background: rgba(59, 130, 246, 0.2) !important;
    border: 1.5px solid #3b82f6 !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2) !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
}

.badge.bg-primary,
.badge.bg-primary-subtle,
.badge[class*="bg-primary"],
.badge-primary {
    color: #bfdbfe !important;
    background: rgba(37, 99, 235, 0.25) !important;
    border: 1.5px solid #3b82f6 !important;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.2) !important;
    font-weight: 700 !important;
    letter-spacing: 0.3px !important;
}

.badge.bg-secondary,
.badge.bg-secondary-subtle,
.badge[class*="bg-secondary"],
.badge-secondary {
    color: #cbd5e1 !important;
    background: rgba(100, 116, 139, 0.2) !important;
    border: 1.5px solid #64748b !important;
    font-weight: 600 !important;
}

/* ============================================================
   BENTO ICON BOXES
   ============================================================ */
.bento-icon-box {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 12px !important;
    flex-shrink: 0 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease !important;
}
.bento-icon-box-warning {
    background: rgba(245, 158, 11, 0.16) !important;
    border: 1.5px solid rgba(245, 158, 11, 0.4) !important;
    color: #f59e0b !important;
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.15) !important;
}
.bento-icon-box-info {
    background: rgba(56, 189, 248, 0.16) !important;
    border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
    color: #38bdf8 !important;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.15) !important;
}
.bento-icon-box-success {
    background: rgba(16, 185, 129, 0.16) !important;
    border: 1.5px solid rgba(16, 185, 129, 0.4) !important;
    color: #10b981 !important;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.15) !important;
}

/* ============================================================
   ADMIN DATA TABLE DESIGN SYSTEM (Modern Dark SaaS)
   ============================================================ */
.admin-table-card {
    background: rgba(23, 32, 48, 0.85) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 20px !important;
    box-shadow: 0 12px 36px -10px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.table-responsive {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.table-responsive::-webkit-scrollbar {
    height: 6px;
    width: 6px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Base table styling */
.admin-table,
.table.align-middle {
    --bs-table-bg: transparent !important;
    --bs-table-color: #cbd5e1 !important;
    --bs-table-border-color: rgba(255, 255, 255, 0.06) !important;
    margin-bottom: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

/* Table Header */
.admin-table thead,
.table.align-middle thead {
    background: rgba(15, 23, 42, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.admin-table thead th,
.table.align-middle thead th {
    padding: 0.9rem 1.25rem !important;
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-top: none !important;
    white-space: nowrap;
    vertical-align: middle !important;
    background: transparent !important;
}

/* Table Body Rows */
.admin-table tbody tr,
.table.align-middle tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    transition: background-color 0.15s ease;
}

.admin-table tbody tr:last-child,
.table.align-middle tbody tr:last-child {
    border-bottom: none !important;
}

.admin-table tbody tr:hover td,
.table.align-middle tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.035) !important;
}

/* Table Body Cells */
.admin-table tbody td,
.table.align-middle tbody td {
    padding: 1.05rem 1.25rem !important;
    vertical-align: middle !important;
    color: #e2e8f0;
    font-size: 0.875rem;
    border: none !important;
    background: transparent !important;
}

/* Product thumbnail */
.product-table-thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #0f172a;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.product-table-thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(15, 23, 42, 0.8);
    color: #f59e0b;
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* Inline Quick Price Widget */
.quick-price-box {
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 3px 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s ease;
}

.quick-price-box:focus-within {
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
    background: rgba(15, 23, 42, 0.98);
}

.quick-price-input {
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 0.925rem;
    width: 76px;
    text-align: right;
    padding: 2px 2px 2px 0;
    outline: none;
}

.quick-price-currency {
    font-size: 0.72rem;
    font-weight: 800;
    color: #f59e0b;
    font-family: 'JetBrains Mono', monospace;
    user-select: none;
}

.quick-price-save-btn {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #f59e0b;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.quick-price-save-btn:hover {
    background: #f59e0b;
    color: #000;
    transform: scale(1.05);
}

/* Status toggle button */
.status-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    text-decoration: none;
}

.status-toggle-btn.status-active {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.35);
}

.status-toggle-btn.status-active:hover {
    background: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.5);
    transform: translateY(-1px);
}

.status-toggle-btn.status-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.35);
}

.status-toggle-btn.status-inactive:hover {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.5);
    transform: translateY(-1px);
}

.status-toggle-btn .status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-toggle-btn.status-active .status-dot {
    background: #10b981;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.8);
}

.status-toggle-btn.status-inactive .status-dot {
    background: #ef4444;
    box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}

/* Category tag */
.table-category-tag {
    background: rgba(100, 116, 139, 0.14);
    color: #cbd5e1;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 9999px;
    padding: 0.3rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
    white-space: nowrap;
}

/* Action buttons */
.btn-action-edit {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #f59e0b;
    transition: all 0.18s ease;
}

.btn-action-edit:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d4af37 100%);
    border-color: #f59e0b;
    color: #000 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

.btn-action-preview {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    transition: all 0.18s ease;
}

.btn-action-preview:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    transform: translateY(-1px);
}

/* Table Actions Group & Gap Utilities */
.table-actions-group,
.mgr-actions-group,
.cust-actions-group {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 8px !important;
    white-space: nowrap !important;
}

.table-actions-group > *,
.mgr-actions-group > *,
.cust-actions-group > * {
    margin: 0 !important;
}

.table-actions-group form,
.mgr-actions-group form,
.cust-actions-group form {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
}

/* Unified Customer & B2B Pill Action Buttons */
.cust-action-btn {
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
    border-radius: 9px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 0 12px !important;
    transition: all 0.18s ease !important;
    flex-shrink: 0 !important;
    border: 1px solid transparent !important;
    line-height: 1 !important;
    text-decoration: none !important;
    cursor: pointer !important;
}
.cust-action-dossier {
    background: rgba(14, 165, 233, 0.12) !important;
    color: #38bdf8 !important;
    border-color: rgba(14, 165, 233, 0.35) !important;
}
.cust-action-dossier:hover {
    background: rgba(14, 165, 233, 0.25) !important;
    color: #7dd3fc !important;
    border-color: rgba(14, 165, 233, 0.6) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2) !important;
}
.cust-action-opt-active {
    background: rgba(245, 158, 11, 0.15) !important;
    color: #f59e0b !important;
    border-color: rgba(245, 158, 11, 0.4) !important;
}
.cust-action-opt-active:hover {
    background: linear-gradient(135deg, #f59e0b 0%, #d4af37 100%) !important;
    color: #000000 !important;
    border-color: #f59e0b !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25) !important;
}
.cust-action-opt-pending {
    background: rgba(16, 185, 129, 0.25) !important;
    color: #ffffff !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3) !important;
}
.cust-action-opt-pending:hover {
    background: rgba(16, 185, 129, 0.4) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}
.cust-action-opt-inactive {
    background: rgba(16, 185, 129, 0.12) !important;
    color: #34d399 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
}
.cust-action-opt-inactive:hover {
    background: rgba(16, 185, 129, 0.25) !important;
    color: #6ee7b7 !important;
    border-color: rgba(16, 185, 129, 0.6) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2) !important;
}
.cust-action-delete {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #f87171 !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}
.cust-action-delete:hover {
    background: rgba(239, 68, 68, 0.25) !important;
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.65) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.22) !important;
}

/* Support for decimal gap classes in Bootstrap views */
.gap-0\.5,
.gap-0-5 {
    gap: 4px !important;
}

.gap-1\.5,
.gap-1-5 {
    gap: 8px !important;
}

.gap-2\.5,
.gap-2-5 {
    gap: 12px !important;
}

/* ============================================================
   MOBILE-FIRST PRO ADMIN SYSTEM (Thumb-Zone, Zero Overflow, Cards)
   ============================================================ */
html,
body {
    max-width: 100%;
    overflow-x: clip;
}

.admin-shell,
.admin-layout,
.admin-content {
    max-width: 100%;
    overflow-x: clip;
}

/* Fixed Mobile Bottom Navigation Bar */
.admin-mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1030;
    background: rgba(6, 10, 18, 0.96);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 4px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 2px;
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.55);
}

.admin-bottom-nav-item {
    flex: 1 1 0;
    min-width: 0;
    min-height: 52px;
    padding: 5px 4px 4px;
    border: none;
    background: transparent;
    color: #94a3b8;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 12px;
    position: relative;
    transition: background-color 0.15s ease, color 0.15s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.admin-bottom-nav-item:active {
    background: rgba(255, 255, 255, 0.06);
}

.admin-bottom-nav-item.is-active {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
}

.admin-bottom-nav-item.is-active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 22%;
    right: 22%;
    height: 2.5px;
    border-radius: 0 0 4px 4px;
    background: linear-gradient(90deg, #f59e0b, #fde68a);
}

.admin-bottom-nav-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    line-height: 1;
}

.admin-bottom-nav-label {
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    letter-spacing: 0.01em;
}

.admin-bottom-nav-badge {
    position: absolute;
    top: -6px;
    right: -11px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 9999px;
    background: #ef4444;
    color: #ffffff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.6rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #060a12;
}

.admin-bottom-nav-dot {
    position: absolute;
    top: -2px;
    right: -4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f59e0b;
    border: 1.5px solid #060a12;
}

/* Reusable Mobile Bento Data Cards */
.mobile-data-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-data-card {
    background: rgba(23, 32, 48, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0.95rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
    transition: border-color 0.16s ease, transform 0.15s ease;
}

.mobile-data-card.is-warning {
    border-color: rgba(245, 158, 11, 0.42);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, rgba(23, 32, 48, 0.94) 50%);
}

.mobile-data-card.is-danger {
    border-color: rgba(239, 68, 68, 0.45);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.08) 0%, rgba(23, 32, 48, 0.94) 50%);
}

.mobile-data-card.is-success {
    border-color: rgba(16, 185, 129, 0.38);
}

.mobile-data-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}

.mobile-data-card-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.98rem;
    color: #ffffff;
    line-height: 1.25;
    min-width: 0;
    word-break: break-word;
}

.mobile-data-card-sub {
    font-size: 0.76rem;
    color: #94a3b8;
    line-height: 1.35;
}

.mobile-data-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.7rem;
}

.mobile-data-kv {
    background: rgba(15, 23, 42, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 0.5rem 0.65rem;
    min-width: 0;
}

.mobile-data-kv-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #94a3b8;
    line-height: 1.2;
    margin-bottom: 2px;
}

.mobile-data-kv-val {
    font-size: 0.84rem;
    font-weight: 700;
    color: #f8fafc;
    line-height: 1.25;
    word-break: break-word;
}

.mobile-data-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-top: 0.65rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-data-card-actions > a,
.mobile-data-card-actions > button {
    min-height: 42px;
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mobile-data-card-actions > form {
    display: flex;
    flex: 1 1 auto;
    margin: 0;
}

.mobile-data-card-actions > form > button {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Horizontal pill scroller (no horizontal page overflow) */
.mobile-scroll-pills {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.mobile-scroll-pills::-webkit-scrollbar {
    display: none;
}

.mobile-scroll-pills > * {
    flex-shrink: 0;
}

/* Tablet & Mobile (<992px) */
@media (max-width: 991.98px) {
    .admin-layout {
        min-height: calc(100vh - 60px);
    }

    .admin-content-inner {
        padding: 1rem 0.85rem calc(88px + env(safe-area-inset-bottom, 0px)) !important;
    }

    .admin-mobile-drawer .sidebar-link {
        padding: 0.72rem 0.95rem;
        font-size: 0.92rem;
        min-height: 44px;
    }

    .admin-mobile-drawer .sidebar-sublink {
        padding: 0.58rem 0.85rem;
        font-size: 0.87rem;
        min-height: 40px;
    }

    .admin-mobile-dropdown {
        width: min(320px, calc(100vw - 24px)) !important;
        min-width: 0 !important;
        max-height: 70vh;
        overflow-y: auto;
    }

    .sticky-form-actions {
        bottom: calc(68px + env(safe-area-inset-bottom, 0px)) !important;
        padding: 0.75rem 0.9rem !important;
        border-radius: 14px !important;
    }

    /* Elevate page-specific CRM sticky bars cleanly above the global mobile bottom nav */
    .sticky-mobile-crm-bar,
    .sticky-mobile-kanban-bar,
    .sticky-mobile-show-bar {
        bottom: calc(62px + env(safe-area-inset-bottom, 0px)) !important;
        z-index: 1025 !important;
        padding-bottom: 10px !important;
    }

    .crm-mobile-padding-bottom {
        padding-bottom: 145px !important;
    }

    .admin-page-footer {
        margin-top: 2rem;
        padding-top: 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
}

/* Phones (<768px) */
@media (max-width: 767.98px) {
    .admin-content-inner {
        padding: 0.85rem 0.75rem calc(86px + env(safe-area-inset-bottom, 0px)) !important;
    }

    h1, .h1, .fs-2, .fs-3 {
        font-size: 1.32rem !important;
        line-height: 1.25 !important;
    }

    h2, .h2, .fs-4 {
        font-size: 1.15rem !important;
    }

    .card,
    .bento-card,
    .admin-table-card {
        border-radius: 16px !important;
    }

    .card-body,
    .bento-card-body {
        padding: 0.95rem !important;
    }

    .card-header,
    .bento-card-header,
    .card-footer {
        padding: 0.8rem 0.95rem !important;
    }

    .stat-card {
        padding: 0.95rem !important;
        border-radius: 16px !important;
    }

    .bento-inner-box {
        padding: 0.85rem !important;
    }

    /* Prevent iOS Safari zoom-on-focus + ensure thumb-friendly 44px controls */
    .admin-shell .form-control,
    .admin-shell .form-select,
    .modal .form-control,
    .modal .form-select {
        min-height: 44px;
        font-size: 16px !important;
        padding: 0.55rem 0.8rem;
    }

    .admin-shell .form-control-sm,
    .admin-shell .form-select-sm,
    .modal .form-control-sm,
    .modal .form-select-sm {
        min-height: 40px;
        font-size: 15px !important;
        padding: 0.45rem 0.7rem;
    }

    .admin-shell textarea.form-control,
    .modal textarea.form-control {
        min-height: 88px;
    }

    .admin-shell .btn:not(.btn-sm):not(.btn-close):not(.quick-price-save-btn) {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .admin-shell .btn-sm:not(.btn-close):not(.quick-price-save-btn) {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
    }

    .entity-tab-pill {
        min-height: 40px;
        padding: 7px 13px;
        font-size: 0.8rem;
    }

    /* Make nav-tabs & nav-pills cleanly swipeable on mobile */
    .admin-shell .nav-tabs,
    .admin-shell .nav-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
    }

    .admin-shell .nav-tabs::-webkit-scrollbar,
    .admin-shell .nav-pills::-webkit-scrollbar {
        display: none;
    }

    .admin-shell .nav-tabs .nav-item,
    .admin-shell .nav-pills .nav-item,
    .admin-shell .nav-tabs .nav-link,
    .admin-shell .nav-pills .nav-link {
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Compact responsive tables where tables are still shown on mobile */
    .admin-shell .table-responsive {
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }

    .admin-shell .table > :not(caption) > * > *,
    .admin-table tbody td,
    .table.align-middle tbody td {
        padding: 0.65rem 0.7rem !important;
        font-size: 0.82rem;
    }

    .admin-shell .table thead th,
    .admin-table thead th,
    .table.align-middle thead th {
        padding: 0.6rem 0.7rem !important;
        font-size: 0.68rem !important;
    }

    .cust-action-btn {
        min-height: 40px !important;
        padding: 0 12px !important;
    }

    .admin-shell .alert {
        padding: 0.8rem 0.9rem !important;
        margin-bottom: 1rem !important;
    }

    .sticky-form-actions .d-flex {
        flex-wrap: wrap;
        gap: 0.5rem !important;
    }
}

/* Mobile Bottom-Sheet Modals (<576px) */
@media (max-width: 575.98px) {
    .modal-dialog,
    .admin-shell .modal-dialog,
    .modal-dialog.modal-lg,
    .admin-shell .modal-dialog.modal-lg,
    .modal-dialog.modal-xl,
    .admin-shell .modal-dialog.modal-xl {
        max-width: 100% !important;
        width: 100% !important;
        margin: auto 0 0 0 !important;
        min-height: auto !important;
        max-height: 92dvh !important;
        align-items: flex-end !important;
    }

    .modal-dialog.modal-dialog-centered {
        min-height: 100dvh !important;
        align-items: flex-end !important;
    }

    .modal-content,
    form.modal-content,
    .admin-shell .modal-content {
        border-radius: 20px 20px 0 0 !important;
        max-height: 92dvh !important;
        border-bottom: none !important;
    }

    .modal-header {
        padding: 0.9rem 1rem !important;
    }

    .modal-body {
        padding: 1rem !important;
    }

    .modal-footer {
        padding: 0.8rem 1rem calc(0.85rem + env(safe-area-inset-bottom, 0px)) !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
    }

    .modal-footer > * {
        margin: 0 !important;
        flex: 1 1 45%;
        min-height: 44px;
    }

    #adminCommandPalette .modal-dialog {
        align-items: flex-start !important;
        margin: 0 !important;
    }

    #adminCommandPalette .modal-content {
        border-radius: 0 0 20px 20px !important;
        max-height: 85dvh !important;
    }
}
