:root {
    --app-ink: #163047;
    --app-muted: #6f7d8a;
    --app-cream: #f5efe2;
    --app-accent: #c65f2a;
    --app-accent-dark: #994311;
    --app-surface: #ffffff;
    --app-bg: linear-gradient(180deg, #f7f1e6 0%, #e8edf1 100%);
}

html {
    scrollbar-gutter: stable;
}

@supports not (scrollbar-gutter: stable) {
    html {
        overflow-y: scroll;
    }
}

body {
    font-family: "Manrope", sans-serif;
    color: var(--app-ink);
    background: var(--app-bg);
    background-attachment: fixed;
    background-position: center top;
    background-repeat: repeat;
    background-size: 1600px 1600px;
    min-height: 100vh;
}

.app-navbar {
    background:
        linear-gradient(135deg, #27318b, #17266f),
        #27318b;
    box-shadow: 0 8px 24px rgba(22, 48, 71, 0.14);
    min-height: 76px;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.app-navbar-container {
    padding-left: clamp(1rem, 2vw, 2rem);
    padding-right: clamp(1rem, 2vw, 2rem);
    gap: 0.45rem;
    transform: translateX(-10px);
}

.app-navbar .navbar-collapse {
    min-width: 0;
    gap: 0.65rem;
    align-items: center;
}

.app-navbar .navbar-nav {
    row-gap: 0.28rem;
    column-gap: 0.3rem;
    align-items: center;
}

.app-navbar .navbar-brand {
    font-size: 1.7rem;
    letter-spacing: 0;
}

.app-navbar-brand {
    display: inline-flex;
    align-items: center;
    padding: 0;
    border-radius: 8px;
    background: transparent;
    line-height: 1;
    margin-right: 0.1rem;
}

.app-navbar-brand__logo {
    display: block;
    width: auto;
    height: 68px;
    max-width: 300px;
    border-radius: 4px;
    object-fit: contain;
}

.app-navbar .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    border-radius: 999px;
    padding: 0.58rem 0.86rem;
    font-weight: 800;
    font-size: 0.94rem;
    line-height: 1.12;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.96);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.24);
}

.app-navbar .nav-link.active,
.app-navbar .nav-link:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.app-navbar .dropdown-menu {
    border: 0;
    border-radius: 18px;
    box-shadow: 0 16px 36px rgba(22, 48, 71, 0.18);
    padding: 0.5rem;
}

.app-navbar .dropdown-item {
    border-radius: 12px;
    padding: 0.6rem 0.85rem;
    font-weight: 600;
}

.navbar-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-meta__text {
    margin: 0;
    color: rgba(255, 255, 255, 0.88) !important;
    font-size: 0.88rem;
    line-height: 1.2;
    text-align: right;
    font-weight: 700;
}

.navbar-meta__logout {
    min-height: 38px;
    padding: 0.45rem 0.92rem;
    border-radius: 8px;
    font-weight: 800;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
}

.navbar-toggler-icon {
    filter: invert(1);
}

.hero-card,
.panel-card,
.login-card {
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 14px 32px rgba(22, 48, 71, 0.07);
}

.hero-card {
    overflow: hidden;
    position: relative;
    isolation: isolate;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: auto -60px -60px auto;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(198, 95, 42, 0.18), transparent 65%);
    pointer-events: none;
}

.admin-module-hero {
    background: #ffffff;
}

.admin-module-hero::after {
    display: none;
}

.metric-card {
    border-radius: 8px;
    padding: 1.25rem;
    background: var(--app-surface);
    box-shadow: inset 0 0 0 1px rgba(22, 48, 71, 0.06);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 10px 25px rgba(22, 48, 71, 0.06);
}

.dashboard-title {
    margin: 0;
    font-size: clamp(1.75rem, 3.3vw, 2.4rem);
    font-weight: 800;
    color: var(--app-ink);
}

.dashboard-subtitle {
    color: var(--app-muted);
    max-width: 720px;
}

.dashboard-userbox {
    min-width: 220px;
    padding: 0.95rem 1rem;
    border-radius: 8px;
    background: #eef3f6;
    border: 1px solid rgba(22, 48, 71, 0.08);
}

.dashboard-userlabel {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--app-muted);
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.dashboard-usertext {
    font-weight: 700;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-modules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-module-card {
    display: block;
    padding: 1.05rem 1.1rem;
    border-radius: 6px;
    border: 1px solid rgba(22, 48, 71, 0.12);
    background: #f8fafb;
    color: var(--app-ink);
    text-decoration: none;
}

.dashboard-module-card:hover {
    color: var(--app-ink);
    background: #eef3f6;
}

.dashboard-module-title {
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.dashboard-module-desc {
    color: var(--app-muted);
    font-size: 0.94rem;
}

.metric-label {
    color: var(--app-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.metric-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.btn-primary {
    background: var(--app-accent);
    border-color: var(--app-accent);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--app-accent-dark);
    border-color: var(--app-accent-dark);
}

.table thead th {
    color: var(--app-muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.login-card {
    width: min(440px, 100%);
    border-radius: 28px;
    box-shadow: 0 25px 60px rgba(22, 48, 71, 0.16);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-logo img {
    display: block;
    width: min(220px, 100%);
    height: auto;
}

.login-submit {
    border-color: #27318b;
    background: #27318b;
}

.login-submit:hover,
.login-submit:focus {
    border-color: #17266f;
    background: #17266f;
}

.eyebrow {
    color: var(--app-accent);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.warehouse-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.warehouse-title {
    grid-column: 1 / -1;
    border-radius: 4px;
    background: #2f89b7;
    color: #ffffff;
    text-align: center;
    font-weight: 800;
    padding: 0.85rem 1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.warehouse-group {
    background: #ffffff;
    border-radius: 2px;
    overflow: hidden;
    border: 1px solid rgba(22, 48, 71, 0.12);
    box-shadow: none;
}

.warehouse-group-name {
    background: var(--group-color);
    min-height: 72px;
    display: grid;
    place-items: center;
    text-align: center;
    font-weight: 700;
    padding: 0.85rem;
    border-bottom: 1px solid rgba(22, 48, 71, 0.12);
    color: #0f2b40;
}

.warehouse-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.warehouse-link {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 92px;
    text-align: center;
    text-decoration: none;
    color: var(--app-ink);
    font-weight: 700;
    padding: 0.85rem 0.75rem;
}

.warehouse-link-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
    margin-bottom: 0.35rem;
}

.warehouse-link-stock {
    background: #f4f6f8;
    border-right: 1px solid rgba(22, 48, 71, 0.12);
}

.warehouse-link-history {
    background: #f2f2f2;
}

.warehouse-link:hover {
    color: var(--app-ink);
    background: #e8edf1;
}

.warehouse-count {
    margin-top: 0.5rem;
    display: inline-flex;
    min-width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    background: rgba(22, 48, 71, 0.1);
    font-size: 0.95rem;
    font-weight: 800;
}

.stock-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
    align-items: center;
}

.stock-toolbar > * {
    flex: 0 0 auto;
}

.stock-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.92rem;
    color: var(--app-muted);
}

.stock-breadcrumb-link {
    color: var(--app-ink);
    text-decoration: none;
    font-weight: 700;
}

.stock-breadcrumb-link:hover {
    color: var(--app-accent-dark);
}

.stock-breadcrumb-sep {
    color: rgba(22, 48, 71, 0.4);
}

.stock-breadcrumb-current {
    color: var(--app-muted);
    font-weight: 700;
}

.stock-toolbar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 0.95rem;
    border-radius: 10px;
    background: #2ca8db;
    color: #072536;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border: 0;
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    cursor: pointer;
    user-select: none;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.1;
    white-space: nowrap;
    pointer-events: auto;
}

.stock-toolbar-btn:hover {
    color: #072536;
    filter: brightness(0.97);
}

.stock-toolbar-btn-muted {
    background: #dfe7ec;
}

.stock-toolbar-btn.is-disabled,
.stock-toolbar-btn[aria-disabled="true"] {
    background: #eef3f6;
    color: #8a98a6;
    pointer-events: none;
    cursor: default;
    box-shadow: none;
}

.stock-toolbar-btn-accent {
    background: #4ab8ec;
}

.stock-toolbar-search {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    min-width: min(100%, 420px);
}

.stock-collapse-panel {
    border-top: 1px solid rgba(22, 48, 71, 0.08);
}

.stock-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(180deg, rgba(244, 247, 249, 0.95), rgba(234, 240, 244, 0.9));
    border-bottom: 1px solid rgba(22, 48, 71, 0.08);
}

.stock-form-grid {
    border-radius: 10px;
}

.stock-form-label {
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--app-muted);
}

.stock-form-control {
    min-height: 48px;
    border-radius: 14px;
    border-color: rgba(22, 48, 71, 0.12);
    background: rgba(255, 255, 255, 0.95);
}

textarea.stock-form-control {
    min-height: 112px;
}

.stock-form-control:focus {
    border-color: rgba(198, 95, 42, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(198, 95, 42, 0.14);
}

.stock-sheet {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(241, 245, 247, 0.94));
}

.stock-category-container {
    max-width: 100%;
    padding-left: clamp(0.75rem, 1.4vw, 1.5rem);
    padding-right: clamp(0.75rem, 1.4vw, 1.5rem);
}

.stock-excel-table thead th {
    background: #235f9f;
    background-color: #235f9f;
    color: #ffffff;
    vertical-align: middle;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.9rem;
    font-weight: 900;
    border-bottom: 3px solid rgba(16, 55, 96, 0.42);
    line-height: 1.18;
    padding: 1.05rem 0.68rem;
    text-align: left;
    white-space: normal;
    min-width: 96px;
}

.stock-excel-table thead th:first-child {
    min-width: 52px;
}

.stock-excel-table thead th .stock-head-label {
    display: block;
    max-width: 18ch;
    margin: 0;
    white-space: normal;
    overflow-wrap: normal;
    font-weight: 900;
}

.stock-bulk-grid th,
.wagon-bulk-grid th,
.wagon-presence-table thead th,
.repair-calendar-table thead th,
.repair-schedule-header-row th {
    background: #235f9f !important;
    background-color: #235f9f !important;
    color: #ffffff !important;
    text-align: left !important;
    white-space: normal;
    line-height: 1.15;
}

.stock-bulk-grid th,
.wagon-bulk-grid th {
    border-bottom-color: rgba(16, 55, 96, 0.28);
}

.stock-excel-table td {
    font-size: 0.88rem;
    vertical-align: middle;
    line-height: 1.3;
    padding: 0.68rem 0.65rem;
}

.stock-excel-table tbody tr:nth-child(even) {
    background: #f1f5f9;
}

.stock-excel-table tbody tr:nth-child(even) > td {
    background: #f1f5f9;
}

.stock-excel-table tbody tr:nth-child(odd) > td {
    background: #ffffff;
}

.stock-excel-table tbody tr:hover {
    background: #e8eff6;
}

.stock-excel-table tbody tr:hover > td {
    background: #e8eff6;
}

.stock-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 102px;
    min-height: 34px;
    padding: 0.3rem 0.65rem;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    font-size: 0.84rem;
}

.stock-excel-table .stock-status-badge,
.stock-history-table-panel .stock-status-badge {
    width: 154px;
    min-width: 154px;
    max-width: 154px;
    white-space: normal;
    line-height: 1.12;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.status-good {
    background: #9fd86c;
    color: #12310f;
}

.status-good-pss {
    background: #bde98a;
    color: #12310f;
}

.status-ok {
    background: #9fd86c;
    color: #12310f;
}

.status-bad {
    background: #f39a3d;
    color: #3a2107;
}

.status-scrap {
    background: #ef4f4f;
    color: #fff;
}

.status-warn {
    background: #f0cb55;
    color: #473600;
}

.status-pss {
    background: #1f62ca;
    color: #fff;
}

.status-sonk {
    background: #14613a;
    color: #fff;
}

.status-dark {
    background: #4b5563;
    color: #fff;
}

.status-neutral {
    background: #dbe4ea;
    color: #163047;
}

.status-info {
    background: #d9e8f6;
    color: #163047;
}

.stock-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
}

.stock-quick-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0.5rem 0.85rem;
    border-radius: 7px;
    border: 1px solid rgba(22, 48, 71, 0.14);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.94rem;
    line-height: 1.1;
    transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.stock-quick-filter:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(22, 48, 71, 0.08);
    filter: brightness(0.99);
}

.stock-quick-filter.is-all {
    background: #707780;
    color: #fff;
}

.stock-quick-filter.is-good {
    background: #fff;
    color: #198754;
    border-color: rgba(25, 135, 84, 0.32);
}

.stock-quick-filter.is-bad {
    background: #fff;
    color: #bf6508;
    border-color: rgba(243, 154, 61, 0.45);
}

.stock-quick-filter.is-scrap {
    background: #fff;
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.38);
}

.stock-quick-filter.is-pss {
    background: #fff;
    color: #1f62ca;
    border-color: rgba(31, 98, 202, 0.32);
}

.stock-quick-filter.is-sonk {
    background: #fff;
    color: #14613a;
    border-color: rgba(20, 97, 58, 0.42);
}

.stock-quick-filter.is-active {
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.24), 0 10px 18px rgba(22, 48, 71, 0.12);
}

.stock-owner-filter-panel {
    padding: 1rem 1.35rem;
    border-bottom: 1px solid rgba(22, 48, 71, 0.08);
    background: #fbfdff;
}

.stock-owner-filter-form {
    display: flex;
    align-items: end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stock-owner-filter-field {
    flex: 1 1 420px;
    min-width: 280px;
}

.stock-owner-filter-field .stock-form-label {
    margin-bottom: 0.3rem;
}

.stock-owner-filter-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.wagon-status-filters {
    padding: 0.85rem 0.9rem 0.7rem;
    border-top: 1px solid rgba(22, 48, 71, 0.08);
    justify-content: flex-end;
}

.wagon-status-filter {
    min-width: 136px;
    justify-content: space-between;
    gap: 0.55rem;
}

.wagon-status-filter strong {
    font-size: 0.84rem;
    font-weight: 800;
}

.wagon-status-filter.is-arrived {
    background: #fff;
    color: #3f4852;
    border-color: rgba(63, 72, 82, 0.32);
}

.wagon-status-filter.is-repair {
    background: #fff;
    color: #9a7100;
    border-color: rgba(232, 195, 77, 0.42);
}

.wagon-status-filter.is-completed {
    background: #fff;
    color: #3f8a12;
    border-color: rgba(63, 138, 18, 0.28);
}

.wagon-status-filter.is-waiting {
    background: #fff;
    color: #a44707;
    border-color: rgba(164, 71, 7, 0.34);
}

.wagon-status-filter.is-neutral {
    background: #fff;
    color: #5c6770;
    border-color: rgba(92, 103, 112, 0.22);
}

.stock-actions-cell {
    white-space: nowrap;
}

.stock-actions-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.stock-actions-inline form {
    margin: 0;
}

.stock-history-nav .btn,
.stock-history-edit-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.45rem 0.9rem;
    line-height: 1.1;
    white-space: nowrap;
    position: relative;
    z-index: 5;
    pointer-events: auto;
}

.stock-history-nav {
    position: relative;
    z-index: 5;
}

.stock-history-page {
    max-width: none;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    background:
        linear-gradient(180deg, rgba(34, 40, 49, 0.94), rgba(25, 31, 39, 0.96)),
        #222831;
    border-radius: 0;
    box-shadow: inset 0 18px 44px rgba(0, 0, 0, 0.12);
}

.stock-history-page .hero-card {
    background:
        linear-gradient(135deg, rgba(20, 28, 40, 0.96), rgba(57, 66, 80, 0.94)),
        #1f2933;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #f3f6f8;
    box-shadow: 0 18px 38px rgba(16, 24, 34, 0.22);
}

.stock-history-page .hero-card .eyebrow {
    color: #ffb15d;
}

.stock-history-page .hero-card .text-secondary {
    color: #c1ccd6 !important;
}

.stock-history-page > .panel-card {
    background: linear-gradient(180deg, #2d3642 0%, #252e38 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 28px rgba(8, 13, 20, 0.16);
}

.stock-history-page .stock-history-search,
.stock-history-page .stock-quick-filters {
    background: transparent;
}

.stock-history-page .stock-form-label {
    color: #d2dae3;
}

.stock-history-page .stock-history-search .stock-form-control {
    background: #f8fafc;
    border-color: rgba(255, 255, 255, 0.22);
    color: #162130;
}

.stock-history-page .stock-quick-filter {
    background: #f8fafc;
}

.stock-history-page .stock-quick-filter.is-active {
    background: #6b7280;
    color: #ffffff;
    border-color: #9ca3af;
}

.stock-history-table-panel {
    padding: 0.85rem;
    border-color: rgba(19, 27, 38, 0.3);
    background: linear-gradient(180deg, #293241 0%, #1f2933 100%);
    box-shadow: 0 18px 36px rgba(18, 26, 36, 0.18);
}

.stock-history-table-panel .table-responsive {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    overflow: auto;
    background: #121a24;
}

.stock-history-table-panel .stock-excel-table thead th {
    background: #111827 !important;
    background-color: #111827 !important;
    color: #f8fafc !important;
    border-bottom: 3px solid #c75f24;
    border-right-color: rgba(255, 255, 255, 0.09);
    font-size: 0.92rem;
    text-shadow: none;
}

.stock-history-table-panel .stock-excel-table tbody td {
    border-color: rgba(255, 255, 255, 0.07);
    color: #162130;
}

.stock-history-table-panel .stock-excel-table tbody tr:nth-child(odd) > td {
    background: #f6f1e9;
}

.stock-history-table-panel .stock-excel-table tbody tr:nth-child(even) > td {
    background: #e4e1dc;
}

.stock-history-table-panel .stock-excel-table tbody tr:hover > td {
    background: #ffd8a8;
    color: #111827;
}

.stock-history-table-panel .stock-excel-table tbody td.text-secondary {
    color: #5d6874 !important;
}

.stock-history-table-panel .badge.text-bg-light {
    background: #d7dce2 !important;
    color: #2c3540 !important;
    border-color: #aeb8c2 !important;
}

.stock-actions-cell .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0.36rem 0.68rem;
    line-height: 1.1;
    border-radius: 6px;
    font-size: 0.84rem;
}

.stock-actions-cell .stock-history-edit-icon {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    font-size: 1.05rem;
    line-height: 1;
}

.stock-history-delete-form {
    display: inline-flex;
    margin: 0;
}

.stock-actions-cell .stock-history-delete-icon {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    font-size: 1rem;
    line-height: 1;
    font-weight: 800;
    text-transform: lowercase;
}

.stock-actions-cell .stock-icon-btn {
    width: 32px;
    min-width: 32px;
    padding-left: 0;
    padding-right: 0;
    font-size: 0.95rem;
}

.stock-delete-btn {
    min-width: 32px;
    padding-inline: 0.45rem;
}

.wagon-delete-icon-btn {
    width: 34px;
    min-width: 34px;
    padding: 0;
}

.wagon-delete-icon {
    font-size: 0.95rem;
    line-height: 1;
    display: inline-block;
}

.stock-action-shell {
    max-width: 980px;
    margin: 0 auto;
}

.stock-action-hero {
    border: 1px solid rgba(22, 48, 71, 0.08);
    box-shadow: 0 14px 28px rgba(22, 48, 71, 0.05);
}

.stock-action-hero-copy {
    max-width: 760px;
}

.stock-action-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
    gap: 0.5rem;
}

