:root {
    --bg: #f3efe7;
    --bg-strong: #e8dfcf;
    --panel: rgba(255, 252, 246, 0.92);
    --panel-border: rgba(47, 61, 70, 0.12);
    --text: #1b252b;
    --muted: #5d6a72;
    --brand: #124559;
    --brand-soft: #d6e4ea;
    --accent: #d96c06;
    --danger: #b42318;
    --success: #0f7b55;
    --shadow: 0 18px 50px rgba(18, 69, 89, 0.1);
    --radius: 20px;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(217, 108, 6, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(18, 69, 89, 0.18), transparent 30%),
        linear-gradient(180deg, #f8f5ee 0%, var(--bg) 45%, #ebe3d6 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

.site-header,
.page-shell {
    width: min(1180px, calc(100vw - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    margin-top: 12px;
    padding: 14px 20px;
    background: rgba(255, 252, 246, 0.75);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.brand-cluster {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
    min-width: 0;
}

.brand,
.admin-gear,
.profile-chip,
.client-card__trigger,
.tab-row a,
.operation-tags span,
.file-pill,
.ghost-button,
.primary-button {
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
}

.brand--icon-only {
    gap: 0;
}

.header-icon-button,
.admin-gear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(18, 69, 89, 0.2);
    background: rgba(214, 228, 234, 0.55);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
}

.header-icon-button--logout {
    color: var(--text);
}

.header-icon-button:hover,
.admin-gear:hover {
    transform: translateY(-1px);
}

.admin-gear.active {
    background: var(--brand-soft);
    border-color: rgba(18, 69, 89, 0.18);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), #1f6f8b);
    color: white;
    font-weight: 700;
}

.brand-logo {
    display: block;
    width: 54px;
    height: 54px;
    object-fit: contain;
    border-radius: 999px;
}

.brand small,
.profile-chip small,
.eyebrow,
.timeline-card small,
.client-card small {
    display: block;
    color: var(--muted);
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
}

.header-nav {
    width: auto;
    min-width: 0;
}

.main-nav a,
.tab-row a,
.operation-tags a,
.operation-tags span,
.ghost-button,
.primary-button,
.file-pill {
    padding: 9px 12px;
    border-radius: 999px;
    border: 1px solid rgba(27, 37, 43, 0.2);
    background: rgba(255, 255, 255, 0.7);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
}

.main-nav a.active,
.tab-row a.active,
.operation-tags a.active {
    background: var(--brand-soft);
    border-color: rgba(18, 69, 89, 0.18);
}

.profile-chip {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    padding: 8px 10px 8px 14px;
    border-radius: 18px;
    background: rgba(214, 228, 234, 0.55);
    white-space: nowrap;
}

.page-shell {
    padding: 28px 0 60px;
}

.section-head,
.grid-two,
.panel,
.auth-card,
.flash-stack,
.message-stack {
    margin-bottom: 20px;
}

.section-head,
.toolbar-row,
.pagination-row,
.client-card__trigger,
.message-card__head,
.timeline-card header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.toolbar-row {
    margin-bottom: 14px;
}

.panel,
.auth-card {
    padding: 24px;
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.auth-shell {
    display: grid;
    place-items: center;
    min-height: 100vh;
}

.auth-card {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

.auth-copy h1,
.section-head h1,
.error-panel h1 {
    margin: 0 0 10px;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 0.96;
}

.demo-credentials {
    margin-top: 28px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(214, 228, 234, 0.45);
}

.form-grid {
    display: grid;
    gap: 16px;
}

.split-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.full-span {
    grid-column: 1 / -1;
}

label span {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--muted);
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(27, 37, 43, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
}

textarea {
    resize: vertical;
}

.primary-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: var(--brand);
    color: white;
    border: 1px solid rgba(18, 69, 89, 0.2);
    cursor: pointer;
}

.ghost-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    background: rgba(255, 255, 255, 0.7);
    color: var(--text);
    border: 1px solid rgba(27, 37, 43, 0.12);
    cursor: pointer;
}

.ghost-button--danger {
    color: var(--danger);
    border-color: rgba(180, 35, 24, 0.18);
    background: rgba(180, 35, 24, 0.06);
}

.primary-button:hover,
.ghost-button:hover,
.tab-row a:hover,
.client-card__trigger:hover,
.file-pill:hover {
    transform: translateY(-1px);
}

.stat-card {
    min-width: 140px;
    padding: 16px 18px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(217, 108, 6, 0.1), rgba(18, 69, 89, 0.18));
}

.stat-card strong {
    display: block;
    font-size: 2rem;
}

.section-head--compact {
    align-items: center;
}

.section-head--compact h1 {
    margin-bottom: 0;
}

.section-head__title-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.stat-card--compact {
    min-width: auto;
    padding: 10px 14px;
}

.stat-card--compact strong {
    font-size: 1.05rem;
    line-height: 1;
}

.stat-card--compact span {
    font-size: 0.78rem;
}

.search-field {
    position: relative;
    display: block;
    margin-bottom: 16px;
}

.search-field input {
    padding-right: 196px;
}

.search-field__actions {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 8px;
    align-items: center;
}

.clear-search,
.search-toggle {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(27, 37, 43, 0.12);
    background: rgba(255, 255, 255, 0.78);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.search-toggle {
    font-size: 0.95rem;
}

.search-toggle.active {
    background: var(--brand);
    color: white;
    border-color: rgba(18, 69, 89, 0.3);
}

.clear-search::before {
    content: "";
    width: 16px;
    height: 16px;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b252b' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 7h12'/%3E%3Cpath d='M12 7l6 6'/%3E%3Cpath d='M10 10l5 5'/%3E%3Cpath d='M5 7l4 11h5l-4-11'/%3E%3Cpath d='M14 18h6'/%3E%3C/svg%3E");
}

.toggle-form--inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.toggle-form__inline-field {
    margin: 0;
}

.toggle-form__inline-field input {
    width: 100%;
}

.client-list,
.timeline-list,
.message-stack,
.stack,
.session-list {
    display: grid;
    gap: 14px;
}

.list-loader {
    margin-top: 14px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
}

.client-card {
    border: 1px solid rgba(27, 37, 43, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.55);
    overflow: hidden;
}

.client-card--reports-done {
    background: rgba(168, 214, 176, 0.28);
    border-color: rgba(74, 144, 89, 0.22);
}

.client-card--reports-pending {
    background: rgba(244, 227, 148, 0.34);
    border-color: rgba(189, 159, 64, 0.22);
}

.client-card__trigger {
    width: 100%;
    padding: 18px 20px;
    background: transparent;
    border: 0;
    text-align: left;
    cursor: pointer;
    align-items: center;
}

.chevron {
    font-size: 1.4rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
}

.client-card__title {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    font-weight: 700;
    line-height: 1.25;
}

.client-card__menu {
    display: grid;
    gap: 10px;
    max-height: 0;
    padding: 0 20px;
    overflow: hidden;
    transition: max-height 0.24s ease, padding 0.24s ease;
}

.client-card__menu.open {
    max-height: 2000px;
    padding: 0 20px 18px;
}

.client-card__menu a {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(214, 228, 234, 0.42);
    border: 1px solid rgba(18, 69, 89, 0.18);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.client-preview-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.client-preview-nav__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 999px;
    flex: 0 0 auto;
    font-size: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Ccircle cx='120' cy='120' r='120' fill='%2329A9EA'/%3E%3Cpath fill='%23fff' d='M54.2 118.8c35.1-15.3 58.4-25.4 69.9-30.4 32.9-13.7 39.7-16.1 44.2-16.2 1 0 3.3.2 4.8 1.4 1.2 1 1.6 2.3 1.8 3.3.2 1 .4 3.2.2 4.9-1.9 19.8-10 67.9-14.2 90.1-1.8 9.4-5.3 12.6-8.7 12.9-7.4.7-13-4.9-20.1-9.5-11.1-7.3-17.4-11.8-28.2-18.9-12.5-8.2-4.4-12.7 2.7-20.1 1.9-1.9 34.3-31.4 34.9-34 .1-.3.1-1.5-.6-2.2-.7-.7-1.8-.4-2.6-.2-1.1.2-18.1 11.5-51 33.9-4.8 3.3-9.2 4.9-13.1 4.8-4.3-.1-12.7-2.4-18.9-4.4-7.5-2.4-13.5-3.7-13-7.8.3-2.2 3.3-4.5 9.3-6.9z'/%3E%3C/svg%3E");
}

.client-preview-links {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.client-preview-text-item {
    display: grid;
    gap: 8px;
}

.client-note {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.55);
}

.client-note p,
.object-note {
    margin: 8px 0 0;
    white-space: pre-wrap;
    line-height: 1.5;
}

.info-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
}

.toggle-form {
    margin-bottom: 16px;
}

.section-note {
    margin: 8px 0 0;
    color: var(--muted);
}

.info-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.icon-button {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(27, 37, 43, 0.2);
    background: rgba(255, 255, 255, 0.75);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.26);
    color: var(--text);
    cursor: pointer;
    line-height: 1;
    font-size: 1rem;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.icon-button:hover {
    transform: translateY(-1px);
}

.icon-button--danger {
    color: var(--danger);
    border-color: rgba(180, 35, 24, 0.18);
    background: rgba(180, 35, 24, 0.06);
}

button[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.object-buttons-list {
    display: grid;
    gap: 14px;
}

.object-button-card {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(27, 37, 43, 0.08);
    background: rgba(255, 255, 255, 0.5);
}

.object-button-card.is-link,
.object-button-card.is-text {
    border-left: 0;
}

.object-button-main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.object-button-type,
.object-button-meta {
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.35;
}

.object-button-pill {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 14px;
    background: rgba(214, 228, 234, 0.55);
    border: 1px solid rgba(18, 69, 89, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
    max-width: 100%;
}

.object-button-pill--text {
    width: fit-content;
}

.object-button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: 999px;
    background: rgba(18, 69, 89, 0.12);
    font-size: 0.48rem;
    line-height: 1;
    font-weight: 700;
}

.object-button-icon--txt {
    letter-spacing: 0.04em;
}

.object-preview-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    max-width: 100%;
}

.object-preview-pill--text {
    cursor: pointer;
    border: 1px solid rgba(18, 69, 89, 0.2);
    background: rgba(214, 228, 234, 0.42);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.inline-edit-form {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed rgba(27, 37, 43, 0.12);
}

.tab-row,
.operation-tags,
.flash-stack,
.legacy-files {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tab-row--object {
    margin-top: 16px;
}

.toolbar-row.wrap,
.grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.toolbar-row--spaced {
    margin-bottom: 16px;
}

.materials-summary-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.toolbar-search input {
    min-width: 260px;
}

.table-wrap {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(27, 37, 43, 0.08);
    text-align: left;
    vertical-align: top;
}

.data-table tbody tr {
    cursor: pointer;
}

.data-table tbody tr:hover {
    background: rgba(214, 228, 234, 0.28);
}

.timeline-card {
    padding: 16px;
    border-radius: 18px;
    background: rgba(214, 228, 234, 0.28);
}

.session-card {
    padding: 18px 20px;
    border: 1px solid rgba(27, 37, 43, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.session-card:hover {
    border-color: rgba(18, 69, 89, 0.16);
    background: rgba(255, 255, 255, 0.78);
}

.session-card--reports-done {
    border-color: rgba(84, 143, 98, 0.18);
    background: rgba(203, 228, 210, 0.28);
}

.session-card--reports-done:hover {
    border-color: rgba(84, 143, 98, 0.24);
    background: rgba(203, 228, 210, 0.4);
}

.session-card--reports-pending {
    border-color: rgba(189, 159, 64, 0.18);
    background: rgba(246, 232, 177, 0.3);
}

.session-card--reports-pending:hover {
    border-color: rgba(189, 159, 64, 0.24);
    background: rgba(246, 232, 177, 0.42);
}

.warehouse-log-card--incoming {
    border-color: rgba(84, 143, 98, 0.18);
    background: rgba(203, 228, 210, 0.42);
}

.warehouse-log-card--incoming:hover {
    border-color: rgba(84, 143, 98, 0.24);
    background: rgba(203, 228, 210, 0.56);
}

.warehouse-log-card--outgoing {
    border-color: rgba(176, 92, 92, 0.18);
    background: rgba(235, 209, 209, 0.42);
}

.warehouse-log-card--outgoing:hover {
    border-color: rgba(176, 92, 92, 0.24);
    background: rgba(235, 209, 209, 0.56);
}

.warehouse-log-card--neutral {
    border-color: rgba(27, 37, 43, 0.08);
}

.session-card__desktop,
.session-card__mobile {
    display: grid;
    gap: 14px;
}

.session-card__mobile {
    display: none;
}

.session-card__compact {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: start;
    width: 100%;
}

.session-card__top {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
}

.session-card__summary {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.session-card__summary strong {
    font-size: 0.98rem;
    line-height: 1.2;
}

.session-card__summary span {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.2;
}

.session-card__icons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: nowrap;
    margin-left: auto;
    flex: 0 0 auto;
}

.session-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(27, 37, 43, 0.2);
    background: rgba(214, 228, 234, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
    color: rgba(27, 37, 43, 0.38);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    line-height: 1;
    text-decoration: none;
    padding: 0;
}

.session-icon.is-active {
    color: var(--brand);
    border-color: rgba(18, 69, 89, 0.24);
    background: rgba(214, 228, 234, 0.54);
}

.session-icon--telegram.is-active {
    color: var(--brand);
}

.session-icon--telegram {
    font-size: 0;
}

.session-icon--telegram::before {
    content: "";
    width: 15px;
    height: 15px;
    display: block;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.48;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 240'%3E%3Ccircle cx='120' cy='120' r='120' fill='%2329A9EA'/%3E%3Cpath fill='%23fff' d='M54.2 118.8c35.1-15.3 58.4-25.4 69.9-30.4 32.9-13.7 39.7-16.1 44.2-16.2 1 0 3.3.2 4.8 1.4 1.2 1 1.6 2.3 1.8 3.3.2 1 .4 3.2.2 4.9-1.9 19.8-10 67.9-14.2 90.1-1.8 9.4-5.3 12.6-8.7 12.9-7.4.7-13-4.9-20.1-9.5-11.1-7.3-17.4-11.8-28.2-18.9-12.5-8.2-4.4-12.7 2.7-20.1 1.9-1.9 34.3-31.4 34.9-34 .1-.3.1-1.5-.6-2.2-.7-.7-1.8-.4-2.6-.2-1.1.2-18.1 11.5-51 33.9-4.8 3.3-9.2 4.9-13.1 4.8-4.3-.1-12.7-2.4-18.9-4.4-7.5-2.4-13.5-3.7-13-7.8.3-2.2 3.3-4.5 9.3-6.9z'/%3E%3C/svg%3E");
}

.session-icon--telegram.is-active::before {
    opacity: 1;
}

.session-icon--danger.is-active {
    color: #9a2f2f;
    border-color: rgba(154, 47, 47, 0.18);
    background: rgba(231, 205, 205, 0.48);
    cursor: pointer;
}

.session-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    align-items: baseline;
    justify-content: space-between;
}

.session-card__meta strong {
    font-size: 1rem;
    display: block;
}

.session-card__meta span {
    color: var(--muted);
}

.timeline-card__actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.session-card__rows {
    display: grid;
    gap: 14px;
}

.session-row {
    display: grid;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid rgba(27, 37, 43, 0.08);
}

.session-row:first-child {
    padding-top: 0;
    border-top: 0;
}

.session-row__text,
.session-card__preview {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.42;
    width: 100%;
    max-width: 100%;
}

.session-row__empty {
    margin: 0;
    color: var(--muted);
}

.session-media-strip,
.media-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 14px;
    margin-top: 8px;
    width: 100%;
}

.session-thumb,
.media-card img {
    display: block;
}

.session-thumb {
    width: 280px;
    max-width: 100%;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(18, 69, 89, 0.12);
    background: rgba(214, 228, 234, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.session-thumb img,
.media-card img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

.session-thumb--video {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 158px;
    background: rgba(18, 69, 89, 0.12);
    color: var(--brand);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.session-thumb--video strong {
    font-size: 1rem;
    text-transform: uppercase;
}

.session-file-badge,
.media-file-link {
    display: grid;
    gap: 4px;
    min-width: min(280px, 100%);
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(18, 69, 89, 0.12);
    background: rgba(214, 228, 234, 0.42);
}

.session-file-badge strong,
.media-file-link strong {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--brand);
}

.session-file-badge span,
.media-file-link span {
    word-break: break-word;
}

.session-file-badge--video strong,
.media-file-link--video strong {
    color: var(--accent);
}

.media-card {
    margin: 0;
}

.mini-table {
    display: grid;
    gap: 10px;
}

.mini-table div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
}

.admin-list {
    gap: 10px;
}

.admin-list__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.55);
}

.warehouse-log-card p {
    margin: 0 0 6px;
}

.message-card {
    scroll-margin-top: 120px;
}

.month-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
}

.month-nav--bottom {
    justify-content: flex-start;
}

.month-nav__button {
    min-width: 34px;
    height: 34px;
    padding: 0;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1;
}

.month-nav__button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(27, 37, 43, 0.2);
    background: transparent;
    box-shadow: none;
}

.month-nav__picker {
    position: relative;
}

.month-nav__picker summary {
    list-style: none;
}

.month-nav__picker summary::-webkit-details-marker {
    display: none;
}

.month-nav__current {
    min-width: 112px;
    text-align: center;
}

.schedule-filter {
    display: grid;
    gap: 8px;
    min-width: min(320px, 100%);
}

.schedule-filter-form {
    gap: 12px;
}

.schedule-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.month-nav-shell {
    margin-bottom: 20px;
}

.month-nav__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 8;
    display: grid;
    gap: 6px;
    min-width: 180px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(27, 37, 43, 0.12);
    background: rgba(255, 252, 246, 0.96);
    box-shadow: var(--shadow);
}

