﻿/* ============================================================
   ROOT VARIABLES — Modern SaaS Theme matching image_b28582.jpg
   ============================================================ */
:root {
    /* Theme Colors */
    --bg-page: #f5f6f8; /* Light grayish-blue background */
    --bg-panel: #ffffff; /* Pure white panels */
    --bg-input: #f8fafc; /* Very faint gray for input fields */
    --bg-sidebar: #0f172a; /* Dark navy blue for sidebar */

    --accent: #5b58ff; /* Vibrant primary blue */
    --accent-hover: #4f46e5; /* Slightly darker blue for hover */

    --text-main: #1e293b; /* Dark slate for main text */
    --text-muted: #64748b; /* Slate gray for labels/secondary text */
    --text-sidebar: #cbd5e1; /* Light gray for sidebar text */

    --border-color: #e2e8f0; /* Light, clean borders */
    /* Layout & Shadows — Modern rounded corners */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    --shadow-focus: 0 0 0 3px rgba(91, 88, 255, 0.2);
    /* Compact spacing */
    --spacing-panel: 1.25rem;
    --spacing-grid: 0.75rem;
    --font-base: 0.85rem;
}

/* ===============================
   GLOBAL & RESET
=============================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-page);
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
    font-size: var(--font-base);
    line-height: 1.5;
    min-height: 100vh;
}

.enrollment-container {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-page);
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text-main);
    font-size: var(--font-base);
}

/* Typography */
.font-serif {
    font-family: 'Inter', system-ui, sans-serif; /* Switched to sans-serif to match modern image */
    font-weight: 700;
}

.text-xs {
    font-size: 0.7rem;
}

.text-sm {
    font-size: 0.8rem;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-accent {
    color: var(--accent);
}

.uppercase {
    text-transform: uppercase;
}

/* Custom Scrollbar — keep it subtle */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-sm);
}

    ::-webkit-scrollbar-thumb:hover {
        background: #94a3b8;
    }

/* ===============================
   PROFESSIONAL LOADING SCREEN
=============================== */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background: var(--bg-page);
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: var(--accent);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(91, 88, 255, 0.3);
}

    .logo-circle i {
        font-size: 2.4rem;
        color: #fff;
    }

.loading-bar {
    width: 220px;
    height: 4px;
    background: var(--border-color);
    border-radius: 9999px;
    overflow: hidden;
    margin-top: 2.5rem;
}

.loading-progress {
    height: 100%;
    width: 45%;
    background: var(--accent);
    border-radius: 9999px;
    animation: loading 2.2s infinite ease-in-out;
}

@keyframes loading {
    0% {
        transform: translateX(-80%);
    }

    50% {
        transform: translateX(120%);
    }

    100% {
        transform: translateX(-80%);
    }
}

/* ===============================
   SIDEBAR — matched to image (Dark Navy)
=============================== */
.retro-sidebar {
    width: 240px;
    padding: 1.5rem 1rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border-right: none;
    background: var(--bg-sidebar); /* Dark Navy */
}

.sidebar-logo-title {
    font-size: 1.2rem;
    line-height: 1.2;
    margin-bottom: 0.15rem;
    color: #ffffff; /* White text for dark sidebar */
    font-weight: 700;
}

.sidebar-session {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 2rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-md);
    color: var(--text-sidebar);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    margin-bottom: 0.25rem;
}

    .sidebar-nav-item:hover:not(.active) {
        background-color: rgba(255, 255, 255, 0.05);
        color: #ffffff;
    }

    .sidebar-nav-item.active {
        background-color: var(--accent);
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(91, 88, 255, 0.3);
    }

    .sidebar-nav-item i {
        font-size: 1.1rem;
        opacity: 0.9;
        width: 1.2rem;
        text-align: center;
    }

/* ===============================
   MAIN AREA & HEADER
=============================== */
.retro-main {
    flex: 1;
    padding: 1.5rem 2rem 2rem 2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: var(--bg-page);
}

.retro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-title-group {
    display: flex;
    flex-direction: column;
}

.header-title {
    font-size: 1.5rem;
    margin-bottom: 0.2rem;
    color: var(--text-main);
    font-weight: 700;
}

