:root {
    --bg-color: #e7ecf3;
    --surface: #e7ecf3;
    --surface-strong: #edf1f6;

    --accent: #4f46e5;
    --accent-hover: #4338ca;
    --accent-soft: rgba(79, 70, 229, 0.10);
    --accent-glow: rgba(79, 70, 229, 0.22);

    --text-main: #172033;
    --text-muted: #5e687c;
    --text-soft: #7d8798;

    --border-color: rgba(255, 255, 255, 0.72);
    --border-dark: rgba(20, 30, 48, 0.08);

    --shadow-light: -7px -7px 16px rgba(255, 255, 255, 0.85);
    --shadow-dark: 8px 8px 18px rgba(163, 174, 194, 0.55);
    --shadow-raised:
        -7px -7px 16px rgba(255, 255, 255, 0.82),
         8px  8px 18px rgba(163, 174, 194, 0.48);

    --shadow-raised-small:
        -4px -4px 10px rgba(255, 255, 255, 0.82),
         5px  5px 12px rgba(163, 174, 194, 0.42);

    --shadow-inset:
        inset -4px -4px 9px rgba(255, 255, 255, 0.82),
        inset  5px  5px 10px rgba(163, 174, 194, 0.42);

    --shadow-inset-soft:
        inset -3px -3px 7px rgba(255, 255, 255, 0.78),
        inset  3px  3px 7px rgba(163, 174, 194, 0.35);

    --danger: #e5484d;
    --success: #1f9d72;

    --header-height: 72px;
    --content-width: 1080px;

    --radius-small: 12px;
    --radius-medium: 18px;
    --radius-large: 26px;

    --transition-fast: 0.18s ease;
    --transition-medium: 0.28s ease;
}


/* =========================================================
   DARK THEME
   ========================================================= */

body.dark-theme {
    --bg-color: #171b22;
    --surface: #171b22;
    --surface-strong: #1d222b;

    --text-main: #f2f5fa;
    --text-muted: #adb6c6;
    --text-soft: #8993a4;

    --border-color: rgba(255, 255, 255, 0.045);
    --border-dark: rgba(0, 0, 0, 0.18);

    --accent: #7c73ff;
    --accent-hover: #918aff;
    --accent-soft: rgba(124, 115, 255, 0.13);
    --accent-glow: rgba(124, 115, 255, 0.24);

    --shadow-light: -7px -7px 15px rgba(255, 255, 255, 0.035);
    --shadow-dark: 8px 8px 18px rgba(0, 0, 0, 0.46);

    --shadow-raised:
        -7px -7px 15px rgba(255, 255, 255, 0.035),
         8px  8px 18px rgba(0, 0, 0, 0.46);

    --shadow-raised-small:
        -4px -4px 10px rgba(255, 255, 255, 0.03),
         5px  5px 12px rgba(0, 0, 0, 0.40);

    --shadow-inset:
        inset -4px -4px 9px rgba(255, 255, 255, 0.025),
        inset  5px  5px 10px rgba(0, 0, 0, 0.46);

    --shadow-inset-soft:
        inset -3px -3px 7px rgba(255, 255, 255, 0.02),
        inset  3px  3px 7px rgba(0, 0, 0, 0.36);
}


/* =========================================================
   GLOBAL RESET
   ========================================================= */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--bg-color);
    color: var(--text-main);

    min-height: 100vh;
    overflow-x: hidden;

    padding: 0 0 42px;
    transition:
        background-color var(--transition-medium),
        color var(--transition-medium);

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

::selection {
    background: var(--accent);
    color: #ffffff;
}


/* =========================================================
   REMOVE OLD GLASS EFFECT
   ========================================================= */

.glass {
    background: var(--surface);
    border: 1px solid var(--border-color);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: var(--shadow-raised);
}


/* =========================================================
   BACKGROUND
   ========================================================= */

.bg-shape {
    position: fixed;
    pointer-events: none;

    border-radius: 50%;
    opacity: 0.06;

    z-index: -1;

    animation: none;
    transform: none;
}

.shape-cyan {
    width: 330px;
    height: 330px;
    top: -150px;
    left: -120px;
    background: #4f46e5;
}

.shape-red {
    width: 270px;
    height: 270px;
    bottom: -110px;
    right: -100px;
    background: #d946ef;
}

