/* ==========================================================
   ОСНОВНАЯ СТРАНИЦА
   ========================================================== */

.journal-page {
    padding: 30px 0 60px;
}

.journal-page button,
.journal-page input {
    font: inherit;
}

.journal-page button {
    -webkit-tap-highlight-color: transparent;
}

/* ==========================================================
   HERO
   ========================================================== */

.journal-hero {
    position: relative;
    min-height: 220px;
    margin-bottom: 28px;
    padding: 40px;
    box-sizing: border-box;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border: 1px solid rgba(190, 175, 225, .28);
    border-radius: 20px;
    background:
        radial-gradient(circle at 85% 20%, rgba(138, 123, 182, .28), transparent 38%),
        linear-gradient(135deg, rgba(138, 123, 182, .18), rgba(20, 18, 28, .72));
    box-shadow:
        0 12px 35px rgba(0, 0, 0, .18),
        inset 0 1px 0 rgba(255, 255, 255, .06);
}

.journal-hero::before {
    content: "TECHCOOL";
    position: absolute;
    right: 30px;
    bottom: -18px;
    color: rgba(190, 175, 225, .06);
    font-size: 100px;
    font-weight: 800;
    letter-spacing: 8px;
    pointer-events: none;
}

.journal-hero-content {
    position: relative;
    z-index: 1;
}

.journal-hero-label {
    display: block;
    margin-bottom: 12px;
    color: var(--light-purple);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
}

.journal-hero h1 {
    margin: 0 0 8px;
    font-size: 34px;
    font-weight: 700;
}

.journal-hero p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 15px;
}

/* ==========================================================
   ВКЛАДКИ
   ========================================================== */

.journal-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 28px;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: rgba(138, 123, 182, .05);
}

.journal-tab {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: .2s ease;
}

.journal-tab:hover {
    color: var(--text);
    background: rgba(138, 123, 182, .08);
}

.journal-tab.active {
    border-color: rgba(190, 175, 225, .25);
    background: rgba(138, 123, 182, .14);
    color: var(--light-purple);
    box-shadow: 0 4px 15px rgba(0, 0, 0, .12);
}

.journal-tab-content {
    display: none;
}

.journal-tab-content.active {
    display: block;
}

/* ==========================================================
   ЗАГОЛОВКИ РАЗДЕЛОВ
   ========================================================== */

.journal-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.journal-section-header h2 {
    margin: 0 0 6px;
    font-size: 23px;
}

.journal-section-header span {
    color: var(--text-secondary);
    font-size: 14px;
}

/* ==========================================================
   КНОПКИ
   ========================================================== */

.journal-primary-button {
    min-height: 42px;
    padding: 10px 18px;
    box-sizing: border-box;
    border: 1px solid rgba(190, 175, 225, .35);
    border-radius: 11px;
    background: rgba(138, 123, 182, .12);
    color: var(--light-purple);
    text-decoration: none;
    cursor: pointer;
    transition: .2s ease;
}

.journal-primary-button:hover {
    border-color: rgba(190, 175, 225, .5);
    background: rgba(138, 123, 182, .2);
    transform: translateY(-1px);
}

.journal-primary-button:active {
    transform: translateY(0);
}

.student-action {
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    background: rgba(255, 255, 255, .015);
    color: var(--text);
    cursor: pointer;
    transition: .2s ease;
}

.student-action:hover {
    border-color: rgba(190, 175, 225, .4);
    background: rgba(138, 123, 182, .1);
}
.student-action.selected {
    border-color: rgba(190, 175, 225, .5);
    background: rgba(138, 123, 182, .16);
    color: var(--light-purple);
}
.attendance-actions .student-action[data-attendance="present"].selected {
    border-color: rgba(111, 190, 133, .55);
    background: rgba(111, 190, 133, .14);
    color: #83d99a;
    box-shadow: 0 0 12px rgba(111, 190, 133, .18);
}
.attendance-actions .student-action[data-attendance="absent"].selected {
    border-color: rgba(220, 100, 100, .55);
    background: rgba(220, 100, 100, .14);
    color: #e98b8b;
    box-shadow: 0 0 12px rgba(220, 100, 100, .18);
}
.student-action[data-action="delete"] {
    border-color: rgba(220, 100, 100, .35);
    color: #e98b8b;
}
.student-action[data-action="delete"]:hover {
    border-color: rgba(220, 100, 100, .6);
    background: rgba(220, 100, 100, .12);
    box-shadow: 0 0 12px rgba(220, 100, 100, .16);
}
.student-action[data-education-action="edit"] {
    border-color: rgba(190, 175, 225, .5);
    background: rgba(138, 123, 182, .1);
    color: var(--light-purple);
}
.student-action[data-education-action="edit"]:hover {
    border-color: rgba(190, 175, 225, .7);
    background: rgba(138, 123, 182, .18);
    box-shadow: 0 0 12px rgba(138, 123, 182, .18);
}
/* ==========================================================
   УЧЕНИКИ
   ========================================================== */

