/* ==========================================================================
   ST. AUGUSTINE STATE UNIVERSITY - OFFICIAL COLLEGE REGISTRATION FORM
   Academic Theme: University Navy (#002147), Gold (#D4AF37), Crimson (#800020)
   ========================================================================== */

:root {
    --navy-dark: #00152e;
    --navy: #002147;
    --navy-light: #0d386b;
    --gold: #d4af37;
    --gold-dark: #b38f24;
    --gold-light: #fef9e7;
    --crimson: #800020;
    --crimson-bg: #fdf2f4;
    --bg-page: #f4f6f9;
    --bg-card: #ffffff;
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #cbd5e0;
    --border-gold: rgba(212, 175, 55, 0.4);
    --font-heading: 'Cinzel', serif;
    --font-subheading: 'Merriweather', serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    --shadow-card: 0 4px 20px rgba(0, 33, 71, 0.08);
    --shadow-header: 0 10px 30px rgba(0, 21, 46, 0.25);
    --radius: 8px;
    --transition: all 0.25s ease-in-out;
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Institutional Top Bar */
.top-bar {
    background-color: var(--navy-dark);
    color: #e2e8f0;
    font-size: 0.825rem;
    padding: 8px 0;
    border-bottom: 2px solid var(--gold);
}

.top-bar-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.support-link {
    color: var(--gold);
    font-weight: 500;
}

/* Main Layout Wrapper */
.main-wrapper {
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.container {
    width: 100%;
    max-width: 1000px;
}

/* College Header */
.college-header {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    color: #ffffff;
    border-radius: var(--radius) var(--radius) 0 0;
    box-shadow: var(--shadow-header);
    border-bottom: 4px solid var(--gold);
    overflow: hidden;
}

.header-banner {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 36px 40px;
    position: relative;
    background-image: radial-gradient(circle at 90% 10%, rgba(212, 175, 55, 0.1) 0%, transparent 60%);
}

.university-crest {
    width: 90px;
    height: 90px;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

.crest-svg {
    width: 100%;
    height: 100%;
}

.university-titles .motto {
    font-family: var(--font-heading);
    color: var(--gold);
    font-size: 0.75rem;
    letter-spacing: 2px;
    font-weight: 700;
    display: block;
    margin-bottom: 4px;
}

.university-titles h1 {
    font-family: var(--font-heading);
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #ffffff;
    line-height: 1.2;
}

.college-sub {
    font-family: var(--font-subheading);
    color: #cbd5e0;
    font-size: 1rem;
    margin-top: 4px;
    font-style: italic;
}

.form-title-strip {
    background: #001938;
    padding: 14px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.form-title-strip h2 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--gold);
    letter-spacing: 1px;
}

.form-code {
    font-family: var(--font-body);
    font-size: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Section Academic Cards */
.academic-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-top: 24px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: var(--transition);
}

.academic-card:hover {
    border-color: var(--navy-light);
}

.card-header {
    background: #f8fafc;
    padding: 18px 28px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
}

.step-num {
    background: var(--navy);
    color: var(--gold);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--gold);
    flex-shrink: 0;
}

.card-header h3 {
    font-family: var(--font-subheading);
    font-size: 1.15rem;
    color: var(--navy);
    font-weight: 700;
}

.card-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-body {
    padding: 28px;
}

/* Form Grids */
.form-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 20px;
}

.form-grid:last-child {
    margin-bottom: 0;
}

.col-2 { grid-template-columns: repeat(2, 1fr); }
.col-3 { grid-template-columns: repeat(3, 1fr); }

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

label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required {
    color: var(--crimson);
}

/* Inputs & Selects */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select {
    width: 100%;
    padding: 12px 14px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-primary);
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    outline: none;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(0, 33, 71, 0.15);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23002147' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select:disabled {
    background-color: #edf2f7;
    cursor: not-allowed;
    color: var(--text-muted);
}

/* Student ID Photo Box */
.student-id-badge-box {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--gold-light);
    border: 1px dashed var(--gold-dark);
    padding: 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
}

.photo-preview-wrapper {
    width: 100px;
    height: 120px;
    background: #ffffff;
    border: 2px solid var(--navy);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    text-align: center;
    padding: 8px;
}

.photo-placeholder svg {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
    color: var(--navy);
}

.photo-preview-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-upload-info h4 {
    font-family: var(--font-subheading);
    font-size: 1rem;
    color: var(--navy);
    margin-bottom: 4px;
}

