/* =========================================================
   MY JOB ALERT INDIA - MODERN ADMIN PANEL STYLESHEET
   ========================================================= */

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

:root {
    --adm-primary: #dc2626;
    --adm-primary-hover: #b91c1c;
    --adm-bg: #f8fafc;
    --adm-sidebar: #090d16;
    --adm-card: #ffffff;
    --adm-text: #0f172a;
    --adm-border: #e2e8f0;
    --adm-radius: 10px;
}

[data-theme="dark"], html[data-theme="dark"], body.dark-theme {
    --adm-bg: #0f172a;
    --adm-sidebar: #020617;
    --adm-card: #1e293b;
    --adm-text: #f8fafc;
    --adm-border: #334155;
}

[data-theme="dark"] body, body.dark-theme {
    background-color: #0f172a !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .admin-topbar, body.dark-theme .admin-topbar {
    background-color: #1e293b !important;
    border-bottom-color: #334155 !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .admin-topbar .title, body.dark-theme .admin-topbar .title {
    color: #f8fafc !important;
}

[data-theme="dark"] .admin-card,
body.dark-theme .admin-card,
[data-theme="dark"] div[style*="background:#fff"],
[data-theme="dark"] div[style*="background: #fff"],
body.dark-theme div[style*="background:#fff"],
body.dark-theme div[style*="background: #fff"] {
    background-color: #1e293b !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

[data-theme="dark"] div[style*="background:#f8fafc"],
[data-theme="dark"] div[style*="background: #f8fafc"],
[data-theme="dark"] tr[style*="background:#f8fafc"],
[data-theme="dark"] tr[style*="background: #f8fafc"],
body.dark-theme div[style*="background:#f8fafc"],
body.dark-theme tr[style*="background:#f8fafc"] {
    background-color: #0f172a !important;
    border-color: #334155 !important;
}

[data-theme="dark"] input.form-control,
[data-theme="dark"] select.form-control,
[data-theme="dark"] textarea.form-control,
body.dark-theme input.form-control,
body.dark-theme select.form-control,
body.dark-theme textarea.form-control {
    background-color: #0f172a !important;
    color: #f8fafc !important;
    border-color: #334155 !important;
}

[data-theme="dark"] [style*="color:#0f172a"],
[data-theme="dark"] [style*="color: #0f172a"],
[data-theme="dark"] [style*="color:#334155"],
[data-theme="dark"] [style*="color: #334155"],
[data-theme="dark"] [style*="color:#475569"],
[data-theme="dark"] [style*="color: #475569"],
body.dark-theme [style*="color:#0f172a"],
body.dark-theme [style*="color:#334155"],
body.dark-theme [style*="color:#475569"] {
    color: #f8fafc !important;
}

[data-theme="dark"] [style*="color:#64748b"],
[data-theme="dark"] [style*="color: #64748b"],
body.dark-theme [style*="color:#64748b"] {
    color: #94a3b8 !important;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--adm-bg);
    color: var(--adm-text);
    font-size: 14px;
    line-height: 1.5;
}

a {
    color: var(--adm-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Layout */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--adm-sidebar);
    color: #e2e8f0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header {
    padding: 22px 20px;
    background: #04060a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header h2 {
    font-size: 17px;
    font-weight: 900;
    color: #ef4444;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-menu {
    list-style: none;
    padding: 10px 0;
    flex: 1;
    overflow-y: auto;
}

/* Sidebar Dropdown Accordion Animated Styles */
.sidebar-dropdown-group {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.sidebar-dropdown-header {
    padding: 13px 20px;
    font-size: 11.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #38bdf8;
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.25s ease, color 0.25s ease, padding-left 0.25s ease;
}

.sidebar-dropdown-header:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    padding-left: 24px;
}

.sidebar-dropdown-header .dropdown-arrow {
    font-size: 10px;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.25s ease;
    color: #94a3b8;
}

.sidebar-dropdown-group.open .sidebar-dropdown-header .dropdown-arrow {
    transform: rotate(180deg);
    color: #38bdf8;
}

.sidebar-dropdown-animator {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-dropdown-group.open .sidebar-dropdown-animator {
    grid-template-rows: 1fr;
}

.sidebar-dropdown-menu {
    overflow: hidden;
    list-style: none;
    padding: 2px 0 6px 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.22);
}

.sidebar-dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px 10px 24px;
    font-size: 13px;
    color: #94a3b8;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-dropdown-menu li a:hover {
    color: #ffffff;
    background: rgba(56, 189, 248, 0.1);
    border-left-color: #38bdf8;
    transform: translateX(5px);
}

