@font-face {
    font-family: "IRANSansXFaNum";
    src: url("../fonts/IRANSansXFaNum-regular.woff") format("woff");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "IRANSansXFaNum";
    src: url("../fonts/IRANSansXFaNum-medium.woff") format("woff");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "IRANSansXFaNum";
    src: url("../fonts/IRANSansXFaNum-bold.woff") format("woff");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

:root {
    --app-primary: #2457d6;
    --app-bg: #f5f7fb;
    --app-text: #182033;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--app-bg);
    color: var(--app-text);
    font-family: "IRANSansXFaNum", Tahoma, Arial, sans-serif;
    overflow-x: hidden;
}

.btn-primary {
    --bs-btn-bg: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: #1d49b8;
    --bs-btn-hover-border-color: #1d49b8;
}

.login-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at 85% 15%, rgba(36, 87, 214, 0.13), transparent 34%),
        var(--app-bg);
}

.login-card {
    border-radius: 1.25rem;
}

.login-logo {
    width: 88px;
    height: 88px;
    object-fit: contain;
}

.navbar-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
}

.navbar-brand {
    min-width: 0;
}

.navbar-brand span {
    max-width: min(42vw, 320px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-control {
    min-height: 48px;
}

.form-select {
    min-height: 48px;
}

.form-section-title {
    padding-bottom: 0.65rem;
    border-bottom: 1px solid #e8ebf2;
    color: #34405a;
}

.student-search {
    width: min(100%, 430px);
}

.student-search .form-control {
    min-width: 0;
}

.student-tabs {
    flex-wrap: nowrap;
}

.student-table {
    min-width: 760px;
}

.course-choice-list ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.course-choice-list label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 0.75rem;
    cursor: pointer;
}

.course-choice-list .form-check-input {
    min-height: auto;
    flex: 0 0 auto;
}

.detail-list dt,
.detail-list dd {
    padding-block: 0.45rem;
    margin-bottom: 0;
    border-bottom: 1px solid #eef0f4;
}

.operation-message {
    position: fixed;
    z-index: 1090;
    left: 1rem;
    bottom: 1rem;
    width: min(420px, calc(100% - 2rem));
}

.schedule-day {
    min-height: 220px;
}

.session-card {
    width: 100%;
    padding: 1rem;
    background: #fff;
    border: 1px solid #e1e5ee;
    border-radius: 0.9rem;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.session-card:hover,
.session-card:focus-visible {
    border-color: rgba(36, 87, 214, 0.55);
    box-shadow: 0 0.5rem 1rem rgba(24, 32, 51, 0.08);
    transform: translateY(-1px);
    outline: none;
}

.session-time {
    display: inline-block;
    padding: 0.3rem 0.55rem;
    border-radius: 0.5rem;
    background: rgba(36, 87, 214, 0.1);
    color: var(--app-primary);
    font-weight: 600;
}

.dashboard-highlight-card {
    background:
        linear-gradient(135deg, rgba(36, 87, 214, 0.08), transparent 58%),
        #fff;
}

.dashboard-chip {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.35rem 0.7rem;
    border: 1px solid #e1e5ee;
    border-radius: 999px;
    background: #fff;
    color: #4c5870;
    font-size: 0.875rem;
}

@media (max-width: 575.98px) {
    .login-card {
        border-radius: 1rem;
    }

    .login-card .card-body {
        padding: 1.5rem !important;
    }

    .modal-dialog {
        margin: 0;
        min-height: 100%;
    }

    .modal-content {
        min-height: 100vh;
        border: 0;
        border-radius: 0;
    }

    .account-profile-modal {
        padding: 0.75rem;
    }

    .account-profile-hero,
    .account-profile-section {
        border-radius: 0.85rem;
    }

    .account-info-grid {
        grid-template-columns: 1fr;
    }

    .account-info-item-wide {
        grid-column: auto;
    }

    .account-course-item {
        align-items: flex-start;
    }

    .course-choice-list ul {
        grid-template-columns: 1fr;
    }
}

.min-w-0 {
    min-width: 0;
}

.news-card {
    color: inherit;
    background: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.news-card:hover,
.news-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 0.7rem 1.4rem rgba(24, 32, 51, 0.12) !important;
    outline: none;
}

.news-icon,
.news-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 0.8rem;
    background: rgba(36, 87, 214, 0.1);
    color: var(--app-primary);
    font-size: 1.15rem;
}

.news-empty-icon {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
}

.news-preview {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.news-dashboard-item {
    padding: 1rem;
    border: 1px solid #e7eaf0;
    border-radius: 0.9rem;
    background: #fff;
    color: inherit;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.news-dashboard-item:hover,
.news-dashboard-item:focus-visible {
    border-color: rgba(36, 87, 214, 0.45);
    background: #fbfcff;
    outline: none;
}

.news-body {
    color: #35405a;
    line-height: 2;
    overflow-wrap: anywhere;
}

/* Phase-one replay placeholder */
.replay-placeholder-card {
    overflow: hidden;
}

.replay-placeholder-icon {
    width: 72px;
    height: 72px;
    background: rgba(13, 110, 253, 0.08);
    color: var(--bs-primary);
}

.replay-placeholder-text {
    max-width: 560px;
}


/* Shared account/profile modal */
.account-modal-header {
    align-items: flex-start;
}

.account-profile-modal {
    background: #f7f8fb;
}

.account-profile-hero {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid #e7eaf0;
    border-radius: 1rem;
}

.account-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 54px;
    height: 54px;
    border-radius: 1rem;
    background: rgba(36, 87, 214, 0.1);
    color: var(--app-primary);
    font-size: 1.65rem;
}

.account-avatar-lg {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    font-size: 1.45rem;
}

.account-profile-section {
    padding: 1rem;
    margin-bottom: 1rem;
    background: #fff;
    border: 1px solid #e7eaf0;
    border-radius: 1rem;
}

.account-profile-section-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding-bottom: 0.75rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid #edf0f4;
    color: #34405a;
    font-weight: 700;
}

.account-profile-section-title > i,
.account-profile-section-title > span > i {
    color: var(--app-primary);
}

.account-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.account-info-item {
    min-width: 0;
    padding: 0.8rem 0.9rem;
    background: #fafbfc;
    border: 1px solid #edf0f4;
    border-radius: 0.8rem;
}

.account-info-item-wide {
    grid-column: 1 / -1;
}

.account-info-label {
    display: block;
    margin-bottom: 0.25rem;
    color: #768096;
    font-size: 0.78rem;
}

.account-info-item strong {
    display: block;
    overflow-wrap: anywhere;
    color: #273147;
    font-size: 0.92rem;
}

.account-course-list {
    display: grid;
    gap: 0.65rem;
}

.account-course-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.85rem;
    background: #fafbfc;
    border: 1px solid #edf0f4;
    border-radius: 0.8rem;
}