.stock-action-summary-card {
    border: 1px solid rgba(22, 48, 71, 0.1);
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    background: linear-gradient(180deg, rgba(250, 252, 255, 0.98), rgba(240, 245, 250, 0.92));
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.stock-action-summary-card--wide {
    grid-column: span 2;
}

.stock-action-summary-card strong {
    color: #163047;
    font-size: 0.86rem;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.stock-action-summary-label {
    color: #6b7b8e;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.stock-action-card {
    border-radius: 10px;
    border: 1px solid rgba(22, 48, 71, 0.08);
    box-shadow: 0 18px 36px rgba(22, 48, 71, 0.08);
}

.stock-action-form {
    display: grid;
    gap: 0.6rem;
}

.stock-action-section {
    border: 1px solid rgba(22, 48, 71, 0.1);
    background: linear-gradient(180deg, rgba(249, 251, 252, 0.98), rgba(243, 247, 250, 0.9));
    border-radius: 8px;
    padding: 0.65rem 0.75rem;
}

.stock-action-section-title {
    color: #163047;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.stock-action-list {
    display: grid;
    gap: 0.55rem;
}

.stock-action-option + .stock-action-option {
    margin-top: 0;
}

.stock-action-option {
    border: 1px solid rgba(22, 48, 71, 0.1);
    background: #ffffff;
    border-radius: 8px;
    padding: 0.55rem 0.65rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.stock-action-option.is-active {
    border-color: rgba(72, 170, 223, 0.65);
    box-shadow: 0 10px 24px rgba(72, 170, 223, 0.14);
}

.stock-action-radio {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #163047;
}

.stock-action-fields {
    margin-top: 0.5rem;
    margin-left: 1.45rem;
}

.stock-action-hint {
    color: #6b7b8e;
    font-size: 0.78rem;
    margin-bottom: 0.4rem;
}

.stock-action-check {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.stock-action-type-pill {
    min-height: 38px;
    border: 1px solid rgba(22, 48, 71, 0.1);
    border-radius: 12px;
    background: linear-gradient(180deg, rgba(245, 248, 251, 0.95), rgba(236, 242, 247, 0.95));
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.7rem;
    color: #163047;
    font-size: 0.88rem;
    font-weight: 700;
    width: fit-content;
    min-width: 140px;
}

.stock-action-submit-row {
    display: flex;
    justify-content: flex-end;
}

.stock-action-submit {
    min-height: 42px;
    font-weight: 800;
    min-width: 180px;
    margin-top: 0;
}

.stock-action-page-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #163047;
}

.stock-action-page-meta {
    color: #6b7b8e;
    font-weight: 500;
    font-size: 0.82rem;
}

.stock-action-shell .stock-form-control {
    min-height: 40px;
    padding: 0.45rem 0.72rem;
    font-size: 0.9rem;
}

.stock-action-shell textarea.stock-form-control {
    min-height: 76px;
}

.stock-action-shell .stock-form-label {
    margin-bottom: 0.25rem;
    font-size: 0.76rem;
}

.stock-action-shell .p-lg-4,
.stock-action-shell .p-4,
.stock-action-shell .p-3 {
    padding: 1rem !important;
}

.stock-action-date-field {
    max-width: 180px;
}

.stock-action-target-field {
    max-width: 360px;
}

@media (max-width: 767.98px) {
    .stock-action-date-field,
    .stock-action-target-field {
        max-width: 100%;
    }
}

.stock-history-edit-shell {
    max-width: 1100px;
    margin: 0 auto;
}

.stock-history-edit-form {
    display: grid;
    gap: 1.25rem;
}

.stock-history-edit-section {
    border: 1px solid rgba(22, 48, 71, 0.1);
    background: #f9fbfc;
}

.stock-history-edit-section-title {
    padding: 0.8rem 1rem;
    background: #eef3f6;
    border-bottom: 1px solid rgba(22, 48, 71, 0.1);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #163047;
}

.stock-history-edit-section .row {
    padding: 1rem;
}

.stock-history-edit-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 0.25rem;
}

.wagon-presence-shell {
    border-radius: 8px;
    border: 1px solid rgba(22, 48, 71, 0.08);
    background:
        radial-gradient(circle at top right, rgba(229, 184, 98, 0.18), transparent 32%),
        linear-gradient(180deg, rgba(251, 252, 252, 0.98), rgba(243, 247, 249, 0.98));
    box-shadow: 0 14px 28px rgba(22, 48, 71, 0.05);
}

.wagon-presence-titlebar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.wagon-presence-heading {
    min-width: 280px;
}

.wagon-presence-kicker {
    display: inline-block;
    padding: 0.28rem 0.6rem;
    border-radius: 4px;
    background: #eef3f6;
    color: var(--app-ink);
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border: 1px solid rgba(22, 48, 71, 0.08);
}

.wagon-presence-title {
    margin: 0.85rem 0 0;
    font-size: clamp(1.8rem, 3.5vw, 2.25rem);
    font-weight: 800;
    color: var(--app-ink);
}

.wagon-presence-stats {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.wagon-presence-stats--history {
    align-items: stretch;
    justify-content: flex-end;
}

.wagon-presence-stat {
    min-width: 120px;
    padding: 0.75rem 0.9rem;
    border-radius: 6px;
    background: rgba(248, 250, 251, 0.96);
    border: 1px solid rgba(22, 48, 71, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.wagon-presence-stat--history {
    min-width: 148px;
}

.wagon-presence-stat-label {
    display: block;
    color: var(--app-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.2rem;
}

.wagon-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    min-height: 56px;
}

.wagon-toolbar-search {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex: 1 1 420px;
}

.wagon-history-search {
    flex-wrap: wrap;
    justify-content: space-between;
}

.wagon-history-search .stock-form-control {
    flex: 1 1 360px;
}

.wagon-history-search-actions {
    display: inline-flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

.wagon-history-page {
    background:
        linear-gradient(180deg, rgba(34, 40, 49, 0.94), rgba(25, 31, 39, 0.96)),
        #222831;
    border-radius: 0;
    box-shadow: inset 0 18px 44px rgba(0, 0, 0, 0.12);
}

.wagon-history-page .wagon-presence-shell {
    background:
        linear-gradient(135deg, rgba(20, 28, 40, 0.96), rgba(57, 66, 80, 0.94)),
        #1f2933;
    border-color: rgba(255, 255, 255, 0.08);
    color: #f3f6f8;
    box-shadow: 0 18px 38px rgba(16, 24, 34, 0.22);
}

.wagon-history-page .wagon-presence-kicker {
    background: rgba(255, 177, 93, 0.12);
    border-color: rgba(255, 177, 93, 0.26);
    color: #ffb15d;
}

.wagon-history-page .wagon-presence-title {
    color: #f8fafc;
}

.wagon-history-page .wagon-presence-shell .text-secondary {
    color: #c1ccd6 !important;
}

.wagon-history-page > .panel-card {
    background: linear-gradient(180deg, #2d3642 0%, #252e38 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 14px 28px rgba(8, 13, 20, 0.16);
}

.wagon-history-page .wagon-presence-stat--history {
    background: rgba(17, 24, 39, 0.72);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.wagon-history-page .wagon-presence-stat--history .wagon-presence-stat-label {
    color: #aeb8c5;
}

.wagon-history-page .wagon-presence-stat--history strong {
    color: #f8fafc;
}

.wagon-history-page .wagon-history-search .stock-form-control {
    flex: 0 0 24ch;
    width: 24ch;
    min-width: 24ch;
    max-width: 24ch;
    background: #f8fafc;
    border-color: rgba(255, 255, 255, 0.22);
    color: #162130;
}

.wagon-history-page .wagon-history-search {
    justify-content: flex-end;
    width: 100%;
    gap: 0.55rem;
}

.wagon-history-page .wagon-history-search-actions {
    margin-left: 0;
    justify-content: flex-end;
    gap: 0.55rem;
}

.wagon-history-page .wagon-section-tabs {
    background: #202936;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.wagon-history-page .wagon-section-tab {
    color: #c8d2dd;
}

.wagon-history-page .wagon-section-tab:not(.is-active) {
    opacity: 0.68;
}

.wagon-history-page .wagon-section-tab.is-active {
    background: #111827;
    color: #ffffff;
    border-color: rgba(255, 177, 93, 0.32);
}

.wagon-history-page .wagon-hero {
    background: linear-gradient(180deg, #293241 0%, #1f2933 100%);
    border-color: rgba(19, 27, 38, 0.3);
    box-shadow: 0 18px 36px rgba(18, 26, 36, 0.18);
}

.wagon-history-page .wagon-table-wrap {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 8px 8px;
    background: #121a24;
}

.wagon-history-page .wagon-history-table thead th {
    background: #111827 !important;
    background-color: #111827 !important;
    color: #f8fafc !important;
    border-bottom: 3px solid #c75f24;
    border-right-color: rgba(255, 255, 255, 0.09);
    text-shadow: none;
}

.wagon-history-page .wagon-history-table tbody td {
    border-color: rgba(255, 255, 255, 0.07);
    color: #162130;
}

.wagon-history-page .wagon-history-table tbody tr:nth-child(odd) > td {
    background: #f6f1e9;
}

.wagon-history-page .wagon-history-table tbody tr:nth-child(even) > td {
    background: #e4e1dc;
}

.wagon-history-page .wagon-history-table tbody tr:hover > td {
    background: #ffd8a8;
    color: #111827;
}

.wagon-history-page .wagon-history-empty {
    background: #202936 !important;
    color: #b8c4d0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wagon-history-page .wagon-history-pagination-card {
    background: linear-gradient(180deg, #2d3642 0%, #252e38 100%);
}

.wagon-history-page .wagon-history-page-number {
    background: #f8fafc;
    color: #162130;
}

.wagon-history-page .wagon-history-page-number.is-active {
    background: #111827;
    border-color: #c75f24;
    color: #ffffff;
}

.wagon-toolbar-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.wagon-toolbar-actions .stock-toolbar-btn {
    min-height: 44px;
}

.wagon-row-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
    min-width: 0;
}

.wagon-row-actions--center {
    align-items: center;
}

.wagon-inline-form {
    margin: 0;
    display: inline-flex;
    align-items: flex-start;
    align-self: flex-start;
}

.wagon-hidden-form {
    display: none;
    margin: 0;
}

.wagon-depart-cell {
    min-width: 170px;
}

.wagon-date-form {
    margin: 0;
    width: auto;
}

.wagon-depart-date {
    min-height: 42px;
}

.wagon-entry-form {
    max-width: 100%;
}

.wagon-entry-form .stock-form-control {
    border-radius: 6px;
}

.wagon-sheet {
    display: grid;
    gap: 0;
    border: 1px solid rgba(22, 48, 71, 0.08);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.wagon-sheet-row {
    display: grid;
    grid-template-columns: 160px minmax(190px, 1fr) 160px minmax(190px, 1fr);
    border-bottom: 1px solid rgba(22, 48, 71, 0.08);
}

.wagon-sheet-row:last-child {
    border-bottom: 0;
}

.wagon-sheet-row--wide {
    grid-template-columns: 160px minmax(0, 1fr);
}

.wagon-sheet-label,
.wagon-sheet-field {
    min-width: 0;
    padding: 0.6rem 0.72rem;
}

.wagon-sheet-label {
    display: flex;
    align-items: center;
    background: #f5f8fa;
    border-right: 1px solid rgba(22, 48, 71, 0.08);
    color: #5f7283;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    line-height: 1.2;
}

.wagon-sheet-field {
    display: flex;
    align-items: center;
    background: #fff;
}

.wagon-sheet-field:nth-child(2) {
    border-right: 1px solid rgba(22, 48, 71, 0.08);
}

.wagon-sheet-row--wide .wagon-sheet-field:nth-child(2) {
    border-right: 0;
}

.wagon-sheet-field .stock-form-control,
.wagon-sheet-field .form-select.stock-form-control {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.wagon-sheet-field--full {
    align-items: stretch;
}

.wagon-entry-grid {
    row-gap: 0.85rem !important;
}

.wagon-entry-grid .stock-form-label {
    margin-bottom: 0.3rem;
}

.wagon-entry-form textarea.stock-form-control {
    min-height: 58px;
}

.wagon-waiting-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.wagon-waiting-date {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.3rem 0.7rem;
    border: 1px solid rgba(22, 48, 71, 0.12);
    border-radius: 8px;
    background: #f6f9fb;
    color: #52677b;
    font-size: 0.88rem;
    font-weight: 700;
}

.wagon-waiting-toggle {
    border: 1px solid rgba(22, 48, 71, 0.22);
    background: #ffffff;
    color: var(--app-ink);
    font-weight: 700;
    min-height: 34px;
    padding: 0.35rem 0.75rem;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.wagon-waiting-toggle:hover {
    background: #f5f8fa;
    border-color: rgba(22, 48, 71, 0.3);
    color: var(--app-ink);
}

.btn-check:checked + .wagon-waiting-toggle {
    background: linear-gradient(180deg, #6fbe74 0%, #4cae58 100%);
    border-color: #459d50;
    color: #ffffff;
    box-shadow: 0 0 0 0.2rem rgba(76, 174, 88, 0.18);
}

.btn-check:focus-visible + .wagon-waiting-toggle,
.btn-check:focus + .wagon-waiting-toggle {
    box-shadow: 0 0 0 0.2rem rgba(76, 174, 88, 0.16);
}

.wagon-waiting-modal[hidden] {
    display: none;
}

.wagon-waiting-modal {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.wagon-waiting-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 48, 71, 0.46);
}

.wagon-waiting-modal__dialog {
    position: relative;
    width: min(430px, 100%);
    border: 1px solid rgba(22, 48, 71, 0.12);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(22, 48, 71, 0.24);
    overflow: hidden;
}

.wagon-waiting-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem 0.75rem;
    border-bottom: 1px solid rgba(22, 48, 71, 0.08);
}

.wagon-waiting-modal__title {
    margin: 0;
    color: var(--app-ink);
    font-size: 1.08rem;
    font-weight: 800;
}

.wagon-waiting-modal__close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #eef3f7;
    color: var(--app-ink);
    font-size: 1.25rem;
    line-height: 1;
}

.wagon-waiting-modal__body {
    padding: 1rem 1.1rem;
}

.wagon-waiting-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0 1.1rem 1.1rem;
}

.wagon-action-button-row {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.35rem;
    flex-wrap: nowrap;
}

.wagon-date-form .stock-form-control,
.wagon-action-date {
    min-height: 34px;
    border-radius: 6px;
    min-width: 112px;
    width: 112px !important;
    padding: 0.34rem 0.5rem;
    font-size: 0.84rem;
}

.wagon-action-btn {
    width: 96px !important;
    min-width: 96px !important;
    max-width: none !important;
    min-height: 34px;
    padding-inline: 0.58rem;
    white-space: nowrap;
    justify-self: start;
    text-align: center;
    font-size: 0.82rem;
}

.wagon-delete-icon-btn {
    align-self: flex-start;
    margin-top: 0 !important;
    width: 34px;
    min-width: 34px;
    min-height: 34px;
}

.wagon-form-card {
    border: 1px solid rgba(22, 48, 71, 0.08);
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(250, 252, 253, 0.98), rgba(241, 246, 249, 0.96));
    box-shadow: 0 14px 28px rgba(22, 48, 71, 0.05);
    width: min(100%, 900px);
    margin: 0 auto 0 0;
}

.wagon-form-card-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.2rem;
    background: linear-gradient(180deg, rgba(234, 242, 247, 0.95), rgba(224, 235, 241, 0.92));
    border-bottom: 1px solid rgba(22, 48, 71, 0.08);
}

.wagon-form-card-header .h4 {
    font-size: 1.1rem;
}

.wagon-form-card-header .text-secondary {
    font-size: 0.9rem;
    line-height: 1.4;
}

.wagon-form-card .p-4 {
    padding: 0.9rem 1rem !important;
}

.wagon-form-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .wagon-sheet-row,
    .wagon-sheet-row--wide {
        grid-template-columns: 1fr;
    }

    .wagon-sheet-label {
        border-right: 0;
        border-bottom: 1px solid rgba(22, 48, 71, 0.08);
    }

    .wagon-sheet-field:nth-child(2) {
        border-right: 0;
    }
}

.wagon-section-banner {
    display: inline-flex;
    align-items: center;
    min-height: 52px;
    padding: 0.9rem 1.4rem;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #eef3f6 0%, #e3ebf0 100%);
    color: var(--app-ink);
    font-weight: 800;
    border: 1px solid rgba(22, 48, 71, 0.1);
    border-bottom: 0;
}

.wagon-table-wrap {
    border-radius: 0 8px 8px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    border: 1px solid rgba(22, 48, 71, 0.1);
    background: #fff;
    box-shadow: 0 10px 22px rgba(22, 48, 71, 0.045);
    width: 100%;
}

.wagon-table-wrap-flat {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
}

.wagon-section-tabs {
    display: flex;
    align-items: stretch;
    gap: 0.6rem;
    padding: 0.85rem 0.9rem 0;
    border-bottom: 1px solid rgba(22, 48, 71, 0.08);
    background: #f7fbfd;
}

.wagon-section-tab {
    display: inline-flex;
    align-items: center;
    min-height: 46px;
    padding: 0.72rem 1.05rem;
    border-radius: 8px 8px 0 0;
    background: #edf3f7;
    border: 1px solid rgba(22, 48, 71, 0.12);
    border-bottom-color: transparent;
    color: var(--app-ink);
    text-decoration: none;
    font-weight: 800;
    line-height: 1.15;
    max-width: 380px;
}

.wagon-section-tab:hover {
    color: var(--app-ink);
    background: #f5f9fb;
}

.wagon-section-tab.is-active {
    background: #ffffff;
    position: relative;
    top: 1px;
}

.wagon-hero {
    border-radius: 8px;
}

.wagon-hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.wagon-hero-stat {
    padding: 0.95rem 1rem;
    border-radius: 6px;
    background: #f8fafb;
    border: 1px solid rgba(22, 48, 71, 0.08);
    text-align: center;
}

.wagon-hero-stat strong {
    display: block;
    font-size: 1.8rem;
    line-height: 1;
    color: var(--app-ink);
}

.wagon-hero-stat-label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--app-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 800;
}

.wagon-presence-table {
    margin-bottom: 0;
    width: 100%;
    min-width: 1400px;
    table-layout: fixed;
}

.wagon-presence-table--current {
    min-width: 1260px;
}

.wagon-history-table {
    min-width: 1480px;
}

.wagon-presence-table thead th {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.79rem;
    color: var(--app-ink);
    background: #eef3f6;
    border-bottom: 2px solid rgba(22, 48, 71, 0.18);
    border-color: rgba(22, 48, 71, 0.08);
    height: 54px;
    vertical-align: middle !important;
    white-space: normal;
    line-height: 1.14;
    padding: 0.35rem 0.65rem;
}

.wagon-presence-table tbody td {
    font-size: 0.86rem;
    vertical-align: middle;
    line-height: 1.3;
    padding: 0.72rem 0.65rem;
    border-color: rgba(22, 48, 71, 0.08);
}

.wagon-cell-id,
.wagon-cell-number,
.wagon-cell-owner,
.wagon-cell-repair,
.wagon-cell-arrival,
.wagon-cell-release,
.wagon-cell-departure,
.wagon-cell-days,
.wagon-cell-edit,
.wagon-cell-action,
.wagon-cell-history-action,
.wagon-cell-history-delete {
    white-space: nowrap;
}

.wagon-cell-status,
.wagon-cell-edit,
.wagon-cell-history-action,
.wagon-cell-history-delete {
    text-align: center;
}

.wagon-cell-action {
    text-align: left;
}

.wagon-presence-table--current .wagon-cell-works,
.wagon-presence-table--current .wagon-cell-notes,
.wagon-presence-table--current .wagon-cell-status,
.wagon-presence-table--current .wagon-cell-arrival,
.wagon-presence-table--current .wagon-cell-release,
.wagon-presence-table--current .wagon-cell-edit,
.wagon-presence-table--current .wagon-cell-action,
.wagon-history-table .wagon-cell-history-action,
.wagon-history-table .wagon-cell-history-delete {
    vertical-align: middle;
}

.wagon-presence-table--current th.wagon-cell-release,
.wagon-presence-table--current td.wagon-cell-release {
    text-align: left;
    vertical-align: middle !important;
}

.wagon-presence-table tbody tr:nth-child(even) {
    background: #f1f5f9;
}

.wagon-presence-table tbody tr:nth-child(even) > td {
    background: #f1f5f9;
}

.wagon-presence-table tbody tr:nth-child(odd) > td {
    background: #ffffff;
}

.wagon-presence-table tbody tr:hover {
    background: #e8eff6;
}

.wagon-presence-table tbody tr:hover > td {
    background: #e8eff6;
}

.wagon-col-id { width: 42px; }
.wagon-col-number { width: 128px; }
.wagon-col-owner { width: 146px; }
.wagon-col-repair { width: 88px; }
.wagon-col-works { width: 190px; }
.wagon-col-notes { width: 132px; }
.wagon-col-status { width: 148px; }
.wagon-col-arrival { width: 118px; }
.wagon-col-release { width: 108px; }
.wagon-col-departure { width: 108px; }
.wagon-col-days { width: 96px; }
.wagon-col-edit { width: 44px; }
.wagon-col-action { width: 260px; }
.wagon-col-history-action { width: 132px; }
.wagon-col-history-delete { width: 72px; }

.wagon-head-wrap {
    white-space: normal;
}

.wagon-cell-text-wrap {
    white-space: normal !important;
}

.wagon-cell-text {
    display: block;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wagon-cell-text--works {
    color: #203240;
}

.wagon-cell-text--notes {
    color: #394a58;
    max-height: 2.35rem;
    overflow: hidden;
}

.wagon-presence-table .wagon-cell-number {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.wagon-row-actions .stock-status-badge {
    justify-content: center;
}

.wagon-presence-table .stock-status-badge {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.15;
    padding: 0.48rem 0.6rem;
    font-size: 0.8rem;
}

.wagon-presence-table .wagon-status-badge-repair {
    background: #ffe89a;
    color: #533b00;
}

.wagon-presence-table .wagon-status-badge-waiting {
    background: #c96019;
    color: #ffffff;
}

.wagon-presence-table .wagon-status-badge-arrived {
    background: #4b5563;
    color: #ffffff;
}

.wagon-pencil-cell {
    min-width: 70px;
    font-weight: 800;
    text-align: center;
}

.wagon-history-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    justify-content: center;
}

.wagon-history-empty {
    font-size: 0.96rem;
}

.wagon-history-pagination-card {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

.wagon-history-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.wagon-history-pagination-pages {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: center;
}

.wagon-history-page-btn {
    min-width: 120px;
}

.wagon-history-page-btn-disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    background: #eef3f6;
    color: #8a98a6;
    font-weight: 800;
}

.wagon-bulk-form {
    display: grid;
    gap: 0.85rem;
}

.wagon-bulk-panel > .stock-compact-header {
    width: 100%;
    border: 0;
    border-radius: 0;
    background: linear-gradient(180deg, #ffffff 0%, #f6f9fc 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.15rem;
    text-align: left;
}

.wagon-bulk-panel .stock-compact-title {
    min-width: 0;
}

.wagon-bulk-panel .stock-compact-title h2 {
    margin: 0.18rem 0 0;
    color: #163047;
    font-size: 1.05rem;
    line-height: 1.15;
    font-weight: 900;
}

.wagon-bulk-panel .stock-compact-title .eyebrow {
    color: #c75f24;
    font-size: 0.75rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wagon-bulk-panel .stock-compact-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 84px;
    min-height: 34px;
    padding: 0.35rem 0.75rem;
    border-radius: 8px;
    background: #e6f0f7;
    color: #153850;
    font-size: 0.84rem;
    font-weight: 900;
    white-space: nowrap;
}

.wagon-bulk-panel > .stock-compact-header:hover .stock-compact-state {
    background: #d8e8f3;
}

.wagon-bulk-hint {
    padding: 0.75rem 0.9rem;
    border: 1px solid #d8e3ec;
    border-radius: 8px;
    background: #f7fbff;
    color: #526575;
    font-size: 0.9rem;
    line-height: 1.35;
}

.wagon-bulk-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.wagon-bulk-summary {
    padding: 0.48rem 0.7rem;
    border-radius: 8px;
    background: #eaf4ff;
    color: #184a73;
    font-size: 0.86rem;
    font-weight: 800;
}

.wagon-bulk-summary.is-error {
    background: #fff0f0;
    color: #a33131;
}

.wagon-bulk-grid-wrap {
    overflow: auto;
    max-height: 460px;
    border: 1px solid #d8e3ec;
    border-radius: 8px;
    background: #ffffff;
}

.wagon-bulk-grid {
    width: 100%;
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.84rem;
}

.wagon-bulk-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 0.55rem 0.5rem;
    border-right: 1px solid #d8e3ec;
    border-bottom: 1px solid #cbd8e3;
    background: #eef3f6;
    color: #163047;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.15;
}

.wagon-bulk-grid td {
    padding: 0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.wagon-bulk-grid tr:nth-child(even) td {
    background: #f8fbfd;
}

.wagon-bulk-rownum {
    width: 42px;
    min-width: 42px !important;
    max-width: 42px;
    text-align: center;
    color: #667789;
    font-weight: 900;
}

.wagon-bulk-cell {
    width: 100%;
    min-width: 0;
    height: 34px;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 0.35rem 0.5rem;
    color: #163047;
    font: inherit;
}

.wagon-bulk-select {
    cursor: pointer;
}

.wagon-bulk-grid .wagon-bulk-col-wagon_number {
    width: 128px;
    min-width: 128px;
    max-width: 128px;
}

.wagon-bulk-grid .wagon-bulk-col-arrival_date {
    width: 126px;
    min-width: 126px;
    max-width: 126px;
}

.wagon-bulk-grid .wagon-bulk-col-owner_name {
    width: 160px;
    min-width: 160px;
    max-width: 160px;
}

.wagon-bulk-grid .wagon-bulk-col-arrival_status {
    width: 112px;
    min-width: 112px;
    max-width: 112px;
}

.wagon-bulk-grid .wagon-bulk-col-repair_code {
    width: 230px;
    min-width: 230px;
    max-width: 230px;
}

.wagon-bulk-grid .wagon-bulk-col-is_waiting {
    width: 86px;
    min-width: 86px;
    max-width: 86px;
}

.wagon-bulk-grid .wagon-bulk-col-additional_works {
    width: 170px;
    min-width: 170px;
    max-width: 170px;
}

.wagon-bulk-grid .wagon-bulk-col-repair_notes {
    width: 170px;
    min-width: 170px;
    max-width: 170px;
}

.wagon-bulk-cell:focus {
    outline: 2px solid #4aa3df;
    outline-offset: -2px;
    background: #ffffff;
}

.wagon-bulk-cell-invalid {
    background: #fff1f1 !important;
    box-shadow: inset 0 0 0 2px #e55a5a;
}

.wagon-bulk-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.wagon-history-page-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 42px;
    padding: 0.45rem 0.75rem;
    border-radius: 12px;
    background: #edf3f7;
    border: 1px solid rgba(22, 48, 71, 0.1);
    color: var(--app-ink);
    text-decoration: none;
    font-weight: 800;
}

.wagon-history-page-number:hover {
    color: var(--app-ink);
    background: #f4f8fb;
}

.wagon-history-page-number.is-active {
    background: #dce9f5;
    border-color: rgba(42, 108, 165, 0.24);
    color: #123b61;
}

.wagon-presence-table--current .wagon-row-actions {
    width: 100%;
}

.wagon-presence-table--current .wagon-cell-action .wagon-row-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.35rem;
}

.wagon-presence-table--current .wagon-action-button-row,
.wagon-presence-table--current .wagon-date-form {
    justify-content: flex-start;
    align-items: center;
    flex-wrap: nowrap;
}

.wagon-presence-table--current .wagon-pencil-cell .btn,
.wagon-history-table .btn {
    min-width: 50px;
}

.wagon-pencil-icon-btn {
    width: 34px;
    min-width: 34px !important;
    height: 34px;
    min-height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    font-size: 1.02rem;
}

.wagon-presence-table--upcoming .wagon-col-id { width: 42px; }
.wagon-presence-table--upcoming .wagon-col-number { width: 132px; }
.wagon-presence-table--upcoming .wagon-col-owner { width: 160px; }
.wagon-presence-table--upcoming .wagon-col-repair { width: 86px; }
.wagon-presence-table--upcoming .wagon-col-works { width: 190px; }
.wagon-presence-table--upcoming .wagon-col-notes { width: 132px; }
.wagon-presence-table--upcoming .wagon-col-status { width: 128px; }
.wagon-presence-table--upcoming .wagon-col-arrival { width: 104px; }
.wagon-presence-table--upcoming .wagon-col-edit { width: 44px; }
.wagon-presence-table--upcoming .wagon-col-action { width: 236px; }

.wagon-presence-table .wagon-pencil-cell,
.wagon-presence-table .wagon-cell-edit {
    padding-inline: 0.28rem;
}

.wagon-presence-table--upcoming .wagon-pencil-cell {
    min-width: 0;
}

.wagon-presence-table--upcoming .wagon-cell-action {
    padding-inline: 0.5rem;
}

.wagon-presence-table--upcoming .wagon-cell-action .wagon-row-actions {
    align-items: center;
    justify-content: flex-start;
    gap: 0.45rem;
}

.wagon-presence-table--upcoming .wagon-date-form .stock-form-control,
.wagon-presence-table--upcoming .wagon-action-date {
    width: 116px !important;
    min-width: 116px;
}

.wagon-presence-table--upcoming .wagon-action-btn {
    width: 72px !important;
    min-width: 72px !important;
    padding-inline: 0.5rem;
}

.wagon-history-table .wagon-history-icon-btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.wagon-history-table .wagon-history-edit-icon {
    font-size: 1.05rem;
}

.wagon-history-table .wagon-history-delete-icon {
    font-size: 1rem;
    font-weight: 800;
    text-transform: lowercase;
}

.wagon-presence-table--current .wagon-cell-number,
.wagon-presence-table--current .wagon-cell-repair,
.wagon-history-table .wagon-cell-number,
.wagon-history-table .wagon-cell-repair {
    font-variant-numeric: tabular-nums;
}

.wagon-presence-table--current .wagon-cell-arrival,
.wagon-history-table .wagon-cell-arrival,
.wagon-history-table .wagon-cell-release,
.wagon-history-table .wagon-cell-departure,
.wagon-history-table .wagon-cell-days {
    font-variant-numeric: tabular-nums;
}

.wagon-history-actions form,
.wagon-cell-history-delete form {
    margin: 0;
}

.wagon-history-table .wagon-cell-history-action,
.wagon-history-table .wagon-cell-history-delete {
    padding-top: 0.95rem;
}

.track-rental-table {
    table-layout: fixed;
    min-width: 1430px;
}

.track-rental-col-no { width: 56px; }
.track-rental-col-wagon { width: 148px; }
.track-rental-col-owner { width: 230px; }
.track-rental-col-date { width: 142px; }
.track-rental-col-month-date { width: 190px; }
.track-rental-col-repair { width: 132px; }
.track-rental-col-days { width: 150px; }
.track-rental-col-action { width: 170px; }

.track-rental-table th,
.track-rental-table td {
    text-align: left;
}

.track-rental-table th {
    white-space: normal;
    line-height: 1.15;
}

.track-rental-head-label {
    display: block;
    max-width: 18ch;
    line-height: 1.12;
    white-space: normal;
}

.track-rental-finish-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0.32rem 0.65rem;
    border: 1px solid rgba(22, 48, 71, 0.16);
    border-radius: 8px;
    background: #ffffff;
    color: #163047;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.15;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.track-rental-finish-btn:hover {
    background: #eef6fb;
    border-color: rgba(28, 126, 214, 0.32);
    color: #184a73;
}

.track-rental-finish-modal[hidden] {
    display: none;
}

.track-rental-finish-modal {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.track-rental-finish-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 48, 71, 0.46);
}

.track-rental-finish-modal__dialog {
    position: relative;
    width: min(430px, 100%);
    border: 1px solid rgba(22, 48, 71, 0.12);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(22, 48, 71, 0.24);
    overflow: hidden;
}

.track-rental-finish-modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem 0.75rem;
    border-bottom: 1px solid rgba(22, 48, 71, 0.08);
}

.track-rental-finish-modal__title {
    margin: 0;
    color: var(--app-ink);
    font-size: 1.08rem;
    font-weight: 800;
}

.track-rental-finish-modal__wagon {
    margin: 0.25rem 0 0;
    color: #667789;
    font-size: 0.88rem;
    font-weight: 700;
}

.track-rental-finish-modal__close {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #eef3f7;
    color: var(--app-ink);
    font-size: 1.25rem;
    line-height: 1;
}

.track-rental-finish-modal__body {
    padding: 1rem 1.1rem;
}

.track-rental-finish-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0 1.1rem 1.1rem;
}

.wagon-pencil-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    min-height: 34px;
    border-radius: 6px;
    color: var(--app-ink);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 900;
}