.photo-upload-info p {
    font-size: 0.825rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

input[type="file"] {
    display: none;
}

/* Financial Aid & Checkbox */
.financial-aid-option {
    margin-top: 16px;
    background: #f8fafc;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.academic-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    user-select: none;
}

.academic-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.academic-checkbox .checkmark {
    width: 20px;
    height: 20px;
    background: #ffffff;
    border: 2px solid var(--navy);
    border-radius: 3px;
    flex-shrink: 0;
    margin-top: 2px;
    position: relative;
    transition: var(--transition);
}

.academic-checkbox input:checked ~ .checkmark {
    background-color: var(--navy);
}

.academic-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.academic-checkbox input:checked ~ .checkmark:after {
    display: block;
}

/* Honor Code Box */
.honor-code-box {
    background: #fffdf5;
    border-left: 4px solid var(--gold);
    border-top: 1px solid var(--border-gold);
    border-right: 1px solid var(--border-gold);
    border-bottom: 1px solid var(--border-gold);
    padding: 18px;
    font-size: 0.875rem;
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
    border-radius: 4px;
}

.signature-input {
    font-family: 'Merriweather', serif;
    font-style: italic;
    font-size: 1.05rem !important;
    letter-spacing: 1px;
}

.terms-check {
    margin-top: 16px;
}

/* Error States */
.form-group.has-error input,
.form-group.has-error select {
    border-color: var(--crimson);
    background-color: var(--crimson-bg);
}

.error-msg {
    font-size: 0.785rem;
    color: var(--crimson);
    margin-top: 4px;
    display: none;
    font-weight: 600;
}

.form-group.has-error .error-msg,
.terms-check.has-error .error-msg {
    display: block;
}

/* Buttons */
.form-footer-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 36px;
}

.btn-academic {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: var(--transition);
}

.btn-primary {
    background: var(--navy);
    color: #ffffff;
    border: 1px solid var(--navy-dark);
    box-shadow: 0 4px 12px rgba(0, 33, 71, 0.2);
}

.btn-primary:hover {
    background: var(--navy-light);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 33, 71, 0.3);
}

.btn-secondary {
    background: #edf2f7;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.btn-outline {
    background: #ffffff;
    color: var(--navy);
    border: 1px solid var(--navy);
    padding: 8px 16px;
    font-size: 0.825rem;
}

.btn-outline:hover {
    background: var(--navy);
    color: #ffffff;
}

.btn-gold {
    background: var(--gold);
    color: var(--navy);
    border: 1px solid var(--gold-dark);
}

.btn-gold:hover {
    background: var(--gold-dark);
    color: #ffffff;
}

/* Alert Notification */
.alert {
    padding: 14px 20px;
    border-radius: 4px;
    margin-top: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
    font-weight: 600;
}

.alert-danger {
    background: var(--crimson-bg);
    color: var(--crimson);
    border: 1px solid #f87171;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: inherit;
    cursor: pointer;
}

.hidden { display: none !important; }

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 21, 46, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-card {
    background: #ffffff;
    border: 3px double var(--gold);
    border-radius: var(--radius);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.modal-seal {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px auto;
}

.seal-small { width: 100%; height: 100%; }

.modal-card h2 {
    font-family: var(--font-heading);
    color: var(--navy);
    font-size: 1.4rem;
    letter-spacing: 1px;
}

.modal-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.receipt-details {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 16px;
    text-align: left;
    margin-bottom: 20px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
    font-size: 0.9rem;
}

.receipt-row:last-child {
    border-bottom: none;
}

.status-badge {
    background: #def7ec;
    color: #03543f;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.modal-note {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
}

/* University Footer */
.university-footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.825rem;
    color: var(--text-muted);
}

.disclaimer {
    font-size: 0.75rem;
    margin-top: 4px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-banner {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    .form-title-strip {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    .col-2, .col-3 {
        grid-template-columns: 1fr;
    }
    .form-footer-actions {
        flex-direction: column-reverse;
    }
    .btn-academic {
        width: 100%;
        justify-content: center;
    }
    .student-id-badge-box {
        flex-direction: column;
        text-align: center;
    }
}

/* Print CSS */
@media print {
    .top-bar, .form-footer-actions, .btn-outline, .university-footer {
        display: none !important;
    }
    body {
        background: #ffffff;
    }
    .main-wrapper {
        padding: 0;
    }
    .academic-card {
        box-shadow: none;
        break-inside: avoid;
    }
    .modal {
        position: static;
        background: transparent;
        backdrop-filter: none;
    }
    .modal-card {
        box-shadow: none;
        border: 2px solid var(--navy);
        max-width: 100%;
    }
    .modal-buttons {
        display: none !important;
    }
}