.account-profile-empty {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem;
    background: #fafbfc;
    border: 1px dashed #dce1e9;
    border-radius: 0.8rem;
}

.account-profile-empty > i {
    color: var(--app-primary);
    font-size: 1.15rem;
}

.account-profile-footer {
    background: #fff;
}

.account-nav-name {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.password-help ul {
    margin: 0.4rem 0 0;
    padding-right: 1.1rem;
}

.password-help li + li {
    margin-top: 0.25rem;
}

/* Keep the account modal inside the viewport on every screen size. */
.account-modal-dialog {
    width: min(760px, calc(100% - 2rem));
    max-width: 760px;
}

.account-modal-dialog .modal-content {
    max-height: calc(100dvh - 2rem);
    overflow: hidden;
}

.account-modal-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.account-modal-form .modal-body {
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

.account-modal-header,
.account-profile-footer {
    flex: 0 0 auto;
}

@media (max-width: 575.98px) {
    .account-modal-dialog {
        width: 100%;
        max-width: none;
        height: 100dvh;
        min-height: 100dvh;
        margin: 0;
    }

    .account-modal-dialog .modal-content {
        width: 100%;
        height: 100dvh;
        min-height: 0;
        max-height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .account-modal-header,
    .account-profile-footer {
        padding-inline: 1rem;
    }

    .account-profile-footer > * {
        flex: 1 1 auto;
    }
}

/* SpotPlayer phase 2 */
.replay-license-card {
    overflow: hidden;
}

.replay-key-box {
    background: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
}

.replay-key-box .form-control {
    min-width: 0;
}
