@import url('/fonts/inter.css');

* {
    font-family: 'Inter', sans-serif;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.glass {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.sidebar {
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

/* Ensure sidebar has fixed height so inner scroll works */
#sidebar.sidebar {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

/* Left menu scroll: constrain height so nav can scroll when many items */
.sidebar-nav-scroll {
    min-height: 0;
    max-height: 100vh;
    overflow-y: auto !important;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 0%;
}
.sidebar-nav-scroll::-webkit-scrollbar {
    width: 6px;
}
.sidebar-nav-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}
.sidebar-nav-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}
.sidebar-nav-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.h-100 {
    height: 100px;
}

.w-250 {
    width: 130px;
}

.horizon-logo img.w-250 {
    width: 130px;
    height: 100px;
}

.nav-item {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.nav-item.active {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #667eea;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-item.active::before {
    transform: scaleY(1);
}

/* Sidebar: menu (parent) and menu-sub (submenu) */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.menu {
    margin-bottom: 0.25rem;
}

.menu-title {
    display: flex;
    align-items: center;
    padding: 0.6rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    user-select: none;
    list-style: none;
    border-radius: 0.5rem;
    transition: background 0.2s ease, color 0.2s ease;
}

.menu-title::-webkit-details-marker {
    display: none;
}

.menu-title::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    margin-left: auto;
    font-size: 0.65rem;
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.menu[open] .menu-title {
    color: rgba(255, 255, 255, 0.9);
}

.menu[open] .menu-title::after {
    transform: rotate(180deg);
}

.menu-title:hover {
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.06);
}

/* Submenu list under each menu */
.menu-sub {
    list-style: none;
    margin: 0.25rem 0 0 0;
    padding: 0 0 0 0.5rem;
    border-left: 2px solid rgba(255, 255, 255, 0.15);
    margin-left: 0.75rem;
}

.menu-sub li {
    margin: 0;
    padding: 0;
}

.menu-sub .nav-item {
    padding-left: 1rem;
    font-size: 0.9rem;
}
.menu-sub .nav-item span {
    word-break: break-word;
    white-space: normal;
}

.menu-admin {
    margin-top: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* ========== Email Config page – professional layout ========== */
.email-config-page {
    min-height: 60vh;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    margin: -1.5rem -1.5rem 0 -1.5rem;
    padding: 2rem 1.5rem 3rem;
}
@media (min-width: 576px) {
    .email-config-page {
        margin: -1.5rem -2rem 0 -2rem;
        padding: 2.5rem 2rem 3.5rem;
    }
}

.ec-container {
    max-width: 720px;
    margin: 0 auto;
}

/* Intro */
.ec-intro {
    background: #fff;
    border-radius: 12px;
    padding: 1.75rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
}
.ec-intro__title {
    font-size: 1.375rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.02em;
}
.ec-intro__text {
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 1.25rem 0;
}

/* Recommended highlight box */
.ec-intro__recommended {
    position: relative;
    padding: 1.25rem 1.5rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 50%, #a7f3d0 100%);
    border: 1px solid #6ee7b7;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.2);
}
.ec-intro__recommended-badge {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #047857;
    background: #fff;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.ec-intro__recommended-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.ec-intro__recommended-icon {
    flex-shrink: 0;
    font-size: 1.75rem;
    color: #059669;
    margin-top: 0.15rem;
}
.ec-intro__recommended-title {
    font-size: 1rem;
    font-weight: 600;
    color: #065f46;
    margin: 0 0 0.35rem 0;
}
.ec-intro__recommended-text {
    font-size: 0.875rem;
    color: #047857;
    line-height: 1.55;
    margin: 0;
}

/* Form section */
.ec-form-section {
    background: #fff;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    overflow: hidden;
}
.ec-form-section__header {
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}
.ec-form-section__title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.01em;
}
.ec-form-section__subtitle {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
}
.ec-form-section__body {
    padding: 1.75rem 2rem;
}

/* Alerts */
.ec-alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.ec-alert--success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}
.ec-alert__close {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 0 0.25rem;
}

