/* =========================================
   Applicant Dashboard - Premium UI
   ========================================= */

.applicant-dashboard-container {
    max-width: 1000px;
    margin: 40px auto;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    color: #333;
}

.applicant-dashboard-container h3 {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
    border-bottom: 3px solid #3b82f6;
    display: inline-block;
    padding-bottom: 5px;
}

.applicant-dashboard-container p {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 30px;
}

/* Email Lookup Form */
.email-lookup-form {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    border: 1px solid #e2e8f0;
}

.email-lookup-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #475569;
}

.email-lookup-form input[type="email"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.email-lookup-form input[type="email"]:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.dashboard-btn {
    margin-top: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Applications List */
.applications-list {
    display: grid;
    gap: 20px;
}

.application-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    padding-left: 6px;
    /* Space for the colored border */
}

.application-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* Status Colors Border */
.application-card:has(.status-pending) {
    border-left: 5px solid #f59e0b;
}

.application-card:has(.status-approved) {
    border-left: 5px solid #10b981;
}

.application-card:has(.status-rejected) {
    border-left: 5px solid #ef4444;
}

.application-card:has(.status-draft) {
    border-left: 5px solid #94a3b8;
}

.application-card:has(.status-under_review) {
    border-left: 5px solid #3b82f6;
}

/* Fallback for browsers without :has support */
.application-card.status-border-pending {
    border-left: 5px solid #f59e0b;
}

.application-card.status-border-approved {
    border-left: 5px solid #10b981;
}

.application-card.status-border-rejected {
    border-left: 5px solid #ef4444;
}

.application-card.status-border-draft {
    border-left: 5px solid #94a3b8;
}

.application-header {
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    background: #f8fafc;
}

.application-header h4 {
    margin: 0;
    font-size: 18px;
    color: #0f172a;
    font-weight: 700;
}

.application-meta {
    font-size: 13px;
    color: #64748b;
    display: flex;
    gap: 15px;
}

.application-meta span {
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.application-ref {
    background: #0f172a !important;
    /* Dark Slate to match theme */
    color: #fff !important;
    font-family: monospace;
    font-size: 14px;
    border: 1px solid #0f172a;
}

.application-details {
    padding: 24px;
}

.detail-row {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.detail-row strong {
    min-width: 120px;
    color: #475569;
    font-weight: 600;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-pending {
    background-color: #fffbeb;
    color: #b45309;
    border: 1px solid #fcd34d;
}

.status-approved {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #6ee7b7;
}

.status-rejected {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}

.status-under_review {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.status-draft {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.file-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.file-item:hover {
    background: #fff;
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.file-item i {
    color: #64748b;
}

.file-item a {
    text-decoration: none;
    color: #334155;
    font-weight: 500;
}

.file-item a:hover {
    color: #3b82f6;
}

.draft-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed #e2e8f0;
}

.edit-draft-btn {
    display: inline-block;
    padding: 10px 20px;
    background: #f59e0b;
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.edit-draft-btn:hover {
    background: #d97706;
}

@media (max-width: 600px) {
    .application-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-row {
        flex-direction: column;
    }

    .detail-row strong {
        margin-bottom: 4px;
    }

    .application-meta {
        margin-top: 10px;
        flex-wrap: wrap;
    }
}