/* ==========================================================================
   TeacherRecruit Centralized Design System & CSS Framework
   ========================================================================== */

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

/* --- 1. Design Tokens --- */
:root {
    /* Brand Colors */
    --tr-navy-dark: #0f172a;
    --tr-navy-deep: #1e293b;
    --tr-primary: #1e3a8a;
    --tr-primary-hover: #1d4ed8;
    --tr-secondary: #0284c7;
    --tr-accent: #f59e0b;
    
    /* Backgrounds & Surfaces */
    --tr-bg: #f8fafc;
    --tr-surface: #ffffff;
    --tr-border: #e2e8f0;
    --tr-border-dark: #334155;

    /* Text Colors */
    --tr-text-primary: #0f172a;
    --tr-text-secondary: #475569;
    --tr-text-muted: #64748b;
    --tr-text-light: #f8fafc;

    /* Status Colors */
    --tr-success: #059669;
    --tr-success-bg: #d1fae5;
    --tr-success-border: #a7f3d0;

    --tr-warning: #d97706;
    --tr-warning-bg: #fef3c7;
    --tr-warning-border: #fde68a;

    --tr-danger: #e11d48;
    --tr-danger-bg: #ffe4e6;
    --tr-danger-border: #fecdd3;

    --tr-info: #0284c7;
    --tr-info-bg: #e0f2fe;
    --tr-info-border: #bae6fd;

    /* Typography */
    --tr-font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --tr-font-heading: 'Outfit', sans-serif;

    /* Radii */
    --tr-radius-sm: 6px;
    --tr-radius-md: 10px;
    --tr-radius-lg: 16px;

    /* Shadows */
    --tr-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --tr-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --tr-shadow-lg: 0 16px 36px -10px rgba(15, 23, 42, 0.12);
}

/* --- 2. Base & Typography --- */
body {
    font-family: var(--tr-font-sans);
    background-color: var(--tr-bg);
    color: var(--tr-text-secondary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--tr-font-heading);
    font-weight: 700;
    color: var(--tr-text-primary);
    letter-spacing: -0.02em;
}

/* Contrast Fixes */
h1.text-white, h2.text-white, h3.text-white, h4.text-white, h5.text-white, h6.text-white,
.text-white h1, .text-white h2, .text-white h3, .text-white h4, .text-white h5, .text-white h6,
.hero-section h1, .hero-section h2, .hero-section h3, .auth-hero-title {
    color: #ffffff !important;
}

.text-white-50, .auth-hero-desc {
    color: #cbd5e1 !important;
}

/* --- 3. Header & Navigation --- */
.navbar-custom {
    background: #ffffff !important;
    border-bottom: 1px solid var(--tr-border);
    box-shadow: var(--tr-shadow-sm);
    padding: 0.85rem 0;
}

.navbar-brand {
    font-family: var(--tr-font-heading);
    font-weight: 800;
    font-size: 1.45rem;
    color: var(--tr-primary) !important;
    letter-spacing: -0.03em;
    white-space: nowrap;
}

.nav-link {
    color: var(--tr-text-secondary) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.65rem !important;
    white-space: nowrap !important;
    transition: color 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--tr-primary-hover) !important;
}

/* --- 4. Form Inputs System --- */
.form-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--tr-text-primary);
    margin-bottom: 0.35rem;
}

.form-control, .form-select {
    border: 1px solid #cbd5e1 !important;
    border-radius: var(--tr-radius-md) !important;
    padding: 0.65rem 0.9rem !important;
    font-size: 0.95rem !important;
    color: var(--tr-text-primary) !important;
    background-color: #f8fafc !important;
    transition: all 0.2s ease !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--tr-primary) !important;
    box-shadow: 0 0 0 3.5px rgba(30, 58, 138, 0.14) !important;
    background-color: #ffffff !important;
}

.form-control::placeholder {
    color: #94a3b8 !important;
    font-size: 0.9rem;
}

/* --- 5. Button System --- */
.btn-tr-primary {
    background-color: var(--tr-primary);
    color: #ffffff !important;
    font-weight: 600;
    padding: 0.65rem 1.4rem;
    border-radius: var(--tr-radius-md);
    border: none;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
    transition: all 0.2s ease;
}