.wagon-pencil-link:hover {
    color: var(--app-ink);
    background: rgba(22, 48, 71, 0.08);
}

.repair-page-shell,
.repair-flow-grid .panel-card {
    border-radius: 8px;
}

.repair-page-shell {
    padding: 1.5rem !important;
    border: 1px solid rgba(22, 48, 71, 0.08);
    background:
        radial-gradient(circle at top right, rgba(229, 184, 98, 0.18), transparent 32%),
        linear-gradient(180deg, rgba(251, 252, 252, 0.98), rgba(243, 247, 249, 0.98));
    box-shadow: 0 14px 28px rgba(22, 48, 71, 0.05);
}

.repair-header,
.repair-toolbar,
.repair-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.repair-header {
    align-items: flex-start;
}

.repair-hero-copy {
    max-width: 720px;
}

.repair-hero-copy .h3 {
    font-size: clamp(1.8rem, 3.2vw, 2.3rem);
    line-height: 1.1;
}

.repair-hero-copy .text-secondary {
    font-size: 0.96rem;
    line-height: 1.45;
}

.repair-hero-side {
    display: grid;
    gap: 0.85rem;
    justify-items: end;
}

.repair-hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 0.6rem;
}

.repair-hero-stat {
    min-width: 120px;
    padding: 0.75rem 0.9rem;
    border-radius: 6px;
    background: rgba(248, 250, 251, 0.96);
    border: 1px solid rgba(22, 48, 71, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.repair-hero-stat strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1.38rem;
    line-height: 1;
    color: var(--app-ink);
}

.repair-hero-stat-label {
    display: block;
    font-size: 0.75rem;
    color: var(--app-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 800;
}

.repair-header-actions,
.repair-month-nav,
.repair-day-metrics {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

.repair-add-card {
    border: 1px solid rgba(22, 48, 71, 0.08);
    box-shadow: 0 12px 24px rgba(22, 48, 71, 0.045);
    width: min(100%, 940px);
    margin-left: auto;
    margin-right: auto;
}

.repair-add-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.95rem 1.1rem;
    background: linear-gradient(180deg, rgba(244, 247, 249, 0.95), rgba(234, 240, 244, 0.9));
    border-bottom: 1px solid rgba(22, 48, 71, 0.08);
}

.repair-add-header-compact {
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.75rem 0.95rem;
}

.repair-add-form {
    display: grid;
    gap: 0.8rem;
    max-width: 820px;
    margin: 0 auto;
}

.repair-add-form .stock-form-label {
    margin-bottom: 0.28rem;
    font-size: 0.69rem;
    letter-spacing: 0.04em;
}

.repair-add-form .stock-form-control {
    min-height: 36px;
    padding: 0.42rem 0.62rem;
    font-size: 0.9rem;
}

.repair-add-form .btn {
    min-height: 36px;
    padding: 0.42rem 0.82rem;
    border-radius: 7px;
    font-size: 0.9rem;
    line-height: 1.1;
}

.repair-add-form textarea.stock-form-control {
    min-height: 48px;
    resize: vertical;
}

.repair-sheet {
    display: grid;
    gap: 0;
    border: 1px solid rgba(22, 48, 71, 0.08);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.repair-sheet-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 150px minmax(0, 1fr);
    border-bottom: 1px solid rgba(22, 48, 71, 0.08);
}

.repair-sheet-row:last-child {
    border-bottom: 0;
}

.repair-sheet-row--wide {
    grid-template-columns: 150px minmax(0, 1fr);
}

.repair-sheet-label,
.repair-sheet-field {
    min-width: 0;
    padding: 0.68rem 0.78rem;
}

.repair-sheet-label {
    display: flex;
    align-items: center;
    background: #f5f8fa;
    border-right: 1px solid rgba(22, 48, 71, 0.08);
    color: #5f7283;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.2;
}

.repair-sheet-field {
    display: flex;
    align-items: center;
    background: #fff;
}

.repair-sheet-field:nth-child(2) {
    border-right: 1px solid rgba(22, 48, 71, 0.08);
}

.repair-sheet-row--wide .repair-sheet-field:nth-child(2) {
    border-right: 0;
}

.repair-sheet-field .stock-form-control,
.repair-sheet-field .form-select.stock-form-control {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.repair-sheet-field--full {
    align-items: stretch;
}

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

.repair-file-field {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    min-height: 36px;
    padding: 0.32rem 0.4rem;
    border: 1px solid rgba(22, 48, 71, 0.12);
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
}

.repair-file-field__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 0.28rem 0.72rem;
    border-radius: 999px;
    background: #eef3f6;
    color: var(--app-ink);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
}

.repair-file-field__text {
    min-width: 0;
    color: #697b8b;
    font-size: 0.84rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.repair-source-picker {
    padding: 0.75rem 0.85rem;
    display: grid;
    grid-template-columns: 170px 230px minmax(260px, 1fr);
    gap: 0.55rem;
    align-items: center;
    grid-column: 1 / -1;
    border: 1px solid rgba(22, 48, 71, 0.08);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(247, 250, 252, 0.98), rgba(241, 246, 249, 0.98));
}

.repair-source-picker .stock-form-control {
    max-width: 100%;
    margin-top: 0 !important;
}

.repair-source-picker .stock-form-label {
    margin-bottom: 0;
}

.repair-add-form .stock-form-control[readonly] {
    background: #f3f7fa;
    color: #445665;
    border-color: rgba(22, 48, 71, 0.1);
}

.repair-add-form .stock-form-control[type="file"] {
    padding-block: 0.5rem;
}

.repair-add-field-short .stock-form-control {
    max-width: 180px;
}

.repair-add-field-date .stock-form-control {
    max-width: 180px;
}

.repair-add-field-wide textarea.stock-form-control[data-repair-work-input] {
    min-height: 44px;
}

.repair-add-field-wide textarea.stock-form-control[name="notes"] {
    min-height: 58px;
}

.repair-add-card .p-4 {
    padding: 0.7rem 0.8rem !important;
}

.repair-add-header .h4 {
    font-size: 1.05rem;
}

.repair-add-header .text-secondary {
    font-size: 0.88rem;
    line-height: 1.35;
}

.repair-add-actions {
    padding-top: 0.15rem;
}

.repair-form-actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
    padding-top: 0.15rem;
}

.repair-add-field .stock-form-control,
.repair-add-field .form-select.stock-form-control {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.repair-add-field-date .stock-form-control,
.repair-add-field-short .stock-form-control {
    min-width: 0;
}

.repair-add-field-type .stock-form-control,
.repair-add-field-template .stock-form-control {
    min-width: 0;
}

.repair-add-field-file .stock-form-control {
    min-width: 0;
}

@media (max-width: 1200px) {
    .repair-add-card {
        width: 100%;
    }

    .repair-source-picker {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .repair-source-picker .stock-form-label {
        margin-bottom: 0.2rem;
    }

}

@media (max-width: 768px) {
    .repair-add-card .p-4 {
        padding: 0.75rem !important;
    }

    .repair-sheet-row,
    .repair-sheet-row--wide {
        grid-template-columns: 1fr;
    }

    .repair-sheet-label {
        border-right: 0;
        border-bottom: 1px solid rgba(22, 48, 71, 0.08);
    }

    .repair-sheet-field:nth-child(2) {
        border-right: 0;
    }
}

.repair-month-label {
    min-width: 180px;
    text-align: center;
    font-size: 1rem;
    font-weight: 800;
    color: var(--app-ink);
}

.repair-calendar-wrap {
    border: 1px solid rgba(22, 48, 71, 0.1);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.repair-calendar-table {
    margin-bottom: 0;
}

.repair-calendar-table thead th {
    background: #eef3f6;
    color: var(--app-ink);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.82rem;
    border-bottom: 2px solid rgba(22, 48, 71, 0.14);
    padding: 0.72rem 0.55rem;
}

.repair-week-no {
    width: 84px;
    font-weight: 800;
    color: var(--app-muted);
    background: #f8fafb;
}

.repair-day-cell {
    padding: 0 !important;
    min-width: 112px;
    vertical-align: top;
}

.repair-day-link {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 78px;
    padding: 0.68rem 0.7rem;
    color: var(--app-ink);
    text-decoration: none;
}

.repair-day-link:hover {
    color: var(--app-ink);
    background: #eef3f6;
}

.repair-day-link-disabled {
    background: #f6f8fa;
    color: #a0adb9;
    cursor: default;
}

.repair-day-cell.is-outside .repair-day-link {
    background: #f8fafb;
    color: #9aa7b2;
}

.repair-day-cell.is-active .repair-day-link {
    background: #ffe766;
}

.repair-day-cell.has-items .repair-day-number {
    color: var(--app-accent-dark);
}

.repair-day-number {
    font-size: 1.02rem;
    font-weight: 800;
}

.repair-day-meta {
    font-size: 0.74rem;
    color: var(--app-muted);
}

.repair-day-metric {
    min-width: 110px;
    padding: 0.68rem 0.78rem;
    border-radius: 6px;
    background: #f8fafb;
    border: 1px solid rgba(22, 48, 71, 0.08);
    text-align: center;
}

.repair-day-metric span {
    display: block;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--app-muted);
    font-weight: 800;
}

.repair-day-metric strong {
    display: block;
    margin-top: 0.15rem;
    font-size: 1.3rem;
    line-height: 1;
}

.repair-flow-grid {
    display: grid;
    gap: 1.15rem;
}

.repair-flow-grid .panel-card {
    border: 1px solid rgba(22, 48, 71, 0.08);
    box-shadow: 0 12px 24px rgba(22, 48, 71, 0.045);
}

.repair-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.82rem 1rem;
    color: #fff;
}

.repair-stage-orange {
    background: linear-gradient(135deg, #d6a72f, #f0c85a);
}

.repair-stage-green {
    background: linear-gradient(135deg, #5a9f19, #89c23e);
}

.repair-stage-blue {
    background: linear-gradient(135deg, #2e63d1, #4f87f0);
}

.repair-stage-slate {
    background: linear-gradient(135deg, #586579, #7a8698);
}

.repair-stage-title {
    font-size: 0.98rem;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.repair-stage-subtitle {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.8rem;
    font-weight: 600;
}

.repair-table-wrap {
    border-top: 1px solid rgba(22, 48, 71, 0.08);
    background: #fff;
}

.repair-table-wrap .wagon-presence-table {
    min-width: 1180px;
}

.repair-table-wrap .wagon-presence-table thead th {
    background: #f0f4f7 !important;
    background-color: #f0f4f7 !important;
    color: var(--app-ink) !important;
    font-size: 0.8rem;
    border-bottom: 2px solid rgba(22, 48, 71, 0.12);
    padding: 0.7rem 0.58rem;
    text-align: left !important;
    text-shadow: none;
}

.repair-table-wrap .wagon-presence-table tbody td {
    vertical-align: middle;
    padding: 0.62rem 0.58rem;
    font-size: 0.84rem;
    line-height: 1.28;
    text-align: left;
}

.repair-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.repair-row-actions-compact {
    justify-content: center;
    flex-wrap: nowrap;
}

.repair-inline-form-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    justify-content: center;
}

.repair-inline-form-actions .stock-form-control {
    min-height: 34px;
    min-width: 118px;
    width: 118px;
    padding: 0.34rem 0.5rem;
    font-size: 0.84rem;
}

.repair-inline-form-actions .btn {
    min-height: 34px;
    padding: 0.36rem 0.62rem;
    font-size: 0.82rem;
    line-height: 1.1;
}

.repair-stage-note {
    max-width: 76ch;
    font-size: 0.9rem;
    line-height: 1.5;
}

.repair-departure-form {
    display: flex;
    align-items: end;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.repair-departure-field {
    flex: 1 1 360px;
    min-width: 280px;
    display: grid;
    grid-template-columns: minmax(180px, 0.42fr) minmax(260px, 1fr);
    gap: 0.55rem;
    align-items: end;
}

.repair-departure-field .stock-form-label {
    grid-column: 1 / -1;
    margin-bottom: -0.2rem;
}

.repair-departure-field .stock-form-control {
    min-width: 0;
}

.repair-departure-actions,
.repair-modal-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.repair-departure-actions {
    margin-left: auto;
}

.repair-structured-table thead th {
    background: #f0f4f7 !important;
    background-color: #f0f4f7 !important;
    color: #1f2f3a !important;
    font-weight: 800;
    text-align: left !important;
    white-space: normal;
    line-height: 1.2;
}

.repair-table-wrap .wagon-presence-table tbody td,
.repair-table-wrap .wagon-cell-edit,
.repair-table-wrap .wagon-cell-action,
.repair-table-wrap .cell-doc-link,
.repair-table-wrap .cell-metric-ok,
.repair-table-wrap .cell-metric-bad,
.repair-table-wrap .cell-next-repair,
.repair-table-wrap .cell-yellow-soft,
.repair-table-wrap .cell-orange-soft,
.repair-table-wrap .cell-blue-soft {
    text-align: left !important;
}

.repair-table-wrap .repair-row-actions,
.repair-table-wrap .repair-inline-form-actions,
.repair-table-wrap .stock-actions-inline,
.repair-table-wrap .wagon-row-actions,
.repair-table-wrap .wagon-date-form {
    justify-content: flex-start !important;
}

.repair-table-wrap .repair-mini-action,
.repair-table-wrap .wagon-pencil-icon-btn,
.repair-table-wrap .wagon-pencil-link {
    margin-left: 0;
    margin-right: auto;
}

.repair-table-wrap .repair-mini-action {
    justify-content: flex-start;
}

.repair-table-wrap .repair-structured-table tbody .cell-doc-link,
.repair-table-wrap .repair-structured-table tbody .cell-metric-ok,
.repair-table-wrap .repair-structured-table tbody .cell-metric-bad,
.repair-table-wrap .repair-structured-table tbody .cell-next-repair,
.repair-table-wrap .repair-structured-table tbody .cell-yellow-soft {
    text-align: left !important;
}

.repair-structured-table .cell-peach,
.repair-structured-table .cell-orange {
    background: #f6cfb1;
}

.repair-structured-table .cell-yellow {
    background: #fff35a;
}

.repair-structured-table .cell-green-soft {
    background: #b5df76;
}

.repair-structured-table .cell-blue-soft {
    background: #89a9dd;
}

.repair-structured-table tbody .cell-metric-ok {
    background: #8fd14f;
    color: #13310a;
    font-weight: 800;
    text-align: center;
}

.repair-structured-table tbody .cell-metric-bad {
    background: #ff2a23;
    color: #fff;
    font-weight: 800;
    text-align: center;
}

.repair-structured-table tbody .cell-next-repair,
.repair-structured-table tbody .cell-yellow-soft {
    background: #ffe177;
    font-weight: 700;
    text-align: center;
}

.repair-structured-table tbody .cell-doc-link {
    background: #d8efba;
    text-align: center;
}

.repair-structured-table tbody .cell-orange-soft {
    background: #f3b74a;
    font-weight: 700;
}

.repair-structured-table .wagon-pencil-link.is-disabled {
    opacity: 0.68;
    pointer-events: none;
}

.repair-mini-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 34px;
    padding: 0.4rem 0.58rem;
    border: 1px solid rgba(22, 48, 71, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--app-ink);
    text-decoration: none;
    font-weight: 700;
    line-height: 1;
}

.repair-mini-action:hover {
    color: var(--app-ink);
    background: #ffffff;
    box-shadow: 0 0 0 2px rgba(22, 48, 71, 0.08);
}

.repair-mini-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    font-size: 1rem;
}

.repair-mini-action-label {
    font-size: 0.78rem;
}

.repair-mini-action-doc {
    background: linear-gradient(180deg, #eef7e5 0%, #d9efba 100%);
    border-color: rgba(88, 133, 40, 0.22);
}

.repair-mini-action-code {
    background: linear-gradient(180deg, #fde6a7 0%, #f3c158 100%);
    border-color: rgba(168, 105, 16, 0.22);
}

.repair-mini-action-material {
    background: linear-gradient(180deg, #dbe7fb 0%, #a8c1ee 100%);
    border-color: rgba(44, 89, 156, 0.18);
}

.repair-mini-action-passport {
    min-width: 38px;
    padding-inline: 0.55rem;
    background: linear-gradient(180deg, #efe9fb 0%, #d5c8f2 100%);
    border-color: rgba(101, 79, 157, 0.2);
}

.repair-mini-action.is-disabled {
    opacity: 0.72;
    pointer-events: none;
}

.repair-inline-date-cell {
    min-width: 170px;
}

.repair-inline-form {
    margin: 0;
}

.repair-compact-table {
    table-layout: fixed;
    width: 100% !important;
    min-width: 1180px !important;
}

.repair-table-wrap .repair-compact-table tbody td {
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
    text-align: left !important;
}

.repair-compact-table th {
    overflow: hidden;
    text-overflow: ellipsis;
}

.repair-compact-table th:nth-child(1),
.repair-compact-table td:nth-child(1) {
    width: 3.2% !important;
}

.repair-compact-table th:nth-child(3),
.repair-compact-table td:nth-child(3) {
    width: 11% !important;
}

.repair-task-table th:nth-child(2),
.repair-task-table td:nth-child(2) {
    width: 11% !important;
}

.repair-task-table th:nth-child(4),
.repair-task-table td:nth-child(4) {
    width: 7% !important;
}

.repair-task-table th:nth-child(5),
.repair-task-table td:nth-child(5),
.repair-task-table th:nth-child(6),
.repair-task-table td:nth-child(6) {
    width: 12% !important;
}

.repair-task-table th:nth-child(7),
.repair-task-table td:nth-child(7) {
    width: 8% !important;
}

.repair-task-table th:nth-child(8),
.repair-task-table td:nth-child(8) {
    width: 9% !important;
}

.repair-task-table th:nth-child(9),
.repair-task-table td:nth-child(9) {
    width: 5% !important;
}

.repair-task-table th:nth-child(10),
.repair-task-table td:nth-child(10) {
    width: 14% !important;
}

.repair-task-table th:nth-child(11),
.repair-task-table td:nth-child(11) {
    width: 7% !important;
}

.repair-task-file-cell {
    text-align: center;
}

.repair-task-table .repair-task-mileage-cell.cell-metric-ok {
    background: #8fd14f !important;
    color: #13310a !important;
    font-weight: 800;
    text-align: center;
}

.repair-task-table .repair-task-mileage-cell.cell-metric-bad {
    background: #ff2a23 !important;
    color: #fff !important;
    font-weight: 800;
    text-align: center;
}

.repair-release-table th:nth-child(2),
.repair-release-table td:nth-child(2) {
    width: 12% !important;
}

.repair-release-table th:nth-child(4),
.repair-release-table td:nth-child(4) {
    width: 7% !important;
}

.repair-compact-table .repair-release-col-type {
    width: 7% !important;
}

.repair-release-table .repair-release-col-mods {
    width: 17% !important;
}

.repair-release-table .repair-release-col-date {
    width: 14% !important;
}

.repair-release-table th:nth-child(6),
.repair-release-table td:nth-child(6) {
    width: 15% !important;
}

.repair-release-table th:nth-child(7),
.repair-release-table td:nth-child(7) {
    width: 14% !important;
}

.repair-release-table .repair-release-col-action {
    width: 6% !important;
}

.repair-release-table .repair-task-col-action {
    width: 7% !important;
}

.repair-compact-table th:last-child,
.repair-compact-table td:last-child {
    width: 6% !important;
}

.repair-release-type-cell {
    text-align: center;
    font-weight: 700;
    white-space: nowrap;
}

.repair-modernization-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.repair-modernization-inline .repair-modernization-list {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 34px;
    padding: 0.36rem 0.55rem;
    border-radius: 8px;
}

.repair-release-date-form {
    flex-wrap: nowrap;
}

.repair-release-date-form .stock-form-control {
    width: 118px;
    min-width: 118px;
}

.repair-release-action-cell {
    text-align: center;
}

.repair-task-action-cell {
    text-align: center;
}

.repair-release-edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 1rem;
    line-height: 1;
    text-decoration: none;
}

.repair-table-wrap .repair-completed-table {
    table-layout: fixed;
    min-width: 1180px;
}

.repair-table-wrap .repair-completed-table thead th,
.repair-table-wrap .repair-completed-table tbody td {
    padding: 0.56rem 0.5rem;
    vertical-align: middle;
}

.repair-completed-table .repair-completed-col-index {
    width: 3.2%;
}

.repair-completed-table .repair-completed-col-wagon {
    width: 9%;
    white-space: nowrap;
}

.repair-completed-table .repair-completed-col-owner {
    width: 16%;
}

.repair-completed-table .repair-completed-col-type {
    width: 7%;
    white-space: nowrap;
}

.repair-completed-table .repair-completed-col-codes {
    width: 15%;
}

.repair-completed-table .repair-completed-col-doc {
    width: 10%;
}

.repair-completed-table .repair-completed-col-materials {
    width: 10%;
}

.repair-completed-table .repair-completed-col-release {
    width: 9%;
    white-space: nowrap;
}

.repair-completed-table .repair-completed-col-action {
    width: 5.8%;
    white-space: nowrap;
}

.repair-completed-table .repair-mini-action {
    min-height: 32px;
    padding: 0.34rem 0.52rem;
}

.repair-completed-table .repair-mini-action-label {
    font-size: 0.74rem;
}

.repair-completed-codes-inline {
    align-items: center;
    justify-content: flex-start;
    gap: 0.42rem;
}

.repair-completed-codes-inline .repair-modernization-list {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 32px;
    padding: 0.32rem 0.48rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.repair-completed-codes-inline .repair-mini-action-code {
    flex: 0 0 auto;
    margin-right: 0 !important;
}

.repair-task-code-link {
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
}

.repair-task-code-link .repair-mini-action-label {
    display: none;
}

.repair-table-wrap .repair-compact-table thead th,
.repair-table-wrap .repair-compact-table tbody td,
.repair-table-wrap .repair-structured-table thead th,
.repair-table-wrap .repair-structured-table tbody td {
    text-align: left !important;
}

.repair-table-wrap .repair-compact-table .repair-mini-action,
.repair-table-wrap .repair-structured-table .repair-mini-action,
.repair-table-wrap .repair-compact-table .repair-inline-form-actions,
.repair-table-wrap .repair-structured-table .repair-inline-form-actions,
.repair-table-wrap .repair-compact-table .wagon-row-actions,
.repair-table-wrap .repair-structured-table .wagon-row-actions {
    justify-content: flex-start !important;
}

.repair-table-wrap .repair-compact-table .repair-mini-action,
.repair-table-wrap .repair-structured-table .repair-mini-action {
    margin-left: 0 !important;
    margin-right: auto !important;
}

@media (max-width: 992px) {
    .dashboard-stats,
    .dashboard-modules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .warehouse-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stock-toolbar {
        justify-content: flex-start;
    }

    .stock-form-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stock-action-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .stock-history-edit-actions {
        justify-content: stretch;
    }

    .wagon-form-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .repair-stage-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .repair-departure-field {
        grid-template-columns: 1fr;
    }

    .repair-departure-actions {
        margin-left: 0;
    }

    .repair-add-header {
        flex-direction: column;
        align-items: flex-start;
    }

}

@media (max-width: 640px) {
    .dashboard-header {
        flex-direction: column;
    }

    .dashboard-userbox,
    .dashboard-stats,
    .dashboard-modules {
        width: 100%;
    }

    .dashboard-stats,
    .dashboard-modules {
        grid-template-columns: 1fr;
    }

    .warehouse-grid {
        grid-template-columns: 1fr;
    }

    .stock-toolbar-search {
        min-width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .stock-history-edit-actions {
        flex-direction: column;
    }

    .wagon-toolbar-search,
    .wagon-toolbar-actions {
        width: 100%;
    }

    .wagon-toolbar-actions > * {
        width: 100%;
        text-align: center;
    }

    .wagon-section-tabs {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 0.75rem 0;
    }

    .wagon-section-tab {
        max-width: none;
        border-radius: 10px;
        border-bottom-color: rgba(22, 48, 71, 0.12);
        top: 0;
    }

    .repair-header-actions,
    .repair-month-nav,
    .repair-day-metrics {
        width: 100%;
    }

    .repair-hero-side,
    .repair-hero-stats {
        width: 100%;
    }

    .repair-hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .repair-header-actions > *,
    .repair-month-nav > * {
        width: 100%;
        text-align: center;
    }

    .repair-form-actions > *,
    .repair-inline-form-actions > * {
        width: 100%;
    }
}

.repair-picker-title {
    margin-bottom: 0.85rem;
    font-size: 0.88rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--app-accent);
}

.repair-codes-scroll {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.25rem 0.1rem 0.25rem 0;
}

.repair-code-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    height: 100%;
    padding: 0.9rem;
    background: #ffffff;
    border: 1px solid rgba(22, 48, 71, 0.12);
    border-radius: 10px;
    cursor: pointer;
}

.repair-code-card input {
    margin-top: 0.2rem;
}

.repair-code-card-top {
    background: linear-gradient(180deg, #fff8df 0%, #fff2c2 100%);
    border-color: rgba(198, 95, 42, 0.18);
}

.repair-modal-actions {
    justify-content: flex-end;
}

.repair-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1080;
    padding: 2rem;
    background: rgba(22, 48, 71, 0.42);
    overflow-y: auto;
}

.repair-modal-card {
    width: min(1180px, 100%);
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 24px 60px rgba(22, 48, 71, 0.22);
}

.repair-mod-layout {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.25rem;
}

.repair-mod-intro {
    padding: 0.95rem;
    background: #f6f9fb;
    border: 1px solid rgba(22, 48, 71, 0.08);
    border-radius: 10px;
}

.repair-mod-options {
    min-width: 0;
}

.repair-selected-box {
    min-height: 130px;
    padding: 0.82rem 0.95rem;
    border-radius: 10px;
    border: 1px dashed rgba(22, 48, 71, 0.22);
    background: #ffffff;
    color: var(--app-ink);
    white-space: pre-wrap;
    font-size: 0.9rem;
    line-height: 1.45;
}

.repair-code-card.is-hidden {
    display: none;
}

.repair-code-card.is-selected {
    border-color: rgba(198, 95, 42, 0.45);
    box-shadow: 0 0 0 2px rgba(198, 95, 42, 0.12);
}

.repair-quick-code {
    border: 1px solid rgba(33, 74, 108, 0.16);
    background: #eef4fb;
    color: #173249;
    border-radius: 999px;
    padding: 0.5rem 0.9rem;
    font-weight: 700;
    line-height: 1;
    transition: all 0.18s ease;
}

.repair-quick-code:hover {
    background: #dfeaf7;
    border-color: rgba(33, 74, 108, 0.24);
}

.repair-quick-code.is-selected {
    background: linear-gradient(180deg, #2f6994 0%, #24597f 100%);
    color: #f7fbff;
    border-color: transparent;
}

@media (max-width: 992px) {
    .repair-modal-backdrop {
        padding: 1rem;
    }

    .repair-mod-layout {
        grid-template-columns: 1fr;
    }
}

.repair-modernization-list {
    min-height: 2.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: 10px;
    background: #fff8df;
    border: 1px solid rgba(198, 95, 42, 0.18);
    font-weight: 700;
    color: #7f4b16;
    word-break: break-word;
}
.equipment-sheet-card {
    border: 1px solid #c5cfda;
}

.equipment-sheet-ledger {
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(255, 244, 207, 0.16), rgba(255, 255, 255, 0)) 0 0 / 100% 110px no-repeat,
        #ffffff;
}

.equipment-sheet-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #d6dee8;
}

.equipment-meta-grid {
    display: grid;
    grid-template-columns: 180px 180px minmax(260px, 1fr);
    gap: 12px;
    align-items: end;
}

.equipment-meta-notes {
    min-width: 0;
}

.equipment-summary-grid {
    display: grid;
    grid-template-columns: 160px minmax(180px, 1fr) 160px minmax(220px, 1fr) 160px 120px;
    border: 1px solid #b8c4d1;
    background: #fff;
}

.equipment-summary-cell {
    padding: 0.65rem 0.8rem;
    border-right: 1px solid #b8c4d1;
    border-bottom: 1px solid #b8c4d1;
    min-height: 46px;
    display: flex;
    align-items: center;
}

.equipment-summary-grid > :nth-last-child(-n+2) {
    border-bottom: 0;
}

.equipment-summary-grid > :nth-child(6n) {
    border-right: 0;
}

.equipment-summary-label {
    background: #f2f5f8;
    font-weight: 800;
    color: #3b556e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 0.78rem;
}

.equipment-summary-value {
    font-weight: 700;
    color: #183249;
}

.equipment-section {
    border: 1px solid #bbc7d5;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.equipment-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #e8edf4;
    border-bottom: 1px solid #bbc7d5;
}

.equipment-section-note {
    font-size: 0.8rem;
    color: #566676;
    font-weight: 700;
}

.equipment-band-wheelsets .equipment-section-header {
    background: #dae9fb;
}

.equipment-band-cast .equipment-section-header {
    background: #fde4ab;
}

.equipment-band-coupler .equipment-section-header {
    background: #dce7f4;
}

.equipment-band-brake .equipment-section-header {
    background: #e8f0de;
}

.equipment-table thead th {
    white-space: normal;
    font-size: 12px;
    line-height: 1.25;
    padding: 0.7rem 0.55rem;
    background: #f2f5f8;
    border-color: #bbc7d5;
    color: #26425a;
    letter-spacing: 0.02em;
    text-transform: none;
}

.equipment-table thead tr:first-child th {
    background: #e7edf4;
    text-align: center;
    font-weight: 800;
}

.equipment-table thead tr + tr th {
    background: #f7f9fb;
}

.equipment-table td {
    min-width: 120px;
    padding: 0;
    border-color: #c8d1dc;
    background: #fff;
}

.equipment-table td:first-child {
    min-width: 50px;
}

.equipment-index-col {
    width: 56px;
    text-align: center;
}

.equipment-index-cell {
    width: 56px;
    text-align: center;
    font-weight: 700;
    background: #f7f9fb;
    vertical-align: middle;
}

.equipment-row--swap-source td {
    background-color: #fff7d1 !important;
}

.equipment-swap-trigger {
    display: block;
    width: 28px;
    height: 24px;
    margin: 0.35rem auto 0;
    border: 1px solid #c8d1dc;
    border-radius: 6px;
    background: #ffffff;
    color: #41576d;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.equipment-swap-trigger:hover {
    background: #eef5fb;
    border-color: #8eabc8;
    color: #153b5b;
}

.equipment-swap-trigger.is-active {
    background: #2f80b7;
    border-color: #2f80b7;
    color: #ffffff;
}

.equipment-code-cell {
    background: #fff3ac;
    vertical-align: middle;
}

.equipment-table .stock-form-control {
    min-width: 110px;
    border: 1px solid #97b4d3;
    border-radius: 0;
    min-height: 44px;
    background: #eef6ff;
    box-shadow: none;
    padding: 0.5rem 0.55rem;
}

.equipment-table .stock-form-control:focus {
    border-color: #2f89b7;
    box-shadow: inset 0 0 0 1px #2f89b7;
    background: #ffffff;
}

.equipment-readonly-input {
    font-weight: 800;
    color: #17324a;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    min-height: 28px !important;
    padding-bottom: 0.15rem !important;
}

.equipment-part-name {
    margin-top: 0;
    padding: 0 0.55rem 0.45rem;
    font-size: 0.74rem;
    line-height: 1.2;
    color: #5f5b2b;
    font-weight: 700;
}

@media (max-width: 991px) {
    .equipment-meta-grid {
        grid-template-columns: 1fr 1fr;
    }

    .equipment-meta-notes {
        grid-column: 1 / -1;
    }

    .equipment-summary-grid {
        grid-template-columns: 160px minmax(180px, 1fr);
    }

    .equipment-summary-grid > :nth-child(2n) {
        border-right: 0;
    }

    .equipment-summary-grid > :nth-last-child(-n+2) {
        border-bottom: 1px solid #b8c4d1;
    }

    .equipment-summary-grid > :nth-last-child(-n+2):nth-child(odd),
    .equipment-summary-grid > :nth-last-child(-n+2):nth-child(even) {
        border-bottom: 0;
    }
}

@media (max-width: 767px) {
    .equipment-sheet-head {
        flex-direction: column;
        align-items: stretch;
    }

    .equipment-meta-grid {
        grid-template-columns: 1fr;
    }
}

.material-sheet-card .wagon-presence-table {
    min-width: 1180px;
}

.material-section-band .equipment-section-header {
    background: linear-gradient(180deg, #dce7fb 0%, #c7d8f4 100%);
}

.material-usage-table thead th {
    background: #edf3fb;
}

.material-usage-table td {
    background: #ffffff;
}

.material-usage-table .stock-form-control,
.material-usage-table .form-select {
    min-height: 38px;
    border-color: #94b4dd;
    background: #eef5ff;
}

.material-usage-table .stock-form-control:focus,
.material-usage-table .form-select:focus {
    border-color: #4d7fbe;
    box-shadow: 0 0 0 0.14rem rgba(77, 127, 190, 0.18);
    background: #ffffff;
}

.material-qty-input {
    min-width: 92px;
}

.material-checkbox-cell {
    text-align: center;
    min-width: 110px;
}

.material-check-wrap {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    color: #29405d;
}

.material-check-wrap input {
    width: 16px;
    height: 16px;
}

.material-unit-input {
    min-width: 90px;
}

.materials-header-grid {
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(320px, 1fr);
    gap: 0;
    border: 2px solid #1d2730;
    margin-bottom: 1rem;
}

.materials-header-title,
.materials-header-note {
    padding: 0.8rem 1rem;
    font-weight: 800;
}

.materials-header-title {
    background: #ffe045;
    color: #000;
}

.materials-header-note {
    background: #fff66e;
    color: #1f2f3a;
    text-align: center;
}

.materials-meta-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr 0.8fr 220px;
    gap: 0;
    border: 2px solid #1d2730;
    margin-bottom: 1rem;
}

.materials-meta-cell {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0.65rem 0.8rem;
    border-right: 1px solid #1d2730;
    background: #fffdf3;
}

.materials-meta-cell:last-child {
    border-right: 0;
}

.materials-meta-cell strong {
    font-size: 0.8rem;
    text-transform: none;
    color: #36485f;
}

.materials-meta-cell span {
    font-size: 0.98rem;
    font-weight: 700;
    color: #12283f;
}

.materials-ledger-table {
    min-width: 1240px;
}

.materials-ledger-table thead th {
    background: #e9eef4;
    color: #132637;
    font-weight: 800;
    text-align: center;
    border: 1px solid #1d2730;
    white-space: normal;
}

.materials-ledger-table tbody td {
    border: 1px solid #1d2730;
    background: #fff;
    vertical-align: middle;
}

.materials-item-name {
    min-width: 290px;
    font-weight: 600;
    background: #fffdf8;
}

.materials-divider {
    border-left-width: 3px !important;
}

.materials-qty-cell {
    width: 86px;
    min-width: 86px;
    background: #eef5ff;
}

.materials-qty-input {
    min-width: 72px;
    text-align: center;
}

.materials-flag-cell {
    width: 74px;
    min-width: 74px;
    text-align: center;
    background: #f8fbff;
}

.materials-flag-cell input {
    width: 16px;
    height: 16px;
}

@media (max-width: 1100px) {
    .materials-header-grid,
    .materials-meta-grid {
        grid-template-columns: 1fr;
    }

    .materials-meta-cell {
        border-right: 0;
        border-bottom: 1px solid #1d2730;
    }

    .materials-meta-cell:last-child {
        border-bottom: 0;
    }
}

.material-sheet-plain {
    background: #fff;
    border: 1px solid #d7dde6;
    padding: 1rem 1rem 1.25rem;
}

.material-sheet-form-excel {
    overflow-x: auto;
}

.material-title-row {
    display: inline-grid;
    grid-template-columns: 160px;
    margin-bottom: 0.9rem;
}

.material-title-cell,
.material-title-note {
    border: 1px solid #1d2730;
    background: #fff044;
    padding: 0.6rem 0.7rem;
    font-weight: 800;
    line-height: 1.15;
}

.material-title-note {
    text-align: center;
}

.material-meta-table,
.materials-excel-table {
    border-collapse: collapse;
    width: 100%;
    min-width: 980px;
    margin-bottom: 0.9rem;
}

.material-meta-table th,
.material-meta-table td,
.materials-excel-table th,
.materials-excel-table td {
    border: 1px solid #1d2730;
    padding: 0.18rem 0.3rem;
    vertical-align: middle;
}

.material-meta-table th {
    background: #ffffff;
    font-weight: 400;
    text-align: center;
}

.material-auto-note {
    background: #fff044 !important;
    font-weight: 700 !important;
    min-width: 240px;
}

.material-date-input {
    width: 100%;
    min-width: 140px;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 0.1rem 0.2rem;
}

.materials-headband-row th {
    background: #ffffff;
    font-style: italic;
    font-weight: 700;
    text-align: center;
}

.materials-excel-table th {
    background: #ffffff;
    font-weight: 400;
    text-align: center;
}

.materials-head-label,
.materials-head-unit {
    display: block;
    line-height: 1.05;
}

.materials-head-unit {
    margin-top: 0.12rem;
}

.materials-excel-table .item-col {
    width: 320px;
    min-width: 320px;
}

.materials-excel-table .qty-col,
.materials-excel-table .flag-col {
    width: 74px;
    min-width: 74px;
    text-align: center;
}

.materials-excel-table .divider-left {
    border-left-width: 2px;
}

.excel-qty-input {
    width: 100%;
    min-width: 54px;
    border: 0;
    outline: 0;
    background: #eef5ff;
    text-align: center;
    padding: 0.14rem 0.25rem;
}

.excel-qty-input:focus {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #4d7fbe;
}

.excel-unit-text {
    display: inline-block;
    width: 100%;
    text-align: center;
    font-size: 0.95rem;
}

.excel-mini-input {
    width: 100%;
    min-width: 46px;
    border: 0;
    outline: 0;
    background: #eef5ff;
    text-align: center;
    padding: 0.14rem 0.2rem;
}

.excel-mini-input:focus {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #4d7fbe;
}

.materials-actions-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.equipment-sheet-plain {
    background: #fff;
    border: 1px solid #d7dde6;
    padding: 1rem 1rem 1.25rem;
}

.equipment-sheet-head-compact {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #cfd8e4;
}

.equipment-excel-note {
    border: 1px solid #d6b44f;
    background: #fff8d8;
    color: #3c3320;
    padding: 0.6rem 0.75rem;
    font-size: 0.94rem;
}

.equipment-summary-grid-excel {
    border: 1px solid #1d2730;
    background: #fff;
}

.equipment-summary-grid-excel .equipment-summary-cell {
    border-right: 1px solid #1d2730;
    border-bottom: 0;
}

.equipment-summary-grid-excel .equipment-summary-cell:last-child {
    border-right: 0;
}

.equipment-summary-grid-excel .equipment-summary-label {
    background: #ffffff;
    color: #12283f;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

.equipment-summary-grid-excel .equipment-summary-value {
    background: #fff044;
    font-weight: 700;
}

.equipment-meta-grid-excel {
    border: 1px solid #1d2730;
    background: #fff;
    padding: 0.55rem;
}

.equipment-ledger-section {
    border: 0;
    background: transparent;
}

.equipment-section-header-excel {
    justify-content: flex-start;
    padding: 0.15rem 0.35rem 0.35rem;
    border: 0;
    background: transparent;
}

.equipment-section-header-excel h2 {
    font-style: italic;
    font-weight: 700;
}

.equipment-ledger-table {
    min-width: 1080px;
}

.equipment-ledger-table thead th,
.equipment-ledger-table tbody td {
    border: 1px solid #1d2730;
}

.equipment-ledger-table thead th {
    background: #ffffff !important;
    color: #12283f !important;
    text-align: center !important;
    text-shadow: none !important;
    font-weight: 400;
    padding: 0.2rem 0.25rem;
    white-space: normal;
}

.equipment-ledger-table thead tr:first-child th {
    font-weight: 700;
}

.equipment-ledger-table tbody td {
    background: #fff !important;
    color: #12283f !important;
    text-shadow: none !important;
    padding: 0.14rem 0.18rem;
}

.equipment-ledger-table .stock-form-control {
    min-height: 30px;
    border: 0;
    border-radius: 0;
    background: #eef5ff;
    box-shadow: none;
    padding: 0.18rem 0.28rem;
}

.equipment-ledger-table .stock-form-control:focus {
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #4d7fbe;
}

.equipment-ledger-table .equipment-readonly-input {
    background: #fff !important;
}

.equipment-ledger-table .equipment-code-cell {
    background: #fff;
    min-width: 86px;
}

.equipment-ledger-table .equipment-code-cell .stock-form-control {
    background: #fff;
    text-align: center;
    font-weight: 700;
}

.equipment-ledger-table .equipment-part-name {
    margin-top: 0.18rem;
    padding: 0;
    font-size: 0.74rem;
    line-height: 1.2;
    color: #4a5563;
    font-weight: 700;
    text-align: center;
}

.warehouse-shell {
    background: #fff;
    border: 1px solid #d7dde6;
    padding: 1rem;
}

.warehouse-titlebar {
    border: 2px solid #111f29;
    border-bottom-width: 0;
    background: #6ea5bd;
    color: #14222c;
    text-align: center;
    padding: 0.45rem 0.75rem;
    font-size: 1.35rem;
    font-weight: 800;
}

.warehouse-excel-layout {
    display: grid;
    grid-template-columns: 1.15fr 2.25fr 1fr 0.95fr;
    border: 2px solid #111f29;
    gap: 0;
    background: #fff;
}

.warehouse-block {
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
}

.warehouse-block + .warehouse-block {
    border-left: 2px solid #111f29;
}

.warehouse-block-title,
.warehouse-subblock-title {
    padding: 0.8rem 0.55rem;
    text-align: center;
    font-weight: 800;
    color: #0d141b;
    border-bottom: 2px solid #111f29;
}

.warehouse-block-wheelset > .warehouse-block-title {
    background: #b9d68c;
}

.warehouse-block-casted > .warehouse-block-title {
    background: #e5cd8a;
}

.warehouse-block-coupler > .warehouse-block-title {
    background: #cfcdd0;
}

.warehouse-block-draft > .warehouse-block-title {
    background: #d98b8b;
}

.warehouse-casted-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100%;
}

.warehouse-subblock + .warehouse-subblock {
    border-left: 2px solid #111f29;
}

.warehouse-subblock-title {
    background: #ecd79c;
    padding-block: 0.7rem;
}

.warehouse-block-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 136px;
}

.warehouse-cell {
    display: grid;
    place-items: center;
    gap: 0.45rem;
    text-align: center;
    padding: 0.9rem 0.45rem;
    min-height: 100%;
    border-bottom: 0;
    text-decoration: none;
    color: inherit;
}

.warehouse-cell + .warehouse-cell {
    border-left: 2px solid #111f29;
}

.warehouse-cell-stock {
    background: #f1e6be;
}

.warehouse-cell-history {
    background: #f3f4f6;
}

.warehouse-block-wheelset .warehouse-cell-stock,
.warehouse-block-wheelset .warehouse-cell-history {
    background: #c6ddb0;
}

.warehouse-block-coupler .warehouse-cell-stock {
    background: #bbb9be;
}

.warehouse-block-coupler .warehouse-cell-history {
    background: #e3e4e7;
}

.warehouse-block-draft .warehouse-cell-stock,
.warehouse-block-draft .warehouse-cell-history {
    background: #e1a2a2;
}

.warehouse-cell-title {
    font-weight: 800;
    color: #111820;
    line-height: 1.2;
    text-decoration: none;
}

.warehouse-history-count {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    min-height: 30px;
    padding: 0 0.45rem;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.45);
    color: #111820;
    font-weight: 800;
}

@media (max-width: 980px) {
    .warehouse-excel-layout {
        grid-template-columns: 1fr;
    }

    .warehouse-block + .warehouse-block {
        border-left: 0;
        border-top: 2px solid #111f29;
    }

    .warehouse-casted-grid {
        grid-template-columns: 1fr;
    }

    .warehouse-subblock + .warehouse-subblock {
        border-left: 0;
        border-top: 2px solid #111f29;
    }
}

.repair-schedule-shell {
    background: #fff;
    border: 1px solid #d7dde6;
    padding: 1rem;
}

.repair-schedule-header {
    display: grid;
    grid-template-columns: 190px 1fr 190px;
    align-items: center;
    gap: 0.75rem;
}

.repair-schedule-header-center {
    text-align: center;
}

.repair-schedule-month-nav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.55rem 0.8rem;
    border: 1px solid #aeb8c3;
    background: #f7f9fb;
    color: #173249;
    text-decoration: none;
    font-weight: 700;
}

.repair-schedule-month-nav:hover {
    color: #173249;
    background: #eef3f6;
}

.repair-schedule-month-nav-disabled {
    background: #eef3f6;
    color: #9aa7b2;
    border-color: #c5ced7;
    pointer-events: none;
}

.repair-schedule-month-title {
    display: inline-block;
    padding: 0.45rem 1rem;
    background: #d8b26e;
    color: #8e2f14;
    font-size: 2rem;
    font-weight: 800;
    font-style: italic;
}

.repair-schedule-header-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.45rem;
    color: #607283;
    font-size: 0.95rem;
}

.repair-schedule-table-wrap {
    overflow-x: auto;
}

.repair-schedule-table {
    width: 100%;
    min-width: 1480px;
    border-collapse: collapse;
    background: #fff;
}

.repair-schedule-table th,
.repair-schedule-table td {
    border: 1px solid #9fb0c1;
    padding: 0.28rem 0.35rem;
    vertical-align: middle;
}

.repair-schedule-month-row th {
    background: linear-gradient(180deg, #2f6994 0%, #24597f 100%);
    color: #f7fbff;
    font-size: 1.18rem;
    font-style: normal;
    font-weight: 800;
    text-align: left;
    padding: 0.5rem 0.65rem;
}

.repair-schedule-header-row th {
    background: #d9e8f4;
    color: #173249;
    text-align: center;
    font-size: 0.82rem;
    line-height: 1.15;
    text-transform: none;
    letter-spacing: 0;
}

.repair-schedule-header-row .col-doc-in {
    background: #d7e5f2;
    width: 78px;
    min-width: 78px;
}

.repair-schedule-header-row .col-doc-out {
    background: #dbe8d2;
    width: 78px;
    min-width: 78px;
}

.repair-schedule-header-row .col-materials {
    background: #efe2bf;
    width: 82px;
    min-width: 82px;
}

.repair-schedule-header-row .col-parts {
    background: #d7dee6;
}

.repair-schedule-header-row .col-additional,
.repair-schedule-header-row .col-misc {
    background: #dbe8d2;
}

.repair-schedule-table td:nth-child(7) {
    text-align: center;
    font-weight: 800;
}

.repair-schedule-flag-cell.flag-yes {
    background: #9dcb5a;
    color: #203211;
}

.repair-schedule-flag-cell.flag-no {
    background: #dc726a;
    color: #fff8f7;
}

.repair-schedule-soft-cell {
    background: #cfe3bc;
    text-align: center;
    font-weight: 700;
}

.repair-schedule-doc-cell {
    text-align: center;
    width: 78px;
    min-width: 78px;
}

.repair-schedule-doc-link {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid #7f4f24;
    background: #f3d7c4;
    color: #2d241d;
    text-decoration: none;
    font-size: 1.05rem;
}

.repair-schedule-doc-link.outgoing {
    background: #cce990;
    border-color: #658a20;
}

.repair-schedule-doc-link.material {
    background: #f3e0a0;
    border-color: #a0811f;
}

.repair-schedule-doc-link:hover {
    color: #111820;
    filter: brightness(0.97);
}

.repair-schedule-part-cell {
    min-width: 62px;
    background: #eef3f7;
}

.repair-schedule-misc-cell {
    min-width: 160px;
    background: #edf4e8;
}

.repair-schedule-inline-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.35rem;
    align-items: center;
}

.repair-schedule-inline-form .form-control {
    min-height: 32px;
    border-radius: 0;
}

.repair-schedule-eur-cell {
    min-width: 72px;
    background: #fff;
}

.repair-schedule-empty {
    text-align: center;
    color: #617281;
    padding: 2rem 1rem !important;
}

.repair-schedule-footer-note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem;
    align-items: center;
}

.repair-schedule-footer-parts {
    display: grid;
    grid-template-columns: repeat(4, minmax(70px, auto));
    border: 1px solid #111f29;
}

.repair-schedule-footer-parts span {
    padding: 0.55rem 0.5rem;
    background: #c8c8c8;
    border-right: 1px solid #111f29;
    text-align: center;
    font-weight: 700;
}

.repair-schedule-footer-parts span:last-child {
    border-right: 0;
}

.repair-schedule-footer-text {
    background: #c8c8c8;
    color: #111820;
    padding: 0.75rem 1rem;
    text-align: center;
    font-size: 0.94rem;
}

@media (max-width: 1024px) {
    .repair-schedule-header {
        grid-template-columns: 1fr;
    }

    .repair-schedule-header-center {
        order: -1;
    }

    .repair-schedule-footer-note {
        grid-template-columns: 1fr;
    }
}

.equipment-picker-head {
    min-width: 170px;
}

.equipment-stock-pick-cell {
    min-width: 170px;
    background: #fffbea;
    vertical-align: top;
}

.equipment-stock-picker-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #7b8794;
    background: linear-gradient(180deg, #f8fbff 0%, #e4edf7 100%);
    color: #1f3042;
    font-weight: 700;
    line-height: 1;
    border-radius: 8px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.equipment-stock-picker-toggle:hover {
    background: linear-gradient(180deg, #ffffff 0%, #dbe7f3 100%);
}

.equipment-stock-select.d-none {
    display: none !important;
}

.equipment-stock-current {
    margin-top: 0.4rem;
    font-size: 0.72rem;
    line-height: 1.35;
    color: #51606f;
    max-width: 150px;
}

.equipment-stock-empty {
    color: #8792a0;
}

body.equipment-stock-drawer-open {
    overflow: hidden;
}

.equipment-stock-drawer[hidden] {
    display: none !important;
}

.equipment-stock-drawer {
    position: fixed;
    inset: 0;
    z-index: 1200;
}

.equipment-stock-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 32, 43, 0.45);
}

.equipment-stock-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(920px, 98vw);
    height: 100%;
    background: #fffdf8;
    box-shadow: -12px 0 32px rgba(22, 32, 43, 0.18);
    display: flex;
    flex-direction: column;
}

.equipment-stock-drawer__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem 1.25rem 0.9rem;
    border-bottom: 1px solid #e2dccd;
    background: #fff8ea;
}

