@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,500;0,600;0,700;0,800;0,900;1,700&family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');
@import url('https://cdn.jsdelivr.net/npm/remixicon@4.3.0/fonts/remixicon.css');

/* =========================================================
   GLOBAL & DESIGN SYSTEM (BUILD INDIA BRAND IDENTITY)
========================================================= */

:root {
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Official Build India Brand Colors */
    --brand-red: #0284c7;
    --brand-red-dark: #0369a1;
    --brand-red-light: #38bdf8;
    --brand-red-subtle: #f0f9ff;

    --brand-gold: #f59e0b;
    --brand-gold-dark: #d97706;
    --brand-gold-light: #fbbf24;
    --brand-gold-subtle: #fffbeb;

    --primary: var(--brand-red);
    --primary-dark: var(--brand-red-dark);
    --primary-light: var(--brand-red-light);
    --primary-subtle: var(--brand-red-subtle);

    --accent: var(--brand-gold);
    --accent-dark: var(--brand-gold-dark);
    --accent-light: var(--brand-gold-light);
    --accent-subtle: var(--brand-gold-subtle);

    /* Surfaces & Themes */
    --sidebar: #0f172a;        /* Deep modern industrial slate */
    --sidebar-light: #1e293b;
    --sidebar-border: rgba(255, 255, 255, 0.08);

    --background: #f8fafc;     /* Clean slate-tinted light canvas */
    --card: #ffffff;
    --border: #e2e8f0;

    --text: #0f172a;
    --text-muted: #64748b;
    --muted: #64748b;

    --blue: #2563eb;
    --purple: #7c3aed;
    --orange: #ea580c;
    --green: #059669;
    --red: var(--brand-red);

    --sidebar-width: 270px;
    --topbar-height: 72px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    background: var(--background);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings & Brand Titles (Montserrat) */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.brand-name,
.visual-title,
.page-heading h2,
.section-title h5,
.card-header-custom h5,
.modal-title,
.stat-content h3,
.stat-content span,
.quick-action strong,
.category-number {
    font-family: var(--font-heading);
    letter-spacing: -0.015em;
}

h1, h2, h3, .brand-name {
    font-weight: 700;
}

h4, h5, h6, .modal-title, .card-header-custom h5 {
    font-weight: 600;
}

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

/* =========================================================
   ADMIN WRAPPER
========================================================= */

.admin-wrapper {
    min-height: 100vh;
    display: flex;
    position: relative;
}

/* =========================================================
   SIDEBAR (BRANDED & MODERN)
========================================================= */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    height: 100dvh;
    position: fixed;
    left: 0;
    top: 0;
    background: var(--sidebar);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.08);
}

/* Sidebar Header / Logo Box */
.sidebar-header {
    padding: 16px 18px 14px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, #131d35 0%, #0f172a 100%);
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-brand-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 5px 5px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sidebar-brand-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.sidebar-logo {
    max-width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    display: block;
}

.sidebar-header-badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-top: 10px;
    padding: 0 2px;
}

.admin-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(2, 132, 199, 0.15);
    color: #fca5a5;
    border: 1px solid rgba(2, 132, 199, 0.3);
    padding: 3px 10px;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ef4444;
    box-shadow: 0 0 6px #ef4444;
    display: inline-block;
}

.btn-sidebar-close {
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #94a3b8;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-sidebar-close:hover {
    background: rgba(2, 132, 199, 0.3);
    color: #ffffff;
}

/* Sidebar Menu */
.sidebar-menu {
    flex: 1;
    padding: 16px 14px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}
.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
}

.menu-title {
    color: #64748b;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 16px 12px 6px;
    text-transform: uppercase;
}

.menu-item {
    display: flex;
    align-items: center;
    color: #94a3b8;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.22s ease;
    position: relative;
}

.menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #94a3b8;
    margin-right: 12px;
    flex-shrink: 0;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-label {
    flex: 1;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    transform: translateX(3px);
}

