/*
 * Личный кабинет.
 * Общие стили сайта подключаются из /css/style.css.
 * Все правила этого файла изолированы компонентами кабинета.
 */

.student-dashboard {
    padding: 54px 0 90px;
    background: #faf6f0;
    color: #2c2c2c;
}

.dashboard-welcome {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.dashboard-kicker,
.profile-view__eyebrow {
    margin: 0 0 6px;
    color: #0b4f6c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.student-dashboard .dashboard-welcome h1,
.student-dashboard .dashboard-card__title,
.student-dashboard .profile-view__name {
    margin: 0;
    color: #2c2c2c;
    font-family: 'Cormorant', serif;
}

.student-dashboard .dashboard-welcome h1 {
    font-size: 48px;
    font-weight: 600;
    line-height: 1.05;
}

.dashboard-welcome__text {
    max-width: 410px;
    margin: 0;
    color: #666;
    text-align: right;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(290px, 0.8fr);
    gap: 24px;
    align-items: start;
}

.dashboard-main,
.dashboard-aside {
    display: grid;
    gap: 24px;
}

.dashboard-card {
    padding: 28px;
    border: 1px solid #d4c4b0;
    border-radius: 16px;
    background: #fffdf9;
    box-shadow: 0 14px 32px rgba(62, 43, 22, 0.08);
}

.dashboard-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.student-dashboard .dashboard-card__title {
    font-size: 27px;
    font-weight: 600;
    line-height: 1.2;
}

.dashboard-card__title i,
.dashboard-link {
    color: #0b4f6c;
}

.dashboard-link {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.dashboard-link:hover {
    color: #b8822f;
    text-decoration: none;
}

.dashboard-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border: 1px solid #0b4f6c;
    border-radius: 8px;
    background: #0b4f6c;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: 0.25s;
}

.dashboard-button:hover {
    border-color: #e8b86d;
    background: #e8b86d;
    color: #2c2c2c;
    text-decoration: none;
}

.dashboard-button:disabled {
    cursor: not-allowed;
    opacity: 0.85;
}

.dashboard-button--outline {
    background: transparent;
    color: #0b4f6c;
}

.dashboard-button--outline:hover {
    border-color: #0b4f6c;
    background: #0b4f6c;
    color: #fff;
}

.dashboard-button--small {
    padding: 9px 12px;
    font-size: 12px;
    white-space: nowrap;
}

/* Профиль */
.profile-view__head {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-bottom: 20px;
}

.profile-view__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #e8b86d;
    color: #2c2c2c;
    font-size: 23px;
}

.student-dashboard .profile-view__name {
    font-size: 26px;
    font-weight: 600;
    line-height: 1.1;
}

.profile-view__details {
    display: grid;
    gap: 10px;
    margin: 0 0 21px;
}

.profile-view__details div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding-bottom: 9px;
    border-bottom: 1px solid #eee4d7;
    font-size: 13px;
}

.profile-view__details dt {
    color: #826f5c;
    font-weight: 400;
}

.profile-view__details dd {
    margin: 0;
    color: #2c2c2c;
    font-weight: 500;
    text-align: right;
    overflow-wrap: anywhere;
}

.profile-view .dashboard-button {
    width: 100%;
}

.student-dashboard .mygroup {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 13px 15px;
    border: 1px dashed #d4c4b0;
    border-radius: 10px;
    background: #f5e6d3;
    color: #665c53;
    font-size: 13px;
}

.student-dashboard .mygroup::before {
    color: #0b4f6c;
    content: '\f4da';
    font-family: 'bootstrap-icons';
}