.equipment-stock-drawer__eyebrow {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b7642d;
    margin-bottom: 0.35rem;
}

.equipment-stock-drawer__title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    color: #243b53;
}

.equipment-stock-drawer__subtitle {
    margin-top: 0.25rem;
    color: #6b7280;
    font-size: 0.92rem;
}

.equipment-stock-drawer__close {
    border: 1px solid #c9d3df;
    background: #ffffff;
    color: #425466;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 1.3rem;
    line-height: 1;
}

.equipment-stock-drawer__body {
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 0;
    flex: 1;
}

.equipment-stock-drawer__search {
    min-height: 44px;
}

.equipment-stock-drawer__select {
    flex: 1;
    min-height: 340px;
    font-size: 0.92rem;
    line-height: 1.45;
}

.equipment-stock-drawer__list {
    flex: 1;
    min-height: 360px;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding-right: 0.25rem;
}

.equipment-stock-drawer__item {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #ffffff;
    padding: 0.85rem 0.95rem;
    text-align: left;
    color: #102a43;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.equipment-stock-drawer__item:hover {
    border-color: #2f80b7;
    box-shadow: 0 8px 22px rgba(47, 128, 183, 0.16);
    transform: translateY(-1px);
}

.equipment-stock-drawer__item.is-selected {
    border-color: #1f6f9f;
    background: #eaf5ff;
    box-shadow: 0 0 0 3px rgba(47, 128, 183, 0.18);
}