.students-list {
    display: grid;
    gap: 12px;
}
.student-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(138, 123, 182, .055);
    box-shadow: 0 5px 18px rgba(0, 0, 0, .08);
    transition: .2s ease;
}
.student-card:hover {
    border-color: rgba(190, 175, 225, .3);
    background: rgba(138, 123, 182, .08);
    transform: translateY(-1px);
}
.student-card-info {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 22px;
}

.student-card-name {
    min-width: 220px;
    margin-bottom: 0;
}

.student-card-group {
    white-space: nowrap;
}

.student-card-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.student-card-actions {
    display: flex;
    gap: 8px;
}
.student-today-status {
    min-width: 125px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.student-today-status.present {
    border-color: rgba(111, 190, 133, .35);
    background: rgba(111, 190, 133, .1);
    color: #83d99a;
}

.student-today-status.absent {
    border-color: rgba(215, 121, 121, .35);
    background: rgba(215, 121, 121, .1);
    color: #df8a8a;
}

.student-today-status.unset {
    border-color: var(--border-color);
    background: rgba(255, 255, 255, .025);
    color: var(--text-secondary);
}
/* ==========================================================
   ОПЛАТА
   ========================================================== */

.student-payment {
    min-width: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 12px;
    border: 1px solid;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
}

.student-payment.paid {
    border-color: rgba(111, 190, 133, .35);
    background: rgba(111, 190, 133, .1);
    color: #83d99a;
}

.student-payment.not-paid {
    border-color: rgba(215, 121, 121, .35);
    background: rgba(215, 121, 121, .1);
    color: #df8a8a;
}

.payment-indicator,
.status-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: currentColor;
}

/* ==========================================================
   ОБУЧЕНИЕ
   ========================================================== */

.education-list {
    display: grid;
    gap: 16px;
}

.education-card {
    padding: 22px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(138, 123, 182, .055);
    box-shadow: 0 5px 18px rgba(0, 0, 0, .08);
}

.education-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 17px;
    border-bottom: 1px solid var(--border-color);
}

.education-card-header h3 {
    margin: 0 0 6px;
    font-size: 18px;
}

.education-card-header span {
    color: var(--text-secondary);
    font-size: 14px;
}

.education-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.education-info-block {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    background: rgba(0, 0, 0, .08);
}

.education-label {
    display: block;
    margin-bottom: 7px;
    color: var(--text-secondary);
    font-size: 12px;
}

.education-info-block strong {
    display: block;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.payment-stat-block {
    border-color: rgba(138, 123, 182, .3);
    background: rgba(138, 123, 182, .09);
}

.payment-stat-block strong {
    color: var(--light-purple);
    font-size: 17px;
}

/* ==========================================================
   КАЛЕНДАРЬ
   ========================================================== */

.attendance-calendar {
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: rgba(138, 123, 182, .055);
    box-shadow: 0 5px 18px rgba(0, 0, 0, .08);
}

.attendance-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.attendance-calendar-header strong {
    font-size: 17px;
}

.calendar-button {
    width: 38px;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(138, 123, 182, .06);
    color: var(--text);
    cursor: pointer;
    transition: .2s ease;
}

.calendar-button:hover {
    border-color: rgba(190, 175, 225, .4);
    background: rgba(138, 123, 182, .14);
    color: var(--light-purple);
}

.calendar-weekdays,
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 7px;
}

.calendar-weekdays {
    margin-bottom: 7px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}

.calendar-day {
    position: relative;
    min-height: 52px;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid transparent;
    border-radius: 10px;
    background: rgba(138, 123, 182, .055);
    color: var(--text);
    cursor: pointer;
    transition: .2s ease;
}

.calendar-day:hover {
    border-color: rgba(190, 175, 225, .3);
    background: rgba(138, 123, 182, .12);
}

