/* =========================================================================
   High School Memories - Photo Submission Portal Stylesheet
   Design System:
     --primary:      #071B2D
     --secondary:    #123B52
     --accent:       #00B8A9
     --background:   #EAF4F4
     --surface:      #FFFFFF
     --text:         #193548
     --muted:        #6B8492
     --muted-accent: #5BADA5
   ========================================================================= */

/* =========================================================================
   1. CSS VARIABLES & RESET
   ========================================================================= */
:root {
    --primary: #071B2D;
    --secondary: #123B52;
    --accent: #00B8A9;
    --background: #EAF4F4;
    --surface: #FFFFFF;
    --text: #193548;
    --muted: #6B8492;
    --muted-accent: #5BADA5;

    /* Semantic & Functional Tokens */
    --accent-hover: #009e91;
    --accent-glow: rgba(0, 184, 169, 0.22);
    --surface-glass: rgba(255, 255, 255, 0.85);
    --border-subtle: rgba(18, 59, 82, 0.12);
    --border-focus: #00B8A9;
    --shadow-sm: 0 2px 8px rgba(7, 27, 45, 0.05);
    --shadow-md: 0 10px 25px rgba(7, 27, 45, 0.08);
    --shadow-lg: 0 20px 50px rgba(7, 27, 45, 0.12);
    --danger: #e04747;
    --danger-bg: #fff1f1;
    --success: #059669;
    --success-bg: #e6f7f2;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 9999px;
    --font-heading: Georgia, 'Times New Roman', serif;
    --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--background);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* =========================================================================
   2. NAVBAR
   ========================================================================= */
.navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.nav-container {
    width: min(1140px, 92%);
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: white;
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: clamp(1.05rem, 3vw, 1.35rem);
    font-weight: normal;
    letter-spacing: 0.2px;
    transition: opacity 0.2s ease;
}

.brand:hover {
    opacity: 0.92;
}

.brand img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(0, 184, 169, 0.4);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: white;
    padding: 9px 16px;
    border-radius: 12px;
    list-style: none;
    transition: all 0.25s ease;
}

.dropdown summary::-webkit-details-marker {
    display: none;
}

.dropdown summary:hover,
.dropdown[open] summary {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
}

.dropdown summary .arrow {
    font-size: 0.75rem;
    transition: transform 0.25s ease;
}

.dropdown[open] summary .arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    display: flex;
    flex-direction: column;
    min-width: 220px;
    background: var(--surface);
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 16px 40px rgba(7, 27, 45, 0.25);
    border: 1px solid var(--border-subtle);
    animation: dropdownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1050;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dropdown-menu a {
    text-decoration: none;
    color: var(--text);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.18s ease;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: rgba(0, 184, 169, 0.12);
    color: var(--secondary);
    font-weight: 600;
}

/* =========================================================================
   3. PORTAL HERO / INTRO
   ========================================================================= */
.portal-hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, #0a253c 50%, var(--secondary) 100%);
    color: white;
    padding: clamp(60px, 9vw, 90px) 20px clamp(50px, 8vw, 75px);
    text-align: center;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: -30%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 184, 169, 0.2) 0%, transparent 70%);
    pointer-events: none;
    z-index: 1;
}

.hero-container {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: rgba(0, 184, 169, 0.12);
    border: 1px solid rgba(0, 184, 169, 0.35);
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.hero-badge-icon {
    width: 15px;
    height: 15px;
}

.portal-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5.5vw, 3.6rem);
    font-weight: normal;
    line-height: 1.15;
    margin-bottom: 18px;
    color: #FFFFFF;
}

.portal-hero h1 span {
    color: var(--accent);
    font-style: italic;
    position: relative;
}

.hero-description {
    color: #C6CED9;
    font-size: clamp(0.95rem, 2vw, 1.12rem);
    line-height: 1.7;
    max-width: 680px;
    margin: 0 auto 30px;
}

.hero-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px 30px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
}

.feature-item svg {
    width: 17px;
    height: 17px;
    color: var(--accent);
}

/* =========================================================================
   4. MAIN SUBMISSION PORTAL
   ========================================================================= */
.submission-section {
    position: relative;
    margin-top: -30px;
    padding-bottom: 80px;
    z-index: 10;
}

.portal-container {
    width: min(840px, 92%);
    margin: 0 auto;
}

.portal-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Header of Form Card */
.card-header {
    background: linear-gradient(to right, #f8fbfb, var(--surface));
    padding: 30px 36px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.header-titles h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 4px;
}

.header-titles p {
    font-size: 0.9rem;
    color: var(--muted);
}

.step-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    background: rgba(0, 184, 169, 0.1);
    color: var(--secondary);
    border: 1px solid rgba(0, 184, 169, 0.3);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Form Layout */
#photoSubmissionForm {
    padding: 36px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

/* Fieldset Section */
.form-section {
    border: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.section-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 6px;
}

.legend-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--secondary);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
}

