/* =============================================================================
   SANKALP INSTITUTE — Authentication & Dashboards
   -----------------------------------------------------------------------------
   Login, registration, password reset and the two dashboards. Everything here
   reuses the tokens defined in style.css, so the auth screens inherit the same
   palette, radii, shadows and typography as the rest of the site.
   ========================================================================== */

/* Layout ------------------------------------------------------------------ */
.auth-section {
    padding-top: clamp(2.5rem, 1.5rem + 3vw, 4rem);
}

/* Auth card --------------------------------------------------------------- */
.auth-card {
    max-width: 480px;
    margin-inline: auto;
    padding: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
    border-radius: var(--r-lg);
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.auth-card--wide {
    max-width: 760px;
}

.auth-card__head {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-card__icon {
    display: inline-grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin-bottom: 1rem;
    border-radius: 20px;
    background: var(--grad-brand);
    color: var(--white);
    font-size: 1.4rem;
    box-shadow: var(--shadow-brand);
}

.auth-card--admin .auth-card__icon {
    background: var(--grad-dark);
    box-shadow: 0 14px 32px rgba(17, 17, 17, .28);
}

.auth-card__title {
    font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem);
    margin-bottom: .35rem;
}

.auth-card__subtitle {
    margin: 0;
    font-size: .92rem;
    color: var(--muted);
}

.auth-card__note {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    margin: 1.25rem 0 0;
    padding: .75rem .9rem;
    border-radius: var(--r-sm);
    background: var(--surface-soft);
    font-size: .8rem;
    color: var(--muted);
}

.auth-card__note i {
    margin-top: .15rem;
    color: var(--success);
}

.auth-card__footer {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px dashed var(--line);
    text-align: center;
    font-size: .9rem;
    color: var(--muted);
}

.auth-card__footer a {
    font-weight: 600;
}

/* Auth form --------------------------------------------------------------- */
.auth-form__field {
    margin-bottom: 1.1rem;
}

.auth-form__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.4rem;
}

.auth-form__link {
    font-size: .86rem;
    font-weight: 500;
}

.auth-form__hint {
    margin: .4rem 0 0;
    font-size: .78rem;
    color: var(--muted-soft);
}

/* Checkbox */
.auth-check {
    display: inline-flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .88rem;
    color: var(--ink-70);
    cursor: pointer;
}

.auth-check input {
    width: 18px;
    height: 18px;
    margin-top: .12rem;
    flex-shrink: 0;
    accent-color: var(--brand);
    cursor: pointer;
}

/* Show/hide password */
.input-icon__toggle {
    position: absolute;
    right: .6rem;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--muted-soft);
    font-size: .85rem;
    cursor: pointer;
    transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}

.input-icon__toggle:hover {
    color: var(--brand);
    background: rgba(229, 57, 53, .08);
}

.input-icon:has(.input-icon__toggle) .form-control {
    padding-right: 3rem;
}

/* Dashboards -------------------------------------------------------------- */
.dash-alert {
    max-width: 900px;
    margin-inline: auto;
}

.dash-row {
    margin-top: 1.5rem;
}

.dash-card {
    height: 100%;
    padding: clamp(1.35rem, 1rem + 1.2vw, 1.9rem);
    border-radius: var(--r-lg);
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}

.dash-card+.dash-card {
    margin-top: 1.5rem;
}

.dash-card__title {
    font-size: 1.05rem;
    margin-bottom: 1.15rem;
    padding-bottom: .75rem;
    border-bottom: 1px dashed var(--line);
}

/* Profile block */
.dash-profile {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin-bottom: 1.35rem;
}

.dash-profile__avatar {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--grad-brand);
    color: var(--white);
    font-size: 1.4rem;
    font-weight: 700;
    box-shadow: var(--shadow-brand);
}

.dash-profile__name {
    font-size: 1.1rem;
    margin: 0;
}

.dash-profile__role {
    margin: 0;
    font-size: .82rem;
    font-weight: 600;
    color: var(--brand);
}

.dash-list {
    display: grid;
    gap: .7rem;
    font-size: .88rem;
    color: var(--ink-70);
}

.dash-list li {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    word-break: break-word;
}

.dash-list i {
    margin-top: .2rem;
    width: 18px;
    color: var(--brand);
}

.dash-logout {
    margin-top: 1.4rem;
}

/* Quick actions */
.dash-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .85rem;
}

.dash-action {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .9rem 1rem;
    border-radius: var(--r-md);
    background: var(--surface-soft);
    border: 1px solid transparent;
    color: var(--ink);
    transition: transform var(--t) var(--ease), border-color var(--t) var(--ease), background var(--t) var(--ease);
}

.dash-action:hover {
    transform: translateY(-3px);
    background: var(--white);
    border-color: rgba(229, 57, 53, .25);
    color: var(--ink);
}