.menu-item:hover .menu-icon {
    background: rgba(251, 191, 36, 0.14);
    border-color: rgba(251, 191, 36, 0.35);
    color: var(--brand-gold-light);
    transform: scale(1.08);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
}

.menu-item.active .menu-icon {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.menu-item.active::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--brand-gold-light);
    border-radius: 4px 0 0 4px;
}

/* Go to Website Special Sidebar Item */
.menu-item-website {
    background: rgba(2, 132, 199, 0.08);
    border: 1px dashed rgba(2, 132, 199, 0.35);
    color: #f1f5f9;
    margin: 8px 0 14px 0;
    padding: 10px 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.menu-item-website .website-icon {
    background: rgba(2, 132, 199, 0.2);
    border-color: rgba(2, 132, 199, 0.4);
    color: #ff6b6b;
}

.menu-item-website:hover {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.22) 0%, rgba(245, 158, 11, 0.18) 100%);
    border-color: rgba(245, 158, 11, 0.7);
    color: #ffffff;
    transform: translateX(4px);
    box-shadow: 0 4px 16px rgba(2, 132, 199, 0.25);
}

.menu-item-website:hover .website-icon {
    background: var(--brand-red);
    border-color: var(--brand-red);
    color: #ffffff;
    transform: rotate(-10deg) scale(1.1);
    box-shadow: 0 0 12px rgba(2, 132, 199, 0.6);
}

.sidebar-live-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #6ee7b7;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    margin-left: auto;
    transition: all 0.2s ease;
}

.sidebar-live-pill .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: livePulse 1.8s infinite;
}

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

.menu-item-website:hover .sidebar-live-pill {
    background: rgba(16, 185, 129, 0.25);
    border-color: #10b981;
    color: #ffffff;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid var(--sidebar-border);
    background: rgba(0, 0, 0, 0.15);
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-red), var(--brand-gold));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.admin-user strong {
    display: block;
    font-size: 13px;
    color: #f8fafc;
}

.admin-user small {
    display: block;
    color: #94a3b8;
    font-size: 11px;
}

.logout-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 17px;
    transition: all 0.2s ease;
}

.logout-btn:hover {
    background: rgba(2, 132, 199, 0.2);
    border-color: rgba(2, 132, 199, 0.4);
    color: #fca5a5;
    transform: translateY(-1px);
}

.topbar-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: #f1f5f9;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 17px;
    transition: all 0.2s ease;
}

.topbar-action-btn:hover {
    background: #fee2e2;
    color: var(--brand-red);
    border-color: #fca5a5;
    transform: translateY(-1px);
}

/* Topbar 'Go to Website' Button */
.btn-topbar-website {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    border: 1.5px solid #fecaca;
    color: var(--brand-red);
    font-family: var(--font-heading);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.2px;
    padding: 6px 14px;
    border-radius: 30px;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    margin-right: 14px;
    text-decoration: none;
}

.btn-topbar-website i {
    font-size: 15px;
    line-height: 1;
}

.btn-topbar-website .ext-icon {
    font-size: 12px;
    opacity: 0.75;
    transition: transform 0.2s ease;
}

.btn-topbar-website:hover {
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    border-color: var(--brand-red-dark);
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35);
    transform: translateY(-2px);
}

.btn-topbar-website:hover .ext-icon {
    transform: translate(2px, -2px);
    opacity: 1;
}

@media (max-width: 576px) {
    .btn-topbar-website span {
        display: none;
    }
    .btn-topbar-website {
        padding: 6px 10px;
        margin-right: 6px;
    }
}

/* =========================================================
   BACKDROP OVERLAY (MOBILE FIRST)
========================================================= */

.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

body.sidebar-open {
    overflow: hidden;
}

/* =========================================================
   MAIN CONTENT
========================================================= */

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    min-width: 0;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
}

/* =========================================================
   TOPBAR
========================================================= */

.topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 990;
}

