/* 
 * Syrian Private University (SPU) - Job Portal Style Sheet
 * Theme: Official Academic Royal Blue & Gold Palette
 */

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

:root {
    --spu-navy: #0b2239;
    --spu-blue: #134074;
    --spu-light-blue: #2364aa;
    --spu-gold: #c5a059;
    --spu-gold-hover: #b08c45;
    --spu-red: #8d0801;
    --spu-bg: #f4f7fa;
    --spu-card-bg: #ffffff;
    --spu-text-dark: #1e293b;
    --spu-text-muted: #64748b;
    --spu-border: #e2e8f0;
    --spu-shadow-sm: 0 2px 4px rgba(11, 34, 57, 0.04);
    --spu-shadow: 0 10px 30px rgba(11, 34, 57, 0.08);
    --spu-shadow-lg: 0 20px 40px rgba(11, 34, 57, 0.12);
    --spu-radius: 12px;
    --spu-font: 'Cairo', 'Alexandria', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--spu-font);
    direction: rtl;
    text-align: right;
    background-color: var(--spu-bg);
    color: var(--spu-text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Header & Navbar */
.spu-header {
    background: linear-gradient(135deg, var(--spu-navy) 0%, var(--spu-blue) 100%);
    color: #ffffff;
    padding: 2.5rem 1rem 3.5rem;
    position: relative;
    border-bottom: 4px solid var(--spu-gold);
    box-shadow: var(--spu-shadow);
}

.spu-header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.spu-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.spu-logo-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid var(--spu-gold);
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: transform 0.2s ease;
}

.spu-logo-img:hover {
    transform: scale(1.04);
}

.spu-brand-title h1 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
    letter-spacing: -0.5px;
}

.spu-brand-title p {
    color: #e2e8f0;
    font-size: 0.95rem;
    opacity: 0.9;
}

.spu-header-badge {
    background: rgba(197, 160, 89, 0.18);
    border: 1px solid var(--spu-gold);
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Page Container */
.main-wrapper {
    max-width: 1100px;
    margin: -2rem auto 4rem;
    padding: 0 1rem;
    position: relative;
    z-index: 10;
}

/* Form Card */
.form-card {
    background: var(--spu-card-bg);
    border-radius: var(--spu-radius);
    box-shadow: var(--spu-shadow-lg);
    border: 1px solid var(--spu-border);
    padding: 2.5rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px dashed var(--spu-border);
}

.form-header h2 {
    color: var(--spu-navy);
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: var(--spu-text-muted);
    font-size: 1rem;
}

/* Section Blocks */
.form-section {
    margin-bottom: 2.5rem;
    background: #fafbfc;
    border-radius: 10px;
    padding: 1.75rem;
    border: 1px solid #edf2f7;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--spu-navy);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--spu-gold);
}

.section-icon {
    width: 32px;
    height: 32px;
    background: var(--spu-blue);
    color: #ffffff;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* Form Layout Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--spu-text-dark);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-label .required {
    color: var(--spu-red);
    font-weight: 700;
    margin-right: 0.25rem;
}

.form-label .hint {
    font-size: 0.8rem;
    color: var(--spu-text-muted);
    font-weight: normal;
}

/* Form Controls */
.form-control, .form-select, textarea.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--spu-font);
    font-size: 0.95rem;
    color: var(--spu-text-dark);
    background-color: #ffffff;
    border: 1.5px solid var(--spu-border);
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    outline: none;
}

.form-control:focus, .form-select:focus, textarea.form-control:focus {
    border-color: var(--spu-light-blue);
    box-shadow: 0 0 0 4px rgba(35, 100, 170, 0.12);
}

.form-control.is-invalid, .form-select.is-invalid {
    border-color: var(--spu-red);
    background-color: #fff8f8;
}

.invalid-feedback {
    color: var(--spu-red);
    font-size: 0.85rem;
    margin-top: 0.4rem;
    font-weight: 600;
}

/* Disabled Preset Control */
.form-control-readonly {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--spu-navy);
    font-weight: 700;
    cursor: not-allowed;
}

/* Custom Radio Group */
.radio-group {
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 0;
}

.radio-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    color: var(--spu-text-dark);
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--spu-blue);
    cursor: pointer;
}

