/* --- THEME COLORS (PREMIUM DESIGN SYSTEM) --- */
:root {
    /* Primary Brand Colors (Modern Indigo/Blue) */
    --color-primary: #4F46E5;
    /* Indigo 600 */
    --color-primary-hover: #4338CA;
    /* Indigo 700 */
    --color-primary-light: #E0E7FF;
    /* Indigo 100 */

    /* Secondary & Accents */
    --color-secondary: #0EA5E9;
    /* Sky 500 */
    --color-accent: #8B5CF6;
    /* Violet 500 */

    /* Neutrals & Text */
    --color-text-dark: #1E293B;
    /* Slate 800 */
    --color-text-subtle: #64748B;
    /* Slate 500 */
    --color-text-light: #94A3B8;
    /* Slate 400 */

    /* Backgrounds */
    --color-bg-body: #F1F5F9;
    /* Slate 100 */
    --color-bg-card: #FFFFFF;
    --color-bg-glass: rgba(255, 255, 255, 0.85);

    /* Status Colors (Vibrant & Clear) */
    --color-success: #10B981;
    /* Emerald 500 */
    --color-success-bg: #D1FAE5;
    --color-warning: #F59E0B;
    /* Amber 500 */
    --color-warning-bg: #FEF3C7;
    --color-danger: #EF4444;
    /* Red 500 */
    --color-danger-bg: #FEE2E2;

    /* Shadows (Layered & Soft) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

    /* Borders & Radius */
    --border-radius-sm: 6px;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-color: #E2E8F0;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: "Inter", "Plus Jakarta Sans", sans-serif;
    color: var(--color-text-dark);
    line-height: 1.6;
    background: var(--color-bg-body);
    -webkit-font-smoothing: antialiased;
}

/* PAGE WRAPPER */
.page-container {
    max-width: 1280px;
    margin: auto;
    padding: 40px 24px;
}

/* HEADINGS */
h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--color-text-dark);
    letter-spacing: -0.5px;
}

h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--color-text-dark);
    letter-spacing: -0.3px;
}

h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text-dark);
}

/* TEXT UTIL */
.text-muted {
    color: var(--color-text-subtle);
}

/* CARD */
/* CARD (PREMIUM) */
.card {
    background: var(--color-bg-card);
    padding: 32px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-light);
}

/* BUTTONS (Applying Primary Blue) */
/* BUTTONS (PREMIUM 3D FEEL) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--border-radius-sm);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-hover));
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary-light);
    color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

/* BADGES (Using Theme Status Colors) */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 6px;
    /* Slightly smaller radius for badges */
    font-size: 13px;
    font-weight: 600;
}

.badge-success {
    background: #9AE6B4;
    /* Light Green */
    color: #276749;
    /* Dark Green */
}

.badge-warning {
    background: #FEEBCF;
    /* Light Orange */
    color: #975A16;
    /* Dark Orange */
}

.badge-danger {
    background: #FEB2B2;
    /* Light Red */
    color: #9B2C2C;
    /* Dark Red */
}

.badge-neutral {
    background: #E2E8F0;
    /* Lighter Gray */
    color: var(--color-text-subtle);
}

/* TABLE */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.05);
}

.table th {
    background: var(--color-bg-light);
    /* Lighter header background */
    padding: 14px;
    text-align: left;
    font-weight: 700;
    border-bottom: 1px solid #E2E8F0;
    color: var(--color-text-subtle);
}

.table td {
    padding: 14px;
    border-bottom: 1px solid #EDF2F7;
}

.table tr:hover td {
    background: #F7FAFC;
    /* Subtle hover */
}

/* INPUTS (Reusable) */
/* INPUTS (MODERN) */
input,
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
    background: #FFFFFF;
    font-size: 15px;
    color: var(--color-text-dark);
    transition: var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
    outline: none;
}

/* SPACING UTILS (Keep as is) */
.mt-2 {
    margin-top: 10px;
}

.mt-3 {
    margin-top: 18px;
}

.mt-4 {
    margin-top: 25px;
}

.mb-3 {
    margin-bottom: 18px;
}

.mb-4 {
    margin-bottom: 25px;
}

/* FLEX (Keep as is) */
.flex {
    display: flex;
    gap: 25px;
    flex-wrap: wrap;
}