.sidebar-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f1f5f9;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
    margin-right: 12px;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background: #fee2e2;
    color: var(--brand-red);
    border-color: #fca5a5;
}

.breadcrumb-area h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.breadcrumb-area small {
    color: var(--muted);
    font-size: 12px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

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

.profile-avatar {
    width: 38px;
    height: 38px;
    background: #fee2e2;
    color: var(--brand-red);
    border: 1px solid #fecaca;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
}

.profile-info strong {
    display: block;
    font-size: 13px;
    color: var(--text);
}

.profile-info small {
    display: block;
    font-size: 11px;
    color: var(--muted);
}

/* =========================================================
   PAGE CONTENT
========================================================= */

.page-content {
    padding: 28px;
    flex: 1;
}

.page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-heading h2 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text);
}

.page-heading p {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

/* =========================================================
   BUTTONS & ACTIONS (MODERN, RICH, ELEVATED)
========================================================= */

/* Base Button Smoothing & Micro-interactions */
.btn {
    font-family: var(--font-heading);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    line-height: 1.4;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
}

.btn:active {
    transform: scale(0.96) !important;
}

/* Primary Button (Build India Brand Gradient) */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-red) 0%, #b91c1c 100%) !important;
    border: 1px solid #b91c1c !important;
    color: #ffffff !important;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 8px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #b91c1c 0%, #991b1b 100%) !important;
    border-color: #991b1b !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.42);
    transform: translateY(-2px);
}

.btn-primary:disabled,
.btn-primary.disabled {
    background: #94a3b8 !important;
    border-color: #94a3b8 !important;
    box-shadow: none !important;
    transform: none !important;
    opacity: 0.65;
    cursor: not-allowed;
}

/* Secondary Button */
.btn-secondary {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #334155 !important;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
    background: #e2e8f0 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    transform: translateY(-1px);
}

/* Outline Secondary (General Use) */
.btn-outline-secondary {
    color: #475569;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 8px;
    padding: 6px 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-outline-secondary:hover {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
    transform: translateY(-1px);
}

/* Outline Danger (Delete, Reset) */
.btn-outline-danger {
    color: #dc2626;
    background: #ffffff;
    border: 1.5px solid #fecaca;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 8px;
    padding: 6px 14px;
    box-shadow: 0 1px 2px rgba(220, 38, 38, 0.05);
}

.btn-outline-danger:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
    transform: translateY(-1px);
}

/* Outline Primary */
.btn-outline-primary {
    color: var(--brand-red);
    background: #ffffff;
    border: 1.5px solid #fca5a5;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 8px;
    padding: 6px 14px;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    border-color: var(--brand-red-dark);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
    transform: translateY(-1px);
}

/* =========================================================
   TABLE ACTION BUTTONS (HIGH-END MODERN SQUARE/PILL ICONS)
========================================================= */

/* Dedicated Action Buttons */
.action-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.action-btn:active {
    transform: scale(0.92);
}

/* Edit / View Details */
.action-btn.edit,
.action-btn.view,
.btn-action-view {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #2563eb;
}

.action-btn.edit:hover,
.action-btn.view:hover,
.btn-action-view:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
    transform: translateY(-2px);
}

/* Delete Action */
.action-btn.delete,
.btn-action-delete {
    background: #f0f9ff;
    border-color: #fecaca;
    color: #dc2626;
}

.action-btn.delete:hover,
.btn-action-delete:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
    transform: translateY(-2px);
}

/* Table Row Actions Auto-Enhancement for existing pages */
.custom-table tbody td:last-child {
    white-space: nowrap;
}

.custom-table tbody td .btn-sm {
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    width: auto !important;
    min-height: 32px;
    line-height: 1.3;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    vertical-align: middle;
}

.custom-table tbody td form {
    display: inline-block;
    margin: 0;
    vertical-align: middle;
}

.custom-table tbody td .btn + form,
.custom-table tbody td form + .btn,
.custom-table tbody td form + form,
.custom-table tbody td .btn + .btn {
    margin-left: 8px;
}

