/* Student dashboard & catalog theme enhancements */

:root {
    --student-gradient-start: #5f80ff;
    --student-gradient-end: #8644ff;
    --student-surface: #f4f5ff;
    --student-border: rgba(255, 255, 255, 0.25);
    --student-card-radius: 1.25rem;
    --student-shadow: 0 20px 45px rgba(30, 37, 94, 0.18);
    --lender-gradient-start: #0ea5e9;
    --lender-gradient-end: #6366f1;
    --lender-surface: #f3f4f6;
    --lender-card-radius: 1.25rem;
    --lender-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}

body.app-body.auth-surface {
    background: linear-gradient(180deg, #f2f4f8 0%, #ffffff 60%);
}

.auth-wrapper {
    min-height: calc(100vh - 140px);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

.auth-card {
    width: 100%;
    border-radius: 1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background-color: #fff;
}

.auth-card__body {
    padding: clamp(1.5rem, 3vw, 2.5rem);
}

.auth-card__header {
    max-width: 520px;
    margin: 0 auto;
}

.auth-card__badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    background: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.auth-card__title {
    font-weight: 600;
    color: #1a2240;
}

.auth-card__subtitle {
    color: #6c757d;
    font-size: 0.95rem;
}

.auth-info-list {
    display: grid;
    gap: 0.6rem;
    text-align: left;
    font-size: 0.92rem;
}

.auth-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}

.auth-info-list i {
    color: #0d6efd;
    font-size: 1rem;
    margin-top: 0.1rem;
}

.auth-form .form-label {
    font-weight: 500;
    color: #2f3b57;
}

.auth-form .form-control {
    border-radius: 0.65rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background-color: #fff;
}

.auth-form .form-control:focus {
    border-color: rgba(13, 110, 253, 0.45);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.1);
}

.auth-form .form-check-label {
    color: #6c757d;
}

.auth-form .btn-primary {
    border-radius: 0.65rem;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.auth-link {
    color: #0d6efd;
    font-weight: 500;
}

.auth-link:hover {
    color: #0a58ca;
}

.auth-footer {
    font-size: 0.9rem;
}

.auth-form .form-check-input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.2rem;
}

.auth-form .form-check-input:disabled {
    opacity: 0.5;
}

@media (max-width: 575.98px) {
    .auth-card__body {
        padding: 2rem 1.5rem;
    }

    .auth-info-list {
        gap: 0.5rem;
    }
}

.catalog-hero {
    border-radius: calc(var(--student-card-radius) * 1.35);
    padding: clamp(2rem, 4vw, 3rem);
    position: relative;
    background: rgba(18, 25, 64, 0.9);
    color: #fff;
    overflow: hidden;
    box-shadow: var(--student-shadow);
}

.catalog-hero__background {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(95, 128, 255, 0.8), transparent 55%),
        radial-gradient(circle at 85% 15%, rgba(134, 68, 255, 0.75), transparent 50%),
        radial-gradient(circle at 50% 90%, rgba(35, 45, 108, 0.95), transparent 65%);
    opacity: 0.9;
}

.catalog-hero .row {
    position: relative;
    z-index: 1;
}

.catalog-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.85);
    text-transform: uppercase;
    font-weight: 700;
}

.catalog-hero__badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5f80ff, #8644ff);
}

.catalog-hero__muted {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.05rem;
    max-width: 32rem;
}

.catalog-hero__card {
    position: relative;
    border-radius: calc(var(--student-card-radius) * 1.1);
    background: linear-gradient(140deg, rgba(95, 128, 255, 0.35), rgba(134, 68, 255, 0.6));
    padding: 2rem;
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.catalog-hero__icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.15);
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    color: #fff;
}

.catalog-filter {
    border-radius: calc(var(--student-card-radius) * 1.1);
    padding: clamp(1.5rem, 3vw, 2rem);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: var(--student-shadow);
}

.catalog-filter .form-label {
    font-weight: 600;
    color: rgba(13, 27, 62, 0.65);
}

.catalog-filter .input-group-text {
    color: rgba(13, 27, 62, 0.45);
}

.catalog-filter .btn-primary {
    border-radius: 0.85rem;
}

.catalog-card {
    border-radius: calc(var(--student-card-radius) * 0.9);
    overflow: hidden;
}