.shape-green,
.shape-orange {
    display: none;
}

body.dark-theme .bg-shape {
    opacity: 0.045;
}


/* =========================================================
   INDEPENDENT TOP BAR
   ========================================================= */

.portal-header {
    position: sticky;
    top: 0;
    left: 0;

    width: 100%;
    height: var(--header-height);

    margin: 0;
    padding: 0 24px;

    z-index: 1500;

    background: rgba(231, 236, 243, 0.92);
    border: 0;
    border-bottom: 1px solid var(--border-dark);

    box-shadow:
        0 5px 18px rgba(124, 135, 154, 0.10);

    transition:
        background-color var(--transition-medium),
        box-shadow var(--transition-medium);
}

body.dark-theme .portal-header {
    background: rgba(23, 27, 34, 0.94);
    box-shadow:
        0 5px 18px rgba(0, 0, 0, 0.24);
}

.header-inner {
    width: min(var(--content-width), 100%);
    height: 100%;
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

.brand-block {
    display: flex;
    align-items: center;
    gap: 13px;

    text-decoration: none;
    min-width: 0;
}

.portal-logo-wrap {
    width: 44px;
    height: 44px;

    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--surface);
    box-shadow: var(--shadow-raised-small);

    flex: 0 0 auto;
}

.portal-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.header-text {
    min-width: 0;
}

.brand-name {
    display: block;

    color: var(--text-main);

    font-size: 1.12rem;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -0.35px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-date {
    display: block;

    margin-top: 3px;

    color: var(--text-muted);

    font-size: 0.73rem;
    font-weight: 650;
    line-height: 1.1;

    white-space: nowrap;
}

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

    flex: 0 0 auto;
}

.info-btn {
    width: 42px;
    height: 42px;

    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--surface);
    color: var(--text-main);

    box-shadow: var(--shadow-raised-small);

    font-size: 1rem;
    font-weight: 800;

    cursor: pointer;

    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        color var(--transition-fast),
        background-color var(--transition-medium);
}

.info-btn:hover {
    color: var(--accent);
    transform: translateY(-1px);
}

.info-btn:active {
    transform: translateY(1px);
    box-shadow: var(--shadow-inset-soft);
}

.info-btn:focus-visible {
    outline: 3px solid var(--accent-glow);
    outline-offset: 2px;
}


/* =========================================================
   MAIN CONTENT
   ========================================================= */

.main-content {
    width: min(var(--content-width), calc(100% - 32px));
    margin: 34px auto 0;

    animation: contentIn 0.45s ease both;
}

@keyframes contentIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   TABS + UTILITY ACTIONS
   ========================================================= */

.tabs-container {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 18px;
    margin-bottom: 22px;
}

.tab-group {
    display: flex;
    align-items: center;

    padding: 6px;

    border-radius: var(--radius-medium);

    background: var(--surface);
    border: 1px solid var(--border-color);

    box-shadow: var(--shadow-raised-small);

    flex: 0 0 auto;
}

.tab-btn {
    min-height: 44px;

    padding: 0 22px;

    border-radius: 13px;

    background: transparent;
    color: var(--text-muted);

    font-size: 0.9rem;
    font-weight: 780;

    cursor: pointer;

    transition:
        background-color var(--transition-fast),
        color var(--transition-fast),
        box-shadow var(--transition-fast),
        transform var(--transition-fast);
}

.tab-btn:hover {
    color: var(--text-main);
}

.tab-btn.active {
    background: var(--accent);
    color: #ffffff;

    box-shadow:
        0 6px 14px var(--accent-glow);

    font-weight: 800;
}

.tab-btn:active {
    transform: scale(0.985);
}

.tab-btn:focus-visible {
    outline: 3px solid var(--accent-glow);
    outline-offset: 2px;
}

.utility-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 10px;

    min-width: 0;
}