.header-breadcrumb {
    font-size: 0.75rem;
    color: var(--text-muted);
}

    .header-breadcrumb span {
        color: var(--accent);
        font-weight: 500;
    }

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ===============================
   BUTTONS — Modern Pill/Rounded shape
=============================== */
.btn-retro {
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    height: 2.2rem;
}

    .btn-retro:focus-visible {
        outline: none;
        box-shadow: var(--shadow-focus);
    }

.btn-outline {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

    .btn-outline:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
    }

.btn-solid {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 4px rgba(91, 88, 255, 0.2);
}

    .btn-solid:hover {
        background: var(--accent-hover);
        box-shadow: 0 4px 6px rgba(91, 88, 255, 0.3);
        transform: translateY(-1px);
    }

    .btn-solid:active {
        transform: translateY(0);
    }

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

    .btn-icon:hover {
        border-color: var(--accent);
        color: var(--accent);
        background: #f8fafc;
    }

/* ===============================
   GRID & PANELS — Clean white boxes
=============================== */
.retro-grid {
    display: grid;
    grid-template-columns: 2fr 1.5fr 1.2fr;
    gap: 1.25rem;
    align-items: start;
}

.retro-panel {
    background: var(--bg-panel);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

.panel-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent); /* Matches the blue headings in the image */
    margin: 0;
    display: flex;
    align-items: center;
}

    .panel-title i {
        margin-right: 0.5rem;
        color: var(--accent);
        font-size: 1rem;
    }

/* ===============================
   FORMS & INPUTS — Clean, faint backgrounds
=============================== */
.input-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem 1rem;
}

.input-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem 1rem;
}

.input-full {
    grid-column: 1 / -1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.retro-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: normal;
    text-transform: none; /* Changed to none to match Title Case in image */
}

    .retro-label .required {
        color: #ef4444; /* Standard red */
        margin-left: 2px;
    }

.retro-input {
    width: 100%;
    padding: 0.4rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
    font-family: 'Inter', system-ui, sans-serif;
    height: 2.2rem;
}

    .retro-input::placeholder {
        color: #94a3b8;
        font-size: 0.8rem;
    }

    .retro-input:focus {
        background: #ffffff;
        border-color: var(--accent);
        box-shadow: var(--shadow-focus);
    }

    .retro-input:disabled,
    .retro-input[readonly] {
        background: #f1f5f9;
        border: 1px solid var(--border-color);
        color: var(--text-muted);
        cursor: not-allowed;
    }

    /* Highlighted read-only fields (like Admission No in image) */
    .retro-input.highlight-field {
        background: #eef2ff;
        border-color: #c7d2fe;
        color: var(--accent);
        font-weight: 600;
    }

    /* Validation states */
    .retro-input.invalid {
        border-color: #ef4444;
        background-color: #fef2f2;
    }

        .retro-input.invalid:focus {
            box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
        }

.validation-message {
    color: #ef4444;
    font-size: 0.7rem;
    margin-top: 0.15rem;
    font-weight: 500;
}

/* Select */
.retro-select {
    width: 100%;
    padding: 0.4rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-main);
    outline: none;
    transition: all 0.2s ease;
    font-family: 'Inter', system-ui, sans-serif;
    appearance: none;
    /* Updated SVG fill to a darker gray to match theme */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
    height: 2.2rem;
}

    .retro-select:focus {
        background: #ffffff;
        border-color: var(--accent);
        box-shadow: var(--shadow-focus);
    }

/* ===============================
   PHOTO UPLOAD — Rounded Square
=============================== */
.photo-upload-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.photo-placeholder {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md); /* Adjusted to match square image look */
    background: var(--bg-input);
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #94a3b8;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    overflow: hidden;
    position: relative;
}

    .photo-placeholder:hover {
        border-color: var(--accent);
        color: var(--accent);
        background: #eef2ff;
    }

    .photo-placeholder img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.photo-upload-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

    .photo-upload-info .file-label {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text-main);
        cursor: pointer;
    }

        .photo-upload-info .file-label:hover {
            color: var(--accent);
        }

    .photo-upload-info .hint {
        font-size: 0.7rem;
        color: var(--text-muted);
    }