/* Баланс */
.balance-card {
    position: relative;
    overflow: hidden;
    border-color: #0b4f6c;
    background: linear-gradient(135deg, #0b4f6c, #163d4d);
}

.balance-card::after {
    position: absolute;
    right: -32px;
    bottom: -58px;
    width: 180px;
    height: 180px;
    border: 1px solid rgba(232, 184, 109, 0.55);
    border-radius: 50%;
    content: '';
}

.balance-card__label {
    position: relative;
    z-index: 1;
    margin: 0 0 9px;
    color: #d8eef6;
    font-size: 13px;
}

.balance-card__value {
    position: relative;
    z-index: 1;
    margin: 0 0 20px;
    color: #fff;
    font-size: 36px;
    font-weight: 500;
    line-height: 1;
}

.balance-card__value small {
    font-size: 18px;
    font-weight: 400;
}

.balance-card .dashboard-button {
    position: relative;
    z-index: 1;
    border-color: #e8b86d;
    background: #e8b86d;
    color: #2c2c2c;
}

.balance-card .dashboard-button:hover {
    border-color: #fffdf9;
    background: #fffdf9;
}

/* Материалы */
.library-list {
    display: grid;
    gap: 10px;
}

.library-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 13px;
    padding: 13px;
    border: 1px solid #eadfce;
    border-radius: 12px;
    background: #faf6f0;
    transition: 0.25s;
}

.library-card:hover {
    border-color: #0b4f6c;
    transform: translateY(-2px);
}

.library-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #e8f1f4;
    color: #0b4f6c;
    font-size: 19px;
}

.library-card.is-locked .library-card__icon {
    background: #f3eadc;
    color: #9b7541;
}

.library-card h3 {
    margin: 0 0 3px;
    color: #2c2c2c;
    font-family: 'Cormorant', serif;
    font-size: 19px;
    font-weight: 600;
}

.library-card p {
    margin: 0;
    color: #467485;
    font-size: 12px;
}

.library-card.is-locked p {
    color: #826f5c;
}

.library-card__course-status { display: flex; flex-wrap: wrap; gap: 5px 10px; margin: 5px 0!important; color: #28734b!important; font-weight: 700; }
.library-card__tariff { margin: 5px 0!important; color: #0b4f6c!important; font-weight: 700; }
.library-card__actions { display: grid; justify-items: center; gap: 7px; }
.library-card__actions .dashboard-link { color: #28734b; font-size: 12px; font-weight: 700; }

.library-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 12px;
    padding: 12px 14px;
    border: 1px solid #e8b86d;
    border-radius: 10px;
    background: #fff6e6;
    color: #725321;
    font-size: 13px;
}

.library-alert i {
    color: #b8822f;
    font-size: 17px;
}

.dashboard-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 24px 0;
    color: #9d8b78;
    font-size: 14px;
}

/* Расписание */
.schedule-card {
    padding: 28px;
    overflow: hidden;
}

.schedule-card .dashboard-card__head {
    padding: 0;
    margin-bottom: 18px;
}

.schedule-card .dashboard-card__title i {
    margin-right: 8px;
}

.schedule-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 11px;
    padding: 0 28px 20px;
}

.schedule-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #826f5c;
    font-size: 11px;
}