.equipment-stock-drawer__item-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

.equipment-stock-drawer__item-main strong {
    display: block;
    font-size: 1.08rem;
    line-height: 1.2;
}

.equipment-stock-drawer__item-main em {
    display: block;
    margin-top: 0.25rem;
    color: #5f6f7f;
    font-style: normal;
    font-size: 0.88rem;
}

.equipment-stock-drawer__item-id {
    flex: 0 0 auto;
    border-radius: 999px;
    background: #f1f5f9;
    color: #516173;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.28rem 0.55rem;
}

.equipment-stock-drawer__item-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem 0.75rem;
    font-size: 0.84rem;
    color: #34495e;
}

.equipment-stock-drawer__item-grid span {
    min-width: 0;
    word-break: break-word;
}

.equipment-stock-drawer__item-grid b,
.equipment-stock-drawer__item-notes b {
    color: #102a43;
}

.equipment-stock-drawer__item-notes {
    margin-top: 0.65rem;
    padding-top: 0.55rem;
    border-top: 1px dashed #d9e2ec;
    color: #5f6f7f;
    font-size: 0.84rem;
}

.equipment-stock-drawer__hint {
    font-size: 0.8rem;
    color: #6b7280;
}

.equipment-stock-drawer__footer {
    padding: 1rem 1.25rem 1.2rem;
    border-top: 1px solid #e2dccd;
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    background: #fffdf8;
}