.btn-tr-primary:hover {
    background-color: var(--tr-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-tr-outline {
    border: 2px solid var(--tr-primary);
    color: var(--tr-primary) !important;
    font-weight: 600;
    padding: 0.6rem 1.3rem;
    border-radius: var(--tr-radius-md);
    background: transparent;
    transition: all 0.2s ease;
}

.btn-tr-outline:hover {
    background-color: var(--tr-primary);
    color: #ffffff !important;
}

/* --- 6. Card & Container System --- */
.tr-card {
    background: var(--tr-surface);
    border: 1px solid var(--tr-border);
    border-radius: var(--tr-radius-lg);
    box-shadow: var(--tr-shadow-sm);
    transition: all 0.25s ease;
}

.tr-card:hover {
    box-shadow: var(--tr-shadow-md);
}

.job-card {
    background: #ffffff;
    border: 1px solid var(--tr-border);
    border-radius: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--tr-shadow-sm);
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--tr-shadow-lg);
    border-color: #cbd5e1;
}

/* --- 7. Soft Status Badges --- */
.badge-soft-warning {
    background-color: var(--tr-warning-bg) !important;
    color: var(--tr-warning) !important;
    border: 1px solid var(--tr-warning-border);
    font-weight: 600;
}

.badge-soft-success {
    background-color: var(--tr-success-bg) !important;
    color: var(--tr-success) !important;
    border: 1px solid var(--tr-success-border);
    font-weight: 600;
}

.badge-soft-danger {
    background-color: var(--tr-danger-bg) !important;
    color: var(--tr-danger) !important;
    border: 1px solid var(--tr-danger-border);
    font-weight: 600;
}

.badge-soft-info {
    background-color: var(--tr-info-bg) !important;
    color: var(--tr-info) !important;
    border: 1px solid var(--tr-info-border);
    font-weight: 600;
}

/* --- 8. Table Styling --- */
.table-responsive {
    border-radius: var(--tr-radius-md);
}

.table th {
    font-weight: 600;
    color: var(--tr-text-muted);
    background-color: #f8fafc;
    border-bottom: 2px solid var(--tr-border);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.85rem 1rem;
}

.table td {
    color: var(--tr-text-primary);
    vertical-align: middle;
    padding: 0.85rem 1rem;
}

/* --- 9. Auth Wrapper Layout --- */
.auth-wrapper {
    padding-top: 4rem !important;
    padding-bottom: 5rem !important;
    background-color: #f7f9fc !important;
    min-height: calc(100vh - 80px);
}

.auth-card {
    background: #ffffff !important;
    border: 1px solid #d9dee8 !important;
    border-radius: 18px !important;
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08) !important;
    padding: 2.25rem 2.5rem !important;
    max-width: 520px;
    width: 100%;
    margin: 0 auto;
}

.auth-hero-title {
    color: #0f172a !important;
    font-family: 'Outfit', sans-serif !important;
    font-weight: 800 !important;
    font-size: 2.4rem !important;
    line-height: 1.15 !important;
}

.auth-hero-desc {
    color: #475569 !important;
    font-size: 1.05rem !important;
    max-width: 540px;
}

.auth-input {
    height: 52px !important;
    border: 1px solid #d9dee8 !important;
    border-radius: 12px !important;
    padding: 0 16px !important;
    font-size: 0.95rem !important;
    color: #0f172a !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease !important;
}

.auth-input:focus {
    border-color: var(--tr-primary) !important;
    box-shadow: 0 0 0 3.5px rgba(30, 58, 138, 0.14) !important;
}

/* --- 10. Footer Styling --- */
.footer-dark {
    background-color: var(--tr-navy-dark) !important;
    color: #cbd5e1 !important;
    margin-top: auto;
}

.footer-dark h5, .footer-dark h6 {
    color: #ffffff !important;
}

.footer-dark a {
    color: #cbd5e1 !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-dark a:hover {
    color: #38bdf8 !important;
}

.footer-dark .text-muted, .footer-dark p, .footer-dark small, .footer-dark span {
    color: #94a3b8 !important;
}

/* --- 11. Responsive Breakpoints --- */
@media (max-width: 991.98px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -260px;
        z-index: 1050;
        transition: left 0.3s ease;
    }

    .admin-sidebar.show {
        left: 0;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }

    .hero-section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .hero-section h1 {
        font-size: 2.1rem !important;
    }
}

.hero-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%) !important;
    border-radius: 16px !important;
    padding: 1.75rem 2rem !important;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15) !important;
    color: #ffffff !important;
}

.hero-section h1, .hero-section h2, .hero-section h3, .hero-section h4 {
    color: #ffffff !important;
}

.hero-section p {
    color: #cbd5e1 !important;
}

@media (max-width: 575.98px) {
    .btn-tr-primary, .btn-tr-outline {
        padding: 0.55rem 1rem;
        font-size: 0.88rem;
    }

    .navbar-brand {
        font-size: 1.2rem;
    }
}