.schedule-legend i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.schedule-legend .webinar { background: #39c6df; }
.schedule-legend .deadline { background: #ffb86b; }
.schedule-legend .meeting { background: #a998f7; }

.schedule-list,
.schedule-day {
    border-color: #eee4d7;
}

.schedule-list {
    border-top: 1px solid #eee4d7;
}

.schedule-day {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 15px;
    padding: 17px 28px;
    border-bottom: 1px solid #eee4d7;
}

.schedule-day:last-child {
    border-bottom: 0;
}

.schedule-date {
    color: #826f5c;
    font-size: 12px;
    line-height: 1.25;
    text-transform: capitalize;
}

.schedule-date strong {
    display: block;
    margin-top: 2px;
    color: #2c2c2c;
    font-size: 22px;
    font-weight: 500;
}

.schedule-event {
    display: grid;
    grid-template-columns: 55px minmax(0, 1fr);
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-left: 3px solid var(--event-color);
    border-radius: 10px;
    background: #faf6f0;
    color: inherit;
    text-align: left;
    cursor: pointer;
    transition: 0.2s;
}

.schedule-event:hover {
    background: #f5e6d3;
    transform: translateX(3px);
}

.schedule-event__time,
.schedule-event__type {
    color: var(--event-color);
    font-weight: 700;
}

.schedule-event__time {
    padding-top: 2px;
    font-size: 12px;
}

.schedule-event__type {
    display: block;
    margin-bottom: 2px;
    font-size: 10px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.schedule-event__title {
    display: block;
    color: #2c2c2c;
    font-size: 13px;
    font-weight: 500;
}

.schedule-event__meta {
    display: block;
    margin-top: 3px;
    color: #826f5c;
    font-size: 11px;
}

.schedule-empty {
    margin: 12px 0;
    color: #9d8b78;
    font-size: 12px;
}

/* Сообщения и модальное окно расписания */
.inbox-card__top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inbox-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f5e6d3;
    color: #0b4f6c;
    font-size: 19px;
}

.inbox-card__text {
    margin: 0;
    color: #826f5c;
    font-size: 13px;
    line-height: 1.45;
}

.inbox-card__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 50px;
    background: #e8b86d;
    color: #2c2c2c;
    font-size: 11px;
    font-weight: 700;
}

.inbox-card__footer {
    margin-top: 17px;
    padding-top: 15px;
    border-top: 1px solid #eee4d7;
}

.schedule-modal .modal-content {
    border: 1px solid #d4c4b0;
    border-radius: 16px;
    background: #fffdf9;
    color: #2c2c2c;
}

.schedule-modal .modal-header {
    border-color: #eadfce;
}

.schedule-modal .modal-title {
    color: #2c2c2c;
    font-family: 'Cormorant', serif;
    font-size: 28px;
}

.schedule-modal__type {
    margin: 0 0 10px;
    color: #0b4f6c;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.schedule-modal__meta {
    color: #826f5c;
    font-size: 14px;
}

/* Приватные объявления для учеников */
.student-announcements {
    margin-top: 32px;
    padding: 28px;
    border: 1px solid #d4c4b0;
    border-radius: 16px;
    background: #fffdf9;
    box-shadow: 0 14px 32px rgba(62, 43, 22, 0.08);
}

.student-announcements__head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.student-announcements__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f5e6d3;
    color: #0b4f6c;
    font-size: 18px;
}

.student-announcements__head h2 {
    margin: 0;
    color: #2c2c2c;
    font-family: 'Cormorant', serif;
    font-size: 27px;
    font-weight: 600;
    line-height: 1.1;
}

.student-announcements__head p {
    margin: 3px 0 0;
    color: #826f5c;
    font-size: 12px;
}

.student-announcements__content {
    color: #4e443b;
    line-height: 1.65;
}

.student-announcements__content > :first-child { margin-top: 0; }
.student-announcements__content > :last-child { margin-bottom: 0; }

.student-announcements__content h2,
.student-announcements__content h3,
.student-announcements__content h4 {
    margin: 1.25em 0 0.5em;
    color: #2c2c2c;
    font-family: 'Cormorant', serif;
    font-weight: 600;
}

.student-announcements__content h2 { font-size: 28px; }
.student-announcements__content h3 { font-size: 23px; }
.student-announcements__content h4 { font-size: 19px; }

.student-announcements__content a {
    color: #0b4f6c;
    font-weight: 600;
    text-decoration-color: #e8b86d;
    text-underline-offset: 3px;
}

.student-announcements__content a:hover { color: #b8822f; }

.student-announcements__content ul,
.student-announcements__content ol {
    padding-left: 22px;
}

.student-announcements__content li + li { margin-top: 6px; }

.student-announcements__content blockquote {
    margin: 20px 0;
    padding: 14px 18px;
    border-left: 3px solid #e8b86d;
    border-radius: 0 8px 8px 0;
    background: #fff6e6;
    color: #725321;
}

.student-announcements__content img {
    height: auto;
    border-radius: 10px;
}

/* Самостоятельные страницы кабинета ученика */
body:has(.student-utility-page),
body:has(.profile-edit-form) {
    background: #faf6f0;
}

body:has(.student-utility-page) .bg-light,
body:has(.profile-edit-form) .bg-light {
    min-height: 70vh;
    padding: 54px 0 90px;
    background: #faf6f0 !important;
}

body:has(.student-utility-page) .bg-light > .container,
body:has(.profile-edit-form) .bg-light > .container {
    max-width: 1160px;
}

body:has(.student-utility-page) .bg-light > .container > h3,
body:has(.profile-edit-form) .bg-light > .container > h3 {
    margin: 0 0 28px;
    color: #2c2c2c;
    font-family: 'Cormorant', serif;
    font-size: 48px;
    font-weight: 600;
    line-height: 1.05;
}

.student-utility-page {
    padding: 28px;
    border: 1px solid #d4c4b0;
    border-radius: 16px;
    background: #fffdf9;
    box-shadow: 0 14px 32px rgba(62, 43, 22, 0.08);
}

.student-library-page .library-list { gap: 14px; }
.student-library-page .library-card { padding: 18px; }

.student-schedule-page { padding: 0; border: 0; background: transparent; box-shadow: none; }
.student-schedule-page .school-page-head { margin-bottom: 22px; }
.student-schedule-page .school-page-head h1 { display: none; }
.student-schedule-page .school-legend,
.student-schedule-page .school-agenda,
.student-schedule-page .school-enrollments {
    padding: 28px;
    border: 1px solid #d4c4b0;
    border-radius: 16px;
    background: #fffdf9;
    box-shadow: 0 14px 32px rgba(62, 43, 22, 0.08);
}
.student-schedule-page .school-legend { margin-bottom: 14px; }
.student-schedule-page .school-enrollments { margin-top: 14px; }

body:has(.profile-edit-form) .profile-edit-form {
    width: min(100%, 720px);
    margin: 0 auto;
    padding: 28px;
    border: 1px solid #d4c4b0;
    border-radius: 16px;
    background: #fffdf9;
    box-shadow: 0 14px 32px rgba(62, 43, 22, 0.08);
}

body:has(.profile-edit-form) .profile-form { display: grid; gap: 16px; }
body:has(.profile-edit-form) .form-group { margin: 0; }
body:has(.profile-edit-form) .form-group label { display: block; margin-bottom: 7px; color: #826f5c; font-size: 13px; font-weight: 600; }
body:has(.profile-edit-form) .form-control,
body:has(.profile-edit-form) .form-select { min-height: 46px; border-color: #d4c4b0; background: #fff; }
body:has(.profile-edit-form) .profile-subscribe-edit {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px 16px;
    border: 1px solid #eadfce;
    border-radius: 10px;
    background: #faf6f0;
}
body:has(.profile-edit-form) .profile-subscribe-edit input[type="checkbox"] {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: #0b4f6c;
    cursor: pointer;
}
body:has(.profile-edit-form) .profile-subscribe-edit label {
    margin: 0;
    color: #4e443b;
    font-size: 14px;
    line-height: 1.35;
    cursor: pointer;
}
body:has(.profile-edit-form) .blue-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 22px;
    padding: 12px 18px;
    border: 1px solid #0b4f6c;
    border-radius: 9px;
    background: #0b4f6c;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, color .2s ease;
}
body:has(.profile-edit-form) .blue-btn:hover {
    border-color: #e8b86d;
    background: #e8b86d;
    color: #2c2c2c;
}

/* Обращения в поддержку */
body:has(.support-tickets) .bg-light { padding: 54px 0 90px; background:#faf6f0!important; }
body:has(.support-tickets) .bg-light > .container { max-width:1160px; }
body:has(.support-tickets) .bg-light > .container > h3 { display:none; }
.support-tickets { color:#2c2c2c; }
.support-tickets .school-page-head { display:flex; align-items:end; justify-content:space-between; gap:20px; margin:0 0 28px; }
.support-tickets .school-page-head h1,.support-tickets .school-panel h2 { margin:4px 0 0; font-family:'Cormorant',serif; font-weight:600; }
.support-tickets .school-page-head h1 { font-size:48px; }
.support-tickets .school-kicker { color:#0b4f6c; font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.support-tickets .school-panel { padding:28px; border:1px solid #d4c4b0; border-radius:16px; background:#fffdf9; box-shadow:0 14px 32px rgba(62,43,22,.08); }
.support-tickets .school-panel h2 { font-size:27px; margin:0 0 18px; }
.support-tickets .school-form { display:grid; gap:14px; }
.support-tickets .school-field { display:grid; gap:7px; color:#826f5c; font-size:13px; font-weight:600; }
.support-tickets input,.support-tickets textarea { width:100%; padding:12px 14px; border:1px solid #d4c4b0; border-radius:10px; background:#fff; color:#2c2c2c; font:inherit; }
.support-tickets textarea { min-height:120px; resize:vertical; }
.support-tickets .school-btn { display:inline-flex; align-items:center; justify-content:center; width:max-content; padding:12px 17px; border:1px solid #0b4f6c; border-radius:9px; background:#0b4f6c; color:#fff; font:inherit; font-size:13px; font-weight:700; text-decoration:none; cursor:pointer; }
.support-tickets .support-layout { display:grid; grid-template-columns:1fr; gap:20px; margin-top:20px; }
.support-tickets .school-cards,.support-tickets .support-thread { display:grid; gap:10px; }
.support-tickets .support-ticket { display:grid; gap:5px; padding:13px; border:1px solid #eadfce; border-radius:10px; color:#2c2c2c; text-decoration:none; }
.support-tickets .support-ticket.is-active { border-color:#0b4f6c; background:#eef5f7; }.support-tickets .support-ticket small,.support-tickets .support-message small{color:#826f5c}.support-tickets .support-ticket b{font-size:11px;color:#28734b}.support-tickets .support-message{padding:14px;border-radius:11px;background:#f5f7fb}.support-tickets .support-message--curator{background:#eef7f1}.support-tickets .support-message p{margin:6px 0}.support-tickets form+form{margin-top:12px}
.support-tickets .support-ticket--open { border-color:#e2bd77; background:#fff7e7; box-shadow:0 8px 18px rgba(184,130,47,.10); }.support-tickets .support-ticket--open b{display:inline-flex;width:max-content;padding:3px 8px;border-radius:999px;background:#f3dfae;color:#7a571f}

@media (max-width: 900px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-aside .profile-dashboard-card { grid-column: span 2; }
    .student-dashboard .dashboard-welcome h1 { font-size: 42px; }
}

@media (max-width: 640px) {
    .student-dashboard { padding: 30px 0 55px; }
    .dashboard-welcome { align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
    .student-dashboard .dashboard-welcome h1 { font-size: 38px; }
    .dashboard-welcome__text { text-align: left; }
    .dashboard-grid, .dashboard-main, .dashboard-aside { gap: 15px; }
    .dashboard-aside { grid-template-columns: 1fr; }
    .dashboard-aside .profile-dashboard-card { grid-column: auto; }
    .dashboard-card { padding: 20px; border-radius: 14px; }
    .student-dashboard .dashboard-card__title { font-size: 24px; }
    .schedule-card { padding: 20px; }
    .schedule-card .dashboard-card__head { padding: 0; }
    .schedule-legend { padding: 0 0 16px; gap: 8px; }
    .schedule-day { grid-template-columns: 56px minmax(0, 1fr); gap: 10px; padding: 14px 20px; }
    .schedule-date strong { font-size: 18px; }
    .schedule-event { grid-template-columns: 44px minmax(0, 1fr); padding: 10px; }
    .library-card { grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
    .library-card .dashboard-button { grid-column: 2; width: max-content; }
    .library-card__icon { width: 38px; height: 38px; }
    .profile-view__details div { display: block; }
    .profile-view__details dd { margin-top: 2px; text-align: left; }
    .balance-card__value { font-size: 32px; }
    .student-announcements { margin-top: 22px; padding: 20px; }
    .student-announcements__head h2 { font-size: 24px; }
    body:has(.student-utility-page) .bg-light,
    body:has(.profile-edit-form) .bg-light { padding: 30px 0 55px; }
    body:has(.student-utility-page) .bg-light > .container > h3,
    body:has(.profile-edit-form) .bg-light > .container > h3 { margin-bottom: 20px; font-size: 38px; }
    .student-utility-page,
    body:has(.profile-edit-form) .profile-edit-form { padding: 20px; border-radius: 14px; }
    .student-schedule-page .school-legend,
    .student-schedule-page .school-agenda,
    .student-schedule-page .school-enrollments { padding: 20px; border-radius: 14px; }
    body:has(.support-tickets) .bg-light { padding:30px 0 55px; }.support-tickets .school-page-head{align-items:flex-start;flex-direction:column}.support-tickets .school-page-head h1{font-size:38px}.support-tickets .school-panel{padding:20px}.support-tickets .support-layout{grid-template-columns:1fr}
}