.legend-text {
    font-family: var(--font-heading);
    font-size: 1.22rem;
    color: var(--primary);
    font-weight: normal;
}

/* Form Groups & Inputs */
.input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

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

.form-group label,
.label-group-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 4px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.char-counter {
    font-size: 0.75rem;
    color: var(--muted);
    font-family: var(--font-mono);
}

.required {
    color: var(--danger);
    font-weight: bold;
}

.optional {
    color: var(--muted);
    font-weight: normal;
    font-size: 0.8rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--muted);
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-wrapper input,
.input-wrapper textarea {
    width: 100%;
    background: #fbfdfd;
    border: 1.5px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 12px 14px 12px 42px;
    outline: none;
    transition: all 0.22s ease;
}

.input-wrapper textarea {
    padding: 12px 14px;
    resize: vertical;
    min-height: 85px;
    line-height: 1.5;
}

.input-wrapper input::placeholder,
.input-wrapper textarea::placeholder {
    color: #9cb0bc;
}

.input-wrapper input:hover,
.input-wrapper textarea:hover {
    border-color: #9cb0bc;
    background: #ffffff;
}

.input-wrapper input:focus,
.input-wrapper textarea:focus {
    border-color: var(--accent);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.input-wrapper input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--accent);
}

/* Input validation states */
.input-wrapper.is-invalid input,
.input-wrapper.is-invalid textarea {
    border-color: var(--danger);
    background: var(--danger-bg);
}

.input-wrapper.is-invalid input:focus {
    box-shadow: 0 0 0 4px rgba(224, 71, 71, 0.18);
}

.field-error {
    font-size: 0.8rem;
    color: var(--danger);
    min-height: 1.1rem;
    display: block;
    font-weight: 500;
}

.field-hint {
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.4;
}

/* =========================================================================
   5. SEGMENTED CONTROL (GALLERY PREFERENCE)
   ========================================================================= */
.segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--background);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    gap: 4px;
}

.segmented-option {
    cursor: pointer;
    user-select: none;
}

.segmented-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.segmented-pill .pill-icon {
    width: 17px;
    height: 17px;
    transition: transform 0.2s ease;
}

.segmented-option:hover .segmented-pill {
    color: var(--secondary);
    background: rgba(255, 255, 255, 0.6);
}

.segmented-option input[type="radio"]:checked + .segmented-pill {
    background: var(--secondary);
    color: #FFFFFF;
    box-shadow: var(--shadow-sm);
}

.segmented-option input[type="radio"]:checked + .segmented-pill .pill-icon {
    color: var(--accent);
    transform: scale(1.08);
}

.segmented-option input[type="radio"]:focus-visible + .segmented-pill {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* Quick Chips */
.quick-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.chips-label {
    font-size: 0.78rem;
    color: var(--muted);
    font-weight: 500;
}

.chip-btn {
    background: rgba(0, 184, 169, 0.08);
    border: 1px solid rgba(0, 184, 169, 0.25);
    color: var(--secondary);
    padding: 4px 11px;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip-btn:hover {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.chip-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

/* =========================================================================
   6. DRAG AND DROP ZONE & PREVIEWS
   ========================================================================= */
.upload-dropzone {
    border: 2px dashed #b1c7cb;
    border-radius: var(--radius-md);
    background: #f7fafb;
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    outline: none;
}

.upload-dropzone:hover {
    border-color: var(--accent);
    background: #f0f8f8;
    transform: translateY(-1px);
}

.upload-dropzone:focus-visible {
    border-color: var(--accent);
    background: #f0f8f8;
    box-shadow: 0 0 0 4px var(--accent-glow);
}

.upload-dropzone.drag-active {
    border-color: var(--accent);
    background: rgba(0, 184, 169, 0.1);
    transform: scale(1.01);
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.dropzone-icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 184, 169, 0.12);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

.upload-dropzone:hover .dropzone-icon-circle,
.upload-dropzone.drag-active .dropzone-icon-circle {
    transform: scale(1.1) rotate(-4deg);
    background: var(--accent);
    color: var(--primary);
}

.dropzone-icon {
    width: 30px;
    height: 30px;
}

.dropzone-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary);
}

.browse-link {
    color: var(--accent);
    text-decoration: underline;
    font-weight: 700;
}

.dropzone-subtitle {
    font-size: 0.84rem;
    color: var(--muted);
    max-width: 480px;
}

.dropzone-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.tag-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(18, 59, 82, 0.06);
    color: var(--secondary);
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 600;
}

.tag-icon {
    width: 12px;
    height: 12px;
    color: var(--accent);
}