.month-nav__option {
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(27, 37, 43, 0.12);
    background: rgba(255, 255, 255, 0.82);
}

.month-nav__option.active {
    background: var(--brand-soft);
    border-color: rgba(18, 69, 89, 0.18);
}

.schedule-row--red td {
    background: rgba(190, 68, 90, 0.12);
}

.schedule-row--red td:first-child {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.schedule-row--red td:last-child {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.schedule-row--selectable {
    cursor: pointer;
}

.schedule-row--selectable td {
    background: rgba(18, 69, 89, 0.06);
}

.schedule-row--red.schedule-row--selectable td {
    background: rgba(190, 68, 90, 0.14);
}

.schedule-row--selectable:hover td {
    background: rgba(18, 69, 89, 0.12);
}

.schedule-row--red.schedule-row--selectable:hover td {
    background: rgba(190, 68, 90, 0.2);
}

.schedule-row--selected td {
    background: rgba(18, 69, 89, 0.3);
    color: #0f1b21;
    font-weight: 600;
}

.schedule-row--red.schedule-row--selected td {
    background: rgba(190, 68, 90, 0.28);
    color: #2b0f16;
}

.schedule-cell-value {
    white-space: pre-wrap;
    line-height: 1.45;
}

.compact-op-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 12px;
    align-items: center;
}

.compact-op-form > div {
    min-width: 0;
    justify-self: start;
    text-align: left;
}

.compact-op-form input {
    min-width: 0;
    width: 120px;
    justify-self: end;
}

.compact-op-form input::placeholder {
    color: rgba(27, 37, 43, 0.38);
}

.day-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.material-section__trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
}