#equipmentStockDrawer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

#equipmentStockDrawer[hidden] {
    display: none !important;
}

#equipmentStockDrawer .equipment-stock-drawer__backdrop {
    background: rgba(13, 27, 42, 0.58);
    backdrop-filter: blur(2px);
}

#equipmentStockDrawer .equipment-stock-drawer__panel {
    position: relative;
    top: auto;
    right: auto;
    width: min(1120px, calc(100vw - 3rem));
    height: min(780px, calc(100vh - 3rem));
    border-radius: 18px;
    overflow: hidden;
    background: #f7fafd;
    box-shadow: 0 26px 70px rgba(13, 27, 42, 0.32);
}

#equipmentStockDrawer .equipment-stock-drawer__header {
    align-items: center;
    padding: 1.05rem 1.25rem;
    border-bottom: 1px solid #d7e3ec;
    background: linear-gradient(135deg, #f8fcff 0%, #eaf4fb 100%);
}

#equipmentStockDrawer .equipment-stock-drawer__eyebrow {
    color: #2c7da0;
}

#equipmentStockDrawer .equipment-stock-drawer__title {
    font-size: 1.35rem;
}

#equipmentStockDrawer .equipment-stock-drawer__subtitle {
    color: #597083;
    font-weight: 600;
}

#equipmentStockDrawer .equipment-stock-drawer__close {
    border-color: #b8c9d8;
    border-radius: 12px;
}

#equipmentStockDrawer .equipment-stock-drawer__body {
    padding: 1rem 1.15rem;
    background: #eef5f9;
}

#equipmentStockDrawer .equipment-stock-drawer__search {
    min-height: 48px;
    border: 2px solid #8fc5f9;
    border-radius: 12px;
    background: #ffffff;
    font-size: 1rem;
    box-shadow: 0 0 0 3px rgba(47, 128, 183, 0.12);
}

#equipmentStockDrawer .equipment-stock-drawer__list {
    min-height: 0;
    padding: 0.85rem;
    gap: 0.7rem;
    border: 1px solid #d3e1ec;
    border-radius: 14px;
    background: #ffffff;
}

#equipmentStockDrawer .equipment-stock-drawer__item {
    display: grid;
    grid-template-columns: minmax(190px, 0.8fr) minmax(0, 2.3fr);
    gap: 0.85rem 1rem;
    align-items: start;
    border: 1px solid #d6e2ec;
    border-radius: 12px;
    padding: 0.8rem 0.9rem;
    box-shadow: none;
}

#equipmentStockDrawer .equipment-stock-drawer__item:hover {
    border-color: #2f80b7;
    background: #f6fbff;
    box-shadow: 0 7px 20px rgba(47, 128, 183, 0.13);
    transform: none;
}

#equipmentStockDrawer .equipment-stock-drawer__item.is-selected {
    border-color: #1d72a3;
    background: #e8f5ff;
    box-shadow: inset 4px 0 0 #1d72a3;
}

#equipmentStockDrawer .equipment-stock-drawer__item-main {
    margin: 0;
    flex-direction: column;
    gap: 0.35rem;
}

#equipmentStockDrawer .equipment-stock-drawer__item-main strong {
    font-size: 1.15rem;
    color: #102a43;
}

#equipmentStockDrawer .equipment-stock-drawer__item-main em {
    margin: 0;
    font-size: 0.88rem;
    color: #486174;
}

#equipmentStockDrawer .equipment-stock-drawer__item-id {
    width: fit-content;
    border-radius: 8px;
    background: #e2edf5;
    color: #39576d;
}

#equipmentStockDrawer .equipment-stock-drawer__item-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.42rem 0.85rem;
    font-size: 0.88rem;
    line-height: 1.35;
}

#equipmentStockDrawer .equipment-stock-drawer__item-grid span {
    padding: 0.35rem 0.45rem;
    border-radius: 8px;
    background: #f4f8fb;
}

#equipmentStockDrawer .equipment-stock-drawer__item-notes {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0.55rem 0.65rem;
    border: 1px dashed #cbdbe7;
    border-radius: 10px;
    background: #fbfdff;
    color: #425466;
}

#equipmentStockDrawer .equipment-stock-drawer__hint {
    color: #68798a;
}

#equipmentStockDrawer .equipment-stock-drawer__footer {
    padding: 0.95rem 1.15rem;
    border-top-color: #d7e3ec;
    background: #f8fcff;
}

@media (max-width: 780px) {
    #equipmentStockDrawer {
        padding: 0.75rem;
    }

    #equipmentStockDrawer .equipment-stock-drawer__panel {
        width: calc(100vw - 1.5rem);
        height: calc(100vh - 1.5rem);
    }

    #equipmentStockDrawer .equipment-stock-drawer__item {
        grid-template-columns: 1fr;
    }

    #equipmentStockDrawer .equipment-stock-drawer__item-grid {
        grid-template-columns: 1fr;
    }
}