.catalog-card__media {
    position: relative;
    padding-top: 65%;
}

.catalog-card__image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(18, 25, 64, 0.08);
}

.catalog-card__image--placeholder {
    display: grid;
    place-items: center;
    color: rgba(18, 25, 64, 0.25);
    font-size: 2rem;
    background: rgba(95, 128, 255, 0.12);
}

.catalog-card__category {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: rgba(18, 25, 64, 0.85);
    color: rgba(255, 255, 255, 0.9);
}

.catalog-card__title {
    font-size: 1.1rem;
    color: #1d2758;
    font-weight: 600;
}

.catalog-card__price {
    font-weight: 700;
    color: #5f80ff;
}

.catalog-card__description {
    color: rgba(13, 27, 62, 0.65);
    font-size: 0.95rem;
}

.catalog-card__meta {
    font-weight: 500;
    color: rgba(13, 27, 62, 0.45);
}

.empty-state {
    border-radius: calc(var(--student-card-radius) * 1.2);
    background: rgba(18, 25, 64, 0.03);
    box-shadow: inset 0 0 0 1px rgba(18, 25, 64, 0.05);
}

.empty-state__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(95, 128, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #5f80ff;
}

.catalog-card .btn-primary {
    border-radius: 0.75rem;
}

.catalog-card .btn-link {
    color: #5f80ff;
}

.catalog-card .btn-link:hover {
    color: #3246a8;
}

@media (max-width: 991.98px) {
    .catalog-hero {
        text-align: center;
    }

    .catalog-hero__card {
        margin-inline: auto;
    }

    .catalog-filter .row > * {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .catalog-hero {
        padding: 2rem 1.5rem;
    }

    .catalog-card__media {
        padding-top: 60%;
    }
}

/* Auth pages */

body.app-body.auth-surface {
    background: linear-gradient(180deg, rgba(18, 25, 64, 0.95) 0%, rgba(37, 53, 140, 0.7) 45%, rgba(247, 248, 255, 0.9) 100%);
}

body.app-body.dashboard-page {
    background: linear-gradient(180deg, rgba(244, 246, 255, 0.85) 0%, rgba(255, 255, 255, 0.95) 100%);
}

body.app-body.student-surface main {
    background: none;
}

body.app-body.student-surface .navbar {
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.student-dashboard {
    position: relative;
}

.student-dashboard__section-title {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.14em;
    color: rgba(71, 85, 105, 0.8);
}

.student-dashboard__heading {
    font-weight: 700;
    color: #1e293b;
}

.student-dashboard__lead {
    color: #475569;
    max-width: 42rem;
}

.student-stats-card {
    position: relative;
    border-radius: calc(var(--student-card-radius) * 1.1);
    background: var(--student-card-accent, linear-gradient(135deg, rgba(95, 128, 255, 0.25), rgba(134, 68, 255, 0.45)));
    color: #1e1e2f;
    overflow: hidden;
}

.student-stats-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0) 70%);
    pointer-events: none;
}

.student-stats-card__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.75);
    color: rgba(30, 41, 59, 0.85);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.student-stats-card__badge .icon-wrapper {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(13, 110, 253, 0.18);
    color: #0d6efd;
    font-size: 1.1rem;
}

.student-stats-card__value {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    color: #111827;
    position: relative;
    z-index: 1;
}

.student-stats-card__sparkline {
    position: absolute;
    inset: auto -10% -10% auto;
    width: 70%;
    height: 70%;
    opacity: 0.35;
    z-index: 0;
}

.student-table .card-header {
    padding: 1.25rem 1.5rem 0.75rem;
}

.student-table .table {
    --bs-table-hover-bg: rgba(226, 232, 240, 0.35);
    font-size: 0.95rem;
}

.student-table__empty {
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #64748b;
}

.student-card-title {
    font-weight: 600;
    color: #1e293b;
}

.student-recommend {
    border-radius: calc(var(--student-card-radius) * 1.1);
    background: linear-gradient(140deg, rgba(30, 41, 59, 0.95), rgba(79, 70, 229, 0.88));
    color: #fff;
    overflow: hidden;
    box-shadow: var(--student-shadow);
}

.student-recommend__header {
    padding: 1.75rem 1.75rem 0;
}