.calendar-day.active {
    border-color: var(--light-purple);
    background: rgba(138, 123, 182, .17);
    box-shadow: 0 0 0 1px rgba(138, 123, 182, .08);
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day-number {
    display: block;
}

.calendar-day-indicators {
    position: absolute;
    right: 7px;
    bottom: 6px;
    display: flex;
    gap: 4px;
}

.calendar-indicator {
    display: block;
    width: 5px;
    height: 5px;
    border-radius: 50%;
}

.attendance-indicator {
    background: #8a7bb6;
}

.calendar-day .payment-indicator {
    background: #83d99a;
}

/* ==========================================================
   ДЕТАЛИ ПОСЕЩАЕМОСТИ
   ========================================================== */

.attendance-details {
    margin-top: 22px;
}

.attendance-list {
    display: grid;
    gap: 10px;
}

.attendance-student {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    padding: 16px 18px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: rgba(138, 123, 182, .045);
    transition: .2s ease;
}

.attendance-student:hover {
    border-color: rgba(190, 175, 225, .28);
    background: rgba(138, 123, 182, .075);
}

.attendance-student-info {
    min-width: 0;
    display: grid;
    gap: 5px;
}

.attendance-student-info strong {
    overflow: hidden;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attendance-student-info span {
    color: var(--text-secondary);
    font-size: 13px;
}

.attendance-statuses {
    display: flex;
    gap: 8px;
}

.attendance-status {
    min-width: 105px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 10px;
    border: 1px solid;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
}

.attendance-status.present {
    border-color: rgba(111, 190, 133, .3);
    background: rgba(111, 190, 133, .09);
    color: #83d99a;
}

.attendance-status.absent {
    border-color: rgba(215, 121, 121, .3);
    background: rgba(215, 121, 121, .09);
    color: #df8a8a;
}

.attendance-status.unset {
    border-color: var(--border-color);
    background: rgba(255, 255, 255, .025);
    color: var(--text-secondary);
}

.attendance-status.payment-paid {
    border-color: rgba(111, 190, 133, .3);
    background: rgba(111, 190, 133, .09);
    color: #83d99a;
}

.attendance-status.payment-unpaid {
    border-color: rgba(215, 121, 121, .3);
    background: rgba(215, 121, 121, .09);
    color: #df8a8a;
}

.attendance-actions {
    display: flex;
    gap: 7px;
}

/* ==========================================================
   ПУСТЫЕ СОСТОЯНИЯ
   ========================================================== */

.journal-empty {
    padding: 45px 20px;
    border: 1px dashed var(--border-color);
    border-radius: 14px;
    color: var(--text-secondary);
    text-align: center;
}

/* ==========================================================
   МОДАЛЬНОЕ ОКНО
   ========================================================== */

.journal-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    background: rgba(0, 0, 0, .68);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    animation: journalModalFade .18s ease;
}

.journal-modal-content {
    width: 620px;
    max-width: 100%;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 28px;
    box-sizing: border-box;
    border: 1px solid rgba(190, 175, 225, .32);
    border-radius: 18px;
    background: var(--surface-solid);
    box-shadow: 0 25px 70px rgba(0, 0, 0, .4);
    animation: journalModalOpen .2s ease;
}

.journal-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}