.custom-table tbody td .btn-outline-secondary {
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    color: #334155;
}

.custom-table tbody td .btn-outline-secondary:hover {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.25);
    transform: translateY(-2px);
}

.custom-table tbody td .btn-outline-danger {
    background: #f0f9ff;
    border: 1.5px solid #fecaca;
    color: #dc2626;
}

.custom-table tbody td .btn-outline-danger:hover {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #dc2626;
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
    transform: translateY(-2px);
}

/* Explicit Square Icon Buttons (ONLY applied when .btn-icon-only class is on the button) */
.custom-table tbody td .btn-sm.btn-icon-only {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

/* Filter Toolbar Search & Clear Buttons */
.card-header-custom form .btn-outline-secondary,
.card-header-custom .btn-filter {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
}

.card-header-custom form .btn-outline-secondary:hover,
.card-header-custom .btn-filter:hover {
    background: #1e293b;
    border-color: #1e293b;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.3);
    transform: translateY(-1px);
}

.card-header-custom form a.btn-outline-secondary,
.card-header-custom .btn-clear {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #64748b;
    padding: 6px 14px;
}

.card-header-custom form a.btn-outline-secondary:hover,
.card-header-custom .btn-clear:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: var(--brand-red);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.15);
    transform: translateY(-1px);
}

/* =========================================================
   STAT CARDS
========================================================= */

.stat-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    min-height: 135px;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    border-color: #cbd5e1;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 16px;
    flex-shrink: 0;
}

.stat-icon.blue,
.quick-icon.blue,
.category-small-icon.blue {
    background: #eff6ff;
    color: #2563eb;
}

.stat-icon.purple,
.quick-icon.purple,
.category-small-icon.purple {
    background: #f5f3ff;
    color: #7c3aed;
}

.stat-icon.orange,
.quick-icon.orange,
.category-small-icon.orange {
    background: #fffbeb;
    color: #d97706;
}

.stat-icon.green,
.quick-icon.green,
.category-small-icon.green {
    background: #ecfdf5;
    color: #059669;
}

.category-small-icon.red {
    background: #f0f9ff;
    color: var(--brand-red);
}

.stat-content span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 2px;
}

.stat-content h3 {
    margin: 0 0 4px;
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
}

.stat-content small {
    font-size: 11px;
}

.positive {
    color: #059669;
    font-weight: 500;
}

/* =========================================================
   QUICK ACTIONS
========================================================= */

.quick-action {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    align-items: center;
    color: var(--text);
    transition: all 0.25s ease;
}

.quick-action:hover {
    border-color: #fca5a5;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    color: var(--text);
}

.quick-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    margin-right: 14px;
    flex-shrink: 0;
}

.quick-action strong {
    display: block;
    font-size: 13px;
    color: var(--text);
}

.quick-action span {
    display: block;
    font-size: 11px;
    color: var(--muted);
    margin-top: 2px;
}

/* =========================================================
   CONTENT CARD
========================================================= */

.content-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.card-header-custom {
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.card-header-custom h5 {
    margin: 0 0 3px;
    font-size: 16px;
    font-weight: 700;
}

.card-header-custom p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.view-all {
    font-size: 12px;
    font-weight: 600;
    color: var(--brand-red);
    transition: color 0.2s ease;
}

.view-all:hover {
    color: var(--brand-red-dark);
}

/* =========================================================
   CUSTOM TABLES
========================================================= */

.table-responsive {
    border-radius: 10px;
    -webkit-overflow-scrolling: touch;
}

.custom-table {
    margin: 0;
    width: 100%;
}

.custom-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 13px 20px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.custom-table tbody td {
    padding: 14px 20px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
    color: #334155;
}

.custom-table tbody tr:hover td {
    background-color: #f8fafc;
}

.company-cell {
    display: flex;
    align-items: center;
}

.company-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #fee2e2;
    color: var(--brand-red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    margin-right: 12px;
    flex-shrink: 0;
}

.company-cell strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.company-cell small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 2px;
}