.repair-schedule-part-cell {
    text-align: center;
    position: relative;
}

.repair-schedule-part-gear {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 1px solid #64748b;
    background: #ece7df;
    color: #23313f;
    font-size: 1rem;
    cursor: pointer;
    position: relative;
    border-radius: 6px;
    padding: 0;
}

.repair-schedule-part-popover {
    display: none;
}


.repair-schedule-part-popup-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.repair-schedule-part-popup-table th,
.repair-schedule-part-popup-table td {
    border: 1px solid #ddd5c4;
    padding: 0.45rem 0.55rem;
    text-align: left;
}

.repair-schedule-part-popup-table th {
    background: #f5efdf;
    font-weight: 800;
    color: #425466;
}

.repair-schedule-part-popup-table tbody tr:nth-child(even) {
    background: #fffaf0;
}
.repair-schedule-part-popover__item + .repair-schedule-part-popover__item {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #ddd5c4;
}

.repair-schedule-part-popover__row {
    display: grid;
    grid-template-columns: 130px 1fr;
    gap: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.45;
    padding: 0.18rem 0;
}

.repair-schedule-part-popover__label {
    color: #6b7280;
    font-weight: 700;
}

.repair-schedule-part-popover__value {
    color: #23313f;
    font-weight: 600;
    word-break: break-word;
}

body.repair-schedule-part-modal-open {
    overflow: hidden;
}

.repair-schedule-part-modal[hidden] {
    display: none !important;
}

.repair-schedule-part-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
}

.repair-schedule-part-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(22, 32, 43, 0.52);
}

.repair-schedule-part-modal__dialog {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: min(980px, 94vw);
    max-height: 82vh;
    overflow: auto;
    background: #fffdf8;
    border: 1px solid #d8d2c3;
    box-shadow: 0 18px 42px rgba(35, 49, 63, 0.24);
    border-radius: 14px;
}

.repair-schedule-part-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #e3dccd;
    background: #f8f1e2;
}

.repair-schedule-part-modal__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: #23313f;
}

.repair-schedule-part-modal__close {
    width: 38px;
    height: 38px;
    border: 1px solid #c7d0da;
    background: #ffffff;
    color: #425466;
    border-radius: 10px;
    font-size: 1.35rem;
    line-height: 1;
}

.repair-schedule-part-modal__body {
    padding: 1rem 1.2rem 1.2rem;
}

/* Dashboard v2 */
.panel-card {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(22, 48, 71, 0.08);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(22, 48, 71, 0.055);
}

.eyebrow {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
    color: #c7682f;
}

.dashboard-v2-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(280px, 0.85fr);
    gap: 1rem;
}

.dashboard-v2-hero__main,
.dashboard-v2-hero__aside {
    padding: 1.65rem 1.75rem;
}

.dashboard-v2-hero__main {
    background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(246,241,233,0.96));
}

.dashboard-v2-hero__aside {
    background: linear-gradient(180deg, rgba(248, 243, 236, 0.98), rgba(242, 236, 228, 0.98));
}

.dashboard-v2-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.9rem);
    font-weight: 800;
    color: var(--app-ink);
}

.dashboard-v2-subtitle {
    max-width: 780px;
    color: #5f7287;
    font-size: 1.02rem;
    line-height: 1.7;
}

.dashboard-v2-session__label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #7a8694;
    margin-bottom: 0.45rem;
}

.dashboard-v2-session__name {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--app-ink);
}

.dashboard-v2-session__role,
.dashboard-v2-session__date,
.dashboard-v2-session__month {
    color: #667788;
    margin-top: 0.2rem;
}

.dashboard-v2-session__month {
    margin-top: 0.9rem;
    font-weight: 700;
    color: #314559;
}

.dashboard-v2-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-v2-metric {
    border-radius: 16px;
    padding: 1.1rem 1.15rem;
    border: 1px solid rgba(22, 48, 71, 0.08);
    box-shadow: 0 14px 32px rgba(22, 48, 71, 0.05);
}

.dashboard-v2-metric__label {
    color: #6b7a88;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.dashboard-v2-metric__value {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    font-weight: 800;
    color: var(--app-ink);
    line-height: 1;
}

.dashboard-v2-metric--ink {
    background: linear-gradient(180deg, #f7fafc, #eef3f7);
}

.dashboard-v2-metric--sand {
    background: linear-gradient(180deg, #fbf6ef, #f3eadf);
}

.dashboard-v2-metric--sage {
    background: linear-gradient(180deg, #f1f7f0, #e6f0e4);
}

.dashboard-v2-metric--amber {
    background: linear-gradient(180deg, #fff6e7, #f7ead0);
}

.dashboard-v2-metric--steel {
    background: linear-gradient(180deg, #f3f5f7, #e8edf1);
}

.dashboard-v2-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 1rem;
}

.dashboard-v2-grid--secondary {
    grid-template-columns: 1fr 0.95fr;
}

.dashboard-v2-sectionhead {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.dashboard-v2-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.dashboard-v2-action {
    display: block;
    padding: 1rem 1.05rem;
    border-radius: 14px;
    border: 1px solid rgba(22, 48, 71, 0.08);
    background: linear-gradient(180deg, #fbfcfd, #f2f6f9);
    text-decoration: none;
    color: var(--app-ink);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-v2-action:hover {
    color: var(--app-ink);
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(22, 48, 71, 0.08);
    border-color: rgba(22, 48, 71, 0.14);
}

.dashboard-v2-action__title {
    font-weight: 800;
    margin-bottom: 0.28rem;
}

.dashboard-v2-action__desc {
    color: #647586;
    font-size: 0.94rem;
    line-height: 1.45;
}

.dashboard-v2-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.dashboard-v2-listitem {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: #f8fbfd;
    border: 1px solid rgba(22, 48, 71, 0.08);
    text-decoration: none;
    color: var(--app-ink);
}

.dashboard-v2-listitem:hover {
    color: var(--app-ink);
    background: #f1f6fa;
}

.dashboard-v2-listitem__main {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.dashboard-v2-listitem__main span {
    color: #627487;
    font-size: 0.94rem;
}

.dashboard-v2-listitem__meta {
    flex-shrink: 0;
}

.dashboard-v2-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 64px;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    background: #e9eff5;
    color: #274158;
    font-size: 0.82rem;
    font-weight: 800;
}

.dashboard-v2-chip--success {
    background: #dfeedd;
    color: #2d5f31;
}

.dashboard-v2-empty {
    padding: 0.95rem 1rem;
    border-radius: 14px;
    background: #f7f3ee;
    color: #6d7783;
    border: 1px dashed rgba(22, 48, 71, 0.12);
}

.dashboard-v2-stocklist {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.dashboard-v2-stockrow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(22, 48, 71, 0.08);
    background: #f8fafc;
}

.dashboard-v2-stockrow span {
    color: #405365;
    font-weight: 700;
}

.dashboard-v2-stockrow strong {
    font-size: 1.08rem;
}

.dashboard-v2-stockrow--critical {
    background: #fff0ec;
    border-color: rgba(197, 99, 66, 0.18);
}

.dashboard-v2-stockrow--warning {
    background: #fff7e8;
    border-color: rgba(198, 145, 56, 0.16);
}

.dashboard-v2-stockrow--normal {
    background: #f4f8f5;
    border-color: rgba(91, 128, 94, 0.14);
}

.dashboard-v2-table thead th {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7a88;
    border-bottom-width: 1px;
}

.dashboard-v2-table tbody td {
    padding-top: 0.95rem;
    padding-bottom: 0.95rem;
    border-color: rgba(22, 48, 71, 0.08);
}

@media (max-width: 1199.98px) {
    .dashboard-v2-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .dashboard-v2-grid,
    .dashboard-v2-grid--secondary {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .dashboard-v2-hero {
        grid-template-columns: 1fr;
    }

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

    .dashboard-v2-actions {
        grid-template-columns: 1fr;
    }

    .dashboard-v2-sectionhead {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 575.98px) {
    .dashboard-v2-metrics {
        grid-template-columns: 1fr;
    }

    .dashboard-v2-hero__main,
    .dashboard-v2-hero__aside {
        padding: 1.15rem;
    }
}
.equipment-removed-panel {
    padding: 0.5rem 0.65rem;
    background: #fffdf8;
    border: 1px solid #ead8b4;
    border-radius: 6px;
}

.equipment-removed-panel__header {
    display: none;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 0.95rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid #efdfc5;
    color: #435567;
}

.equipment-removed-panel__header strong {
    display: block;
    font-size: 1rem;
    color: #243b53;
    letter-spacing: 0.01em;
}

.equipment-removed-panel__header span {
    max-width: 320px;
    text-align: right;
    font-size: 0.8rem;
    line-height: 1.35;
    color: #6f7f8d;
}

.equipment-removed-panel__main {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
}

.equipment-removed-panel__action {
    display: none;
    max-width: none;
}

.equipment-removed-panel__action .stock-form-label {
    display: none;
}

.equipment-removed-stock-fields {
    padding-top: 0.1rem;
}

.equipment-removed-stock-fields__note {
    font-size: 0.8rem;
    color: #6c7680;
    margin-bottom: 0.7rem;
}

.equipment-removed-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

@media (max-width: 991.98px) {
    .equipment-removed-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .equipment-removed-panel__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .equipment-removed-panel__header span {
        max-width: none;
        text-align: left;
    }

    .equipment-removed-grid {
        grid-template-columns: 1fr;
    }
}
.equipment-removed-choice-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.equipment-removed-choice {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.42rem 0.95rem;
    border: 1px solid #d0b783;
    border-radius: 6px;
    background: #fff;
    color: #314a62;
    font-weight: 700;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
    transition: all 0.16s ease;
}

.equipment-removed-choice:hover {
    background: #fff8eb;
    border-color: #c79f60;
}

.equipment-removed-choice.is-active {
    background: #fff2d8;
    border-color: #bf9258;
    color: #5b3c16;
    box-shadow: inset 0 0 0 1px rgba(191, 146, 88, 0.12), 0 4px 14px rgba(191, 146, 88, 0.12);
}

.equipment-removed-choice__title {
    text-align: center;
    line-height: 1.25;
}

.equipment-removed-route-summary {
    display: none !important;
    padding: 0.9rem 1rem;
    border: 1px solid #ead8b4;
    border-radius: 12px;
    background: linear-gradient(180deg, #fffaf0 0%, #fff5e5 100%);
}

.equipment-removed-route-summary__label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8f6a34;
    margin-bottom: 0.25rem;
}

.equipment-removed-route-summary__text {
    font-size: 0.92rem;
    color: #44596c;
    line-height: 1.45;
}

.equipment-removed-stock-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.equipment-removed-stock-summary__text {
    display: none;
}

.equipment-removed-stock-summary .btn {
    min-height: 34px;
    border-radius: 6px;
    padding: 0.42rem 0.95rem;
    font-weight: 700;
}

.equipment-removed-submit {
    box-shadow: 0 8px 18px rgba(43, 132, 183, 0.16);
}

@media (max-width: 767.98px) {
    .equipment-removed-choice-grid {
        grid-template-columns: 1fr;
    }

    .equipment-removed-stock-summary {
        flex-direction: column;
        align-items: stretch;
    }
}
.warehouse-modern-shell {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.warehouse-modern-head {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-start;
    padding: 1.4rem 1.5rem;
    border: 1px solid rgba(22, 48, 71, 0.1);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(247,249,251,0.96));
    box-shadow: 0 18px 34px rgba(22, 48, 71, 0.06);
}

.warehouse-modern-title {
    margin: 0;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--app-ink);
}

.warehouse-modern-subtitle {
    margin-top: 0.5rem;
    max-width: 720px;
    color: var(--app-muted);
}

.warehouse-modern-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.55rem;
    min-width: 0;
}

.warehouse-modern-summary__item {
    padding: 0.62rem 0.75rem;
    border-radius: 8px;
    background: #f7fafc;
    border: 1px solid rgba(22, 48, 71, 0.08);
}

.warehouse-modern-summary__item.is-good {
    background: #f3fbf5;
    border-color: rgba(25, 135, 84, 0.18);
}

.warehouse-modern-summary__item.is-good-pss {
    background: #f4fce9;
    border-color: rgba(126, 184, 60, 0.22);
}

.warehouse-modern-summary__item.is-pss {
    background: #f3f7ff;
    border-color: rgba(31, 98, 202, 0.18);
}

.warehouse-modern-summary__item.is-bad {
    background: #fff7ed;
    border-color: rgba(243, 154, 61, 0.22);
}

.warehouse-modern-summary__item.is-scrap {
    background: #fff5f5;
    border-color: rgba(220, 53, 69, 0.18);
}

.warehouse-modern-summary__item.is-sonk {
    background: #eef8f2;
    border-color: rgba(20, 97, 58, 0.2);
}

.warehouse-modern-summary__item.is-dark {
    background: #f5f6f8;
    border-color: rgba(75, 85, 99, 0.18);
}

.warehouse-modern-summary__item.is-neutral {
    background: #f7fafc;
    border-color: rgba(22, 48, 71, 0.08);
}

.warehouse-modern-summary__label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--app-muted);
    margin-bottom: 0.15rem;
    font-weight: 800;
    line-height: 1.2;
}

.warehouse-modern-summary__item strong {
    font-size: 1.2rem;
    line-height: 1;
}

.warehouse-modern-summary__item.is-good strong {
    color: #198754;
}

.warehouse-modern-summary__item.is-good-pss strong {
    color: #4f8f19;
}

.warehouse-modern-summary__item.is-pss strong {
    color: #1f62ca;
}

.warehouse-modern-summary__item.is-bad strong {
    color: #bf6508;
}

.warehouse-modern-summary__item.is-scrap strong {
    color: #dc3545;
}

.warehouse-modern-summary__item.is-sonk strong {
    color: #14613a;
}

.warehouse-modern-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.warehouse-modern-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.1rem;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(22, 48, 71, 0.1);
    box-shadow: 0 16px 28px rgba(22, 48, 71, 0.05);
}

.warehouse-modern-card--wide {
    grid-column: span 2;
}

.warehouse-modern-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.warehouse-modern-card__top--stacked {
    align-items: center;
}

.warehouse-modern-card__eyebrow {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--app-muted);
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.warehouse-modern-card__title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--app-ink);
}

.warehouse-modern-card__meta {
    margin-top: 0.3rem;
    color: var(--app-muted);
    font-size: 0.92rem;
}

.warehouse-modern-card__badge {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    height: 44px;
    padding: 0 0.7rem;
    border-radius: 999px;
    background: #eff4f8;
    border: 1px solid rgba(22, 48, 71, 0.08);
    font-weight: 800;
    color: var(--app-ink);
}

.warehouse-modern-card__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.2rem;
    color: var(--app-muted);
    font-size: 0.94rem;
}

.warehouse-modern-card__stats strong {
    color: var(--app-ink);
}

.warehouse-modern-card__actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.warehouse-modern-card__actions--compact {
    margin-top: auto;
}

.warehouse-modern-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

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

.warehouse-modern-button--primary {
    background: #dfeaf3;
    color: #163047;
    box-shadow: inset 0 0 0 1px rgba(22, 48, 71, 0.08);
}

.warehouse-modern-button--primary:hover {
    color: #163047;
    background: #d5e4ef;
}

.warehouse-modern-button--ghost {
    background: #f6f8fa;
    color: #50606e;
    box-shadow: inset 0 0 0 1px rgba(22, 48, 71, 0.08);
}

.warehouse-modern-button--ghost:hover {
    color: #243646;
    background: #edf2f6;
}

.warehouse-modern-subgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.warehouse-modern-subcard {
    padding: 1rem;
    border-radius: 14px;
    background: #fbfcfd;
    border: 1px solid rgba(22, 48, 71, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.warehouse-modern-subcard__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.warehouse-modern-subcard__head h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
}

.warehouse-modern-subcard__head span {
    display: inline-grid;
    place-items: center;
    min-width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #eef3f7;
    font-weight: 800;
}

.warehouse-modern-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.warehouse-modern-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    background: #eef4d8;
    color: #39512f;
    font-weight: 700;
    font-size: 0.86rem;
}

.warehouse-modern-pill--muted {
    background: #eef2f5;
    color: #5b6772;
}

.warehouse-modern-card--wheelset {
    background: linear-gradient(180deg, #ffffff, #f8fcf4);
}

.warehouse-modern-card--casted {
    background: linear-gradient(180deg, #ffffff, #fffaf0);
}

.warehouse-modern-card--coupler {
    background: linear-gradient(180deg, #ffffff, #f8f8fb);
}

.warehouse-modern-card--draft {
    background: linear-gradient(180deg, #ffffff, #fdf5f4);
}

@media (max-width: 1199.98px) {
    .warehouse-modern-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .warehouse-modern-card--wide {
        grid-column: span 2;
    }
}

@media (max-width: 991.98px) {
    .warehouse-modern-head {
        flex-direction: column;
    }

    .warehouse-modern-summary {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    .warehouse-modern-grid,
    .warehouse-modern-subgrid {
        grid-template-columns: 1fr;
    }

    .warehouse-modern-card--wide {
        grid-column: span 1;
    }
}
.stock-toolbar-wrap,
.stock-title-wrap {
    min-width: 0;
}

.stock-title-wrap h1,
.stock-title-wrap .h2,
.stock-title-wrap .h3 {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.stock-toolbar-wrap {
    position: relative;
    z-index: 3;
}

#equipmentRemovedDrawer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

#equipmentRemovedDrawer[hidden] {
    display: none !important;
}

#equipmentRemovedDrawer .equipment-stock-drawer__backdrop {
    background: rgba(13, 27, 42, 0.58);
    backdrop-filter: blur(2px);
}

#equipmentRemovedDrawer .equipment-stock-drawer__panel {
    position: relative;
    top: auto;
    right: auto;
    width: min(980px, calc(100vw - 3rem));
    max-height: min(760px, calc(100vh - 3rem));
    height: auto;
    border-radius: 18px;
    overflow: hidden;
    background: #f7fafd;
    box-shadow: 0 26px 70px rgba(13, 27, 42, 0.32);
}

#equipmentRemovedDrawer .equipment-stock-drawer__header {
    align-items: center;
    padding: 1.05rem 1.25rem;
    border-bottom: 1px solid #d7e3ec;
    background: linear-gradient(135deg, #f8fcff 0%, #eaf4fb 100%);
}

#equipmentRemovedDrawer .equipment-stock-drawer__eyebrow {
    color: #2c7da0;
}

#equipmentRemovedDrawer .equipment-stock-drawer__title {
    font-size: 1.35rem;
}

#equipmentRemovedDrawer .equipment-stock-drawer__subtitle {
    color: #597083;
    font-weight: 600;
}

#equipmentRemovedDrawer .equipment-stock-drawer__body {
    padding: 1rem 1.15rem;
    background: #eef5f9;
    overflow: auto;
}