.dash-action__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--grad-brand-soft);
    color: var(--brand);
}

.dash-action strong {
    display: block;
    font-size: .92rem;
    line-height: 1.3;
}

.dash-action small {
    font-size: .76rem;
    color: var(--muted);
}

/* Recommended courses */
.dash-courses {
    display: grid;
    gap: .7rem;
}

.dash-courses li {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .75rem .9rem;
    border-radius: var(--r-sm);
    border: 1px solid var(--line);
}

.dash-courses__icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--grad-brand-soft);
    color: var(--brand);
}

.dash-courses__body {
    flex: 1;
    min-width: 0;
}

.dash-courses__body strong {
    display: block;
    font-size: .92rem;
}

.dash-courses__body small {
    font-size: .76rem;
    color: var(--muted);
}

.dash-courses__link {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--brand);
    font-size: .8rem;
}

.dash-courses__link:hover {
    background: var(--grad-brand);
    color: var(--white);
}

/* Admin stat tiles */
.dash-stat {
    height: 100%;
    padding: 1.5rem 1.35rem;
    border-radius: var(--r-lg);
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
    text-align: center;
    transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease);
}

.dash-stat:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.dash-stat__icon {
    display: inline-grid;
    place-items: center;
    width: 50px;
    height: 50px;
    margin-bottom: .8rem;
    border-radius: 16px;
    background: var(--grad-brand-soft);
    color: var(--brand);
    font-size: 1.15rem;
}

.dash-stat__value {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.dash-stat__label {
    margin: .45rem 0 0;
    font-size: .84rem;
    color: var(--muted);
}

/* Admin lists */
.dash-message+.dash-message,
.dash-student+.dash-student {
    margin-top: .9rem;
    padding-top: .9rem;
    border-top: 1px dashed var(--line);
}

.dash-message__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.dash-message__head strong {
    color: var(--ink);
}

.dash-message__head span {
    font-size: .76rem;
    color: var(--muted-soft);
    white-space: nowrap;
}

.dash-message__subject {
    margin: .2rem 0;
    font-size: .9rem;
    color: var(--ink-70);
}

.dash-message__meta {
    margin: 0;
    font-size: .8rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.dash-student {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.dash-student__avatar {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--grad-brand-soft);
    color: var(--brand);
    font-weight: 700;
}

.dash-student__body {
    flex: 1;
    min-width: 0;
}

.dash-student__body strong {
    display: block;
    font-size: .9rem;
}

.dash-student__body small {
    font-size: .76rem;
    color: var(--muted);
    word-break: break-all;
}

.dash-student__date {
    font-size: .76rem;
    color: var(--muted-soft);
    white-space: nowrap;
}

.dash-empty {
    margin: 0;
    padding: 1.5rem 0;
    text-align: center;
    color: var(--muted);
    font-size: .9rem;
}

/* Responsive -------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .dash-actions {
        grid-template-columns: 1fr;
    }

    .auth-form__row {
        flex-direction: column;
        align-items: flex-start;
    }

    .dash-card+.dash-card {
        margin-top: 1.25rem;
    }
}

/* Registration form — section steps, photo upload, confirmation ----------- */
.reg-step {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin: 1.75rem 0 1rem;
    padding-bottom: .6rem;
    border-bottom: 1px dashed var(--line);
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink);
}

.reg-step:first-of-type { margin-top: .25rem; }

.reg-step span {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--grad-brand);
    color: #fff;
    font-size: .78rem;
}

.reg-photo {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    flex-wrap: wrap;
}

.reg-photo__preview {
    width: 118px;
    height: 142px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border: 2px dashed var(--line);
    border-radius: var(--r-sm);
    background: var(--surface-soft);
    color: var(--muted-soft);
    font-size: 2rem;
    overflow: hidden;
}

.reg-photo__preview img { width: 100%; height: 100%; object-fit: cover; }
.reg-photo__field { flex: 1; min-width: 240px; }

.reg-note {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .85rem 1rem;
    border-radius: var(--r-sm);
    background: rgba(255, 152, 0, .1);
    border: 1px solid rgba(255, 152, 0, .25);
    font-size: .84rem;
    color: var(--ink-70);
}

.reg-note i { margin-top: .15rem; color: var(--accent-dark); }

/* Confirmation page */
.reg-done {
    padding: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border-radius: var(--r-md);
    background: var(--grad-brand-soft);
    border: 1px solid rgba(229, 57, 53, .18);
}

.reg-done__label {
    margin: 0;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--muted);
}

