/* КАТКО — корпоративные стили системы учёта имущества */
:root {
    --katko-blue: #009DE0;
    --katko-blue-light: #34B3E8;
    --katko-blue-dark: #0345BF;
    --katko-bg: #F4F7FA;
    --katko-accent: #FFC200;
    --katko-success: #1E8449;
    --katko-danger: #C0392B;
    --katko-warning: #B7950B;
    --katko-text: #252525;
}

/* Шрифт КАТКО — Montserrat (вендоринг, без CDN) */
@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-400.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-500.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-600.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-700.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

body {
    background-color: var(--katko-bg);
    font-family: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
    color: var(--katko-text);
}

/* ---------- Навигация ---------- */
.katko-sidebar {
    background: linear-gradient(180deg, var(--katko-blue-dark) 0%, var(--katko-blue) 100%);
    min-height: 100vh;
    padding: 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.katko-brand {
    padding: 1.1rem 1.2rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.katko-brand-logo {
    display: block;
    height: 34px;
    width: auto;
    margin: 0 auto 0.55rem;
    background: #fff;
    padding: 5px 12px;
    border-radius: 4px;
}

.katko-brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 0;
    text-align: center;
}

.katko-brand-sub {
    font-size: 0.78rem;
    opacity: 0.75;
    text-align: center;
}

.katko-nav {
    list-style: none;
    padding: 0.6rem 0;
    margin: 0;
}

.katko-nav a {
    display: block;
    padding: 0.62rem 1.2rem;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.katko-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-left-color: var(--katko-accent);
}

.katko-nav a.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-left-color: var(--katko-accent);
    font-weight: 600;
}

.katko-nav-section {
    padding: 0.7rem 1.2rem 0.25rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* ---------- Верхняя панель ---------- */
.katko-topbar {
    background: #fff;
    border-bottom: 1px solid #D5DEE8;
    padding: 0.6rem 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.katko-page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--katko-blue-dark);
    margin: 0;
}

.katko-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.katko-role-badge {
    font-size: 0.72rem;
    background: var(--katko-blue);
    color: #fff;
    border-radius: 10px;
    padding: 0.12rem 0.55rem;
}

/* ---------- Контент ---------- */
.katko-content {
    padding: 1.4rem;
}

.katko-card {
    background: #fff;
    border: 1px solid #D5DEE8;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 157, 224, 0.06);
}

.katko-stat-card {
    border-radius: 8px;
    padding: 1rem 1.1rem;
    color: #fff;
    border: none;
    transition: transform 0.12s ease;
}

.katko-stat-card:hover {
    transform: translateY(-2px);
}

.katko-stat-card .stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.1;
}

.katko-stat-card .stat-label {
    font-size: 0.82rem;
    opacity: 0.9;
}