/* Form */
.ec-form__summary { margin-bottom: 1rem; }
.ec-form__summary.text-danger { color: #b91c1c; font-size: 0.875rem; }
.ec-form__group {
    margin-bottom: 1.25rem;
}
.ec-form__group--8 { flex: 1; min-width: 0; }
.ec-form__group--4 { flex: 0 0 140px; }
.ec-form__row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 575px) {
    .ec-form__row { flex-direction: column; }
    .ec-form__group--4 { flex: none; }
}
.ec-form__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 0.35rem;
}
.ec-form__required { color: #dc2626; }
.ec-form__input,
.ec-form__select {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: #0f172a;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ec-form__input:focus,
.ec-form__select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}
.ec-form__input::placeholder { color: #94a3b8; }
.ec-form__input-row {
    display: flex;
    gap: 0.5rem;
}
.ec-form__input-row .ec-form__input { flex: 1; min-width: 0; }
.ec-form__error {
    display: block;
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 0.25rem;
}
.ec-form__hint {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.25rem;
    margin-bottom: 0;
}
.ec-form__group--switch {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
}
.ec-form__switch {
    width: 2.75rem;
    height: 1.375rem;
    margin: 0;
    cursor: pointer;
}
.ec-form__switch-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    margin: 0;
}
.ec-form__group--switch .ec-form__hint { width: 100%; margin-top: 0; }
.ec-note { display: block; padding: 0.5rem 0.75rem; background: #f8fafc; border-radius: 6px; border-left: 3px solid #94a3b8; }
.ec-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #e2e8f0;
}

/* Buttons */
.ec-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.ec-btn__icon { font-size: 0.8125rem; opacity: 0.9; }
.ec-btn--primary {
    background: #4f46e5;
    color: #fff;
    border-color: #4f46e5;
}
.ec-btn--primary:hover {
    background: #4338ca;
    border-color: #4338ca;
    color: #fff;
}
.ec-btn--secondary {
    background: #fff;
    color: #475569;
    border-color: #cbd5e1;
}
.ec-btn--secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #334155;
}
.ec-btn--link {
    background: none;
    color: #64748b;
}
.ec-btn--link:hover { color: #475569; }

/* Reference panel */
.ec-reference {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.ec-reference__title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem 0;
}
.ec-reference__list {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.65;
    margin: 0;
    padding-left: 1.25rem;
}
.ec-reference__list li { margin-bottom: 0.35rem; }
.ec-reference__list li:last-child { margin-bottom: 0; }
.ec-reference__list strong { color: #334155; }

/* Legacy Email Config (if still used elsewhere) */
.email-config-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.12) 0%, rgba(118, 75, 162, 0.12) 100%);
    border-bottom: 1px solid rgba(102, 126, 234, 0.2);
    padding: 1.25rem 1.5rem;
    border-radius: 16px 16px 0 0;
}
.info-box-quick-setup,
.info-box-how-it-works {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}
.card.card-form-no-hover:hover {
    transform: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.shadow-lg {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Enhanced hover effects for dashboard cards */
.card a[style*="gradient"]:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
}

/* Better spacing for dashboard sections */
.d-flex.gap-3 > * {
    margin-bottom: 0;
}

/* Pipeline improvements */
.pipeline-column-card {
    transition: all 0.3s ease;
}

.pipeline-column-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15) !important;
}

/* Recent applications hover effect */
.card .rounded[style*="background: #f8f9fa"]:hover {
    background: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    transform: translateX(4px);
}