/* Queue Toolbar */
.queue-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--background);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    margin-top: 10px;
}

.queue-stats {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.queue-count {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary);
}

.queue-size {
    font-size: 0.8rem;
    color: var(--muted);
    font-family: var(--font-mono);
}

.queue-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-text-action {
    background: transparent;
    border: none;
    color: var(--secondary);
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-text-action:hover {
    background: rgba(18, 59, 82, 0.08);
}

.btn-danger-action {
    color: var(--danger);
}

.btn-danger-action:hover {
    background: var(--danger-bg);
}

.btn-icon {
    width: 14px;
    height: 14px;
}

/* Dynamic Preview Grid */
.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.preview-card {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #18263d;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-subtle);
    animation: previewFadeIn 0.25s ease-out;
}

@keyframes previewFadeIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.preview-card:hover .preview-img {
    transform: scale(1.06);
}

.preview-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 27, 45, 0.88) 0%, rgba(7, 27, 45, 0.3) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    color: white;
}

.preview-top-row {
    display: flex;
    justify-content: flex-end;
}

.btn-remove-photo {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(224, 71, 71, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.btn-remove-photo:hover {
    background: #c52929;
    transform: scale(1.15);
}

.btn-remove-photo svg {
    width: 13px;
    height: 13px;
}

.preview-bottom-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.preview-filename {
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-filesize {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.75);
    font-family: var(--font-mono);
}

/* =========================================================================
   7. CONSENT & SUBMIT ACTION
   ========================================================================= */
.form-bottom-bar {
    padding-top: 24px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.consent-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.custom-checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 6px;
    border: 1.8px solid var(--muted);
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .custom-checkbox {
    background: var(--accent);
    border-color: var(--accent);
}

.checkbox-label input[type="checkbox"]:checked + .custom-checkbox::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid var(--primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) translate(-1px, -1px);
}

.checkbox-label input[type="checkbox"]:focus-visible + .custom-checkbox {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.checkbox-text {
    font-size: 0.88rem;
    color: var(--text);
    line-height: 1.5;
}

.checkbox-text a {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: underline;
}

.submit-action-wrapper {
    display: flex;
    justify-content: flex-end;
}

.submit-button {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    border: 1.5px solid rgba(0, 184, 169, 0.4);
    color: white;
    padding: 15px 36px;
    border-radius: var(--radius-md);
    font-size: 1.02rem;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(7, 27, 45, 0.2);
    transition: all 0.25s ease;
}

.submit-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #184c69 0%, #0c2c47 100%);
    border-color: var(--accent);
    box-shadow: 0 10px 30px var(--accent-glow);
    transform: translateY(-2px);
}

.submit-button:active:not(:disabled) {
    transform: translateY(0);
}

.submit-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
}

.button-content {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-submit-icon {
    width: 19px;
    height: 19px;
    color: var(--accent);
    transition: transform 0.2s ease;
}

.submit-button:hover:not(:disabled) .btn-submit-icon {
    transform: translateX(3px);
}

/* Button Spinner */
.button-loader {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================================================
   8. PROGRESS, SUCCESS & ERROR CARDS
   ========================================================================= */
/* Progress Card */
.progress-card {
    padding: 48px 36px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
}

.progress-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.pulse-ring {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(0, 184, 169, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 184, 169, 0.4);
    }
    50% {
        box-shadow: 0 0 0 16px rgba(0, 184, 169, 0);
    }
}

.progress-hero-icon {
    width: 36px;
    height: 36px;
    color: var(--accent);
}

.progress-hero h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary);
}

.progress-hero p {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 520px;
}

.progress-container {
    width: 100%;
    max-width: 560px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.progress-bar-track {
    width: 100%;
    height: 10px;
    background: var(--background);
    border-radius: var(--radius-pill);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary) 0%, var(--accent) 100%);
    border-radius: var(--radius-pill);
    transition: width 0.3s ease;
}

.progress-metrics {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
}

.progress-step-text {
    color: var(--text);
    font-weight: 600;
}

.progress-percent-text {
    color: var(--accent);
    font-weight: 700;
    font-family: var(--font-mono);
}

.progress-stages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
    width: 100%;
    max-width: 440px;
    background: #fbfdfd;
    padding: 16px 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.stage-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.86rem;
    color: var(--muted);
    transition: all 0.25s ease;
}

.stage-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ccd7dc;
    transition: all 0.25s ease;
}

.stage-item.in-progress {
    color: var(--primary);
    font-weight: 600;
}

.stage-item.in-progress .stage-dot {
    background: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.stage-item.completed {
    color: var(--success);
}

.stage-item.completed .stage-dot {
    background: var(--success);
}

/* Success Card */
.success-card {
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    text-align: center;
}

.success-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.success-icon-badge {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--success-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    box-shadow: 0 0 0 8px rgba(5, 150, 105, 0.12);
}

.success-icon {
    width: 44px;
    height: 44px;
}

.success-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.3rem);
    color: var(--primary);
}