.bg-katko-blue { background: var(--katko-blue) !important; }
.bg-katko-green { background: var(--katko-success) !important; }
.bg-katko-red { background: var(--katko-danger) !important; }
.bg-katko-orange { background: var(--katko-accent) !important; color: #252525 !important; }
.bg-katko-yellow { background: var(--katko-warning) !important; }
.bg-katko-teal { background: #148F77 !important; }

/* ---------- Таблицы ---------- */
.table thead th {
    background: var(--katko-blue);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.table td, .table th {
    vertical-align: middle;
    padding: 0.55rem 0.7rem;
}

.table-hover tbody tr:hover {
    background: #EDF3F9;
}

/* ---------- Статусы оборудования ---------- */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-working { background: #D5F5E3; color: #145A32; }
.status-broken { background: #FADBD8; color: #922B21; }
.status-repair { background: #FDEBD0; color: #9C640C; }
.status-waiting { background: #FCF3CF; color: #7D6608; }
.status-conserved { background: #D6DBDF; color: #424949; }
.status-write_off { background: #EDBB99; color: #6E2C00; }

/* ---------- Бейдж операций ---------- */
.op-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

.op-receipt { background: #D5F5E3; color: #145A32; }
.op-issue { background: #FADBD8; color: #922B21; }
.op-transfer { background: #D6EAF8; color: #1A5276; }
.op-return { background: #FCF3CF; color: #7D6608; }
.op-adjust { background: #E8DAEF; color: #6C3483; }
.op-inventory { background: #D1F2EB; color: #0E6251; }

/* ---------- Кнопки ---------- */
.btn-katko {
    background: var(--katko-blue);
    border-color: var(--katko-blue);
    color: #fff;
}

.btn-katko:hover, .btn-katko:focus {
    background: var(--katko-blue-dark);
    border-color: var(--katko-blue-dark);
    color: #fff;
}

.btn-outline-katko {
    border-color: var(--katko-blue);
    color: var(--katko-blue);
}

.btn-outline-katko:hover {
    background: var(--katko-blue);
    color: #fff;
}

/* ---------- Графики (простой CSS) ---------- */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 140px;
    padding-top: 8px;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.bar-stack {
    display: flex;
    flex-direction: column-reverse;
    width: 70%;
    max-width: 34px;
    border-radius: 3px 3px 0 0;
    overflow: hidden;
}

.bar-seg {
    width: 100%;
}

.bar-seg.receipt { background: #1E8449; }
.bar-seg.issue { background: #C0392B; }
.bar-seg.transfer { background: #009DE0; }
.bar-seg.return { background: #B7950B; }
.bar-seg.adjust { background: #7D3C98; }
.bar-seg.inventory { background: #148F77; }
.bar-seg.reversal { background: #5D6D7E; }
.bar-seg.write_off { background: #784212; }

.bar-label {
    font-size: 0.68rem;
    color: #566573;
    margin-top: 4px;
    white-space: nowrap;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 4px;
}

/* ---------- Карточка оборудования ---------- */
.asset-card-header {
    background: linear-gradient(135deg, var(--katko-blue) 0%, var(--katko-blue-light) 100%);
    color: #fff;
    padding: 1rem 1.3rem;
    border-radius: 8px 8px 0 0;
}

.asset-card-header .inv-number {
    font-size: 1.4rem;
    font-weight: 700;
}

.timeline {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.timeline li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.5rem;
    border-left: 2px solid #D5DEE8;
    font-size: 0.88rem;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 0.85rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--katko-blue);
}

/* ---------- Алерты ---------- */
.alert-lowstock {
    background: #FCF3CF;
    border-color: #F4D03F;
    color: #7D6608;
}

/* ---------- Логин ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--katko-blue-dark) 0%, var(--katko-blue) 60%, var(--katko-blue-light) 100%);
}

.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 2.2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.katco-login-logo {
    height: 80px;
    width: auto;
}

/* ---------- Утилиты ---------- */
.nowrap { white-space: nowrap; }
.text-katko { color: var(--katko-blue) !important; }
.muted-small { font-size: 0.82rem; color: #5D6D7E; }

/* ---------- Поиск в выпадающих списках складских операций ---------- */
.searchable-select {
    position: relative;
    width: 100%;
}

.searchable-select-input {
    padding-right: 2.6rem;
}

.searchable-select-toggle {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 2.5rem;
    border: 0;
    background: transparent;
    color: #52606d;
    font-size: 1.2rem;
    cursor: pointer;
}

.searchable-select-list {
    position: absolute;
    z-index: 1050;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    max-height: 16rem;
    overflow-y: auto;
    padding: 0.25rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    background: #fff;
    box-shadow: 0 0.35rem 0.8rem rgba(0, 0, 0, 0.14);
}

.searchable-select-option {
    display: block;
    width: 100%;
    padding: 0.4rem 0.6rem;
    border: 0;
    border-radius: 0.25rem;
    background: #fff;
    color: #212529;
    text-align: left;
    cursor: pointer;
}

.searchable-select-option:hover,
.searchable-select-option:focus {
    outline: none;
    background: #e9f2fb;
}

.searchable-select-empty {
    padding: 0.5rem 0.6rem;
    color: #6c757d;
}

@media (max-width: 768px) {
    .katko-sidebar {
        min-height: auto;
    }
    .katko-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 0.3rem;
    }
    .katko-nav a {
        padding: 0.4rem 0.7rem;
        border-left: none;
        border-bottom: 2px solid transparent;
        border-radius: 4px;
        font-size: 0.82rem;
    }
    .katko-nav a.active, .katko-nav a:hover {
        border-left: none;
        border-bottom-color: var(--katko-accent);
    }
    .katko-nav-section { display: none; }
    .katko-content { padding: 0.9rem; }
}.katco-brand-logo {
    display: block;
    height: 26px;
    width: auto;
    margin: 0 auto 0.55rem;
}/* КАТКО — корпоративные стили системы учёта имущества */
:root {
    --katko-blue: #009DE0;
    --katko-blue-light: #34B3E8;
    --katko-blue-dark: #0345BF;
    --katko-bg: #F4F7FA;
    --katko-accent: #FFC200;
    --katko-success: #1E8449;
    --katko-danger: #C0392B;
    --katko-warning: #B7950B;
    --katko-text: #252525;
}

/* Шрифт КАТКО — Montserrat (вендоринг, без CDN) */
@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-400.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-500.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-600.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Montserrat";
    src: url("../fonts/Montserrat-700.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

body {
    background-color: var(--katko-bg);
    font-family: "Montserrat", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 0.95rem;
    color: var(--katko-text);
}

/* ---------- Навигация ---------- */
.katko-sidebar {
    background: linear-gradient(180deg, var(--katko-blue-dark) 0%, var(--katko-blue) 100%);
    min-height: 100vh;
    padding: 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.katko-brand {
    padding: 1.1rem 1.2rem;
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.katko-brand-logo {
    display: block;
    height: 34px;
    width: auto;
    margin: 0 auto 0.55rem;
    background: #fff;
    padding: 5px 12px;
    border-radius: 4px;
}

.katko-brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin: 0;
    text-align: center;
}

.katko-brand-sub {
    font-size: 0.78rem;
    opacity: 0.75;
    text-align: center;
}

.katko-nav {
    list-style: none;
    padding: 0.6rem 0;
    margin: 0;
}

.katko-nav a {
    display: block;
    padding: 0.62rem 1.2rem;
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.92rem;
    border-left: 3px solid transparent;
    transition: all 0.15s ease;
}

.katko-nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-left-color: var(--katko-accent);
}

.katko-nav a.active {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-left-color: var(--katko-accent);
    font-weight: 600;
}

.katko-nav-section {
    padding: 0.7rem 1.2rem 0.25rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

/* ---------- Верхняя панель ---------- */
.katko-topbar {
    background: #fff;
    border-bottom: 1px solid #D5DEE8;
    padding: 0.6rem 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.katko-page-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--katko-blue-dark);
    margin: 0;
}

.katko-user {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
}

.katko-role-badge {
    font-size: 0.72rem;
    background: var(--katko-blue);
    color: #fff;
    border-radius: 10px;
    padding: 0.12rem 0.55rem;
}

/* ---------- Контент ---------- */
.katko-content {
    padding: 1.4rem;
}

.katko-card {
    background: #fff;
    border: 1px solid #D5DEE8;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 157, 224, 0.06);
}

.katko-stat-card {
    border-radius: 8px;
    padding: 1rem 1.1rem;
    color: #fff;
    border: none;
    transition: transform 0.12s ease;
}

.katko-stat-card:hover {
    transform: translateY(-2px);
}

.katko-stat-card .stat-value {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.1;
}

.katko-stat-card .stat-label {
    font-size: 0.82rem;
    opacity: 0.9;
}

.bg-katko-blue { background: var(--katko-blue) !important; }
.bg-katko-green { background: var(--katko-success) !important; }
.bg-katko-red { background: var(--katko-danger) !important; }
.bg-katko-orange { background: var(--katko-accent) !important; color: #252525 !important; }
.bg-katko-yellow { background: var(--katko-warning) !important; }
.bg-katko-teal { background: #148F77 !important; }

/* ---------- Таблицы ---------- */
.table thead th {
    background: var(--katko-blue);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}

.table td, .table th {
    vertical-align: middle;
    padding: 0.55rem 0.7rem;
}

.table-hover tbody tr:hover {
    background: #EDF3F9;
}

/* ---------- Статусы оборудования ---------- */
.status-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-working { background: #D5F5E3; color: #145A32; }
.status-broken { background: #FADBD8; color: #922B21; }
.status-repair { background: #FDEBD0; color: #9C640C; }
.status-waiting { background: #FCF3CF; color: #7D6608; }
.status-conserved { background: #D6DBDF; color: #424949; }
.status-write_off { background: #EDBB99; color: #6E2C00; }

/* ---------- Бейдж операций ---------- */
.op-badge {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}

.op-receipt { background: #D5F5E3; color: #145A32; }
.op-issue { background: #FADBD8; color: #922B21; }
.op-transfer { background: #D6EAF8; color: #1A5276; }
.op-return { background: #FCF3CF; color: #7D6608; }
.op-adjust { background: #E8DAEF; color: #6C3483; }
.op-inventory { background: #D1F2EB; color: #0E6251; }

/* ---------- Кнопки ---------- */
.btn-katko {
    background: var(--katko-blue);
    border-color: var(--katko-blue);
    color: #fff;
}

.btn-katko:hover, .btn-katko:focus {
    background: var(--katko-blue-dark);
    border-color: var(--katko-blue-dark);
    color: #fff;
}

.btn-outline-katko {
    border-color: var(--katko-blue);
    color: var(--katko-blue);
}

.btn-outline-katko:hover {
    background: var(--katko-blue);
    color: #fff;
}

/* ---------- Графики (простой CSS) ---------- */
.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 140px;
    padding-top: 8px;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.bar-stack {
    display: flex;
    flex-direction: column-reverse;
    width: 70%;
    max-width: 34px;
    border-radius: 3px 3px 0 0;
    overflow: hidden;
}

.bar-seg {
    width: 100%;
}

.bar-seg.receipt { background: #1E8449; }
.bar-seg.issue { background: #C0392B; }
.bar-seg.transfer { background: #009DE0; }
.bar-seg.return { background: #B7950B; }
.bar-seg.adjust { background: #7D3C98; }
.bar-seg.inventory { background: #148F77; }
.bar-seg.reversal { background: #5D6D7E; }
.bar-seg.write_off { background: #784212; }

.bar-label {
    font-size: 0.68rem;
    color: #566573;
    margin-top: 4px;
    white-space: nowrap;
}

.legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 4px;
}

/* ---------- Карточка оборудования ---------- */
.asset-card-header {
    background: linear-gradient(135deg, var(--katko-blue) 0%, var(--katko-blue-light) 100%);
    color: #fff;
    padding: 1rem 1.3rem;
    border-radius: 8px 8px 0 0;
}

.asset-card-header .inv-number {
    font-size: 1.4rem;
    font-weight: 700;
}

.timeline {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.timeline li {
    position: relative;
    padding: 0.4rem 0 0.4rem 1.5rem;
    border-left: 2px solid #D5DEE8;
    font-size: 0.88rem;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 0.85rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--katko-blue);
}

/* ---------- Алерты ---------- */
.alert-lowstock {
    background: #FCF3CF;
    border-color: #F4D03F;
    color: #7D6608;
}

/* ---------- Логин ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--katko-blue-dark) 0%, var(--katko-blue) 60%, var(--katko-blue-light) 100%);
}

.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 2.2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.katco-login-logo {
    height: 80px;
    width: auto;
}

/* ---------- Утилиты ---------- */
.nowrap { white-space: nowrap; }
.text-katko { color: var(--katko-blue) !important; }
.muted-small { font-size: 0.82rem; color: #5D6D7E; }

@media (max-width: 768px) {
    .katko-sidebar {
        min-height: auto;
    }
    .katko-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 0.3rem;
    }
    .katko-nav a {
        padding: 0.4rem 0.7rem;
        border-left: none;
        border-bottom: 2px solid transparent;
        border-radius: 4px;
        font-size: 0.82rem;
    }
    .katko-nav a.active, .katko-nav a:hover {
        border-left: none;
        border-bottom-color: var(--katko-accent);
    }
    .katko-nav-section { display: none; }
    .katko-content { padding: 0.9rem; }
}

/* ---------- Этап 3: акт списания ---------- */
.op-write_off { background: #EDBB99; color: #6E2C00; }