.material-section__body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.24s ease, margin-top 0.24s ease;
}

.material-section__body.open {
    max-height: 2000px;
    margin-top: 14px;
}

.day-chip {
    position: relative;
}

.day-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.day-chip span {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(214, 228, 234, 0.3);
    border: 1px solid rgba(27, 37, 43, 0.08);
    cursor: pointer;
}

.day-chip input:checked + span {
    background: var(--brand-soft);
    border-color: rgba(18, 69, 89, 0.25);
}

.message-text {
    white-space: pre-wrap;
    line-height: 1.6;
}

.message-nav {
    display: flex;
    gap: 10px;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.media-card {
    margin: 0;
    padding: 12px;
    border-radius: 18px;
    background: rgba(214, 228, 234, 0.26);
}

.media-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 14px;
}

.result-box {
    padding: 16px;
    border-radius: 18px;
    background: rgba(18, 69, 89, 0.08);
}

.code-box {
    overflow-x: auto;
    white-space: pre-wrap;
}

.flash {
    padding: 14px 16px;
    border-radius: 16px;
}

.flash-success {
    background: rgba(15, 123, 85, 0.14);
}

.flash-error {
    background: rgba(180, 35, 24, 0.12);
}

.flash-warning {
    background: rgba(217, 108, 6, 0.14);
}