.category-badge {
    display: inline-block;
    background: #f1f5f9;
    color: #475569;
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.status-badge.active {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.status-badge.inactive {
    background: #fffbeb;
    color: #d97706;
    border: 1px solid #fde68a;
}

/* =========================================================
   CATEGORY LIST (DASHBOARD)
========================================================= */

.category-list {
    padding: 6px 20px;
}

.category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.category-row:last-child {
    border-bottom: none;
}

.category-left {
    display: flex;
    align-items: center;
}

.category-small-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 16px;
    flex-shrink: 0;
}

.category-left strong {
    display: block;
    font-size: 13px;
    color: var(--text);
    font-weight: 600;
}

.category-left small {
    display: block;
    color: var(--muted);
    font-size: 11px;
}

.category-number {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

/* =========================================================
   PAGINATION (MOBILE FIRST & WINDOWED)
========================================================= */

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    margin: 0;
}

.pagination .page-item .page-link {
    border-radius: 8px !important;
    border: 1px solid #e2e8f0;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    min-width: 36px;
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.2s ease;
}

.pagination .page-item .page-link:hover {
    background-color: #f0f9ff;
    border-color: #fca5a5;
    color: var(--brand-red);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--brand-red) 0%, var(--brand-red-dark) 100%);
    border-color: var(--brand-red-dark);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3);
}

.pagination .page-item.disabled .page-link {
    background-color: #f8fafc;
    border-color: #e2e8f0;
    color: #94a3b8;
    opacity: 0.6;
}

/* =========================================================
   FOOTER
========================================================= */

.admin-footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--muted);
    font-size: 12px;
}

/* =========================================================
   RESPONSIVE (MOBILE-FIRST SYSTEM)
========================================================= */

/* Tablets & Small Laptops (<= 991px) */
@media (max-width: 991px) {
    .sidebar {
        transform: translate3d(-100%, 0, 0);
        width: min(84vw, 290px);
        box-shadow: 6px 0 30px rgba(0, 0, 0, 0.45);
        z-index: 1060;
    }

    .sidebar.show {
        transform: translate3d(0, 0, 0);
    }

    .main-content {
        margin-left: 0 !important;
        width: 100%;
        min-width: 0;
    }

    .sidebar-toggle {
        display: inline-flex !important;
    }

    .top-search {
        display: none;
    }

    .btn-sidebar-close {
        display: inline-flex !important;
    }
}