.journal-modal-label {
    display: block;
    margin-bottom: 7px;
    color: var(--light-purple);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.journal-modal-header h2 {
    margin: 0;
    font-size: 21px;
}

.journal-modal-description {
    margin: 7px 0 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.journal-modal-close {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: rgba(138, 123, 182, .08);
    color: var(--text);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
}

.journal-modal-close:hover {
    border-color: rgba(190, 175, 225, .4);
    background: rgba(138, 123, 182, .16);
    color: var(--light-purple);
}

/* ==========================================================
   ФОРМА
   ========================================================== */

.student-form,
.payment-form {
    display: grid;
    gap: 20px;
}

.form-section {
    padding: 18px;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: rgba(138, 123, 182, .035);
}

.form-section h3 {
    margin: 0 0 15px;
    color: var(--light-purple);
    font-size: 14px;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 13px;
}

.form-field {
    min-width: 0;
    display: grid;
    gap: 7px;
}

.form-field.full {
    grid-column: 1 / -1;
}

.form-field > span {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.form-field input:not([type="checkbox"]) {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    outline: none;
    background: rgba(0, 0, 0, .14);
    color: var(--text);
    transition: .2s ease;
}

.form-field input:not([type="checkbox"]):hover {
    border-color: rgba(190, 175, 225, .28);
}

.form-field input:not([type="checkbox"]):focus {
    border-color: var(--light-purple);
    background: rgba(138, 123, 182, .08);
    box-shadow: 0 0 0 3px rgba(138, 123, 182, .09);
}

.form-field input::placeholder {
    color: var(--text-secondary);
    opacity: .7;
}

.form-field input[type="date"] {
    color-scheme: dark;
}

.form-submit {
    width: 100%;
    min-height: 46px;
}

/* ==========================================================
   ЧЕКБОКС ОПЛАТЫ
   ========================================================== */

.payment-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 11px;
    background: rgba(138, 123, 182, .05);
    color: var(--text);
    cursor: pointer;
    transition: .2s ease;
}

.payment-checkbox:hover {
    border-color: rgba(190, 175, 225, .35);
    background: rgba(138, 123, 182, .09);
}

.payment-checkbox input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.custom-checkbox {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    box-sizing: border-box;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: rgba(0, 0, 0, .14);
    transition: .2s ease;
}

.payment-checkbox input:checked + .custom-checkbox {
    border-color: var(--light-purple);
    background: var(--light-purple);
    box-shadow: inset 0 0 0 4px var(--surface-solid);
}

.payment-checkbox input:focus-visible + .custom-checkbox {
    box-shadow:
        0 0 0 3px rgba(138, 123, 182, .18),
        inset 0 0 0 4px var(--surface-solid);
}

/* ==========================================================
   СУММА
   ========================================================== */

.amount-input {
    position: relative;
    display: flex;
    align-items: center;
}

.amount-input input {
    padding-right: 42px !important;
}

.amount-input strong {
    position: absolute;
    right: 13px;
    color: var(--text-secondary);
    font-size: 14px;
    pointer-events: none;
}

.amount-input input:disabled {
    opacity: .45;
    cursor: not-allowed;
}

/* ==========================================================
   СКРОЛЛБАРЫ
   ========================================================== */

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(138, 123, 182, .55) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

*::-webkit-scrollbar-thumb {
    border: 2px solid transparent;
    border-radius: 999px;
    background: rgba(138, 123, 182, .55);
    background-clip: padding-box;
}

*::-webkit-scrollbar-thumb:hover {
    background: rgba(138, 123, 182, .8);
    background-clip: padding-box;
}

/* ==========================================================
   АНИМАЦИИ
   ========================================================== */

@keyframes journalModalFade {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes journalModalOpen {
    from {
        opacity: 0;
        transform: translateY(10px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
/* ==========================================================
   СВЕТЛАЯ ТЕМА
   ========================================================== */

.light-theme .journal-hero {
    border-color: rgba(80, 65, 110, .28);
    background:
        radial-gradient(circle at 85% 20%, rgba(138, 123, 182, .22), transparent 38%),
        linear-gradient(135deg, rgba(210, 195, 235, .58), rgba(235, 230, 245, .55));
    box-shadow:
        0 12px 35px rgba(90, 70, 120, .1),
        inset 0 1px 0 rgba(255, 255, 255, .65);
}

.light-theme .journal-hero::before {
    color: rgba(100, 80, 140, .06);
}

.light-theme .journal-hero-label {
    color: #625176;
}

.light-theme .journal-primary-button {
    color: #18151d;
    border-color: rgba(70, 60, 90, .35);
}

.light-theme .journal-primary-button:hover {
    color: #000;
    border-color: rgba(70, 60, 90, .5);
}

.light-theme .journal-tab {
    color: #55505d;
}

.light-theme .journal-tab:hover {
    color: #18151d;
}

.light-theme .journal-tab.active {
    color: #18151d;
}

.light-theme .student-card,
.light-theme .education-card,
.light-theme .attendance-calendar {
    background: rgba(210, 195, 235, .22);
}

.light-theme .student-action {
    color: #18151d;
    border-color: rgba(70, 60, 90, .25);
}

.light-theme .student-action:hover,
.light-theme .student-action.selected {
    color: #18151d;
    border-color: rgba(70, 60, 90, .4);
}

.light-theme .education-info-block {
    background: rgba(255, 255, 255, .28);
}

.light-theme .form-section {
    background: #f5f3f8;
    border-color: rgba(70, 60, 90, .22);
}

.light-theme .form-field input:not([type="checkbox"]) {
    background: #ffffff;
    border-color: rgba(70, 60, 90, .35);
    color: #18151d;
}

.light-theme .form-field input:not([type="checkbox"]):hover {
    border-color: rgba(70, 60, 90, .5);
}

.light-theme .form-field input:not([type="checkbox"]):focus {
    border-color: #625176;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(98, 81, 118, .1);
}

.light-theme .form-field input::placeholder {
    color: #77717f;
}

.light-theme .payment-checkbox {
    background: #f5f3f8;
    border-color: rgba(70, 60, 90, .3);
}

.light-theme .payment-checkbox:hover {
    border-color: rgba(70, 60, 90, .45);
    background: #efecf4;
}

.light-theme .journal-modal-content {
    background: #ffffff;
    border-color: rgba(70, 60, 90, .3);
    box-shadow: 0 25px 70px rgba(40, 30, 60, .2);
}

.light-theme .journal-modal-close {
    color: #18151d;
    border-color: rgba(70, 60, 90, .3);
    background: #f5f3f8;
}

.light-theme .journal-modal-close:hover {
    color: #18151d;
    border-color: rgba(70, 60, 90, .45);
    background: #ebe7f1;
}

.light-theme .custom-checkbox {
    border-color: rgba(70, 60, 90, .35);
    background: #ffffff;
}

.light-theme .amount-input strong {
    color: #55505d;
}

.light-theme .form-field input[type="date"] {
    color-scheme: light;
}
/* ==========================================================
   АДАПТИВ
   ========================================================== */

@media (max-width: 900px) {
    .education-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .attendance-student {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .attendance-statuses,
    .attendance-actions {
        flex-wrap: wrap;
    }

    .student-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .student-card-info {
        width: 100%;
    }

    .student-card-right {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 650px) {
    .journal-page {
        padding: 20px 0 40px;
        max-width: 100%;
        overflow: hidden;
    }

    .journal-hero {
        min-height: 190px;
        padding: 25px;
        border-radius: 16px;
    }

    .journal-hero h1 {
        font-size: 27px;
    }

    .journal-hero::before {
        right: -15px;
        bottom: -10px;
        font-size: 55px;
    }

    .journal-tabs {
        width: 100%;
        box-sizing: border-box;
        overflow-x: auto;
    }

    .journal-tab {
        min-width: 110px;
        padding: 11px 14px;
    }

    .journal-section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .journal-primary-button {
        width: 100%;
    }

    .student-card {
        width: 100%;
        box-sizing: border-box;
        padding: 14px;
    }

    .student-card-info {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .student-card-name {
        width: 100%;
        min-width: 0;
    }

    .student-card-group {
        max-width: 100%;
        white-space: normal;
    }

    .student-card-right {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .student-today-status,
    .student-payment {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .student-card-actions {
        width: 100%;
    }

    .student-card-actions .student-action {
        flex: 1;
        min-width: 0;
    }

    .education-grid {
        grid-template-columns: 1fr;
    }

    .education-card {
        padding: 16px;
    }

    .education-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .attendance-calendar {
        padding: 12px;
    }

    .calendar-weekdays,
    .calendar-days {
        gap: 4px;
    }

    .calendar-day {
        min-height: 44px;
        padding: 7px 4px;
    }

    .attendance-student {
        width: 100%;
        box-sizing: border-box;
        padding: 14px;
    }

    .attendance-student-info {
        width: 100%;
    }

    .attendance-statuses,
    .attendance-actions {
        width: 100%;
    }

    .attendance-status {
        min-width: 0;
        flex: 1;
    }

    .attendance-actions .student-action {
        flex: 1;
        min-width: 0;
    }

    .journal-modal {
        align-items: flex-start;
        padding: 10px;
    }

    .journal-modal-content {
        width: 100%;
        max-height: calc(100vh - 20px);
        padding: 20px;
        border-radius: 15px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field.full {
        grid-column: auto;
    }
}

@media (max-width: 420px) {
    .journal-hero {
        min-height: 170px;
        padding: 20px;
    }

    .journal-hero h1 {
        font-size: 23px;
    }

    .journal-hero p {
        font-size: 13px;
    }

    .journal-tabs {
        margin-bottom: 20px;
    }

    .attendance-statuses {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .attendance-status {
        min-width: 0;
    }
}