.blank-btn {
    min-height: 44px;

    padding: 0 17px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border-radius: 13px;

    background: var(--surface);
    color: var(--text-main);

    border: 1px solid var(--border-color);

    box-shadow: var(--shadow-raised-small);

    font-size: 0.84rem;
    font-weight: 750;

    cursor: pointer;

    transition:
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.blank-btn:hover {
    color: var(--accent);
    transform: translateY(-1px);
}

.blank-btn:active {
    transform: translateY(1px);
    box-shadow: var(--shadow-inset-soft);
}

.blank-btn:focus-visible {
    outline: 3px solid var(--accent-glow);
    outline-offset: 2px;
}

.utility-icon {
    font-size: 1rem;
    line-height: 1;
}


/* =========================================================
   MAIN FORM PANEL
   ========================================================= */

.form-panel {
    width: 100%;

    padding: 34px;

    border-radius: var(--radius-large);

    background: var(--surface);

    border: 1px solid var(--border-color);

    box-shadow: var(--shadow-raised);
}


/* =========================================================
   FORM GRID
   ========================================================= */

.form-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 21px 20px;
}

.form-group {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    display: block;

    color: var(--text-main);

    font-size: 0.83rem;
    font-weight: 760;
    line-height: 1.35;
}

.form-group label span {
    color: var(--danger);
    font-weight: 850;
}

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


/* =========================================================
   INPUTS / SELECTS
   ========================================================= */

.form-group input,
.form-group select {
    width: 100%;
    height: 51px;

    padding: 0 15px;

    border: 1px solid transparent;
    border-radius: 14px;

    background: var(--surface);

    color: var(--text-main);

    box-shadow: var(--shadow-inset);

    font-size: 0.92rem;
    font-weight: 600;

    outline: none;

    transition:
        color var(--transition-medium),
        background-color var(--transition-medium),
        box-shadow var(--transition-fast),
        border-color var(--transition-fast);
}

.form-group input:hover,
.form-group select:hover {
    box-shadow: var(--shadow-inset-soft);
}

.form-group input:focus,
.form-group select:focus {
    border-color: rgba(79, 70, 229, 0.38);

    box-shadow:
        inset -3px -3px 7px rgba(255, 255, 255, 0.58),
        inset  3px  3px 7px rgba(163, 174, 194, 0.27),
        0 0 0 3px var(--accent-soft);

    background: var(--surface-strong);
}

body.dark-theme .form-group input:focus,
body.dark-theme .form-group select:focus {
    border-color: rgba(124, 115, 255, 0.45);

    box-shadow:
        inset -3px -3px 7px rgba(255, 255, 255, 0.018),
        inset  3px  3px 7px rgba(0, 0, 0, 0.31),
        0 0 0 3px var(--accent-soft);

    background: var(--surface-strong);
}

.form-group input::placeholder {
    color: var(--text-soft);
    opacity: 0.86;
    font-weight: 520;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;

    cursor: pointer;

    padding-right: 43px;

    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
        linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);

    background-position:
        calc(100% - 18px) 21px,
        calc(100% - 12px) 21px;

    background-size:
        6px 6px,
        6px 6px;

    background-repeat: no-repeat;
}

body.dark-theme .form-group select {
    background-image:
        linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
        linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
}

.form-group input[type="date"] {
    color-scheme: light;
}

body.dark-theme .form-group input[type="date"] {
    color-scheme: dark;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 0.65;
    cursor: pointer;
}


/* =========================================================
   SELECT WRAPPER
   ========================================================= */

.select-wrapper {
    position: relative;
    min-width: 0;
}

.select-wrapper select {
    width: 100%;
}


/* =========================================================
   SEMESTER
   ========================================================= */

.semester-fields {
    width: 100%;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 10px;
}


/* =========================================================
   SECTION HEADINGS
   ========================================================= */

.section-title {
    grid-column: 1 / -1;

    display: flex;
    align-items: center;
    gap: 14px;

    margin: 9px 0 1px;

    color: var(--text-main);

    font-size: 1.08rem;
    font-weight: 850;
    line-height: 1.2;

    letter-spacing: -0.15px;
}

.section-title::after {
    content: "";

    flex: 1;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            rgba(124, 135, 154, 0.24),
            transparent
        );
}


/* =========================================================
   HIDDEN STATES
   ========================================================= */

.hidden {
    display: none !important;
}


/* =========================================================
   FORM ACTIONS
   ========================================================= */

.form-footer {
    width: 100%;

    margin-top: 30px;

    display: flex;
    justify-content: center;
    align-items: stretch;

    gap: 14px;
    flex-wrap: wrap;
}