/* Multi-Select Badges & Tag Picker Widget */
.multi-select-container {
    background: #ffffff;
    border: 1.5px solid var(--spu-border);
    border-radius: 10px;
    padding: 1.25rem;
    transition: all 0.2s ease;
}

.multi-select-container:focus-within {
    border-color: var(--spu-light-blue);
    box-shadow: 0 0 0 4px rgba(35, 100, 170, 0.12);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-top: 0.75rem;
}

/* Scrollbar customization */
.courses-grid::-webkit-scrollbar {
    width: 6px;
}
.courses-grid::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.course-checkbox-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--spu-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.course-checkbox-card:hover {
    background: #eef2ff;
    border-color: var(--spu-light-blue);
}

.course-checkbox-card.selected {
    background: #e0f2fe;
    border-color: var(--spu-light-blue);
    box-shadow: 0 2px 6px rgba(35, 100, 170, 0.15);
}

.course-checkbox-card input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--spu-blue);
    cursor: pointer;
}

.course-checkbox-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--spu-text-dark);
}

/* Selected Summary Counter Badge */
.selected-tags-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--spu-border);
}

.badge-tag {
    background: var(--spu-navy);
    color: #ffffff;
    font-size: 0.82rem;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-tag-remove {
    cursor: pointer;
    opacity: 0.8;
    font-weight: bold;
}

.badge-tag-remove:hover {
    opacity: 1;
    color: var(--spu-gold);
}

/* File Upload Box */
.file-upload-box {
    border: 2px dashed var(--spu-light-blue);
    background: #f0f7ff;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.file-upload-box:hover {
    background: #e2f0fe;
    border-color: var(--spu-navy);
}

.file-upload-icon {
    font-size: 2.5rem;
    color: var(--spu-blue);
    margin-bottom: 0.5rem;
}

.file-upload-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--spu-navy);
}

.file-upload-subtext {
    font-size: 0.82rem;
    color: var(--spu-text-muted);
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.selected-file-name {
    margin-top: 0.75rem;
    font-weight: 700;
    color: var(--spu-blue);
    font-size: 0.9rem;
}

/* Buttons */
.btn-submit-container {
    margin-top: 2rem;
    text-align: center;
}

.btn-spu-primary {
    background: linear-gradient(135deg, var(--spu-blue) 0%, var(--spu-navy) 100%);
    color: #ffffff;
    font-family: var(--spu-font);
    font-size: 1.15rem;
    font-weight: 700;
    padding: 1rem 3.5rem;
    border: 2px solid var(--spu-gold);
    border-radius: 50px;
    cursor: pointer;
    box-shadow: var(--spu-shadow);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-spu-primary:hover {
    background: linear-gradient(135deg, var(--spu-navy) 0%, #061526 100%);
    transform: translateY(-2px);
    box-shadow: var(--spu-shadow-lg);
    border-color: #ffffff;
}

.btn-spu-primary:active {
    transform: translateY(0);
}

/* Global Alert Banners */
.alert-banner {
    padding: 1.25rem;
    border-radius: var(--spu-radius);
    margin-bottom: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-banner.error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-banner.success {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

/* Success Confirmation Page */
.success-card {
    text-align: center;
    padding: 3.5rem 2rem;
}

.success-icon {
    width: 90px;
    height: 90px;
    background: #dcfce7;
    color: #15803d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
    box-shadow: 0 10px 20px rgba(22, 101, 52, 0.15);
}

.reference-box {
    background: #f8fafc;
    border: 2px dashed var(--spu-gold);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 450px;
    margin: 1.5rem auto;
}

.reference-code {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--spu-navy);
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* Admin Table */
.admin-table-wrapper {
    overflow-x: auto;
    margin-top: 1.5rem;
}

.spu-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: var(--spu-radius);
    overflow: hidden;
}

.spu-table th {
    background: var(--spu-navy);
    color: #ffffff;
    padding: 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-align: right;
}

.spu-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--spu-border);
    font-size: 0.92rem;
}

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

/* Footer */
.spu-footer {
    text-align: center;
    padding: 2rem;
    color: var(--spu-text-muted);
    font-size: 0.9rem;
    border-top: 1px solid var(--spu-border);
    margin-top: 4rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .spu-header-container {
        flex-direction: column;
        text-align: center;
    }
    .spu-brand {
        flex-direction: column;
    }
    .form-card {
        padding: 1.5rem 1rem;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
}
