* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


:root {
    --background: #f4f7fb;
    --surface: #ffffff;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --text: #172033;
    --muted: #64748b;
    --border: #dbe2ea;
    --danger: #dc2626;
    --success: #16a34a;
    --yellow: #facc15;
}


body {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);
    color: var(--text);
}


.hidden {
    display: none !important;
}


/* STUDENT PAGE */

.page {
    min-height: 100vh;

    display: flex;
    flex-direction: column;

    justify-content: center;
    align-items: center;

    padding: 40px 20px;
}


.card {
    width: 100%;
    max-width: 850px;

    background: var(--surface);

    border: 1px solid var(--border);

    border-radius: 20px;

    padding: 42px;

    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.08);
}


.brand {
    /* display: flex; */
    gap: 18px;
    /* align-items: center; */

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 12px;


    /* align-items: center; */
    /* justify-content: center; */

    margin-bottom: 42px;
    text-align: center;
}


.brand-icon {
    width: 54px;
    height: 54px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eff6ff;

    border-radius: 14px;

    font-size: 26px;
}


.brand h1 {
    font-size: 25px;
}


.brand p {
    margin-top: 4px;
    color: var(--muted);
}


.section-heading {
    display: flex;
    gap: 15px;

    margin-bottom: 25px;
}


.section-heading > span {
    width: 34px;
    height: 34px;

    display: flex;
    justify-content: center;
    align-items: center;

    background: #eff6ff;
    color: var(--primary);

    border-radius: 10px;

    font-weight: 700;
}


.section-heading h2 {
    font-size: 19px;
}


.section-heading p {
    color: var(--muted);
    font-size: 14px;

    margin-top: 4px;
}


.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 20px;
}


.form-group {
    margin-bottom: 22px;
}


.form-group label {
    display: block;

    font-size: 14px;
    font-weight: 600;

    margin-bottom: 8px;
}


input,
select,
textarea {
    width: 100%;

    border: 1px solid var(--border);

    border-radius: 10px;

    padding: 13px 14px;

    font: inherit;

    color: var(--text);

    background: white;

    outline: none;

    transition: 0.2s;
}


input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.1);
}


textarea {
    resize: vertical;
    min-height: 140px;
}


small {
    color: var(--muted);
    display: block;
    margin-top: 6px;
    font-size: 12px;
}


.label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}


#wordCounter {
    color: var(--muted);
    font-size: 12px;
}


.primary-button,
.secondary-button,
.danger-button,
.save-button,
.logout-button,
.text-button {
    border: none;

    font: inherit;
    font-weight: 600;

    cursor: pointer;

    transition: 0.2s;
}


.primary-button {
    width: 100%;

    padding: 14px 18px;

    background: var(--primary);
    color: white;

    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}


.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}


.secondary-button {
    padding: 12px 18px;

    background: #f1f5f9;
    color: var(--text);

    border-radius: 9px;
}


.secondary-button:hover {
    background: #e2e8f0;
}


.danger-button {
    padding: 12px 18px;

    background: var(--danger);
    color: white;

    border-radius: 9px;
}


.danger-button:hover {
    background: #b91c1c;
}


.full-width {
    width: 100%;
}


.student-banner {
    background: #f8fafc;

    border: 1px solid var(--border);

    padding: 14px 16px;

    border-radius: 10px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    margin-bottom: 30px;
}


.small-label {
    display: block;

    font-size: 10px;

    color: var(--muted);

    letter-spacing: 0.08em;

    margin-bottom: 3px;
}


.student-banner strong {
    font-size: 14px;
}


.text-button {
    background: transparent;
    color: var(--primary);
}


.text-button:hover {
    text-decoration: underline;
}


/* SUCCESS */

.success-section {
    text-align: center;

    padding: 20px 0;
}


.success-icon {
    width: 75px;
    height: 75px;

    display: flex;
    justify-content: center;
    align-items: center;

    margin: 0 auto 20px;

    border-radius: 50%;

    background: #dcfce7;
    color: var(--success);

    font-size: 35px;
    font-weight: 700;
}


.success-section h2 {
    font-size: 25px;
}


.success-section > p {
    color: var(--muted);

    max-width: 500px;

    margin: 10px auto 25px;

    line-height: 1.6;
}


.success-details {
    display: flex;

    justify-content: center;

    gap: 15px;

    margin-bottom: 25px;
}


.success-details div {
    background: #f8fafc;

    border: 1px solid var(--border);

    border-radius: 10px;

    padding: 12px 25px;
}


.success-details span {
    display: block;

    font-size: 11px;

    color: var(--muted);

    margin-bottom: 3px;
}


.success-details strong {
    font-size: 18px;
}


footer .dept {
    color: var(--muted);

    font-size: 12px;

    margin-top: 20px;

    padding-bottom: 0px;
}


/* MODALS */

.modal {
    position: fixed;

    inset: 0;

    background: rgba(15, 23, 42, 0.55);

    display: flex;

    justify-content: center;
    align-items: center;

    padding: 20px;

    z-index: 1000;
}


.modal-box {
    width: 100%;
    max-width: 440px;

    background: white;

    border-radius: 16px;

    padding: 30px;

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.2);
}


.modal-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #fee2e2;

    color: var(--danger);

    font-weight: 800;

    margin-bottom: 15px;
}


.modal-icon.warning {
    background: #fef3c7;
    color: #b45309;
}


.modal-box h2 {
    margin-bottom: 8px;
}


.modal-box p {
    color: var(--muted);
    line-height: 1.6;
}


.modal-actions {
    display: flex;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 25px;
}


@media (max-width: 650px) {

    .page {
        padding: 24px 14px;
    }

    .card {
        padding: 28px 20px;
        border-radius: 16px;
    }

    .brand {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 32px;
    }

    .brand-icon {
        width: 50px;
        height: 50px;
        font-size: 23px;
    }

    .brand h1 {
        font-size: clamp(20px, 6vw, 23px);
    }

    .brand p {
        font-size: 13px;
    }

    .section-heading {
        gap: 11px;
        margin-bottom: 20px;
    }

    .section-heading h2 {
        font-size: 17px;
    }

    .section-heading p {
        font-size: 13px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group label {
        font-size: 13px;
    }

    input,
    select,
    textarea {
        padding: 12px;
        font-size: 14px;
    }

    textarea {
        min-height: 120px;
    }

    .primary-button {
        padding: 13px 16px;
        font-size: 14px;
    }

    .student-banner {
        padding: 12px 13px;
        margin-bottom: 24px;
    }

    .student-banner strong {
        font-size: 13px;
    }

    .success-section h2 {
        font-size: 22px;
    }

    .success-details {
        flex-direction: column;
    }

    footer {
        font-size: 11px;
        margin-top: 16px;
    }
}

@media (max-width: 400px) {

    .page {
        padding: 16px 10px;
    }

    .card {
        padding: 24px 16px;
        border-radius: 14px;
    }

    .brand {
        margin-bottom: 28px;
    }

    .brand h1 {
        font-size: 20px;
    }

    .brand p {
        font-size: 12px;
    }

    .section-heading > span {
        width: 30px;
        height: 30px;
        font-size: 12px;
        flex-shrink: 0;
    }

    .section-heading h2 {
        font-size: 16px;
    }

    .section-heading p {
        font-size: 12px;
    }

    .form-group {
        margin-bottom: 18px;
    }

    .primary-button {
        font-size: 13px;
    }
}