/* ===============================
   CHECKBOXES
=============================== */
.retro-checkbox-group {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}

.retro-checkbox {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-main);
    cursor: pointer;
    user-select: none;
}

    .retro-checkbox input[type="checkbox"],
    .retro-checkbox input[type="radio"] {
        accent-color: var(--accent);
        width: 16px;
        height: 16px;
        cursor: pointer;
        border-radius: 4px;
        border: 1px solid var(--border-color);
    }

        .retro-checkbox input[type="checkbox"]:focus-visible,
        .retro-checkbox input[type="radio"]:focus-visible {
            outline: none;
            box-shadow: var(--shadow-focus);
        }

/* ===============================
   DOCUMENT UPLOAD ITEMS
=============================== */
.doc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-panel);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    border: 1px solid var(--border-color);
    transition: border-color 0.2s ease;
    min-height: 2.5rem;
}

    .doc-item:hover {
        border-color: #cbd5e1;
        background: #f8fafc;
    }

    .doc-item .doc-name {
        font-size: 0.8rem;
        font-weight: 500;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: var(--text-main);
    }

        .doc-item .doc-name i {
            color: var(--accent);
            font-size: 1.1rem;
            background: #eef2ff;
            padding: 4px;
            border-radius: 4px;
        }

.upload-btn {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    font-weight: 500;
}

    .upload-btn:hover {
        background: #f1f5f9;
        border-color: #cbd5e1;
    }

/* ===============================
   ADDITIONAL INFO — chips / tags
=============================== */
.info-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.info-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #eef2ff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid #c7d2fe;
    color: var(--accent);
}

    .info-chip i {
        color: var(--accent);
        font-size: 0.8rem;
    }

/* ===============================
   PRINT STYLES (Preserved exactly as logic dictates)
=============================== */
@media print {
    .retro-sidebar,
    .header-actions,
    .upload-btn,
    .btn-retro {
        display: none !important;
    }

    .enrollment-container {
        margin: 0;
        background: white;
    }

    .retro-panel {
        background: white;
        border: 1px solid #ccc;
        break-inside: avoid;
        box-shadow: none;
    }

    .retro-input {
        border: 1px solid #ccc;
        background: transparent;
    }

    .retro-main {
        padding: 1rem;
    }

    .photo-placeholder {
        border: 1px solid #ccc;
    }

    .retro-checkbox input[type="checkbox"] {
        accent-color: #000;
    }
}

/* ===============================
   RESPONSIVE
=============================== */
@media (max-width: 1300px) {
    .retro-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 992px) {
    .retro-sidebar {
        width: 200px;
        padding: 1.25rem 0.75rem;
    }

    .retro-main {
        padding: 1.25rem;
    }

    .input-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .retro-grid {
        grid-template-columns: 1fr;
    }

    .enrollment-container {
        flex-direction: column;
    }

    .retro-sidebar {
        width: 100%;
        padding: 1rem;
        flex-direction: row;
        flex-wrap: wrap;
        border-bottom: 1px solid var(--border-color);
        gap: 0.5rem;
    }

    .sidebar-logo-title {
        font-size: 1.1rem;
        margin-bottom: 0;
    }

    .sidebar-session {
        margin-bottom: 0;
        margin-left: auto;
        font-size: 0.7rem;
    }

    .sidebar-nav-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        width: auto;
    }

    .retro-main {
        padding: 1rem;
    }

    .header-title {
        font-size: 1.3rem;
    }

    .input-grid-2,
    .input-grid-3 {
        grid-template-columns: 1fr;
    }

    .photo-upload-area {
        flex-direction: column;
        align-items: flex-start;
    }

    .retro-header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        justify-content: flex-start;
    }

    .retro-checkbox-group {
        gap: 0.75rem;
    }

    .doc-item {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .retro-main {
        padding: 0.75rem;
    }

    .retro-panel {
        padding: 1rem;
    }

    .header-title {
        font-size: 1.1rem;
    }

    .retro-sidebar {
        padding: 0.75rem;
    }

    .sidebar-nav-item {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }

        .sidebar-nav-item i {
            font-size: 0.9rem;
        }

    .btn-retro {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
}