.success-lead {
    color: var(--text);
    font-size: 0.98rem;
    max-width: 580px;
    line-height: 1.7;
}

/* Receipt Ticket */
.receipt-ticket {
    width: 100%;
    max-width: 520px;
    background: #fcfdfd;
    border: 1px dashed #b7c8cc;
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: left;
    box-shadow: var(--shadow-sm);
}

.ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}

.ticket-label {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--muted);
    letter-spacing: 1.5px;
}

.ticket-id {
    font-family: var(--font-mono);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--secondary);
    background: var(--background);
    padding: 3px 8px;
    border-radius: 6px;
}

.ticket-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.88rem;
}

.ticket-key {
    color: var(--muted);
}

.ticket-val {
    color: var(--primary);
    font-weight: 600;
    text-align: right;
}

.success-actions,
.error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    width: 100%;
}

.btn-primary-action,
.btn-secondary-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.22s ease;
}

.btn-primary-action {
    background: var(--secondary);
    color: white;
    border: 1px solid var(--secondary);
}

.btn-primary-action:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary-action {
    background: transparent;
    color: var(--secondary);
    border: 1.5px solid var(--border-subtle);
}

.btn-secondary-action:hover {
    background: var(--background);
    border-color: var(--secondary);
}

/* Error Card */
.error-card {
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    text-align: center;
}

.error-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.error-icon-badge {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--danger-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger);
    box-shadow: 0 0 0 8px rgba(224, 71, 71, 0.12);
}

.error-icon {
    width: 40px;
    height: 40px;
}

.error-header h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary);
}

.error-header p {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 520px;
    line-height: 1.6;
}

.error-support-note {
    font-size: 0.82rem;
    color: var(--muted);
}

.error-support-note a {
    color: var(--secondary);
    font-weight: 600;
}

/* =========================================================================
   9. INFORMATION & FAQ SECTION
   ========================================================================= */
.portal-info-section {
    padding: 40px 20px 80px;
    background: #E4EFF0;
}

.info-grid {
    width: min(1080px, 92%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.info-card {
    background: var(--surface);
    border-radius: var(--radius-md);
    padding: 30px 24px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.info-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(0, 184, 169, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.info-icon svg {
    width: 22px;
    height: 22px;
}

.info-card h3 {
    font-family: var(--font-heading);
    font-size: 1.18rem;
    color: var(--primary);
}

.info-card p {
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.6;
}

.info-card a {
    color: var(--secondary);
    font-weight: 600;
    text-decoration: underline;
}

/* =========================================================================
   10. FOOTER & STATUS BAR
   ========================================================================= */
.footer {
    margin-top: auto;
    background: #071524;
    color: white;
    padding: 55px 8% 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-content {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-content h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 14px;
    color: #FFFFFF;
}

.footer-content p {
    color: #899eb0;
    font-size: 0.86rem;
    line-height: 1.7;
    margin-bottom: 6px;
}

.footer-note {
    max-width: 580px;
    margin-top: 12px;
}

.email a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dotted var(--accent);
}

.github-link {
    display: inline-block;
    margin-top: 14px;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
}

.github-link:hover {
    text-decoration: underline;
}

.copyright {
    max-width: 1100px;
    margin: 40px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #657b8d;
    font-size: 0.8rem;
}

/* Floating Status Bar Dock (Matching Website Design) */
.status-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: min(90%, 480px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 60px;
    padding: 10px 16px;
    background: rgba(7, 27, 45, 0.88);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(0, 184, 169, 0.25);
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.35);
}

.status-bar a,
.status-bar button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: rgba(255, 255, 255, 0.75);
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: 0.25s ease;
    text-decoration: none;
}

.status-bar a.active,
.status-bar a:hover,
.status-bar button:hover {
    color: var(--accent);
    background: rgba(0, 184, 169, 0.14);
}

.status-bar svg {
    width: 21px;
    height: 21px;
    stroke-width: 1.8;
}

/* =========================================================================
   11. RESPONSIVENESS & ACCESSIBILITY
   ========================================================================= */
@media (max-width: 900px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    #photoSubmissionForm {
        padding: 24px 20px;
        gap: 28px;
    }

    .card-header {
        padding: 22px 20px;
        flex-direction: column;
        align-items: flex-start;
    }

    .input-grid {
        grid-template-columns: 1fr;
    }

    .submit-button {
        width: 100%;
        justify-content: center;
    }

    .status-bar {
        bottom: 16px;
        gap: 36px;
        padding: 8px 12px;
    }

    .status-bar a,
    .status-bar button {
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