/* Mobile Devices & Phones (<= 767px) */
@media (max-width: 767px) {
    .topbar {
        padding: 0 12px;
        height: 62px;
    }

    .sidebar-toggle {
        width: 38px;
        height: 38px;
        font-size: 20px;
        margin-right: 8px;
    }

    .breadcrumb-area {
        max-width: calc(100vw - 220px);
    }

    .breadcrumb-area h5 {
        font-size: 15px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .breadcrumb-area small {
        display: none;
    }

    .topbar-right {
        gap: 6px;
    }

    .btn-topbar-website {
        padding: 6px 10px;
        margin-right: 4px;
        font-size: 12px;
        border-radius: 20px;
    }

    .btn-topbar-website span,
    .btn-topbar-website .ext-icon {
        display: none;
    }

    .profile-info {
        display: none;
    }

    .profile-avatar {
        width: 34px;
        height: 34px;
        font-size: 12px;
    }

    .topbar-action-btn {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .page-content {
        padding: 16px 12px;
    }

    .page-heading {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 18px;
    }

    .page-heading h2 {
        font-size: 20px;
    }

    .page-heading p {
        font-size: 12px;
    }

    .page-heading > div:last-child,
    .page-heading .btn {
        width: 100%;
        justify-content: center;
        padding: 10px 16px;
        font-size: 13px;
    }

    /* Stat Cards (Symmetrical 2x2 Grid) */
    .stat-card {
        padding: 12px 10px;
        min-height: auto;
        border-radius: 12px;
        gap: 8px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-right: 8px;
        border-radius: 10px;
    }

    .stat-content span {
        font-size: 11px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .stat-content h3 {
        font-size: 20px;
        margin-bottom: 2px;
    }

    .stat-content small {
        font-size: 10px;
        white-space: nowrap;
    }

    /* Quick Actions */
    .quick-action {
        padding: 10px;
        border-radius: 10px;
        gap: 8px;
    }

    .quick-icon {
        width: 34px;
        height: 34px;
        font-size: 16px;
        border-radius: 8px;
    }

    .quick-action strong {
        font-size: 12px;
        display: block;
    }

    /* Card Headers & Filter Form Stacking */
    .card-header-custom {
        padding: 14px 12px;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .card-header-custom h5 {
        font-size: 15px;
    }

    .card-header-custom p {
        font-size: 11.5px;
    }

    .card-header-custom form {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .card-header-custom form select,
    .card-header-custom form input[type="text"] {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 40px;
        font-size: 13px;
        border-radius: 8px;
    }

    .card-header-custom form .btn,
    .card-header-custom form a.btn {
        width: 100%;
        min-height: 38px;
        justify-content: center;
        border-radius: 8px;
    }

    /* Table Mobile Optimizations */
    .content-card {
        border-radius: 12px;
        overflow: hidden;
    }

    .table-responsive {
        -webkit-overflow-scrolling: touch;
        margin-bottom: 0;
        border-top: 1px solid var(--border);
    }

    .custom-table {
        margin-bottom: 0;
        min-width: 600px;
    }

    .custom-table thead th {
        font-size: 11.5px;
        padding: 10px 12px;
        white-space: nowrap;
    }

    .custom-table tbody td {
        padding: 10px 12px;
        font-size: 12.5px;
        vertical-align: middle;
    }

    .company-cell .company-logo,
    .company-cell img {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px;
        font-size: 12px;
        border-radius: 6px;
    }

    .custom-table tbody td:last-child {
        white-space: nowrap;
        min-width: 120px;
    }

    .custom-table tbody td .btn-sm {
        padding: 5px 10px !important;
        min-height: 30px;
        font-size: 11.5px;
        border-radius: 6px;
    }

    /* Pagination Mobile */
    .pagination {
        justify-content: center;
        gap: 4px;
    }

    .pagination .page-item .page-link {
        min-width: 32px;
        min-height: 32px;
        padding: 4px 8px;
        font-size: 12px;
        border-radius: 6px !important;
    }

    /* Footer Mobile */
    .admin-footer {
        flex-direction: column;
        gap: 4px;
        text-align: center;
        padding: 16px 0;
        margin-top: 24px;
        font-size: 11.5px;
    }

    /* Bootstrap Modals on Mobile */
    .modal-dialog {
        margin: 10px !important;
        max-width: calc(100vw - 20px) !important;
    }

    .modal-content {
        border-radius: 14px;
    }

    .modal-header {
        padding: 14px 16px;
    }

    .modal-title {
        font-size: 16px;
    }

    .modal-body {
        padding: 16px;
    }

    .modal-body .form-label {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .modal-body .form-control,
    .modal-body .form-select {
        min-height: 42px;
        font-size: 13.5px;
        border-radius: 8px;
    }

    .modal-footer {
        padding: 12px 16px;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .modal-footer .btn {
        flex: 1;
        min-height: 42px;
        font-size: 13px;
        justify-content: center;
    }
}

/* Extra Small Phones (<= 480px) */
@media (max-width: 480px) {
    .page-content {
        padding: 12px 8px;
    }

    .stat-card {
        padding: 10px 8px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
        margin-right: 6px;
    }

    .stat-content h3 {
        font-size: 18px;
    }

    .quick-action strong {
        font-size: 11.5px;
    }

    .btn-topbar-website {
        display: none;
    }
}