.student-recommend__items {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.student-recommend .item-card {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(6px);
}

.student-recommend .item-card:hover {
    background: rgba(255, 255, 255, 0.12);
}

.student-recommend .item-thumb {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    display: grid;
    place-items: center;
}

.student-recommend .item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.student-recommend__price {
    font-weight: 700;
}

.student-recommend__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #cbd5f5;
    text-decoration: none;
    font-weight: 600;
}

.student-recommend__link .bi {
    transition: transform 0.2s ease;
}

.student-recommend__link:hover .bi {
    transform: translateX(4px);
}

@media (max-width: 767.98px) {
    .student-recommend .item-card {
        grid-template-columns: 48px 1fr;
        gap: 0.75rem;
    }

    .student-recommend__items {
        padding: 1.25rem;
    }
}

body.app-body.lender-surface .navbar {
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 25px rgba(2, 6, 23, 0.08);
}

.lender-dashboard {
    position: relative;
}

.lender-hero {
    border-radius: calc(var(--lender-card-radius) * 1.1);
    background: radial-gradient(circle at 15% 20%, rgba(81, 207, 255, 0.75), transparent 60%),
        radial-gradient(circle at 85% 25%, rgba(105, 108, 255, 0.65), transparent 55%),
        linear-gradient(135deg, rgba(14, 165, 233, 0.9), rgba(99, 102, 241, 0.85));
    color: #fff;
    box-shadow: var(--lender-shadow);
}

.lender-hero__background {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.08);
    mix-blend-mode: lighten;
    opacity: 0.45;
}

.lender-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.2);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.lender-hero__title {
    font-weight: 700;
    color: #ffffff;
}

.lender-hero__lead {
    color: rgba(255, 255, 255, 0.82);
    max-width: 30rem;
}

.lender-hero__metric {
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.18);
    padding: 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    color: rgba(255, 255, 255, 0.92);
}

.lender-hero__metric strong {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
}

.lender-hero__metric .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.lender-hero__metric .hint {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.lender-hero__metric--accent {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.14);
}

.lender-stats-card {
    border-radius: calc(var(--lender-card-radius) * 1.05);
    background: #fff;
    position: relative;
    overflow: hidden;
}

.lender-stats-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--lender-card-accent, linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(99, 102, 241, 0.28)));
    opacity: 0.55;
}

.lender-stats-card__icon {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(14, 165, 233, 0.12);
    color: #0ea5e9;
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 1;
}

.lender-stats-card__label {
    font-weight: 600;
    color: #1f2937;
    position: relative;
    z-index: 1;
}

.lender-stats-card__value {
    font-size: 2.25rem;
    font-weight: 700;
    color: #0f172a;
    position: relative;
    z-index: 1;
}

.lender-stats-card__hint {
    font-size: 0.85rem;
    color: #4b5563;
    position: relative;
    z-index: 1;
}

.lender-panel__empty {
    padding: 2.25rem 1.5rem;
    text-align: center;
    color: #6b7280;
    display: grid;
    gap: 0.5rem;
    place-items: center;
}

.lender-panel__empty .bi {
    font-size: 2rem;
    color: rgba(14, 165, 233, 0.65);
}

.lender-return-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lender-return-list__item {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.4);
}

.lender-return-list__item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.lender-top-items {
    display: grid;
    gap: 1rem;
}

.lender-top-item {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.7);
}

.lender-top-item__thumb {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    overflow: hidden;
    background: rgba(79, 70, 229, 0.08);
    display: grid;
    place-items: center;
    color: rgba(79, 70, 229, 0.65);
    font-size: 1.5rem;
}

.lender-top-item__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lender-top-item__meta h6 {
    font-weight: 600;
    color: #111827;
}

.lender-top-item__meta p {
    color: #64748b;
}

@media (max-width: 991.98px) {
    .lender-hero__lead {
        max-width: 100%;
    }

    .lender-top-item {
        grid-template-columns: 56px 1fr;
        gap: 0.75rem;
    }
}

@media (max-width: 767.98px) {
    .lender-return-list__item {
        flex-direction: column;
        align-items: flex-start;
    }

    .lender-hero {
        text-align: center;
    }

    .lender-hero__metric {
        align-items: center;
    }
}
