:root {
    --sgk-blue: #185daa;
    --sgk-black: #231f20;
    --sgk-gray: #c8c7c7;
    --sgk-light: #f4f6f8;
    --sgk-white: #ffffff;
    --line: #d7dbe0;
    --soft-blue: #e8f0fb;
    --warning: #f2f2f2;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    overflow: hidden;
}

body {
    background: var(--sgk-light);
    color: var(--sgk-black);
    font-family: Arial, Helvetica, sans-serif;
    font-weight: 400;
}

.topbar {
    height: 150px;
    display: grid;
    grid-template-columns: 1fr 360px;
    background: var(--sgk-white);
    border-bottom: 8px solid var(--sgk-blue);
}

.brand {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 26px 44px 20px 44px;
}

.logo {
    height: 96px;
    width: auto;
    display: block;
}

.school {
    font-size: 42px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--sgk-black);
}

.subtitle {
    margin-top: 8px;
    font-size: 32px;
    line-height: 1;
    font-weight: 700;
    color: var(--sgk-blue);
    letter-spacing: 0.01em;
}

.statusBlock {
    background: var(--sgk-blue);
    color: var(--sgk-white);
    padding: 20px 36px;
    text-align: right;
}

.clock {
    font-size: 64px;
    line-height: 0.95;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.dateLine {
    margin-top: 8px;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 700;
}

.standLine {
    margin-top: 6px;
    font-size: 18px;
    opacity: 0.92;
}

.screen {
    height: calc(100vh - 150px - 48px);
    padding: 28px 38px 18px 38px;
    position: relative;
}

.summary {
    height: 82px;
    display: grid;
    grid-template-columns: minmax(360px, 1fr) auto;
    align-items: center;
    gap: 24px;
    border-bottom: 3px solid var(--sgk-black);
    margin-bottom: 18px;
}

.summaryTitle {
    font-size: 40px;
    font-weight: 900;
    color: var(--sgk-black);
    letter-spacing: -0.02em;
}

.summaryItems {
    display: flex;
    gap: 10px;
    align-items: stretch;
    justify-content: flex-end;
    font-size: 22px;
    font-weight: 800;
    max-width: 1180px;
    overflow: hidden;
}

.dayChip {
    display: grid;
    grid-template-columns: auto auto;
    gap: 10px;
    align-items: center;
    border-left: 8px solid var(--sgk-gray);
    border-top: 2px solid var(--line);
    border-right: 2px solid var(--line);
    border-bottom: 2px solid var(--line);
    padding: 9px 14px 8px 14px;
    background: var(--sgk-white);
    white-space: nowrap;
}

.dayChip strong {
    font-size: 24px;
    font-weight: 900;
    color: var(--sgk-black);
}

.dayChip em {
    font-style: normal;
    font-size: 22px;
    font-weight: 800;
    color: #4a4f55;
}

.dayChip.is-current {
    border-left-color: var(--sgk-blue);
    background: var(--soft-blue);
}

.dayChip.is-current strong,
.dayChip.is-current em {
    color: var(--sgk-blue);
}

.page {
    display: none;
    height: calc(100% - 100px);
}

.page.active {
    display: block;
}

.pageHead {
    height: 58px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    background: var(--sgk-black);
    color: var(--sgk-white);
    padding: 0 22px;
}

.dayLabel {
    font-size: 30px;
    font-weight: 800;
    margin-right: 18px;
}

.fullDate,
.pageCount {
    font-size: 22px;
    font-weight: 700;
    opacity: 0.92;
}

.monitorTable {
    width: 100%;
    height: calc(100% - 58px);
    table-layout: fixed;
    border-collapse: collapse;
    background: var(--sgk-white);
}

.monitorTable th {
    height: 54px;
    background: #e5e8ec;
    color: var(--sgk-black);
    border-bottom: 3px solid var(--sgk-black);
    border-right: 2px solid var(--line);
    padding: 8px 14px;
    text-align: left;
    font-size: 21px;
    line-height: 1;
    font-weight: 800;
}

.monitorTable th:last-child,
.monitorTable td:last-child {
    border-right: none;
}

.monitorTable td {
    border-bottom: 2px solid var(--line);
    border-right: 2px solid var(--line);
    padding: 10px 14px;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
}

.monitorTable tbody tr:nth-child(even) td {
    background: #f8f9fb;
}

.colNo { width: 4%; }
.colTime { width: 15%; }
.colLesson { width: 6%; }
.colClass { width: 11%; }
.colSubject { width: 10%; }
.colNote { width: 25%; }
.colRoom { width: 14%; }
.colAction { width: 15%; text-align: center; }

.number {
    font-size: 25px;
    line-height: 1;
    font-weight: 400;
    text-align: left;
    color: #4d4d4d;
}

.lesson {
    font-size: 48px;
    line-height: 1;
    font-weight: 900;
    text-align: right;
    color: var(--sgk-blue);
}

.time {
    font-size: 29px;
    font-weight: 800;
    text-align: center;
    color: var(--sgk-black);
}

.className {
    font-size: 46px;
    line-height: 1;
    font-weight: 900;
    color: var(--sgk-black);
}

.action {
    text-align: center;
}

.action span {
    display: inline-block;
    min-width: 165px;
    padding: 13px 14px 12px 14px;
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
    text-align: center;
    border: 3px solid var(--sgk-blue);
    color: var(--sgk-blue);
    background: var(--sgk-white);
}

.subject,
.room {
    font-size: 36px;
    line-height: 1.05;
    font-weight: 900;
    color: var(--sgk-black);
}

.note {
    font-size: 29px;
    line-height: 1.12;
    font-weight: 700;
    color: var(--sgk-black);
}

.rowType-cancel .action span {
    background: var(--sgk-black);
    color: var(--sgk-white);
    border-color: var(--sgk-black);
}

.rowType-self .action span {
    background: var(--sgk-gray);
    color: var(--sgk-black);
    border-color: #8e8e8e;
}

.rowType-room .action span {
    background: var(--sgk-blue);
    color: var(--sgk-white);
    border-color: var(--sgk-blue);
}

.rowType-exam .action span {
    background: var(--sgk-blue);
    color: var(--sgk-white);
    border-color: var(--sgk-blue);
}

.rowType-note .action span {
    background: #f0f0f0;
    color: var(--sgk-black);
    border-color: var(--sgk-gray);
}

.emptyState {
    height: calc(100% - 100px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: var(--sgk-white);
    border-top: 18px solid var(--sgk-blue);
    text-align: center;
}

.emptyTitle {
    font-size: 64px;
    font-weight: 900;
    color: var(--sgk-black);
}

.emptyText {
    margin-top: 18px;
    font-size: 34px;
    font-weight: 700;
    color: #4d4d4d;
}

.footer {
    height: 48px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    padding: 0 38px;
    background: var(--sgk-black);
    color: var(--sgk-white);
    font-size: 20px;
    font-weight: 700;
}

.pageProgress {
    position: fixed;
    left: 0;
    bottom: 48px;
    height: 6px;
    width: 100%;
    background: transparent;
}

#pageProgressBar {
    height: 6px;
    width: 0;
    background: var(--sgk-blue);
}

.debugBox {
    position: fixed;
    inset: 30px;
    z-index: 50;
    overflow: auto;
    background: #111111;
    color: #f0f0f0;
    border: 6px solid var(--sgk-blue);
    padding: 24px;
    font-size: 16px;
}

.debugBox pre {
    white-space: pre-wrap;
}

@media (max-aspect-ratio: 16/10) {
    .className { font-size: 39px; }
    .action span { font-size: 26px; min-width: 150px; }
    .subject, .room { font-size: 32px; }
    .note { font-size: 25px; }
}