.sidebar-dropdown-menu li a.active {
    color: #ffffff;
    font-weight: 700;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.2), rgba(56, 189, 248, 0.03));
    border-left-color: #38bdf8;
}

/* Pulsing Badge Glow Animation */
@keyframes badgeGlowPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.pulse-badge {
    animation: badgeGlowPulse 2s infinite;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #94a3b8;
    font-weight: 600;
    font-size: 13.5px;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    border-left-color: var(--adm-primary);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 12px;
    color: #64748b;
}

/* Main Content Area */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.admin-topbar {
    background: #ffffff;
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--adm-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.admin-topbar .title {
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.admin-topbar .user-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.admin-content {
    padding: 24px;
    flex: 1;
}

/* Metrics Dashboard Cards */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--adm-radius);
    padding: 20px;
    border: 1px solid var(--adm-border);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08);
}

.stat-card .val {
    font-size: 28px;
    font-weight: 900;
    color: #0f172a;
}

.stat-card .label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-top: 2px;
}

.stat-card .icon {
    font-size: 28px;
    padding: 12px;
    border-radius: 10px;
    background: #fef2f2;
    color: #dc2626;
}

/* Card Container */
.admin-card {
    background: #ffffff;
    border-radius: var(--adm-radius);
    border: 1px solid var(--adm-border);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.04);
    margin-bottom: 24px;
    overflow: hidden;
}

.admin-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--adm-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card-header h3 {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.admin-card-body {
    padding: 20px;
}

/* Form Controls */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 700;
    font-size: 13px;
    color: #334155;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13.5px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.form-control:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

/* Dynamic Structured Row Items */
.dyn-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    align-items: center;
}

.btn-remove-row {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.15s;
}

.btn-remove-row:hover {
    background: #fca5a5;
}

.btn-add-row {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px dashed #94a3b8;
    padding: 7px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 12.5px;
    margin-top: 6px;
    display: inline-block;
    transition: all 0.15s;
}

.btn-add-row:hover {
    background: #e2e8f0;
    border-color: #64748b;
}

/* Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

.admin-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 800;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 1px solid var(--adm-border);
}

.admin-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.admin-table tr:hover {
    background: #f8fafc;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.2);
}

.btn-primary:hover {
    filter: brightness(1.1);
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
    text-decoration: none;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 4px;
}

.btn-danger {
    background: #ef4444;
    color: #ffffff;
}

.btn-danger:hover {
    background: #dc2626;
    color: #ffffff;
    text-decoration: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 13.5px;
}

.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Table Responsive Wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
    border-radius: 8px;
}

/* Mobile Toggle Bar */
.mobile-nav-toggle-bar {
    display: none;
    background: #04060a;
    color: #ffffff;
    padding: 12px 16px;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    top: 0;
    z-index: 1001;
}

.mobile-toggle-btn {
    background: #1e293b;
    color: #38bdf8;
    border: 1px solid #334155;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 999;
}

/* Responsive Media Queries for Mobile & Laptops */
@media (max-width: 992px) {
    .stat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile Navigation Bar & Overlay Base Styles */
.mobile-nav-toggle-bar {
    display: none;
    justify-content: space-between;
    align-items: center;
    background: #0f172a;
    color: #ffffff;
    padding: 12px 16px;
    border-bottom: 2px solid #1e293b;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.mobile-toggle-btn {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    border: none;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
    touch-action: manipulation;
}

.mobile-toggle-btn:active {
    transform: scale(0.96);
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.sidebar-overlay.active {
    display: block !important;
    opacity: 1 !important;
}

@media (max-width: 768px) {
    .mobile-nav-toggle-bar {
        display: flex !important;
    }

    .admin-wrapper, .op-wrapper, .user-wrapper {
        flex-direction: column;
    }

    /* Admin Sidebar Mobile Off-Canvas */
    .admin-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -280px !important;
        width: 270px !important;
        height: 100vh !important;
        z-index: 1001 !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5) !important;
        overflow-y: auto !important;
    }

    .admin-sidebar.sidebar-open {
        left: 0 !important;
    }

    /* Operator Sidebar Mobile Off-Canvas */
    .op-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -280px !important;
        width: 270px !important;
        height: 100vh !important;
        z-index: 1001 !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5) !important;
        overflow-y: auto !important;
    }

    .op-sidebar.sidebar-open {
        left: 0 !important;
    }

    /* Candidate User Sidebar Mobile Off-Canvas */
    .user-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -280px !important;
        width: 270px !important;
        height: 100vh !important;
        z-index: 1001 !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5) !important;
        overflow-y: auto !important;
    }

    .user-sidebar.sidebar-open {
        left: 0 !important;
    }

    .admin-main {
        width: 100%;
        min-width: 100%;
    }

    .admin-topbar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
    }

    .admin-card-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 12px;
    }

    .admin-card-header div,
    .admin-card-header .btn-group {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .form-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .form-group[style*="grid-column"] {
        grid-column: span 1 !important;
    }

    .stat-grid {
        grid-template-columns: 1fr !important;
    }

    .admin-content {
        padding: 14px;
    }

    .admin-table th, .admin-table td {
        padding: 10px 12px;
        font-size: 12.5px;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 4px;
    }
}