.generate-btn {
    min-height: 53px;

    min-width: 205px;

    padding: 0 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    border-radius: 15px;

    background: var(--accent);
    color: #ffffff;

    font-size: 0.96rem;
    font-weight: 800;

    box-shadow:
        0 8px 18px var(--accent-glow);

    cursor: pointer;

    transition:
        transform var(--transition-fast),
        box-shadow var(--transition-fast),
        background-color var(--transition-fast);
}

.generate-btn:hover {
    background: var(--accent-hover);

    transform: translateY(-2px);

    box-shadow:
        0 11px 23px var(--accent-glow);
}

.generate-btn:active {
    transform: translateY(1px);

    box-shadow:
        0 5px 11px var(--accent-glow);
}

.generate-btn:focus-visible {
    outline: 3px solid var(--accent-glow);
    outline-offset: 2px;
}

.btn-icon {
    font-size: 1rem;
    line-height: 1;
}


/*
   The email button is intentionally given its own
   neumorphic appearance rather than relying on inline styles.
*/

.email-action-btn {
    background: var(--surface);
    color: var(--text-main);

    border: 1px solid var(--border-color);

    box-shadow: var(--shadow-raised-small);
}

.email-action-btn:hover {
    background: var(--surface);
    color: var(--accent);

    box-shadow: var(--shadow-raised-small);

    transform: translateY(-2px);
}

.email-action-btn:active {
    box-shadow: var(--shadow-inset-soft);
}


/* =========================================================
   FOOTER
   ========================================================= */

.main-footer {
    width: min(var(--content-width), calc(100% - 32px));

    margin: 24px auto 0;
    padding: 20px 22px;

    text-align: center;

    border-radius: var(--radius-medium);

    background: var(--surface);

    border: 1px solid var(--border-color);

    box-shadow: var(--shadow-raised-small);

    color: var(--text-muted);

    font-size: 0.78rem;
    font-weight: 620;
    line-height: 1.65;
}

.main-footer p + p {
    margin-top: 2px;
}

.dev-tag {
    color: var(--text-main);
    font-weight: 800;
}

.generation-counter {
    margin-top: 11px !important;

    color: var(--text-main);

    font-size: 0.81rem;
    font-weight: 760;
}

#generationCounter {
    color: var(--accent);
    font-weight: 850;
}


/* =========================================================
   MODALS
   ========================================================= */

.modal-overlay {
    position: fixed;
    inset: 0;

    padding: 20px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(24, 31, 44, 0.34);

    z-index: 2500;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity var(--transition-medium),
        visibility var(--transition-medium);
}

body.dark-theme .modal-overlay {
    background: rgba(0, 0, 0, 0.58);
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    width: min(430px, 100%);
    max-height: min(760px, calc(100vh - 40px));

    overflow-y: auto;

    padding: 29px;

    position: relative;

    border-radius: 25px;

    background: var(--surface);

    border: 1px solid var(--border-color);

    box-shadow: var(--shadow-raised);

    color: var(--text-main);

    transform: translateY(10px) scale(0.985);

    transition:
        transform var(--transition-medium),
        background-color var(--transition-medium);
}

.modal-overlay.show .modal-card {
    transform: translateY(0) scale(1);
}

.modal-card::-webkit-scrollbar {
    width: 5px;
}

.modal-card::-webkit-scrollbar-thumb {
    background: rgba(120, 130, 148, 0.35);
    border-radius: 999px;
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-title {
    color: var(--text-main);

    font-size: 1.14rem;
    font-weight: 850;

    line-height: 1.25;
}

.modal-subtitle {
    margin-top: 5px;

    color: var(--text-muted);

    font-size: 0.81rem;
    font-weight: 620;

    line-height: 1.45;
}

.close-modal {
    position: absolute;
    top: 14px;
    right: 15px;

    width: 36px;
    height: 36px;

    border-radius: 12px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--surface);
    color: var(--text-muted);

    box-shadow: var(--shadow-raised-small);

    font-size: 1.45rem;
    font-weight: 400;
    line-height: 1;

    cursor: pointer;

    transition:
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.close-modal:hover {
    color: var(--danger);
    transform: scale(1.03);
}

.close-modal:active {
    box-shadow: var(--shadow-inset-soft);
}

.close-modal:focus-visible {
    outline: 3px solid var(--accent-glow);
    outline-offset: 2px;
}


/* =========================================================
   DEVELOPER MODAL
   ========================================================= */

.developer-modal-header {
    padding-top: 4px;
}

.dev-image-wrap {
    width: 88px;
    height: 88px;

    margin: 0 auto 13px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--surface);

    box-shadow: var(--shadow-raised-small);
}