#equipmentRemovedDrawer .equipment-removed-stock-fields {
    display: block;
    padding: 1rem;
    border: 1px solid #d3e1ec;
    border-radius: 14px;
    background: #ffffff;
}

#equipmentRemovedDrawer .equipment-removed-stock-fields__note {
    margin: 0 0 1rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid #d7e3ec;
    border-radius: 10px;
    background: #f4f8fb;
    color: #425466;
    font-size: 0.9rem;
}

#equipmentRemovedDrawer .equipment-removed-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem 1rem;
}

#equipmentRemovedDrawer .stock-form-label {
    margin-bottom: 0.3rem;
    color: #334e68;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

#equipmentRemovedDrawer .stock-form-control {
    min-height: 46px;
    border-color: #cbdbe7;
    border-radius: 11px;
    background: #ffffff;
    font-size: 1rem;
}

#equipmentRemovedDrawer textarea.stock-form-control {
    min-height: 92px;
}

#equipmentRemovedDrawer .equipment-stock-drawer__footer {
    padding: 0.95rem 1.15rem;
    border-top-color: #d7e3ec;
    background: #f8fcff;
}

@media (max-width: 900px) {
    #equipmentRemovedDrawer {
        padding: 0.75rem;
    }

    #equipmentRemovedDrawer .equipment-stock-drawer__panel {
        width: calc(100vw - 1.5rem);
        max-height: calc(100vh - 1.5rem);
    }

    #equipmentRemovedDrawer .equipment-removed-grid {
        grid-template-columns: 1fr;
    }
}
.repair-schedule-part-popup-section {
    display: grid;
    gap: 0.65rem;
}

.repair-schedule-part-popup-heading {
    font-weight: 800;
    color: #123047;
    text-align: center;
    font-size: 1rem;
}

.repair-schedule-part-popup-table {
    min-width: 760px;
    font-size: 0.84rem;
}

.repair-schedule-part-popup-table th,
.repair-schedule-part-popup-table td {
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    line-height: 1.2;
}

.repair-schedule-part-popup-table th:first-child,
.repair-schedule-part-popup-table td:first-child,
.repair-schedule-part-popup-table th:nth-child(2),
.repair-schedule-part-popup-table td:nth-child(2) {
    text-align: left;
}

.repair-schedule-part-modal__body {
    overflow: auto;
}

.admin-users-shell {
    display: grid;
    gap: 1.5rem;
    min-width: 0;
}

.admin-users-hero {
    background:
        radial-gradient(circle at top right, rgba(28, 126, 214, 0.12), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    border: 1px solid #d9e5ef;
    min-width: 0;
    order: 1;
}

.admin-users-hero__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.admin-users-hero__copy {
    max-width: 760px;
    min-width: 0;
}

.admin-users-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: flex-end;
    min-width: 0;
}

.admin-users-hero__actions > .stock-toolbar-btn:nth-child(-n + 2) {
    display: none;
}

.admin-users-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.35rem;
}

.admin-users-stat {
    padding: 0.95rem 1rem;
    border: 1px solid #d8e3ec;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(17, 41, 64, 0.04);
}

.admin-users-stat span {
    display: block;
    color: #71808f;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-users-stat strong {
    display: block;
    margin-top: 0.45rem;
    color: #123047;
    font-size: 1.75rem;
    line-height: 1;
}

.admin-users-stat--muted {
    background: #f7f9fb;
}

.admin-users-layout {
    display: block;
    order: 2;
}

.admin-users-table-card,
.admin-users-side-card {
    overflow: hidden;
    min-width: 0;
}

.admin-users-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 1.1rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #d8e3ec;
    background: linear-gradient(180deg, #fbfdff 0%, #f5f9fc 100%);
}

.admin-users-toolbar__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 0.5rem;
    padding-top: 0.05rem;
}

.admin-users-toolbar__copy {
    min-width: 220px;
}

.admin-users-toolbar__copy h3,
.admin-users-side-card__head h3,
.admin-users-roadmap__head h3 {
    margin: 0;
    color: #14354c;
    font-size: 1.08rem;
    font-weight: 800;
}

.admin-users-toolbar__copy p,
.admin-users-roadmap__head p {
    margin: 0.22rem 0 0;
    color: #728090;
    font-size: 0.86rem;
}

.admin-users-toolbar__filters {
    display: grid;
    grid-template-columns: 205px 116px 116px auto;
    justify-content: flex-end;
    align-items: flex-start;
    gap: 0.42rem;
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.admin-users-toolbar__filters > .d-flex {
    display: contents !important;
}

.admin-users-search,
.admin-users-select {
    width: 100%;
    height: 38px;
    min-height: 38px;
    border-radius: 8px;
    border-color: #cfdbe6;
    background-color: #ffffff;
    font-size: 0.88rem;
    box-shadow: 0 1px 2px rgba(17, 41, 64, 0.04);
}

.admin-users-search {
    width: 100%;
}

.admin-users-select {
    width: 100%;
}

.admin-users-toolbar__filters .btn {
    height: 38px;
    padding: 0 0.82rem;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 800;
    white-space: nowrap;
    background: #ffffff;
    border-color: #b7c7d6;
    color: #244057;
}

.admin-users-toolbar__filters .btn:hover {
    background: #f0f6fb;
    border-color: #91aac0;
}

.admin-users-table-wrap {
    background: #ffffff;
}

.admin-users-table th,
.admin-users-table td {
    vertical-align: middle;
}

.admin-users-table {
    min-width: 100%;
    table-layout: fixed;
}

.admin-backup-table {
    min-width: 720px;
    table-layout: fixed;
}

.admin-backup-table th:nth-child(1),
.admin-backup-table td:nth-child(1) {
    width: 52%;
}

.admin-backup-table th:nth-child(2),
.admin-backup-table td:nth-child(2) {
    width: 18%;
}

.admin-backup-table th:nth-child(3),
.admin-backup-table td:nth-child(3) {
    width: 14%;
}

.admin-backup-table th:nth-child(4),
.admin-backup-table td:nth-child(4) {
    width: 16%;
    text-align: center;
}

.admin-users-table th:nth-child(1),
.admin-users-table td:nth-child(1) {
    width: 14%;
}

.admin-users-table th:nth-child(2),
.admin-users-table td:nth-child(2) {
    width: 18%;
}

.admin-users-table th:nth-child(3),
.admin-users-table td:nth-child(3) {
    width: 18%;
}

.admin-users-table th:nth-child(4),
.admin-users-table td:nth-child(4) {
    width: 12%;
}

.admin-users-table th:nth-child(5),
.admin-users-table td:nth-child(5),
.admin-users-table th:nth-child(6),
.admin-users-table td:nth-child(6) {
    width: 14%;
}

.admin-users-table th:nth-child(7),
.admin-users-table td:nth-child(7) {
    width: 88px;
    text-align: left;
    white-space: nowrap;
}

.admin-users-row-actions {
    align-items: center;
    display: inline-flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.35rem;
    justify-content: flex-start;
}

.admin-users-delete-btn {
    align-items: center;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 800;
    height: 32px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 32px;
}

.admin-users-login strong,
.admin-users-name {
    color: #14354c;
}

.admin-users-role-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
}

.admin-users-role-badge--admin {
    background: #ffe7cc;
    color: #8d4f00;
}

.admin-users-role-badge--dispatcher {
    background: #dff2ff;
    color: #0b5c87;
}

.admin-users-role-badge--senior_master {
    background: #fff0cf;
    color: #8d5b00;
}

.admin-users-role-badge--wheel_master,
.admin-users-role-badge--wheel_brigadier {
    background: #e7f5e8;
    color: #2f6a34;
}

.admin-users-role-badge--assembly_master,
.admin-users-role-badge--assembly_brigadier {
    background: #e8f0ff;
    color: #355aa3;
}

.admin-users-role-badge--accountant {
    background: #f4e9ff;
    color: #6a42a6;
}

.admin-users-role-badge--inspector {
    background: #e7f7f7;
    color: #146b73;
}

.admin-users-role-badge--unknown {
    background: #eef2f5;
    color: #5c6975;
}

.admin-users-side-card {
    padding: 1.2rem 1.3rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbfd 100%);
}

.admin-users-form-panel {
    padding: 0;
    order: 4;
}

.admin-users-table-card > .admin-users-form-panel {
    margin: 0 !important;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    border-bottom: 1px solid #d8e3ec;
}

.admin-users-form-toggle {
    width: 100%;
    border: 0;
    background: linear-gradient(180deg, #ffffff, #f4f8fb);
    padding: 0.82rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    color: var(--app-ink);
}

.admin-users-form-toggle strong,
.admin-users-form-toggle small {
    display: block;
}

.admin-users-form-toggle strong {
    font-size: 0.96rem;
}

.admin-users-form-toggle small {
    margin-top: 0.1rem;
    color: #6b7a88;
    font-weight: 700;
    font-size: 0.82rem;
}

.admin-users-form-toggle__meta {
    min-width: 48px;
    min-height: 28px;
    border-radius: 7px;
    background: #dce9f5;
    color: #123b61;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.admin-users-form-panel__body {
    padding: 0.9rem 1rem 1rem;
    border-top: 1px solid rgba(22, 48, 71, 0.08);
    background: #fbfdff;
}

.admin-users-form-panel .admin-users-side-card__head {
    display: none;
}

.admin-users-side-card__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.15rem;
}

.admin-users-side-card__pill {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: #e8f3ff;
    color: #1967a3;
    font-size: 0.79rem;
    font-weight: 800;
}

.admin-users-form {
    display: grid;
    gap: 0.75rem;
}

.admin-users-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 0.85rem;
}

.admin-users-form-grid .stock-form-label {
    margin-bottom: 0.28rem;
    font-size: 0.76rem;
}

.admin-users-form-grid .stock-form-control {
    min-height: 38px;
}

.admin-users-form-note {
    padding: 0.65rem 0.8rem;
    border: 1px solid #d8e3ec;
    border-radius: 8px;
    background: #f4f8fb;
    color: #546475;
    font-size: 0.84rem;
    line-height: 1.35;
}

.admin-users-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.admin-visual-settings-card {
    order: 2;
}

.admin-background-form {
    display: grid;
    gap: 0.85rem;
}

.admin-background-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
    gap: 0.75rem;
}

.admin-background-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 54px;
    padding: 0.72rem 0.85rem;
    border: 1px solid rgba(22, 48, 71, 0.14);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    font-weight: 800;
    color: var(--app-ink);
}

.admin-background-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.admin-background-option.is-active {
    border-color: #27318b;
    box-shadow: 0 0 0 3px rgba(39, 49, 139, 0.12);
}

.admin-background-option:has(input:checked) {
    border-color: #27318b;
    box-shadow: 0 0 0 3px rgba(39, 49, 139, 0.12);
}

.admin-background-option__swatch {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 8px;
    border: 1px solid rgba(22, 48, 71, 0.18);
    background: var(--swatch-color);
}

.admin-background-option__label {
    line-height: 1.2;
}

.admin-draft-gear-card {
    border: 1px solid rgba(22, 48, 71, 0.08);
    overflow: hidden;
    order: 4;
}

.admin-sql-backup-card {
    order: 3;
}

.admin-draft-gear-toggle {
    width: 100%;
    border: 0;
    background: linear-gradient(180deg, #ffffff, #f4f8fb);
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    text-align: left;
    color: var(--app-ink);
}

.admin-draft-gear-toggle strong,
.admin-draft-gear-toggle small {
    display: block;
}

.admin-draft-gear-toggle strong {
    font-size: 1rem;
}

.admin-draft-gear-toggle small {
    margin-top: 0.15rem;
    color: #6b7a88;
    font-weight: 700;
}

.admin-draft-gear-toggle__meta {
    min-width: 42px;
    min-height: 32px;
    border-radius: 8px;
    background: #dce9f5;
    color: #123b61;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.admin-draft-gear-body {
    padding: 1.1rem;
    border-top: 1px solid rgba(22, 48, 71, 0.08);
}

.admin-draft-gear-tabs {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-draft-gear-form {
    max-width: 920px;
}

.admin-draft-gear-textarea {
    font-family: Consolas, "Courier New", monospace;
    line-height: 1.45;
    resize: vertical;
}

.admin-users-roadmap__head {
    margin-bottom: 1rem;
}

.admin-users-roadmap__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.admin-users-roadmap__item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 0.85rem;
    align-items: start;
    padding: 1rem;
    border: 1px solid #d8e3ec;
    border-radius: 16px;
    background: #fbfdff;
}

.admin-users-roadmap__item strong {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #2f8fdf 0%, #1d6eb8 100%);
    color: #ffffff;
    font-size: 1rem;
}

.admin-users-roadmap__item span {
    color: #4f6071;
    line-height: 1.45;
}

@media (max-width: 1199.98px) {
    .admin-users-stats,
    .admin-users-roadmap__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-users-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .admin-users-hero__head,
    .admin-users-toolbar {
        flex-direction: column;
    }

    .admin-users-toolbar__filters {
        width: 100%;
        max-width: none;
        justify-content: flex-start;
    }

    .admin-users-search {
        width: min(100%, 320px);
    }

    .admin-users-select {
        width: 160px;
    }

}

@media (max-width: 767.98px) {
    .admin-users-stats,
    .admin-users-form-grid,
    .admin-users-roadmap__grid {
        grid-template-columns: 1fr;
    }
}

.role-home-shell {
    display: grid;
    gap: 1.15rem;
}

.role-home-hero {
    display: flex;
    justify-content: space-between;
    gap: 1.25rem;
    align-items: stretch;
    padding: 1.25rem 1.35rem;
    border-color: #d9e2ec;
    background: #ffffff;
}

.role-home-hero__main {
    max-width: 880px;
}

.role-home-hero__title {
    margin: 0;
    color: #102a43;
    font-size: clamp(1.65rem, 3vw, 2.18rem);
    font-weight: 800;
    letter-spacing: 0;
}

.role-home-hero__subtitle {
    margin: 0.45rem 0 0;
    color: #52677a;
    font-size: 0.96rem;
    line-height: 1.5;
}

.role-home-hero__session {
    display: grid;
    align-content: start;
    gap: 0.3rem;
    min-width: 220px;
    padding: 0.85rem 0.95rem;
    border: 1px solid #d8e2ec;
    border-radius: 8px;
    background: #f7faff;
    box-shadow: none;
}

.role-home-hero__session-label {
    color: #6b7c8f;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.role-home-hero__session strong {
    color: #102a43;
    font-size: 1.1rem;
}

.role-home-hero__session span,
.role-home-hero__session small {
    color: #5f7082;
}

.role-home-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.role-home-metric {
    position: relative;
    overflow: hidden;
    padding: 0.9rem 0.95rem 0.9rem 1.1rem;
    border-radius: 8px;
    border: 1px solid #d9e2ec;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(16, 46, 72, 0.035);
}

.role-home-metric::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #27318b;
}

.role-home-metric span {
    display: block;
    color: #66788a;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.role-home-metric strong {
    display: block;
    margin-top: 0.45rem;
    color: #102a43;
    font-size: 1.58rem;
    line-height: 1;
}

.role-home-metric--ink {
    background: #ffffff;
}

.role-home-metric--sand {
    background: #ffffff;
}

.role-home-metric--sand::before {
    background: #b7791f;
}

.role-home-metric--sage {
    background: #ffffff;
}

.role-home-metric--sage::before {
    background: #2f855a;
}

.role-home-metric--steel {
    background: #ffffff;
}

.role-home-metric--steel::before {
    background: #4a6378;
}

.role-home-card-panel,
.role-home-panel {
    padding: 1rem 1.1rem;
    border-color: #d9e2ec;
    background: #ffffff;
}

.role-home-sectionhead {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.role-home-sectionhead h2 {
    margin: 0;
    color: #102a43;
    font-size: 1rem;
    font-weight: 800;
}

.role-home-sectionhead p {
    margin: 0.25rem 0 0;
    color: #66788a;
    font-size: 0.88rem;
}

.role-home-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem;
}

.role-home-card {
    display: grid;
    gap: 0.45rem;
    min-height: 112px;
    padding: 0.95rem 1rem;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    background: #ffffff;
    color: #102a43;
    text-decoration: none;
    box-shadow: none;
    transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.role-home-card:hover {
    border-color: #27318b;
    background: #f7faff;
    box-shadow: 0 10px 20px rgba(39, 49, 139, 0.08);
    color: #102a43;
    text-decoration: none;
}

.role-home-card strong {
    font-size: 0.98rem;
}

.role-home-card span {
    color: #5f7082;
    line-height: 1.45;
}

.role-home-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.role-home-list {
    display: grid;
    gap: 0;
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    overflow: hidden;
}

.role-home-list__item {
    display: flex;
    justify-content: space-between;
    gap: 0.8rem;
    align-items: center;
    padding: 0.78rem 0.85rem;
    border: 0;
    border-bottom: 1px solid #e4ecf3;
    border-radius: 0;
    background: #ffffff;
}

.role-home-list__item:last-child {
    border-bottom: 0;
}

.role-home-list__item:hover {
    background: #f7faff;
}

.role-home-list__main {
    min-width: 0;
}

.role-home-list__main strong {
    display: block;
    color: #102a43;
}

.role-home-list__main span {
    display: block;
    margin-top: 0.2rem;
    color: #66788a;
    font-size: 0.92rem;
}

.role-home-list__badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    background: #edf2ff;
    color: #27318b;
    font-size: 0.82rem;
    font-weight: 800;
}

.role-home-empty {
    padding: 1rem;
    border: 1px dashed #cbd8e4;
    border-radius: 8px;
    background: #f8fbfe;
    color: #66788a;
}

.role-home-shell .eyebrow {
    color: #27318b;
}

@media (max-width: 1199.98px) {
    .role-home-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 991.98px) {
    .role-home-hero,
    .role-home-grid {
        grid-template-columns: 1fr;
        display: grid;
    }

    .role-home-hero__session {
        min-width: 0;
    }
}

@media (max-width: 767.98px) {
    .role-home-card-grid,
    .role-home-metrics,
    .role-home-grid {
        grid-template-columns: 1fr;
    }

    .role-home-list__item {
        flex-direction: column;
        align-items: flex-start;
    }
}