/* Table improvements */
.table-responsive {
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead th {
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    color: #6b7280;
    background: #f8f9fa;
    border-bottom: 2px solid #e5e7eb;
    padding: 12px 16px;
}

.table tbody td {
    padding: 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge improvements */
.badge {
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* Button improvements */
.btn-sm {
    padding: 4px 8px;
    font-size: 0.875rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-sm:hover {
    transform: translateY(-1px);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .stat-card h3 {
        font-size: 2rem !important;
    }
    
    .pipeline-column-card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 8px 12px;
    }
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(102, 126, 234, 0.4);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
    animation: pulse 3s ease-in-out infinite;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

.status-applied {
    background: #dbeafe;
    color: #1e40af;
}

.status-replied {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.tab-btn {
    position: relative;
    transition: all 0.3s ease;
    background: none;
    border: none;
    padding: 12px 24px;
    cursor: pointer;
}

.tab-btn.active {
    color: #667eea;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.progress-bar {
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    height: 8px;
}

.progress-fill {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    height: 100%;
    transition: width 1s ease;
}

.template-card {
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.template-card:hover {
    border-color: #667eea;
    background: #f9fafb;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.input-field {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control, .form-select {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    border-radius: 10px;
    padding: 10px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary {
    border: 2px solid #667eea;
    color: #667eea;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-secondary {
    border: 2px solid #6b7280;
    color: #6b7280;
}

.btn-outline-secondary:hover {
    background: #6b7280;
    color: white;
}

.btn-outline-danger {
    border: 2px solid #ef4444;
    color: #ef4444;
}

.btn-outline-danger:hover {
    background: #ef4444;
    color: white;
}

.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
}

.table {
    border-radius: 12px;
    overflow: hidden;
}

.table thead {
    background: #f9fafb;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: #f9fafb;
}

.elegent-card {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.elegent-card .card-header {
    border-bottom: 1px solid #e5e7eb;
    background: #ffffff;
    font-weight: 600;
    border-radius: 16px 16px 0 0;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: #667eea;
}

.stat-caption {
    color: #64748b;
    font-size: 0.95rem;
}

.stat-accent-success {
    color: #12b981;
}

.stat-accent-danger {
    color: #ef4444;
}

.theme-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-radius: 18px;
    padding: 32px 28px;
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.25);
}

.theme-hero h2 {
    font-weight: 700;
    margin-bottom: 6px;
}

.theme-hero p {
    margin: 0;
    opacity: 0.9;
}

/* Bootstrap overrides */
.bg-white {
    background-color: white !important;
}

.text-gray-800 {
    color: #1f2937;
}

.text-gray-500 {
    color: #6b7280;
}

.text-gray-400 {
    color: #9ca3af;
}

.text-white {
    color: white;
}

.text-purple-600 {
    color: #9333ea;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.w-5 {
    width: 1.25rem;
}

.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

.h-screen {
    height: 100vh;
}

.flex-1 {
    flex: 1 1 0%;
}

.hidden {
    display: none;
}

@media (min-width: 1024px) {
    .lg\:block {
        display: block;
    }
    
    .lg\:hidden {
        display: none;
    }
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

.min-h-0 {
    min-height: 0;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

.z-50 {
    z-index: 50;
}

.border-b {
    border-bottom-width: 1px;
}

.border-gray-200 {
    border-color: #e5e7eb;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-opacity-10 {
    background-color: rgba(255, 255, 255, 0.1);
}

.bg-opacity-20 {
    background-color: rgba(255, 255, 255, 0.2);
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-purple-500 {
    --tw-gradient-from: #a855f7;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(168, 85, 247, 0));
}

.to-pink-500 {
    --tw-gradient-to: #ec4899;
}

.text-center {
    text-align: center;
}

/* Grid utilities */
.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

.gap-6 {
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* Additional spacing */
.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-80 {
    opacity: 0.8;
}

.opacity-90 {
    opacity: 0.9;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}

.w-12 {
    width: 3rem;
}

.h-12 {
    height: 3rem;
}

.w-full {
    width: 100%;
}

.w-10 {
    width: 2.5rem;
}

.h-10 {
    height: 2.5rem;
}

.divide-y > * + * {
    border-top-width: 1px;
}

.divide-gray-200 > * + * {
    border-color: #e5e7eb;
}

.uppercase {
    text-transform: uppercase;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

.hidden {
    display: none;
}

/* Table utilities */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem 1.5rem;
    text-align: left;
}

thead th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #4b5563;
    background-color: #f9fafb;
}

@media (max-width: 1024px) {
    .lg\:col-span-2 {
        grid-column: span 1 / span 1;
    }
}

.inline-block {
    display: inline-block;
}

.text-decoration-none {
    text-decoration: none;
}

.hover\:underline:hover {
    text-decoration: underline;
}

.hover\:bg-gray-100:hover {
    background-color: #f3f4f6;
}

.hover\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.relative {
    position: relative;
}

.z-10 {
    z-index: 10;
}

/* Bootstrap grid compatibility */
@media (min-width: 768px) {
    .md\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Ensure cards work properly */
.card {
    display: flex;
    flex-direction: column;
}

.card-body {
    flex: 1 1 auto;
}

/* Fix for text colors */
.text-gray-600 {
    color: #4b5563;
}

.text-gray-700 {
    color: #374151;
}

.text-gray-800 {
    color: #1f2937;
}

.text-purple-600 {
    color: #9333ea;
}

.text-white {
    color: #ffffff;
}

.text-muted {
    color: #6b7280;
}

/* Additional utility classes */
.rounded-lg {
    border-radius: 0.5rem;
}

.p-8 {
    padding: 2rem;
}

.text-decoration-none {
    text-decoration: none;
}

/* Ensure proper display for flex items */
.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.flex {
    display: flex;
}

/* Authentication page utilities */
.min-h-screen {
    min-height: 100vh;
    background-color: #f1f0f5;
}

/* Add horizontal padding to sections so content doesn't touch borders */
.py-6 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.pt-6, .pb-10 {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .sm\:py-10 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .sm\:pt-10 {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (min-width: 1024px) {
    .lg\:py-12, .lg\:pt-12, .lg\:pb-16 {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* Ensure sections on home page have horizontal padding to prevent touching borders */
body > main section,
._HomeLayout section {
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    body > main section,
    ._HomeLayout section {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Ensure feature cards have equal height and better spacing */
.grid.grid-cols-1.sm\:grid-cols-3 > div,
.grid.grid-cols-3 > div {
    display: flex;
    flex-direction: column;
    min-height: 180px;
}

@media (min-width: 640px) {
    .grid.grid-cols-1.sm\:grid-cols-3 > div,
    .grid.grid-cols-3 > div {
        min-height: 200px;
    }
}

/* Improve card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(15, 23, 42, 0.18), 0 6px 10px rgba(15, 23, 42, 0.08);
}

.justify-center {
    justify-content: center;
}

.max-w-md {
    max-width: 28rem;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.border {
    border-width: 1px;
}

.border-gray-300 {
    border-color: #d1d5db;
}

.hover\:bg-gray-50:hover {
    background-color: #f9fafb;
}

.bg-red-100 {
    background-color: #fee2e2;
}

.text-red-500 {
    color: #ef4444;
}

.text-blue-500 {
    color: #3b82f6;
}

.bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-purple-500 {
    --tw-gradient-from: #a855f7;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(168, 85, 247, 0));
}

.via-pink-500 {
    --tw-gradient-stops: var(--tw-gradient-from), #ec4899, var(--tw-gradient-to, rgba(236, 72, 153, 0));
}

.to-purple-600 {
    --tw-gradient-to: #9333ea;
}

/* Dropdown menu styles */
.group {
    position: relative;
}

.w-8 {
    width: 2rem;
}

.h-8 {
    height: 2rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.w-48 {
    width: 12rem;
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.text-left {
    text-align: left;
}

.text-red-500 {
    color: #ef4444;
}

.hover\:bg-gray-100:hover {
    background-color: #f3f4f6;
}

@media (min-width: 768px) {
    .md\:block {
        display: block;
    }
}

.text-orange-600 {
    color: #ea580c;
}

.text-orange-800 {
    color: #9a3412;
}

.hover\:text-orange-800:hover {
    color: #9a3412;
}

.text-green-600 {
    color: #16a34a;
}

.text-green-800 {
    color: #166534;
}

.hover\:text-green-800:hover {
    color: #166534;
}

.block {
    display: block;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

/* Employer job details modal: light backdrop (page stays visible) */
body.employer-job-modal-open .modal-backdrop {
    opacity: 0.18;
}
body.employer-job-modal-open .modal-backdrop.show {
    opacity: 0.18;
}

/* Apply job modal: light backdrop (not dull), content clickable and scrollable */
body.apply-job-modal-open .modal-backdrop {
    opacity: 0.22;
    background-color: rgba(0, 0, 0, 0.22);
}
body.apply-job-modal-open .modal-backdrop.show {
    opacity: 0.22;
}
/* Apply modal: only when .show — center in viewport; when closed do not override display */
#applyJobModal.modal {
    z-index: 1060;
}
#applyJobModal.modal.show {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow-x: auto;
    overflow-y: auto;
}
/* Center dialog with transform so it stays centered regardless of parent transforms */
#applyJobModal.modal.show .modal-dialog.apply-modal-dialog {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    margin: 0 !important;
    flex-shrink: 0;
}
#applyJobModal .modal-dialog {
    pointer-events: auto;
    max-height: calc(100vh - 2rem);
}
#applyJobModal .modal-content {
    pointer-events: auto;
    max-height: 90vh;
}
#applyJobModal .modal-body {
    pointer-events: auto;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(90vh - 120px);
    -webkit-overflow-scrolling: touch;
}
#applyJobModal .apply-modal-form {
    pointer-events: auto;
}

/* Apply modal: max-width 920px, centered in window */
.apply-modal-dialog {
    max-width: 920px;
    width: 90%;
    min-width: 320px;
}
.apply-modal-content {
    background: #fff;
    border: none;
    border-radius: 20px;
    padding: 30px;
    max-width: 920px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 32px 64px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(15, 23, 42, 0.04);
    animation: applyModalSlideUp 0.3s ease;
}
@keyframes applyModalSlideUp {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.apply-modal-content .modal-body {
    overflow-x: hidden;
    overflow-y: auto;
}
.apply-modal-form .apply-modal-form__columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.75rem;
    min-width: 0;
}
@media (max-width: 576px) {
    .apply-modal-form .apply-modal-form__columns {
        grid-template-columns: 1fr;
    }
}
.apply-modal-form .apply-modal-form__col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}
.apply-modal-form .apply-modal-form__col .apply-modal-input,
.apply-modal-form .apply-modal-form__col .apply-modal-select,
.apply-modal-form .apply-modal-form__col .apply-modal-job-card {
    min-width: 0;
}
.apply-modal-tags {
    flex-wrap: wrap;
    overflow: visible;
}
.apply-modal-select {
    max-width: 100%;
}
.apply-modal-tags {
    flex-wrap: wrap;
    overflow: visible;
}
.apply-modal-select {
    max-width: 100%;
}
.apply-modal-info-block {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    border-left: 4px solid #6366f1;
}
.apply-modal-info-block__text {
    margin: 0;
    font-size: 0.9375rem;
    color: #475569;
    line-height: 1.6;
}
.apply-modal-header {
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid #f1f5f9;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
}
.apply-modal-header .modal-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.025em;
    margin: 0;
    padding-left: 0.75rem;
    border-left: 4px solid #6366f1;
}
.apply-modal-close {
    opacity: 0.45;
    padding: 0.5rem;
    margin: -0.5rem -0.5rem -0.5rem auto;
    border-radius: 8px;
}
.apply-modal-close:hover {
    opacity: 0.85;
    background: #f1f5f9;
}
.apply-modal-body {
    padding: 1.5rem 1.75rem 1.75rem;
    font-size: 0.9375rem;
    color: #334155;
    background: #fff;
}
.apply-modal-loading {
    margin: 0;
    color: #94a3b8;
    font-size: 0.9375rem;
}

/* Apply modal form */
.apply-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.apply-modal-job-card {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    border-left: 4px solid #6366f1;
}
.apply-modal-job-card__label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}
.apply-modal-job-card__title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.35;
}
.apply-modal-job-card__company {
    font-size: 0.875rem;
    color: #64748b;
}
.apply-modal-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.apply-modal-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #334155;
    margin: 0;
}
.apply-modal-required {
    color: #dc2626;
}
.apply-modal-optional {
    font-weight: 400;
    color: #94a3b8;
}
.apply-modal-input {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.9375rem;
    color: #0f172a;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.apply-modal-input::placeholder {
    color: #94a3b8;
}
.apply-modal-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}
.apply-modal-select {
    cursor: pointer;
    appearance: auto;
}
.apply-modal-textarea {
    min-height: 110px;
    resize: vertical;
}
.apply-modal-textarea--sm {
    min-height: 64px;
}
.apply-modal-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
}
.apply-modal-tags-input {
    flex: 1;
    min-width: 120px;
    border: none !important;
    padding: 0.25rem 0 !important;
    background: transparent !important;
}
.apply-modal-tags-input:focus {
    box-shadow: none !important;
}
.apply-modal-tags .badge {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.4rem 0.75rem;
    border-radius: 10px;
    background: #e0e7ff;
    color: #4338ca;
}
.apply-modal-error {
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 0.125rem;
}

/* Apply modal actions */
.apply-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}
.apply-modal-full-form-link {
    font-size: 0.8125rem;
    color: #64748b;
    text-decoration: none;
}
.apply-modal-full-form-link:hover {
    color: #6366f1;
}
.apply-modal-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.apply-modal-btn {
    padding: 0.7rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.05s;
}
.apply-modal-btn--secondary {
    background: #f1f5f9;
    color: #475569;
}
.apply-modal-btn--secondary:hover {
    background: #e2e8f0;
    color: #334155;
}
.apply-modal-btn--primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}
.apply-modal-btn--primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}
.apply-modal-btn--primary:active {
    transform: scale(0.98);
}
.apply-modal-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Employer job details modal: undo generic .modal/.modal-content; force width and clickable buttons */
#jobDetailsModal.modal {
    background: transparent !important;
    pointer-events: none;
    z-index: 1055;
}
#jobDetailsModal.modal.show {
    display: flex !important;
}
#jobDetailsModal.modal .modal-dialog {
    pointer-events: auto;
    max-width: 95vw !important;
    width: 1100px !important;
    margin-left: auto;
    margin-right: auto;
}
#jobDetailsModal.modal .modal-content {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    border-radius: var(--bs-modal-border-radius, 0.5rem);
    overflow: visible;
    animation: none;
    pointer-events: auto;
}
#jobDetailsModal.modal .modal-header,
#jobDetailsModal.modal .modal-footer {
    flex-shrink: 0;
    pointer-events: auto;
    cursor: default;
}
#jobDetailsModal.modal .modal-body {
    overflow-y: auto;
    pointer-events: auto;
}
#jobDetailsModal.modal .modal-header .btn-close,
#jobDetailsModal.modal .modal-footer button,
#jobDetailsModal.modal .modal-footer a.btn {
    pointer-events: auto;
    cursor: pointer;
}