.dev-img {
    width: 72px;
    height: 72px;

    object-fit: cover;

    border-radius: 50%;

    border: 0;
}

.release-card {
    margin-bottom: 17px;
    padding: 17px;

    border-radius: 17px;

    background: var(--surface);

    box-shadow: var(--shadow-inset-soft);
}

.release-card h4 {
    margin-bottom: 11px;

    color: var(--accent);

    font-size: 0.79rem;
    font-weight: 850;

    text-transform: uppercase;
    letter-spacing: 0.7px;
}

.release-card ul {
    padding-left: 18px;

    color: var(--text-muted);

    font-size: 0.78rem;
    font-weight: 560;

    line-height: 1.65;
}

.release-card li + li {
    margin-top: 7px;
}

.release-card b {
    color: var(--text-main);
}


/* =========================================================
   MODAL LINKS
   ========================================================= */

.modal-link {
    width: 100%;

    min-height: 48px;

    margin-bottom: 10px;
    padding: 0 15px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border-radius: 14px;

    background: var(--surface);
    color: var(--text-main);

    border: 1px solid var(--border-color);

    box-shadow: var(--shadow-raised-small);

    text-decoration: none;

    font-size: 0.87rem;
    font-weight: 760;

    transition:
        color var(--transition-fast),
        transform var(--transition-fast),
        box-shadow var(--transition-fast);
}

.modal-link:hover {
    color: var(--accent);
    transform: translateY(-1px);
}

.modal-link:active {
    transform: translateY(1px);
    box-shadow: var(--shadow-inset-soft);
}


/* =========================================================
   EMAIL MODAL
   ========================================================= */

.email-field {
    margin-bottom: 18px;
}

.modal-submit-btn {
    width: 100%;
    min-width: 0;
}

.email-status {
    min-height: 20px;

    margin-top: 13px;

    text-align: center;

    color: var(--accent);

    font-size: 0.8rem;
    font-weight: 760;
    line-height: 1.45;
}


/* =========================================================
   SAMPLE MODAL
   ========================================================= */

.sample-modal-card {
    width: min(520px, 100%);
}

.sample-modal-header {
    margin-bottom: 15px;
}

.sample-modal-body {
    width: 100%;
}

.sample-image-wrap {
    width: 100%;

    padding: 10px;

    border-radius: 18px;

    background: var(--surface);

    box-shadow: var(--shadow-inset-soft);
}

#sampleImage {
    width: 100%;
    height: auto;

    border-radius: 11px;

    border: 1px solid var(--border-color);

    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.10);
}


/* =========================================================
   INTRO / WELCOME SCREEN
   ========================================================= */

.welcome-screen {
    position: fixed;
    inset: 0;

    z-index: 10000;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background: var(--bg-color);

    transition:
        opacity 0.55s ease,
        visibility 0.55s ease;
}

.welcome-backdrop {
    position: absolute;
    inset: 0;

    overflow: hidden;

    pointer-events: none;
}

.welcome-orb {
    position: absolute;

    border-radius: 50%;

    opacity: 0.16;

    animation: welcomeFloat 7s ease-in-out infinite;
}

.welcome-orb-one {
    width: 330px;
    height: 330px;

    top: -160px;
    left: -110px;

    background: var(--accent);
}

.welcome-orb-two {
    width: 260px;
    height: 260px;

    right: -100px;
    bottom: -120px;

    background: #8b5cf6;

    animation-delay: -2s;
}

.welcome-orb-three {
    width: 150px;
    height: 150px;

    top: 26%;
    right: 20%;

    background: #38bdf8;

    opacity: 0.08;

    animation-delay: -4s;
}

@keyframes welcomeFloat {
    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(0, 13px, 0);
    }
}

.welcome-card {
    position: relative;
    z-index: 2;

    width: min(420px, calc(100% - 34px));

    padding: 42px 30px 34px;

    border-radius: 30px;

    background: var(--surface);

    border: 1px solid var(--border-color);

    box-shadow: var(--shadow-raised);

    text-align: center;

    animation: welcomeCardIn 0.65s cubic-bezier(.2,.75,.25,1) both;
}