/* ANIMATION (Keep as is) */
@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- ALERT CONTAINER (FIXED POSITIONING) --- */
.alert-container {
    position: fixed;
    top: 24px;
    right: 24px;
    left: auto;
    transform: none;
    max-width: 420px;
    width: calc(100% - 48px);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* --- PREMIUM ALERT TOAST STYLES --- */
.alert {
    padding: 16px 20px 16px 56px;
    border-radius: 14px;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
        0 10px 40px -10px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    animation: slideInRight 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: right center;
}

@keyframes slideInRight {
    0% {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Icon pseudo-element */
.alert::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
}

/* Progress bar for auto-dismiss feeling */
.alert::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    animation: progressShrink 5s linear forwards;
    border-radius: 0 0 14px 14px;
}

@keyframes progressShrink {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* Success Alert */
.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #065F46;
}

.alert-success::before {
    content: '✓';
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
}

.alert-success::after {
    background: linear-gradient(90deg, #10B981, #34D399);
}

/* Error Alert */
.alert-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #991B1B;
}

.alert-error::before {
    content: '✕';
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
}

.alert-error::after {
    background: linear-gradient(90deg, #EF4444, #F87171);
}

/* Warning Alert */
.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #92400E;
}

.alert-warning::before {
    content: '!';
    background: linear-gradient(135deg, #F59E0B, #D97706);
    color: white;
}

.alert-warning::after {
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

/* Info Alert */
.alert-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #1E40AF;
}

.alert-info::before {
    content: 'i';
    background: linear-gradient(135deg, #3B82F6, #2563EB);
    color: white;
    font-style: italic;
}

.alert-info::after {
    background: linear-gradient(90deg, #3B82F6, #60A5FA);
}

/* Alert text */
.alert span {
    flex-grow: 1;
    text-align: left;
    font-weight: 600;
    padding-right: 12px;
    line-height: 1.4;
}

/* Close button */
.alert-close {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 400;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    color: inherit;
    opacity: 0.6;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.alert-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.1);
    transform: scale(1.1);
}

/* Hide animation */
.alert.hide {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideOutRight {
    0% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateX(100px) scale(0.9);
    }
}


/* =====================================================
   RESPONSIVE GLOBAL THEME EXTENSIONS
   (This is the missing piece your ATS needs)
===================================================== */

/* -----------------------------------------
   GLOBAL RESPONSIVE TYPOGRAPHY 
------------------------------------------ */

@media (max-width: 768px) {
    h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 22px;
    }

    h3 {
        font-size: 18px;
    }

    body {
        line-height: 1.55;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 17px;
    }
}


/* -----------------------------------------
   GLOBAL CONTAINER RESPONSIVENESS
------------------------------------------ */

@media (max-width: 768px) {
    .page-container {
        padding: 25px 16px;
        /* more phone-friendly */
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 20px 12px;
    }
}


/* -----------------------------------------
   BUTTON RESPONSIVE ADJUSTMENTS
------------------------------------------ */

@media (max-width: 480px) {
    .btn {
        padding: 10px 14px;
        font-size: 14px;
        width: 100%;
        /* safer on mobile */
        text-align: center;
    }
}


/* -----------------------------------------
   INPUTS RESPONSIVENESS
------------------------------------------ */

@media (max-width: 480px) {

    input,
    textarea,
    select {
        font-size: 14px;
        padding: 10px 12px;
    }
}


/* -----------------------------------------
   TABLE: MAKE ALL TABLES MOBILE-FRIENDLY
------------------------------------------ */

.table-responsive,
.table-wrapper,
.table-container {
    overflow-x: auto;
    width: 100%;
}

@media (max-width: 768px) {

    .table th,
    .table td {
        padding: 10px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {

    .table th,
    .table td {
        padding: 8px;
        font-size: 13px;
    }
}


/* -----------------------------------------
   FLEX UTIL: SAFER ON MOBILE
------------------------------------------ */

@media (max-width: 600px) {
    .flex {
        flex-direction: column;
        gap: 16px;
    }
}


/* -----------------------------------------
   IMAGES: ALWAYS RESPONSIVE
------------------------------------------ */

img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* -----------------------------------------
   ALERT RESPONSIVENESS
------------------------------------------ */

@media (max-width: 480px) {
    .alert {
        padding: 12px 14px;
        font-size: 14px;
    }

    .alert span {
        padding-right: 10px;
    }
}


/* -----------------------------------------
   GLOBAL SMALL SCREEN TWEAKS
------------------------------------------ */

@media (max-width: 400px) {
    body {
        font-size: 14px;
    }

    .card {
        padding: 20px;
    }
}

/* Sidebar overlay */
.sidebar-overlay {
    display: none;
}

@media (max-width: 768px) {
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 1000;
    }

    .sidebar-overlay.active {
        display: block;
    }

    body.no-scroll {
        overflow: hidden;
    }
}



/* LOGOUT POPUP TWEAKS */
.logout-popup {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    /* Modern blur effect */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    animation: fadeIn 0.3s ease;
}

.logout-box {
    background: #ffffff;
    padding: 30px;
    border-radius: 20px;
    max-width: 380px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.logout-box p {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-dark);
    margin-bottom: 24px;
}

.logout-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.logout-actions .btn {
    flex: 1;
    padding: 12px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}