/* Employer job detail content: clean, professional layout */
.employer-job-detail {
    font-size: 0.9375rem;
    color: #374151;
    line-height: 1.55;
}
.employer-job-detail__header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}
.employer-job-detail__title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.35;
}
.employer-job-detail__meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.employer-job-detail__status {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #6b7280;
}
.employer-job-detail__date {
    font-size: 0.8125rem;
    color: #6b7280;
}
.employer-job-detail__top-row {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem 3rem;
    align-items: start;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
}
@media (max-width: 600px) {
    .employer-job-detail__top-row {
        grid-template-columns: 1fr;
    }
}
.employer-job-detail__stats {
    display: flex;
    gap: 1.5rem;
    padding: 0;
    margin: 0;
}
.employer-job-detail__stat {
    display: flex;
    flex-direction: column;
}
.employer-job-detail__stat-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}
.employer-job-detail__stat-label {
    font-size: 0.75rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.employer-job-detail__grid {
    display: grid;
    grid-template-columns: 9rem 1fr;
    gap: 0.5rem 1.25rem;
    margin: 0;
    font-size: 0.875rem;
}
.employer-job-detail__grid dt {
    color: #6b7280;
    font-weight: 500;
    margin: 0;
}
.employer-job-detail__grid dd {
    margin: 0;
    color: #374151;
}
.employer-job-detail__section {
    margin-bottom: 1.25rem;
}
.employer-job-detail__section-title {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin: 0 0 0.5rem 0;
}
.employer-job-detail__text {
    margin: 0;
    color: #374151;
}
.employer-job-detail__skills {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.employer-job-detail__skills li {
    padding: 0.35rem 0.65rem;
    background: #f3f4f6;
    color: #374151;
    border-radius: 4px;
    font-size: 0.8125rem;
}
.employer-job-detail__html {
    color: #374151;
}
.employer-job-detail__html p {
    margin-bottom: 0.75rem;
}
.employer-job-detail__html p:last-child {
    margin-bottom: 0;
}