@keyframes welcomeCardIn {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.welcome-logo-wrap {
    width: 104px;
    height: 104px;

    margin: 0 auto 21px;

    border-radius: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    position: relative;

    background: var(--surface);

    box-shadow: var(--shadow-raised);
}

.welcome-logo-shadow {
    position: absolute;
    inset: 8px;

    border-radius: 24px;

    box-shadow: var(--shadow-inset-soft);

    pointer-events: none;
}

.welcome-small-logo {
    position: relative;
    z-index: 2;

    width: 66px;
    height: 66px;

    object-fit: contain;
}

.welcome-kicker {
    display: block;

    margin-bottom: 7px;

    color: var(--accent);

    font-size: 0.72rem;
    font-weight: 850;

    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.welcome-card h1 {
    color: var(--text-main);

    font-size: clamp(1.8rem, 6vw, 2.2rem);
    font-weight: 900;

    letter-spacing: -0.8px;

    line-height: 1.05;
}

.welcome-content > p {
    margin-top: 10px;

    color: var(--text-muted);

    font-size: 0.88rem;
    font-weight: 580;

    line-height: 1.5;
}

.welcome-loader {
    position: relative;

    width: min(220px, 100%);

    height: 7px;

    margin: 25px auto 14px;

    border-radius: 999px;

    background: var(--surface);

    box-shadow: var(--shadow-inset-soft);

    overflow: hidden;
}

.welcome-loader-track {
    position: absolute;
    inset: 0;

    border-radius: inherit;
}

.welcome-loader-fill {
    position: absolute;

    top: 1px;
    bottom: 1px;
    left: 2px;

    width: 38%;

    border-radius: 999px;

    background: var(--accent);

    box-shadow: 0 2px 8px var(--accent-glow);

    animation: welcomeProgress 1.25s ease-in-out infinite;
}

@keyframes welcomeProgress {
    0% {
        transform: translateX(-120%);
    }

    100% {
        transform: translateX(330%);
    }
}

.welcome-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    color: var(--text-soft);

    font-size: 0.71rem;
    font-weight: 670;
}

.welcome-status-dot {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background: var(--accent);

    box-shadow: 0 0 0 4px var(--accent-soft);

    animation: statusPulse 1.4s ease-in-out infinite;
}

@keyframes statusPulse {
    0%,
    100% {
        opacity: 0.55;
        transform: scale(0.92);
    }

    50% {
        opacity: 1;
        transform: scale(1.08);
    }
}


/* =========================================================
   ACCESSIBILITY / REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {
    .main-content,
    .main-footer,
    .header-inner {
        width: min(100%, calc(100% - 28px));
    }

    .portal-header {
        padding: 0 14px;
    }

    .form-panel {
        padding: 27px;
    }

    .tab-btn {
        padding-left: 18px;
        padding-right: 18px;
    }

    .blank-btn {
        padding-left: 14px;
        padding-right: 14px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

    body {
        padding-bottom: 26px;
    }

    .portal-header {
        height: 65px;

        position: sticky;
        top: 0;

        padding: 0 10px;
    }

    .header-inner {
        width: 100%;
    }

    .brand-block {
        gap: 10px;
    }

    .portal-logo-wrap {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }

    .portal-logo {
        width: 29px;
        height: 29px;
    }

    .brand-name {
        font-size: 1rem;
    }

    .header-date {
        font-size: 0.66rem;

        max-width: 165px;

        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-actions {
        gap: 7px;
    }

    .info-btn {
        width: 38px;
        height: 38px;

        border-radius: 12px;

        font-size: 0.92rem;
    }

    .main-content {
        width: calc(100% - 20px);
        margin-top: 18px;
    }

    .tabs-container {
        flex-direction: column;
        align-items: stretch;

        gap: 10px;

        margin-bottom: 15px;
    }

    .tab-group {
        width: 100%;
        padding: 5px;
    }

    .tab-btn {
        width: 50%;
        min-height: 43px;

        padding: 0 8px;

        font-size: 0.82rem;
    }

    .utility-actions {
        width: 100%;

        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 9px;
    }

    .blank-btn {
        width: 100%;
        min-height: 42px;

        padding: 0 8px;

        font-size: 0.77rem;
    }

    .form-panel {
        padding: 20px 15px;

        border-radius: 21px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .section-title {
        margin: 8px 0 1px;

        font-size: 1rem;
    }

    .form-group label {
        font-size: 0.79rem;
    }

    .form-group input,
    .form-group select {
        height: 49px;

        border-radius: 13px;

        padding-left: 14px;
        padding-right: 14px;

        font-size: 0.88rem;
    }

    .semester-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .form-footer {
        margin-top: 24px;

        flex-direction: column;

        gap: 10px;
    }

    .generate-btn,
    .email-action-btn {
        width: 100%;
        min-width: 0;
        min-height: 51px;
    }

    .main-footer {
        width: calc(100% - 20px);

        margin-top: 18px;
        padding: 16px 13px;

        border-radius: 17px;

        font-size: 0.72rem;
    }

    .generation-counter {
        font-size: 0.76rem;
    }

    .modal-overlay {
        padding: 12px;
        align-items: center;
    }

    .modal-card {
        width: 100%;
        max-height: calc(100vh - 24px);

        padding: 24px 18px 19px;

        border-radius: 22px;
    }

    .modal-title {
        font-size: 1.04rem;
    }

    .modal-subtitle {
        font-size: 0.76rem;
    }

    .close-modal {
        top: 11px;
        right: 11px;

        width: 34px;
        height: 34px;
    }

    .release-card {
        padding: 14px;
    }

    .release-card ul {
        font-size: 0.75rem;
    }

    .dev-image-wrap {
        width: 78px;
        height: 78px;
    }

    .dev-img {
        width: 62px;
        height: 62px;
    }

    .welcome-card {
        width: calc(100% - 28px);

        padding: 34px 20px 29px;

        border-radius: 25px;
    }

    .welcome-logo-wrap {
        width: 92px;
        height: 92px;

        border-radius: 26px;
    }

    .welcome-small-logo {
        width: 58px;
        height: 58px;
    }

    .welcome-card h1 {
        font-size: 1.8rem;
    }

    .welcome-content > p {
        font-size: 0.82rem;
    }

    .welcome-loader {
        width: 190px;
        margin-top: 22px;
    }

    .welcome-status {
        font-size: 0.68rem;
    }

    .bg-shape {
        display: none;
    }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 390px) {
    .header-date {
        max-width: 135px;
    }

    .brand-name {
        font-size: 0.94rem;
    }

    .info-btn {
        width: 36px;
        height: 36px;
    }

    .main-content {
        width: calc(100% - 16px);
    }

    .form-panel {
        padding-left: 12px;
        padding-right: 12px;
    }

    .tab-btn {
        font-size: 0.78rem;
    }

    .blank-btn {
        font-size: 0.72rem;
    }

    .welcome-card {
        width: calc(100% - 22px);
        padding-left: 16px;
        padding-right: 16px;
    }
}


/* =========================================================
   VERY TALL / SHORT MOBILE SCREENS
   ========================================================= */

@media (max-height: 680px) and (max-width: 768px) {
    .welcome-card {
        padding-top: 25px;
        padding-bottom: 23px;
    }

    .welcome-logo-wrap {
        width: 78px;
        height: 78px;
        margin-bottom: 14px;
    }

    .welcome-small-logo {
        width: 49px;
        height: 49px;
    }

    .welcome-card h1 {
        font-size: 1.55rem;
    }

    .welcome-content > p {
        margin-top: 7px;
    }

    .welcome-loader {
        margin-top: 16px;
        margin-bottom: 10px;
    }
}

.seo-info {
    width: min(var(--content-width), calc(100% - 32px));

    margin: 24px auto 0;
    padding: 22px 24px;

    border-radius: var(--radius-medium);

    background: var(--surface);

    border: 1px solid var(--border-color);

    box-shadow: var(--shadow-raised-small);

    color: var(--text-muted);

    text-align: center;
}

.seo-info h2 {
    margin-bottom: 8px;

    color: var(--text-main);

    font-size: 1rem;
    font-weight: 850;
}

.seo-info p {
    max-width: 780px;

    margin: 0 auto;

    font-size: 0.78rem;
    line-height: 1.65;
}

.seo-info p + p {
    margin-top: 7px;
}

@media (max-width: 768px) {
    .seo-info {
        width: calc(100% - 20px);
        padding: 17px 15px;
    }
}