.reg-done__id {
    margin: .3rem 0;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: .04em;
    background: var(--grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.reg-done__hint { margin: 0; font-size: .8rem; color: var(--muted); }

.reg-timeline { display: grid; gap: 1rem; margin-bottom: 1.4rem; }

.reg-timeline li { display: flex; gap: .85rem; align-items: flex-start; }

.reg-timeline strong { display: block; font-size: .9rem; color: var(--ink); }
.reg-timeline small { font-size: .8rem; color: var(--muted); }

.reg-timeline__dot {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--muted-soft);
    font-size: .8rem;
}

.reg-timeline .is-done .reg-timeline__dot { background: rgba(46, 125, 50, .12); color: var(--success); }
.reg-timeline .is-current .reg-timeline__dot { background: var(--grad-brand); color: #fff; }

/* Dashboard status banner for pending / rejected students */
.status-banner {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: var(--r-md);
    font-size: .9rem;
}

.status-banner i { font-size: 1.2rem; margin-top: .1rem; }

.status-banner--pending {
    background: rgba(255, 152, 0, .1);
    border: 1px solid rgba(255, 152, 0, .28);
    color: var(--ink-70);
}

.status-banner--pending i { color: var(--accent-dark); }

.badge-chip {
    display: inline-block;
    padding: .3rem .75rem;
    border-radius: var(--r-pill);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    font-size: .82rem;
    color: var(--ink-70);
}


/* =============================================================================
   Class Notes library
   -----------------------------------------------------------------------------
   The student's study library: one block per subject, one row per document.
   Reuses the same tokens as the dashboard cards above, so the page belongs to
   the site rather than to the reader it opens.
   ========================================================================== */

.notes-intro {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
    padding: clamp(1.25rem, 1rem + 1vw, 1.9rem);
    margin-bottom: 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--grad-brand-soft);
}

.notes-intro__title {
    margin: 0 0 .35rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ink);
}

.notes-intro__text {
    margin: 0;
    max-width: 62ch;
    font-size: var(--fs-sm);
    color: var(--muted);
}

.notes-batches {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.notes-batches__item {
    display: flex;
    gap: .6rem;
    align-items: center;
    padding: .6rem .9rem;
    border-radius: var(--r-sm);
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-xs);
}

.notes-batches__item i {
    color: var(--brand);
}

.notes-batches__item strong {
    display: block;
    font-size: .9rem;
    line-height: 1.2;
    color: var(--ink);
}

.notes-batches__item small {
    font-size: .76rem;
    color: var(--muted-soft);
}

/* Subject group ----------------------------------------------------------- */
.notes-subject {
    margin-bottom: 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.notes-subject__head {
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface-soft);
}

.notes-subject__title {
    display: flex;
    gap: .6rem;
    align-items: center;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}

.notes-subject__title i {
    color: var(--brand);
}

.notes-subject__count {
    font-size: .78rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.notes-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Document row ------------------------------------------------------------ */
.notes-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--line);
    transition: background var(--t-fast) var(--ease);
}

.notes-item:last-child {
    border-bottom: 0;
}

.notes-item:hover {
    background: var(--surface-soft);
}

.notes-item__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    border-radius: var(--r-sm);
    background: var(--grad-brand-soft);
    color: var(--brand);
    font-size: 1.1rem;
}

.notes-item__body {
    flex: 1 1 auto;
    min-width: 0;
}

.notes-item__title {
    margin: 0 0 .3rem;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
    color: var(--ink);
}

.notes-item__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .7rem;
    align-items: center;
    margin: 0;
    font-size: .78rem;
    color: var(--muted);
}

.notes-item__text {
    margin: .45rem 0 0;
    font-size: .84rem;
    line-height: 1.55;
    color: var(--muted);
}

.notes-item__dot::before {
    content: '2';
    margin-right: .45rem;
    color: var(--muted-soft);
}

.notes-item__meta > .notes-chip + .notes-item__dot::before,
.notes-item__meta > .notes-item__dot:first-child::before {
    content: none;
    margin: 0;
}

.notes-chip {
    display: inline-flex;
    padding: .2rem .6rem;
    border-radius: var(--r-pill);
    background: rgba(229, 57, 53, .1);
    color: var(--brand-dark);
    font-size: .72rem;
    font-weight: 600;
}

.notes-chip--soft {
    background: var(--surface-soft);
    color: var(--muted);
}

.notes-item__cta {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* Empty state ------------------------------------------------------------- */
.notes-empty {
    text-align: center;
}

.notes-empty__icon {
    display: inline-grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin-bottom: 1rem;
    border-radius: 22px;
    background: var(--grad-brand-soft);
    color: var(--brand);
    font-size: 1.6rem;
}

.notes-empty h3 {
    margin: 0 0 .5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.notes-empty p {
    max-width: 46ch;
    margin: 0 auto 1.25rem;
    font-size: var(--fs-sm);
    color: var(--muted);
}

@media (max-width: 575.98px) {
    .notes-item {
        flex-wrap: wrap;
    }

    .notes-item__cta {
        width: 100%;
        justify-content: center;
    }
}