/* =========================================================
   ADMIN / OPERATOR / USER DASHBOARD DARK MODE
   ========================================================= */
[data-theme="dark"] {
    --adm-bg: #090d16;
    --adm-card: #0f172a;
    --adm-text: #f8fafc;
    --adm-border: #1e293b;
}

[data-theme="dark"] body {
    background-color: #090d16;
    color: #f8fafc;
}

[data-theme="dark"] .admin-card {
    background: #0f172a;
    border-color: #1e293b;
    color: #f8fafc;
}

[data-theme="dark"] .admin-card-header {
    background: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

[data-theme="dark"] .admin-table {
    border-color: #1e293b;
    background: #0f172a;
    color: #f8fafc;
}

[data-theme="dark"] .admin-table th {
    background: #1e293b;
    color: #ffffff;
    border-color: #334155;
}

[data-theme="dark"] .admin-table td {
    border-color: #1e293b;
    color: #f1f5f9;
}

[data-theme="dark"] .admin-table tr:nth-child(even) {
    background: #1e293b;
}

[data-theme="dark"] .admin-header {
    background: #0f172a;
    border-color: #1e293b;
}

[data-theme="dark"] input.form-control,
[data-theme="dark"] select.form-control,
[data-theme="dark"] textarea.form-control {
    background: #1e293b;
    color: #f8fafc;
    border-color: #475569;
}

[data-theme="dark"] .stat-card {
    background: #0f172a;
    border-color: #1e293b;
    color: #f8fafc;
}

[data-theme="dark"] .admin-header,
.dark-theme .admin-header {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .admin-header h1,
[data-theme="dark"] .admin-header h2,
[data-theme="dark"] .admin-header div,
.dark-theme .admin-header h1,
.dark-theme .admin-header h2,
.dark-theme .admin-header div {
    color: #f8fafc !important;
}

[data-theme="dark"] .stat-card,
.dark-theme .stat-card {
    background: #0f172a !important;
    border-color: #1e293b !important;
    color: #f8fafc !important;
}

[data-theme="dark"] .stat-card div,
.dark-theme .stat-card div {
    color: #cbd5e1 !important;
}

/* =========================================================
   SMART RESPONSIVE SLIDING PAGINATION ENGINE (Light & Dark)
   ========================================================= */
.smart-pagination-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 16px 0;
    width: 100%;
}

.smart-pagination {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.smart-pagination .page-item {
    display: inline-block;
}

.smart-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.smart-pagination .page-link:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
}

.smart-pagination .page-item.active .page-link {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
    cursor: default;
    pointer-events: none;
}

.smart-pagination .page-item.disabled .page-link {
    color: #94a3b8;
    background: #f8fafc;
    border-color: #e2e8f0;
    cursor: not-allowed;
    pointer-events: none;
    box-shadow: none;
    opacity: 0.65;
}

.smart-pagination .page-link.dots {
    border-color: transparent;
    background: transparent;
    cursor: default;
    padding: 0 4px;
    min-width: auto;
    font-weight: 900;
}

@media (max-width: 640px) {
    .smart-pagination .page-link {
        min-width: 30px;
        height: 32px;
        font-size: 12px;
        padding: 4px 8px;
    }
}

/* Dark Mode Pagination Overrides */
[data-theme="dark"] .smart-pagination .page-link {
    background: #1e293b;
    border-color: #334155;
    color: #e2e8f0;
}

[data-theme="dark"] .smart-pagination .page-link:hover {
    background: #334155;
    border-color: #475569;
    color: #ffffff;
}

[data-theme="dark"] .smart-pagination .page-item.active .page-link {
    background: #38bdf8 !important;
    border-color: #38bdf8 !important;
    color: #0f172a !important;
    box-shadow: 0 2px 10px rgba(56, 189, 248, 0.4);
}

[data-theme="dark"] .smart-pagination .page-item.disabled .page-link {
    background: #0f172a;
    border-color: #1e293b;
    color: #64748b;
}