.flash-info {
    background: rgba(18, 69, 89, 0.12);
}

.error-panel {
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 900px) and (orientation: portrait) {
    .site-header,
    .auth-card,
    .toolbar-row.wrap,
    .grid-two,
    .split-grid {
        grid-template-columns: 1fr;
    }

    .site-header {
        position: static;
        grid-template-columns: auto minmax(0, 1fr);
        grid-template-areas:
            "brand actions"
            "nav nav";
        align-items: center;
    }

    .brand-cluster {
        grid-area: brand;
        justify-content: flex-start;
    }

    .header-nav {
        grid-area: nav;
    }

    .header-actions {
        grid-area: actions;
        width: auto;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 8px;
        min-width: 0;
    }
}

@media (max-width: 640px) and (orientation: portrait) {
    .site-header {
        gap: 12px;
        padding: 12px 14px;
    }

    .brand {
        gap: 10px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        border-radius: 14px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
    }

    .main-nav {
        width: 100%;
        flex-wrap: nowrap;
        gap: 6px;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .header-actions {
        flex-wrap: nowrap;
        gap: 6px;
    }

    .profile-chip {
        padding: 6px 8px 6px 10px;
        gap: 8px;
        min-width: 0;
    }

    .profile-chip strong {
        font-size: 0.85rem;
        line-height: 1.1;
    }

    .profile-chip small {
        font-size: 0.72rem;
        line-height: 1.1;
    }

    .header-icon-button,
    .admin-gear {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .main-nav a {
        padding: 7px 10px;
        font-size: 0.86rem;
        white-space: nowrap;
    }

    .section-head--compact {
        flex-direction: row;
        align-items: center;
    }

    .section-head--compact .stat-card {
        margin-left: auto;
    }

    .info-row {
        align-items: flex-start;
    }

    .object-button-meta {
        max-width: 100%;
    }

    .object-button-pill {
        width: fit-content;
    }

    .session-card {
        padding: 16px;
    }

    .session-card__compact {
        gap: 12px;
        width: 100%;
    }

    .session-card__icons {
        align-self: flex-start;
    }

    .session-thumb {
        width: 280px;
    }
}

@media (max-width: 640px) and (orientation: portrait) {
    .site-header,
    .page-shell {
        width: min(100vw - 20px, 1180px);
    }

    .panel,
    .auth-card {
        padding: 18px;
        border-radius: 18px;
    }

    .section-head:not(.section-head--compact),
    .toolbar-row,
    .pagination-row,
    .message-card__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .toolbar-search,
    .toolbar-search input {
        width: 100%;
    }

    .month-nav {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .month-nav__button {
        min-width: 36px;
        height: 36px;
        font-size: 1.45rem;
        font-weight: 800;
    }

    .materials-summary-grid {
        display: flex;
        flex-direction: column;
    }

    .materials-stock-panel {
        order: 1;
    }

    .materials-operations-panel {
        order: 2;
    }

    .compact-op-form {
        grid-template-columns: minmax(0, 1fr) 104px;
        gap: 10px;
    }

    .compact-op-form input {
        width: 104px;
    }

    .message-nav {
        width: 100%;
        justify-content: space-between;
    }
}

@media (max-width: 900px) and (orientation: landscape) {
    html {
        font-size: 77%;
    }

    html,
    body {
        overflow-x: auto;
    }

    .site-header,
    .page-shell {
        width: max(100vw - 20px, 860px);
        max-width: none;
    }

    .main-nav,
    .header-actions,
    .tab-row,
    .operation-tags {
        flex-wrap: nowrap;
    }

    .site-header {
        gap: 12px;
        padding: 11px 15px;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
    }

    .header-icon-button,
    .admin-gear {
        width: 29px;
        height: 29px;
        font-size: 0.82rem;
    }

    .profile-chip {
        padding: 5px 7px 5px 9px;
        gap: 7px;
    }

    .main-nav a,
    .tab-row a,
    .operation-tags a,
    .operation-tags span,
    .ghost-button,
    .primary-button,
    .file-pill {
        padding: 6px 9px;
    }

    .panel,
    .auth-card {
        padding: 18px;
    }

    .session-card {
        padding: 14px 15px;
    }
}
