:root {
    color-scheme: light;
    --bg: #eaf1fb;
    --bg-accent: #dfe9f7;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #5b6b82;
    --primary: #2f5bff;
    --primary-dark: #1d3bc9;
    --accent: #00b2a9;
    --warning: #ffb454;
    --success: #3aa4ff;
    --border: rgba(15, 23, 42, 0.08);
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    --glow: 0 12px 30px rgba(47, 91, 255, 0.22);
    --inventory-tree-style-version: "inventory-tree-style-v11";
}

* {
    box-sizing: border-box;
}

button,
[type="button"],
[type="submit"],
[type="reset"],
a,
.nav__item {
    touch-action: manipulation;
}

@supports (content-visibility: auto) {
    .card,
    .section,
    .module-card,
    .admin-card {
        content-visibility: auto;
        contain-intrinsic-size: 1px 420px;
    }

    .module-list__body > *,
    .admin-list__body > *,
    .inventory-list-pane > *,
    .dashboard-layout > * {
        content-visibility: auto;
        contain-intrinsic-size: 1px 96px;
    }
}

@media print {
    .card,
    .section,
    .module-card,
    .admin-card,
    .module-list__body > *,
    .admin-list__body > *,
    .inventory-list-pane > *,
    .dashboard-layout > * {
        content-visibility: visible !important;
        contain-intrinsic-size: none !important;
    }
}

html.performance-mode {
    --shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    --glow: 0 8px 16px rgba(47, 91, 255, 0.14);
}

body {
    margin: 0;
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    background: radial-gradient(circle at 20% -10%, #f7fbff 0%, var(--bg) 40%, #e3eefb 100%);
    color: var(--text);
}

html.performance-mode body {
    background: #edf3fb;
}

body.sidebar-open {
    overflow: hidden;
}

.app {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(165deg, #0b1e3a 0%, #103c8f 45%, #0f2a56 100%);
    color: #fff;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 10px 0 40px rgba(12, 27, 64, 0.25);
}

.sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.sidebar__close {
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: none;
    place-items: center;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s ease;
}

.sidebar__close:hover {
    background: rgba(255, 255, 255, 0.22);
}

.sidebar::before {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 91, 255, 0.45), transparent 70%);
    top: -60px;
    right: -60px;
    opacity: 0.7;
}

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

.brand__badge {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: linear-gradient(140deg, #2f5bff, #00c2b8);
    box-shadow: 0 10px 20px rgba(9, 27, 64, 0.35);
}

.brand h1 {
    margin: 0;
    font-size: 20px;
}

.brand__subline {
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.brand p {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.brand__notification-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(125, 160, 255, 0.42);
    background: rgba(125, 160, 255, 0.16);
    color: #dce8ff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.brand__notification-badge.has-unread {
    border-color: rgba(251, 191, 36, 0.6);
    background: rgba(251, 191, 36, 0.2);
    color: #fff2c2;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.nav__item {
    border: none;
    background: transparent;
    color: rgba(227, 236, 255, 0.85);
    font-size: 15px;
    padding: 12px 16px;
    border-radius: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav__item:hover,
.nav__item.is-active {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    transform: translateX(4px);
}

.sidebar__footer {
    margin-top: auto;
}

.sidebar__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    min-height: 70px;
}

.sidebar__logo.is-empty {
    background: transparent;
    border: 1px dashed rgba(255, 255, 255, 0.2);
}

.sidebar__logo img {
    max-width: 100%;
    max-height: 84px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.25));
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.12);
    padding: 12px;
    border-radius: 16px;
    margin-bottom: 12px;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--accent);
}

.btn--logout {
    width: 100%;
    padding: 10px 18px;
    text-align: center;
}

.content {
    flex: 1;
    padding: 32px 40px 48px;
    overflow-y: auto;
    margin-left: 280px;
    background:
        radial-gradient(circle at 15% 0%, rgba(47, 91, 255, 0.12), transparent 45%),
        radial-gradient(circle at 85% 10%, rgba(0, 194, 184, 0.12), transparent 40%);
}

html.performance-mode .content {
    background: transparent;
}

.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(8, 20, 45, 0.4);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 90;
}

body.sidebar-open .sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    gap: 20px;
}

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

.sidebar-toggle {
    display: none;
}

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

.burger {
    position: relative;
    width: 24px;
    height: 18px;
    display: inline-block;
}

.burger span {
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
    transition: transform 0.25s ease, top 0.25s ease, opacity 0.2s ease;
}

.burger span:nth-child(1) {
    top: 0;
}

.burger span:nth-child(2) {
    top: 8px;
}

.burger span:nth-child(3) {
    top: 16px;
}

body.sidebar-open .burger span:nth-child(1) {
    top: 8px;
    transform: rotate(45deg);
}

body.sidebar-open .burger span:nth-child(2) {
    opacity: 0;
}

body.sidebar-open .burger span:nth-child(3) {
    top: 8px;
    transform: rotate(-45deg);
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 45, 0.38);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 90;
}

.topbar h2 {
    margin: 0;
    font-size: 30px;
    font-family: 'Space Grotesk', 'Manrope', sans-serif;
}

.topbar p {
    margin: 4px 0 0;
    color: var(--muted);
}

.topbar__actions {
    display: flex;
    gap: 12px;
}

.btn {
    border: none;
    padding: 10px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), #5b7bff);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--glow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 34px rgba(47, 91, 255, 0.3);
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn--tiny {
    padding: 6px 12px;
    font-size: 12px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.88);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: float-in 0.45s ease;
}

.card.highlight {
    background: linear-gradient(135deg, #fff, #ffe5e5);
    border: 1px solid #ffd6d6;
}

.metric {
    font-size: 32px;
    font-weight: 700;
    margin: 10px 0 4px;
}

.metric--small {
    font-size: 20px;
    margin: 6px 0 2px;
}

.metric-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
    margin-top: 8px;
}

.dashboard-stack {
    display: grid;
    gap: 22px;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.dashboard-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.dashboard-toolbar h3 {
    margin: 0 0 6px;
}

.dashboard-toolbar__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.dashboard-tile {
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.dashboard-tile--wide {
    grid-column: span 2;
}

.dashboard-tile.is-hidden {
    display: none;
}

.dashboard-tile.is-dragging {
    opacity: 0.75;
    transform: scale(1.02);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
    cursor: grabbing;
}

.dashboard-edit-panel {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    padding: 16px 18px;
    border: 1px dashed rgba(15, 23, 42, 0.18);
    display: grid;
    gap: 12px;
}

.dashboard-edit-panel[hidden] {
    display: none !important;
}

[hidden] {
    display: none !important;
}

.dashboard-edit-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.dashboard-edit-panel__list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px 14px;
}

.dashboard-edit-only {
    display: none;
}

.dashboard-editing .dashboard-edit-only {
    display: block;
}

.dashboard-edit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(245, 247, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.dashboard-edit-item input {
    transform: scale(1.1);
}

.dashboard-tile__tools {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.dashboard-editing .dashboard-tile__tools {
    opacity: 1;
    pointer-events: auto;
}

.dashboard-tile__tool {
    border: none;
    background: rgba(15, 23, 42, 0.08);
    color: #1f2a44;
    padding: 6px 8px;
    border-radius: 10px;
    font-size: 12px;
    cursor: pointer;
}

.dashboard-tile__tool:hover {
    background: rgba(15, 23, 42, 0.16);
}

.dashboard-tile__handle {
    cursor: grab;
}

.dashboard-editing .dashboard-tile {
    outline: 1px dashed rgba(15, 23, 42, 0.18);
    outline-offset: 2px;
}

.section {
    margin-top: 36px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 22px;
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.7);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    animation: float-in 0.45s ease;
}

.section__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.section__header h3 {
    margin: 0 0 6px;
    font-size: 20px;
}

.section__header p {
    margin: 0;
    color: var(--muted);
}

.table {
    display: grid;
    gap: 12px;
}

.table__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.table__row--head {
    font-weight: 600;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px;
}

.pill {
    padding: 4px 10px;
    border-radius: 999px;
    background: #f0f3ff;
    color: #2b3a67;
    font-size: 12px;
}

.pill--info {
    background: #e0fbfc;
    color: #05668d;
}

.pill--warning {
    background: #fff4d6;
    color: #b76e00;
}

.pill--success {
    background: #e5f6ff;
    color: #006d77;
}

.tasks {
    display: grid;
    gap: 16px;
}

.task {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.task ul {
    margin: 10px 0 0;
    padding-left: 18px;
    color: var(--muted);
}

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

.muted {
    color: var(--muted);
}

@media (max-width: 1100px) {
    .dashboard-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-tile--wide {
        grid-column: span 2;
    }
}

@media (max-width: 720px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
    .dashboard-tile--wide {
        grid-column: span 1;
    }
    .dashboard-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .dashboard-edit-panel__header {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 960px) {
    .sidebar {
        width: min(85vw, 320px);
        transform: translateX(-110%);
        transition: transform 0.3s ease;
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .content {
        margin-left: 0;
        padding: 24px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar__title {
        width: 100%;
    }

    .sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 14px;
        position: relative;
        z-index: 110;
    }

    .sidebar-overlay {
        display: block;
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar__close {
        display: grid;
    }

    .sidebar__logo img {
        max-height: 70px;
    }
}

/* Admin settings (Material 3 inspired) */
#section-settings {
    padding: 0;
    background: linear-gradient(135deg, rgba(232, 240, 254, 0.7), rgba(255, 248, 240, 0.7));
    border: 1px solid #e5eaf5;
}

.admin-shell {
    padding: 28px;
    display: grid;
    gap: 24px;
}

.admin-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    background: #ffffff;
    border-radius: 22px;
    padding: 20px 22px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.admin-hero h3 {
    margin: 6px 0 4px;
    font-size: 22px;
}

.admin-eyebrow {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #e6f0ff;
    color: #2158d8;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.admin-tabs {
    display: inline-flex;
    padding: 6px;
    border-radius: 999px;
    background: #f5f6fb;
    border: 1px solid #e6e9f4;
    gap: 6px;
    width: fit-content;
}

.admin-tab {
    border: none;
    background: transparent;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    color: #49546a;
    cursor: pointer;
    transition: all 0.2s ease;
}

.admin-tab.is-active {
    background: #1f2a44;
    color: #fff;
    box-shadow: 0 6px 14px rgba(31, 42, 68, 0.25);
}

.admin-panel {
    display: none;
    animation: admin-fade 0.3s ease;
}

.admin-panel.is-active {
    display: block;
}

@keyframes admin-fade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float-in {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.admin-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) 1fr;
    gap: 20px;
}

.admin-card {
    background: #ffffff;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    border: 1px solid #eef1f7;
}

.admin-card h4 {
    margin: 0 0 16px;
}

.admin-form {
    display: grid;
    gap: 12px;
}

.admin-field {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: #5f6b7a;
}

.admin-field input,
.admin-field select {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e6f0;
    background: #f8f9fd;
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-field input:focus,
.admin-field select:focus {
    outline: none;
    border-color: #8aa4ff;
    box-shadow: 0 0 0 3px rgba(138, 164, 255, 0.2);
    background: #fff;
}

.admin-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.admin-list__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.admin-search input {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e6f0;
    background: #f8f9fd;
    min-width: 220px;
}

.admin-list__body {
    display: grid;
    gap: 12px;
}

.admin-row {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #eef1f7;
    background: #fff;
}

.menu-order-list {
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.menu-order-row {
    grid-template-columns: minmax(160px, 1fr) auto;
}

.admin-row__actions {
    display: inline-flex;
    gap: 8px;
}

.admin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-chip {
    padding: 4px 10px;
    border-radius: 999px;
    background: #e6f0ff;
    color: #2158d8;
    font-size: 12px;
    font-weight: 600;
}

.admin-chip--ghost {
    background: #f0f3ff;
    color: #4c5aa8;
}

.admin-chip--status {
    background: #e9f7f1;
    color: #1b7f5a;
}

.admin-permissions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 8px;
    margin-top: 8px;
    max-height: 320px;
    overflow: auto;
    padding-right: 6px;
}

.admin-permission {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8f9fd;
    border: 1px solid #edf0f6;
    font-size: 13px;
}

.sidebar-logo-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 140px;
    border-radius: 16px;
    border: 1px dashed #d7dbe6;
    background: #f8f9fd;
    padding: 12px;
}

.sidebar-logo-preview img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.sidebar-logo-preview__empty {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 1200px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .admin-list__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
}

/* ===== Modern responsive Vehicle module additions ===== */
.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.vehicle-card {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    background: #fff;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vehicle-card__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.vehicle-card__title {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.2;
}

.vehicle-card__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.vehicle-detail-layout {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 16px;
    margin-top: 14px;
}

.compartments-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.compartment-chip {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: rgba(255,255,255,0.7);
}

.compartment-chip__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.vehicle-eq-group {
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
}

.vehicle-eq-group__title {
    padding: 10px 12px;
    font-weight: 700;
    background: rgba(0,0,0,0.03);
}

.vehicle-eq-group__body {
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.vehicle-eq-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
}

.vehicle-eq-row__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 1100px) {
    .vehicles-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .vehicle-detail-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .vehicles-grid { grid-template-columns: 1fr; }
    .vehicle-eq-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
}

/* ===== Orders: optional fields layout ===== */
.module-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 720px) {
    .module-split {
        grid-template-columns: 1fr;
    }
}

/* ===== Attachments modal ===== */
.modal__content--wide {
    width: min(960px, 100%);
}

.modal__content--xwide {
    width: min(1320px, 100%);
}

.attachments-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.attachments-card {
    background: #fff;
    border: 1px solid #eef1f7;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.attachments-card h5 {
    margin: 0 0 12px;
    font-size: 14px;
}

.attachments-list__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.attachments-list {
    display: grid;
    gap: 10px;
}

.attachment-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid #edf0f6;
    border-radius: 14px;
    padding: 12px;
    background: #fff;
}

.attachment-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 920px) {
    .attachments-grid {
        grid-template-columns: 1fr;
    }
    .inventory-detail-modal__split {
        grid-template-columns: 1fr;
    }
}

/* ===== Module sections (Inventory, Orders, etc.) ===== */
.module-section {
    background: linear-gradient(135deg, rgba(240, 246, 255, 0.95), rgba(255, 251, 245, 0.9));
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.dashboard-grid .metric-card {
    min-height: 140px;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.module-header__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.module-grid {
    display: grid;
    grid-template-columns: minmax(260px, 340px) 1fr;
    gap: 20px;
}

.module-card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: 22px;
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.1);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    animation: float-in 0.45s ease;
}

.module-card h4 {
    margin: 0 0 16px;
}

.module-form {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module-field {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: #5f6b7a;
}

.module-field input,
.module-field select,
.module-field textarea {
    width: 100%;
    min-width: 0;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #f2f5ff;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.module-field input[type="checkbox"] {
    width: auto;
    justify-self: start;
}

.module-field small {
    font-size: 12px;
}

.module-field input:focus,
.module-field select:focus,
.module-field textarea:focus {
    outline: none;
    border-color: #7da0ff;
    box-shadow: 0 0 0 3px rgba(125, 160, 255, 0.22);
    background: #fff;
}

.module-field input::placeholder,
.module-field textarea::placeholder,
.module-search input::placeholder {
    color: #a6afbf;
    opacity: 1;
}

.module-field--full,
.module-actions {
    grid-column: 1 / -1;
}

.module-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}

.orders-receive-lines {
    display: grid;
    gap: 10px;
}

.orders-receive-lines__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.orders-receive-line {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 14px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.92);
}

.orders-receive-line__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.orders-receive-line__grid {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.orders-receive-line__grid .module-field {
    margin: 0;
}

.orders-receive-line__remove {
    justify-self: end;
}

@media (max-width: 720px) {
    .orders-receive-line__grid {
        grid-template-columns: 1fr;
    }
}

.module-list__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.module-search input {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e6f0;
    background: #f8f9fd;
    min-width: 220px;
}

.module-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.module-filters select {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e2e6f0;
    background: #f8f9fd;
    min-width: 180px;
}

.module-list__body {
    display: grid;
    gap: 12px;
}

.module-list__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.inventory-workspace {
    border: 1px solid rgba(47, 91, 255, 0.14);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(245, 249, 255, 0.96) 0%, rgba(241, 247, 255, 0.94) 100%);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    padding: 12px;
}

.inventory-workspace__filters {
    margin-bottom: 10px;
}

.inventory-workspace__filters select {
    background: #f8fbff;
}

.inventory-explorer {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.inventory-tree {
    background: #f8fafc;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    padding: 0;
    height: 640px;
    overflow: auto;
}

.inventory-tree__header {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(248, 250, 252, 0.96);
    margin: 0;
    padding: 14px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.inventory-tree__title-wrap {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.inventory-tree__title {
    font-weight: 700;
    font-size: 24px;
    line-height: 1;
    color: #1f2937;
}

.inventory-tree__meta {
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

.inventory-tree__search {
    display: block;
    margin-top: 12px;
}

.inventory-tree__search input {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
    color: inherit;
}

.inventory-tree__search input:focus {
    outline: none;
    border-color: #94a3b8;
    box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.2);
}

.inventory-tree__body {
    padding: 8px;
    background: transparent;
}

.inventory-tree__node {
    margin: 0;
    padding: 0;
    border: 0;
}

.inventory-tree__node + .inventory-tree__node {
    margin-top: 0;
}

.inventory-tree__summary {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    cursor: pointer;
    list-style: none;
    padding: 6px 8px;
    padding-left: calc(8px + (var(--inventory-tree-depth, 0) * 20px));
    min-height: 30px;
    border-radius: 8px;
    transition: background 0.15s ease, color 0.15s ease;
    color: #334155;
}

.inventory-tree__summary:hover {
    background: #f0f4f8;
}

.inventory-tree__summary::-webkit-details-marker {
    display: none;
}

.inventory-tree__summary.is-active {
    background: #f0f4f8;
    color: #0f172a;
}

.inventory-tree__chevron {
    width: 12px;
    min-width: 12px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform-origin: center;
    transition: transform 0.15s ease, color 0.15s ease;
    font-size: 12px;
    line-height: 1;
}

.inventory-tree__node[open] > .inventory-tree__summary .inventory-tree__chevron {
    transform: rotate(90deg);
}

.inventory-tree__count {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    background: transparent;
    padding: 0;
    border-radius: 0;
    min-width: 0;
    text-align: right;
    margin-left: auto;
    flex: 0 0 auto;
}

.inventory-tree__select {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.inventory-tree__select.is-active {
    color: inherit;
    font-weight: inherit;
}

.inventory-tree__leaf {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 6px 8px;
    padding-left: calc(8px + (var(--inventory-tree-depth, 0) * 20px));
    border-radius: 8px;
    margin-left: 0;
    min-height: 28px;
    font-size: 12px;
    color: #475569;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.inventory-tree__leaf--root {
    margin-left: 0;
    margin-bottom: 6px;
    border: 0;
    background: transparent;
    font-weight: 600;
    color: #1f2937;
}

.inventory-tree__leaf:hover {
    background: #f0f4f8;
}

.inventory-tree__leaf.is-active {
    background: #f0f4f8;
    color: #0f172a;
    font-weight: 600;
}

.inventory-tree__row-left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.inventory-tree__keyword-icon {
    width: 14px;
    height: 14px;
    min-width: 14px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.inventory-tree__keyword-icon svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.inventory-tree__keyword-icon--shirt {
    color: #2563eb;
}

.inventory-tree__keyword-icon--hard-hat {
    color: #b45309;
}

.inventory-tree__keyword-icon--wrench {
    color: #0f766e;
}

.inventory-tree__summary--category .inventory-tree__label,
.inventory-tree__summary--type .inventory-tree__label,
.inventory-tree__leaf--entry .inventory-tree__label,
.inventory-tree__leaf--root .inventory-tree__label {
    display: block;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.25;
}

.inventory-tree__summary--category {
    font-weight: 600;
    color: #1e293b;
}

.inventory-tree__summary--type {
    font-size: 12px;
    color: #334155;
}

.inventory-tree__leaf--entry {
    font-size: 12px;
    color: #475569;
}

.inventory-tree__entry-name {
    font-weight: 500;
}

.inventory-tree__entry-assignment {
    font-size: 11px;
    color: #64748b;
    font-weight: 400;
}

.inventory-tree__leaf.is-active .inventory-tree__entry-assignment {
    color: #475569;
}

.inventory-tree__status-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    background: #94a3b8;
}

.inventory-tree__status-dot--available {
    background: #22c55e;
}

.inventory-tree__status-dot--unavailable {
    background: #ef4444;
}

.inventory-tree__leaf--unavailable {
    opacity: 0.5;
}

.inventory-tree__availability {
    display: none;
}

.inventory-tree__empty {
    padding: 8px 10px 4px;
}

.inventory-list-pane {
    display: block;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(47, 91, 255, 0.12);
    border-radius: 14px;
    padding: 8px 12px;
    height: 640px;
    overflow: auto;
}

.inventory-list-pane .inventory-row {
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0;
    box-shadow: none;
    padding: 7px 2px;
    gap: 8px;
}

.inventory-list-pane .inventory-row:hover {
    background: rgba(47, 91, 255, 0.06);
}

.inventory-list-pane .inventory-row.is-active {
    background: rgba(47, 91, 255, 0.12);
    border-radius: 12px;
}

.inventory-list-pane .inventory-row .btn--tiny {
    padding: 4px 10px;
}

.inventory-list-pane .inventory-row .muted {
    line-height: 1.25;
}

.inventory-detail-modal__header {
    align-items: flex-start;
}

.inventory-detail-modal__header-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.inventory-detail-modal__header h4 {
    margin: 0;
}

.inventory-detail-modal__header .muted {
    margin: 4px 0 0;
}

.inventory-detail-modal__body {
    display: grid;
    gap: 16px;
}

.inventory-detail-modal__split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    gap: 14px;
    align-items: start;
}

.inventory-detail-modal__photo {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(47, 91, 255, 0.12);
    border-radius: 12px;
    padding: 12px;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inventory-detail-modal__photo img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: 10px;
}

.inventory-detail-modal__photo-fallback {
    color: #64748b;
    font-size: 13px;
}

.inventory-detail-modal__section {
    display: grid;
    gap: 10px;
}

.inventory-detail-modal__section h5 {
    margin: 0;
    font-size: 14px;
}

.inventory-detail-history {
    display: grid;
    gap: 10px;
}

.inventory-detail-history__item {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 10px;
    background: #fff;
}

.inventory-inline-detail {
    margin-top: 10px;
    border: 1px solid rgba(47, 91, 255, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    padding: 14px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.inventory-inline-detail__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.inventory-inline-detail__header h5 {
    margin: 0;
    font-size: 20px;
}

.inventory-inline-detail__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.inventory-edit-number-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inventory-edit-number-row input {
    flex: 1 1 auto;
}

@media (max-width: 640px) {
    .inventory-edit-number-row {
        flex-direction: column;
        align-items: stretch;
    }
}

.inventory-list-pane .inventory-row:last-child {
    border-bottom: 0;
}

.module-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.module-row--stack {
    grid-template-columns: 1fr;
    gap: 10px;
}

.module-row__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.module-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.module-chip {
    padding: 4px 10px;
    border-radius: 999px;
    background: #e6f0ff;
    color: #2158d8;
    font-size: 12px;
    font-weight: 600;
}

.module-chip--status {
    background: #e9f7f1;
    color: #1b7f5a;
}

.module-chip--alert {
    background: #ffe9e9;
    color: #b42318;
}

.procurement-grid {
    align-items: start;
}

.procurement-dashboard-row {
    gap: 10px;
}

.procurement-dashboard-row__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.procurement-submissions-wrapper {
    margin-top: 20px;
}

.procurement-submission-card {
    gap: 12px;
}

.procurement-submission-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.procurement-submission-card__chips {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.procurement-submission-items {
    display: grid;
    gap: 8px;
}

.procurement-submission-item {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
}

.procurement-submission-item > div {
    display: grid;
    gap: 2px;
}

.procurement-submission-item strong {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.procurement-submission-item span {
    color: #0f172a;
    font-size: 14px;
}

.procurement-submission-item__status {
    grid-column: 1 / -1;
    margin-top: 4px;
    max-width: 260px;
}

.procurement-submission-item__status select {
    width: 100%;
}

.procurement-submission-item__status > span {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.procurement-submission-item.is-status-abgelehnt {
    border-color: rgba(180, 35, 24, 0.35);
    background: #fff1f1;
}

.procurement-submission-item.is-status-bestellt {
    border-color: rgba(181, 132, 0, 0.35);
    background: #fff9e8;
}

.procurement-submission-item.is-status-ausgehaendigt {
    border-color: rgba(27, 127, 90, 0.35);
    background: #eefaf3;
}

.lending-grid {
    align-items: start;
}

.lending-dashboard-row {
    gap: 10px;
}

.lending-dashboard-row__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.lending-list-header {
    gap: 16px;
}

.lending-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.lending-filters .module-field {
    margin: 0;
    min-width: 180px;
}

.lending-status-overview {
    margin-bottom: 12px;
}

.lending-submission-card {
    gap: 12px;
}

.lending-submission-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.lending-submission-card__chips {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.lending-submission-item {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
}

.lending-submission-item > div {
    display: grid;
    gap: 2px;
}

.lending-submission-item strong {
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
}

.lending-submission-item span {
    color: #0f172a;
    font-size: 14px;
}

.lending-submission-item__status,
.lending-submission-item__lent-by,
.lending-submission-item__returned-by {
    grid-column: span 2;
    margin: 0;
}

.lending-submission-item__status select,
.lending-filters select {
    color: #0f172a;
    background: #ffffff;
}

.lending-submission-item__status select option,
.lending-filters select option {
    color: #0f172a;
    background: #ffffff;
}

.lending-submission-item__note {
    grid-column: 1 / -1;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.05);
}

.lending-submission-item__note span {
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.lending-submission-item__actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
}

.lending-submission-item.is-status-angefragt {
    border-color: rgba(33, 88, 216, 0.35);
    background: #eef4ff;
}

.lending-submission-item.is-status-genehmigt,
.lending-submission-item.is-status-herausgegeben {
    border-color: rgba(27, 127, 90, 0.35);
    background: #eefaf3;
}

.lending-submission-item.is-status-abgelehnt {
    border-color: rgba(180, 35, 24, 0.35);
    background: #fff1f1;
}

.lending-submission-item.is-status-zurueckgebracht {
    border-color: rgba(71, 85, 105, 0.35);
    background: #f3f5f8;
}

.lending-calendar-card {
    margin-top: 20px;
}

.lending-calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.lending-calendar-nav {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.lending-calendar-nav strong {
    min-width: 170px;
    text-align: center;
    text-transform: capitalize;
}

.lending-calendar-legend {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.lending-calendar-info {
    margin: 0 0 10px;
}

.lending-calendar-grid-wrap {
    overflow-x: auto;
}

.lending-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    min-width: 720px;
}

.lending-calendar-weekday {
    text-align: center;
    color: #6b7280;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 0;
}

.lending-calendar-day {
    min-height: 126px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 12px;
    background: #fff;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lending-calendar-day.is-outside {
    background: #f8fafc;
    opacity: 0.5;
}

.lending-calendar-day.is-today {
    border-color: rgba(33, 88, 216, 0.45);
    box-shadow: inset 0 0 0 1px rgba(33, 88, 216, 0.2);
}

.lending-calendar-day__head {
    display: flex;
    justify-content: flex-end;
    color: #475569;
    font-size: 12px;
    font-weight: 700;
}

.lending-calendar-day__entries {
    display: grid;
    gap: 4px;
}

.lending-calendar-entry {
    display: inline-block;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 3px 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lending-calendar-entry--angefragt {
    border-color: rgba(33, 88, 216, 0.35);
    background: #eef4ff;
    color: #1f4db8;
}

.lending-calendar-entry--genehmigt,
.lending-calendar-entry--herausgegeben {
    border-color: rgba(27, 127, 90, 0.35);
    background: #eefaf3;
    color: #1b7f5a;
}

.lending-calendar-more {
    color: #6b7280;
    font-size: 11px;
}

body.procurement-public {
    min-height: 100vh;
}

.procurement-public-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 20px 42px;
}

.procurement-public-brand {
    margin-top: 24px;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    justify-content: center;
    align-items: center;
}

.procurement-public-brand img {
    max-width: 100%;
    max-height: 92px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.procurement-public-section {
    margin-top: 24px;
}

.procurement-public-status {
    margin-bottom: 14px;
    color: var(--muted);
}

.procurement-public-status.is-error {
    color: #b42318;
}

.procurement-public-status.is-success {
    color: #1b7f5a;
}

.procurement-public-howto {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.procurement-public-howto h4 {
    margin: 0 0 8px;
    font-size: 16px;
}

.procurement-public-howto ol {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 14px;
    line-height: 1.35;
}

.procurement-public-form {
    display: grid;
    gap: 12px;
}

.procurement-public-rows {
    display: grid;
    gap: 10px;
}

.procurement-public-row {
    display: grid;
    grid-template-columns: minmax(140px, 1.5fr) minmax(140px, 1.5fr) minmax(120px, 1fr) minmax(120px, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.9);
}

.procurement-public-row .module-field {
    margin: 0;
}

.procurement-public-row__remove {
    min-width: 42px;
    padding: 9px 10px;
}

.procurement-public-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.procurement-public-submit {
    min-width: 180px;
}

body.lending-public {
    min-height: 100vh;
}

.lending-public-shell {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 20px 42px;
}

.lending-public-brand {
    margin-top: 24px;
    margin-bottom: 14px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    justify-content: center;
    align-items: center;
}

.lending-public-brand img {
    max-width: 100%;
    max-height: 92px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.lending-public-section {
    margin-top: 24px;
}

.lending-public-status {
    margin-bottom: 14px;
    color: var(--muted);
}

.lending-public-status.is-error {
    color: #b42318;
}

.lending-public-status.is-success {
    color: #1b7f5a;
}

.lending-public-howto {
    margin-bottom: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.lending-public-howto h4 {
    margin: 0 0 8px;
    font-size: 16px;
}

.lending-public-howto ol {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
    color: #334155;
    font-size: 14px;
    line-height: 1.35;
}

.lending-public-form {
    display: grid;
    gap: 12px;
}

.lending-public-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.lending-public-row .module-field {
    margin: 0;
}

.lending-public-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.lending-public-submit {
    min-width: 180px;
}

@media (max-width: 900px) {
    .procurement-public-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .procurement-public-row__remove {
        justify-self: end;
    }
    .lending-list-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .lending-filters .module-field {
        min-width: 140px;
    }
    .lending-calendar-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .lending-calendar-nav strong {
        min-width: 140px;
    }
}

@media (max-width: 640px) {
    .lending-filters {
        width: 100%;
    }
    .lending-filters .module-field {
        width: 100%;
        min-width: 0;
    }
    .procurement-public-row {
        grid-template-columns: 1fr;
    }
    .procurement-submission-item {
        grid-template-columns: 1fr;
    }
    .procurement-submission-item__status {
        max-width: 100%;
    }
    .procurement-public-actions .btn {
        width: 100%;
    }
    .procurement-public-howto {
        padding: 12px;
    }
    .lending-public-row {
        grid-template-columns: 1fr;
    }
    .lending-calendar-header {
        gap: 10px;
    }
    .lending-calendar-nav {
        width: 100%;
        justify-content: space-between;
    }
    .lending-calendar-nav strong {
        min-width: 0;
        flex: 1 1 auto;
        font-size: 15px;
    }
    .lending-calendar-grid-wrap {
        overflow-x: visible;
    }
    .lending-calendar-grid {
        grid-template-columns: 1fr;
        gap: 8px;
        min-width: 0;
    }
    .lending-calendar-weekday {
        display: none;
    }
    .lending-calendar-day {
        min-height: 0;
        display: grid;
        grid-template-columns: minmax(54px, auto) minmax(0, 1fr);
        align-items: start;
        gap: 12px;
        padding: 10px 12px;
    }
    .lending-calendar-day.is-outside {
        display: none;
    }
    .lending-calendar-day__head {
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 3px;
        color: #0f172a;
        font-size: 18px;
        line-height: 1;
    }
    .lending-calendar-day__head::before {
        content: attr(data-weekday);
        color: #64748b;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.04em;
        line-height: 1.2;
        text-transform: uppercase;
    }
    .lending-calendar-day__entries {
        gap: 6px;
        min-height: 24px;
        padding-top: 2px;
    }
    .lending-calendar-day__entries:empty::before {
        content: 'Frei';
        color: #94a3b8;
        font-size: 13px;
        font-weight: 600;
    }
    .lending-calendar-day__entries .lending-calendar-entry {
        display: block;
        width: 100%;
        padding: 5px 8px;
        border-radius: 10px;
        font-size: 12px;
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }
    .lending-calendar-more {
        font-size: 12px;
    }
    .lending-submission-item {
        grid-template-columns: 1fr;
    }
    .lending-submission-item__status,
    .lending-submission-item__lent-by,
    .lending-submission-item__returned-by {
        grid-column: 1 / -1;
    }
    .lending-public-actions .btn {
        width: 100%;
    }
    .lending-public-howto {
        padding: 12px;
    }
    .lending-public-shell {
        padding: 18px 14px 28px;
    }
    .lending-public-brand {
        margin-top: 16px;
        margin-bottom: 12px;
    }
    .lending-public-section {
        margin-top: 18px;
    }
}

@media (max-width: 480px) {
    .lending-calendar-day {
        grid-template-columns: 48px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }
    .lending-calendar-day__head {
        font-size: 17px;
    }
    .lending-calendar-day__entries .lending-calendar-entry {
        font-size: 11px;
    }
    .lending-public-shell {
        padding: 14px 10px 24px;
    }
}

.module-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 6px;
    border-radius: 20px;
    background: #f5f6fb;
    border: 1px solid #e6e9f4;
    gap: 6px;
    width: 100%;
    max-width: 100%;
    margin-bottom: 16px;
}

.module-tab {
    border: none;
    background: transparent;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    color: #49546a;
    cursor: pointer;
    transition: all 0.2s ease;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.module-tab.is-active {
    background: #1f2a44;
    color: #fff;
    box-shadow: 0 6px 14px rgba(31, 42, 68, 0.25);
}

.module-panel {
    display: none;
    animation: admin-fade 0.3s ease;
}

.module-panel.is-active {
    display: block;
}

/* ===== Orders layout ===== */
.orders-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.orders-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    text-align: right;
}

.orders-summary__item {
    min-width: 180px;
    padding: 8px 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: #6b7280;
}

.orders-summary__item strong {
    font-size: 16px;
    color: #0f172a;
}

.dashboard-orders-summary {
    justify-content: flex-start;
    text-align: left;
    margin-top: 12px;
}

.dashboard-orders-summary .orders-summary__item {
    min-width: 160px;
    background: #f8fafc;
    box-shadow: none;
}

.orders-toolbar {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.orders-filters {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
}

.orders-toolbar__row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
}

.orders-toolbar__row--filters {
    flex-wrap: nowrap;
    align-items: flex-end;
}

.orders-sort--inline {
    padding-left: 14px;
    border-left: 1px solid rgba(15, 23, 42, 0.08);
    margin-left: 4px;
}

.orders-search-right {
    margin-left: auto;
}

.orders-sort {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.order-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.order-card.is-active {
    border-color: rgba(47, 91, 255, 0.35);
    box-shadow: 0 18px 32px rgba(47, 91, 255, 0.12);
    margin-bottom: 6px;
}


.order-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.order-card__chips {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.order-card__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.order-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.order-card__title {
    font-weight: 700;
    font-size: 16px;
}

.order-card__meta {
    display: grid;
    gap: 6px;
    font-size: 13px;
    color: var(--muted);
}

.order-card__labels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px 16px;
}

.order-card__labels span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a879c;
    margin-bottom: 4px;
}

.order-card__labels strong {
    display: block;
    font-size: 14px;
    color: var(--text);
}

.order-card__notice {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(180, 35, 24, 0.08);
    color: #8f1c13;
    font-weight: 600;
}

.order-card--invoice-alert {
    border-color: rgba(180, 35, 24, 0.28);
    background:
        linear-gradient(135deg, rgba(255, 236, 232, 0.92), rgba(255, 255, 255, 0.98)),
        rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 30px rgba(180, 35, 24, 0.10);
}

.order-card--invoice-alert:hover {
    box-shadow: 0 18px 34px rgba(180, 35, 24, 0.16);
}

.order-card--invoice-alert.is-active {
    border-color: rgba(180, 35, 24, 0.4);
    box-shadow: 0 20px 36px rgba(180, 35, 24, 0.14);
}

.orders-detail {
    margin-top: 18px;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    position: relative;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px) scaleY(0.98);
    transform-origin: top;
    padding: 0 20px;
    margin-top: 0;
    transition:
        max-height 0.6s ease,
        padding 0.6s ease,
        margin-top 0.6s ease,
        opacity 0.35s ease,
        transform 0.35s ease;
    will-change: max-height, opacity, transform;
}

.orders-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, rgba(47, 91, 255, 0.45), rgba(0, 194, 184, 0.35));
}

.order-card.is-active + .orders-detail {
    margin-top: -8px;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-top: 1px solid rgba(47, 91, 255, 0.25);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.12);
}

.order-card.is-active + .orders-detail::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 24px;
    right: 24px;
    height: 16px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, rgba(47, 91, 255, 0.14), rgba(47, 91, 255, 0));
    pointer-events: none;
}


.orders-detail.is-open {
    max-height: 2000px;
    opacity: 1;
    transform: translateY(0) scaleY(1);
    padding: 20px;
    margin-top: 12px;
}

.orders-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.orders-detail__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.orders-detail__body {
    display: grid;
    gap: 16px;
}

.orders-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px 18px;
}

.orders-detail-card {
    background: #f6f8ff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 12px;
}

.orders-detail-card--alert {
    background: #fff1ee;
    border-color: rgba(180, 35, 24, 0.2);
}

.orders-detail-card span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a879c;
    margin-bottom: 6px;
}

.orders-detail-note {
    padding: 12px 14px;
    border-radius: 16px;
    margin-bottom: 16px;
}

.orders-detail-note--alert {
    background: #fff1ee;
    border: 1px solid rgba(180, 35, 24, 0.18);
    color: #8f1c13;
    font-weight: 600;
}

.orders-attachments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.orders-attachment {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fff;
}

.orders-attachment__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.orders-attachment img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
}

.orders-attachment--pdf {
    grid-column: 1 / -1;
}

.orders-attachment__inline {
    display: none;
    gap: 8px;
}

.orders-attachment__inline.is-open {
    display: grid;
}

.orders-attachment__pdf {
    width: 100%;
    height: 360px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}

.orders-attachment__embed {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.orders-attachment__icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #e7edff;
    color: #2f5bff;
    font-weight: 700;
}

.orders-detail__timeline {
    margin-top: 18px;
}

.orders-timeline__body {
    margin-top: 10px;
    display: grid;
    gap: 16px;
    position: relative;
    padding-left: 18px;
}

.orders-timeline__body::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: rgba(47, 91, 255, 0.35);
}

.timeline-item {
    position: relative;
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -18px;
    top: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2f5bff;
    box-shadow: 0 0 0 4px rgba(47, 91, 255, 0.15);
}

.timeline-item__meta {
    font-size: 12px;
    color: #6c7a92;
}

.orders-empty {
    padding: 20px;
    text-align: center;
    color: var(--muted);
}

/* ===== Comrades module ===== */
.comrades-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.comrades-toolbar__row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.comrades-filters,
.comrades-sort {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.comrades-search-right {
    margin-left: auto;
    min-width: 220px;
}

.comrades-search-right input {
    width: 100%;
}

.comrades-list-card .module-list__body {
    display: grid;
    gap: 14px;
}

.comrades-page-size-field {
    min-width: 110px;
    margin: 0;
}

.comrades-page-size-field select {
    min-width: 110px;
}

.comrades-list__footer {
    flex-wrap: wrap;
}

.comrades-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.comrades-pagination__indicator {
    font-size: 14px;
    font-weight: 600;
    color: #344054;
}

.comrade-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.comrade-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.comrade-card.is-active {
    border-color: rgba(47, 91, 255, 0.35);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.16);
}

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

.comrade-card__identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.comrade-card__title {
    font-size: 16px;
    font-weight: 600;
}

.comrade-card__labels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.comrade-card__labels span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7a879c;
}

.comrade-card__labels strong {
    display: block;
    margin-top: 4px;
    color: #111827;
}

.comrade-card__actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.comrade-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    overflow: hidden;
    background: #e7edff;
    display: grid;
    place-items: center;
    color: #2f5bff;
    font-weight: 700;
}

.comrade-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comrade-avatar__fallback {
    font-size: 14px;
    letter-spacing: 0.04em;
}

.comrades-detail {
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    position: relative;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px) scaleY(0.98);
    transform-origin: top;
    padding: 0 20px;
    margin-top: 0;
    transition:
        max-height 0.6s ease,
        padding 0.6s ease,
        margin-top 0.6s ease,
        opacity 0.35s ease,
        transform 0.35s ease;
    will-change: max-height, opacity, transform;
}

.comrades-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, rgba(47, 91, 255, 0.45), rgba(0, 194, 184, 0.35));
}

.comrade-card.is-active + .comrades-detail {
    margin-top: -8px;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-top: 1px solid rgba(47, 91, 255, 0.25);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.12);
}

.comrade-card.is-active + .comrades-detail::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 24px;
    right: 24px;
    height: 16px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, rgba(47, 91, 255, 0.14), rgba(47, 91, 255, 0));
    pointer-events: none;
}

.comrades-detail.is-open {
    max-height: 2600px;
    opacity: 1;
    transform: translateY(0) scaleY(1);
    padding: 20px;
    margin-top: 12px;
}

.comrades-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.comrades-detail__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.comrades-detail__body {
    display: grid;
    gap: 16px;
}

.comrades-detail-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 16px;
    align-items: start;
}

.comrades-detail-photo {
    width: 180px;
    height: 180px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f3f6ff;
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.comrades-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comrade-photo__fallback {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #2f5bff;
}

.comrades-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px 18px;
}

.comrades-detail-card {
    background: #f6f8ff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 12px;
}

.comrades-detail-card span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a879c;
    margin-bottom: 6px;
}

.comrades-detail-card--full {
    grid-column: 1 / -1;
}

.comrades-detail-sections {
    display: grid;
    gap: 16px;
}

.comrades-detail-list {
    display: grid;
    gap: 10px;
}

.comrade-item {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    display: grid;
    gap: 4px;
}

.comrades-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
}

.fdisk-import-actions {
    flex-wrap: wrap;
}

.fdisk-import-preview {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    overflow: auto;
    max-height: 460px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.fdisk-import-preview__empty {
    padding: 18px;
    color: var(--muted);
}

.fdisk-import-table {
    width: 100%;
    min-width: 780px;
    border-collapse: collapse;
}

.fdisk-import-table th,
.fdisk-import-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    text-align: left;
    vertical-align: middle;
}

.fdisk-import-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f6f8ff;
    color: #475467;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.fdisk-import-row.is-existing {
    background: rgba(248, 250, 252, 0.96);
}

.fdisk-import-row.is-selected {
    background: rgba(235, 243, 255, 0.92);
}

.fdisk-import-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.fdisk-import-pill--new {
    background: rgba(12, 166, 120, 0.12);
    color: #0b6b4c;
}

.fdisk-import-pill--existing {
    background: rgba(71, 84, 103, 0.12);
    color: #475467;
}

/* ===== Locations module ===== */
.locations-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.locations-toolbar__row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.locations-toolbar__actions {
    display: inline-flex;
    gap: 10px;
    margin-left: auto;
}

.locations-search-right {
    min-width: 220px;
    margin-left: auto;
}

.locations-search-right input {
    width: 100%;
}

.locations-list-card .module-list__body {
    display: grid;
    gap: 14px;
}

.location-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.location-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.location-card.is-active {
    border-color: rgba(47, 91, 255, 0.35);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.16);
}

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

.location-card__title {
    font-size: 16px;
    font-weight: 600;
}

.location-card__labels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.location-card__labels span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7a879c;
}

.location-card__labels strong {
    display: block;
    margin-top: 4px;
    color: #111827;
}

.location-card__actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.locations-detail {
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    position: relative;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px) scaleY(0.98);
    transform-origin: top;
    padding: 0 20px;
    margin-top: 0;
    transition:
        max-height 0.6s ease,
        padding 0.6s ease,
        margin-top 0.6s ease,
        opacity 0.35s ease,
        transform 0.35s ease;
    will-change: max-height, opacity, transform;
}

.locations-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, rgba(47, 91, 255, 0.45), rgba(0, 194, 184, 0.35));
}

.location-card.is-active + .locations-detail {
    margin-top: -8px;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-top: 1px solid rgba(47, 91, 255, 0.25);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.12);
}

.location-card.is-active + .locations-detail::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 24px;
    right: 24px;
    height: 16px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, rgba(47, 91, 255, 0.14), rgba(47, 91, 255, 0));
    pointer-events: none;
}

.locations-detail.is-open {
    max-height: 2200px;
    opacity: 1;
    transform: translateY(0) scaleY(1);
    padding: 20px;
    margin-top: 12px;
}

.locations-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.locations-detail__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.locations-detail__body {
    display: grid;
    gap: 16px;
}

.locations-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px 18px;
}

.locations-detail-card {
    background: #f6f8ff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 12px;
}

.locations-detail-card span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a879c;
    margin-bottom: 6px;
}

.locations-detail-section h5 {
    margin-bottom: 10px;
}

.locations-detail-list {
    display: grid;
    gap: 10px;
}

.location-item {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 10px 12px;
    color: #1f2937;
}

.locations-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
}

/* ===== Suppliers module ===== */
.suppliers-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.suppliers-toolbar__row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.suppliers-toolbar__actions {
    display: inline-flex;
    gap: 10px;
    margin-left: auto;
}

.suppliers-search-right {
    min-width: 220px;
    margin-left: auto;
}

.suppliers-search-right input {
    width: 100%;
}

.suppliers-list-card .module-list__body {
    display: grid;
    gap: 14px;
}

.supplier-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.supplier-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.supplier-card.is-active {
    border-color: rgba(47, 91, 255, 0.35);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.16);
}

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

.supplier-card__title {
    font-size: 16px;
    font-weight: 600;
}

.supplier-card__labels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.supplier-card__labels span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7a879c;
}

.supplier-card__labels strong {
    display: block;
    margin-top: 4px;
    color: #111827;
}

.supplier-card__actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.suppliers-detail {
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    position: relative;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px) scaleY(0.98);
    transform-origin: top;
    padding: 0 20px;
    margin-top: 0;
    transition:
        max-height 0.6s ease,
        padding 0.6s ease,
        margin-top 0.6s ease,
        opacity 0.35s ease,
        transform 0.35s ease;
    will-change: max-height, opacity, transform;
}

.suppliers-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, rgba(47, 91, 255, 0.45), rgba(0, 194, 184, 0.35));
}

.supplier-card.is-active + .suppliers-detail {
    margin-top: -8px;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-top: 1px solid rgba(47, 91, 255, 0.25);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.12);
}

.supplier-card.is-active + .suppliers-detail::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 24px;
    right: 24px;
    height: 16px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, rgba(47, 91, 255, 0.14), rgba(47, 91, 255, 0));
    pointer-events: none;
}

.suppliers-detail.is-open {
    max-height: 1600px;
    opacity: 1;
    transform: translateY(0) scaleY(1);
    padding: 20px;
    margin-top: 12px;
}

.suppliers-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.suppliers-detail__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.suppliers-detail__body {
    display: grid;
    gap: 16px;
}

.suppliers-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px 18px;
}

.suppliers-detail-card {
    background: #f6f8ff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 12px;
}

.suppliers-detail-card span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a879c;
    margin-bottom: 6px;
}

.suppliers-detail-card--full {
    grid-column: 1 / -1;
}

.suppliers-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
}

/* ===== Categories module ===== */
.categories-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.categories-toolbar__row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.categories-toolbar__actions {
    display: inline-flex;
    gap: 10px;
    margin-left: auto;
}

.categories-search-right {
    min-width: 220px;
    margin-left: auto;
}

.categories-search-right input {
    width: 100%;
}

.categories-list-card .module-list__body {
    display: grid;
    gap: 14px;
}

.category-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.category-card.is-active {
    border-color: rgba(47, 91, 255, 0.35);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.16);
}

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

.category-card__title {
    font-size: 16px;
    font-weight: 600;
}

.category-card__labels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.category-card__labels span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7a879c;
}

.category-card__labels strong {
    display: block;
    margin-top: 4px;
    color: #111827;
}

.category-card__actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.categories-detail {
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    position: relative;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px) scaleY(0.98);
    transform-origin: top;
    padding: 0 20px;
    margin-top: 0;
    transition:
        max-height 0.6s ease,
        padding 0.6s ease,
        margin-top 0.6s ease,
        opacity 0.35s ease,
        transform 0.35s ease;
    will-change: max-height, opacity, transform;
}

.categories-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, rgba(47, 91, 255, 0.45), rgba(0, 194, 184, 0.35));
}

.category-card.is-active + .categories-detail {
    margin-top: -8px;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-top: 1px solid rgba(47, 91, 255, 0.25);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.12);
}

.category-card.is-active + .categories-detail::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 24px;
    right: 24px;
    height: 16px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, rgba(47, 91, 255, 0.14), rgba(47, 91, 255, 0));
    pointer-events: none;
}

.categories-detail.is-open {
    max-height: 1600px;
    opacity: 1;
    transform: translateY(0) scaleY(1);
    padding: 20px;
    margin-top: 12px;
}

.categories-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.categories-detail__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.categories-detail__body {
    display: grid;
    gap: 16px;
}

.categories-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px 18px;
}

.categories-detail-card {
    background: #f6f8ff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 12px;
}

.categories-detail-card span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a879c;
    margin-bottom: 6px;
}

.categories-detail-section h5 {
    margin-bottom: 10px;
}

.categories-detail-list {
    display: grid;
    gap: 10px;
}

.category-item {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 10px 12px;
    color: #1f2937;
}

.categories-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
}

/* ===== Inspections module ===== */
.inspections-wizard {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.inspections-wizard.is-hidden {
    display: none;
}

.inspections-wizard__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.inspections-wizard__step {
    display: grid;
}

.inspections-wizard__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.inspections-wizard__summary {
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f6f8ff;
}

.inspections-wizard__buttons {
    display: inline-flex;
    gap: 10px;
}

.inspections-wizard__step.is-hidden {
    display: none;
}

#inspectionsForm.is-hidden {
    display: none;
}

.inspection-workspace__summary,
.inspection-workspace__card {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f8fbff;
}

.inspection-workspace__card.is-error {
    background: #fff4f4;
    border-color: rgba(180, 35, 24, 0.2);
}

.inspection-workspace__card.is-ok {
    background: #f2fbf6;
    border-color: rgba(27, 127, 90, 0.18);
}

.inspection-card-field-results {
    display: grid;
    gap: 12px;
}

.inspection-card-field-results__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.inspection-card-field-results__list {
    display: grid;
    gap: 10px;
}

.inspection-card-field-results__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 220px);
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
}

.inspection-card-field-results__label {
    font-weight: 600;
    color: #0f172a;
}

.inspection-card-field-results__row .module-field {
    margin: 0;
}

.inspection-resume {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.inspection-resume__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.inspection-resume__list {
    display: grid;
    gap: 10px;
    max-height: 360px;
    overflow: auto;
    padding-right: 4px;
}

.inspection-resume__item {
    display: grid;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(37, 99, 235, 0.12);
    background: #f8fbff;
}

.inspection-resume__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.inspection-resume__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.inspection-resume__actions {
    display: flex;
    justify-content: flex-end;
}

.inspection-session {
    display: grid;
    gap: 16px;
}

.inspection-session.is-hidden {
    display: none;
}

.inspection-modal {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 16px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.inspection-modal .modal__header {
    margin-bottom: 0;
}

.inspection-modal .inspections-wizard,
.inspection-modal #inspectionsForm,
.inspection-modal .inspection-session {
    min-height: 0;
}

.inspection-modal .inspections-wizard.is-hidden,
.inspection-modal #inspectionsForm.is-hidden,
.inspection-modal .inspection-session.is-hidden {
    display: none;
}

.inspection-modal .inspections-wizard {
    align-content: start;
    grid-auto-rows: max-content;
    overflow: auto;
    padding-right: 4px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.inspection-modal #inspectionsForm {
    display: grid;
    gap: 14px;
    align-content: start;
    overflow: auto;
    padding-right: 4px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.inspection-modal .module-field,
.inspection-card-editor-modal .module-field {
    gap: 8px;
}

.inspection-modal .module-field > span,
.inspection-card-editor-modal .module-field > span {
    font-size: 14px;
    font-weight: 600;
    color: #516074;
}

.inspection-modal .module-field input,
.inspection-modal .module-field select,
.inspection-modal .module-field textarea,
.inspection-card-editor-modal .module-field input,
.inspection-card-editor-modal .module-field select,
.inspection-card-editor-modal .module-field textarea {
    min-height: 48px;
    padding: 12px 14px;
    font-size: 16px;
}

.inspection-modal .btn,
.inspection-card-editor-modal .btn {
    min-height: 46px;
}

.inspection-modal .btn--tiny,
.inspection-card-editor-modal .btn--tiny {
    min-height: 40px;
    padding: 8px 14px;
    font-size: 13px;
}

.inspection-modal .module-actions {
    flex-wrap: wrap;
}

.inspection-modal .inspection-session {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 16px;
    align-content: start;
    min-height: 0;
    overflow: hidden;
}

.inspection-session__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.inspection-session__header-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.inspection-session__progress {
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f6f8ff;
}

.inspection-session__layout {
    display: grid;
    grid-template-columns: minmax(340px, 460px) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.inspection-session__list,
.inspection-session__work {
    display: grid;
    gap: 14px;
    min-height: 0;
}

.inspection-session__list {
    max-height: none;
    overflow: auto;
    padding-right: 4px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.inspection-session__work {
    grid-template-rows: minmax(0, 1fr) auto;
    overflow: hidden;
}

.inspection-session__work .module-form {
    overflow: auto;
    padding-right: 4px;
    min-height: 0;
    align-content: start;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.inspection-session__group {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(248, 251, 255, 0.95);
}

.inspection-session__group.is-collapsed {
    gap: 0;
}

.inspection-session__group-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.inspection-session__group-toggle::after {
    content: '▾';
    flex-shrink: 0;
    font-size: 18px;
    color: #475467;
    transition: transform 0.18s ease;
}

.inspection-session__group.is-collapsed .inspection-session__group-toggle::after {
    transform: rotate(-90deg);
}

.inspection-session__group-text {
    display: grid;
    gap: 2px;
}

.inspection-session__group-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.inspection-session__group-items {
    display: grid;
    gap: 8px;
}

.inspection-session__group.is-collapsed .inspection-session__group-items {
    display: none;
}

.inspection-session__group-title {
    font-size: 15px;
    font-weight: 700;
    color: #334155;
}

.inspection-session__group-meta {
    font-size: 13px;
    color: #64748b;
}

.inspection-session__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px 12px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.inspection-session__item:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.1);
}

.inspection-session__item.is-active {
    border-color: rgba(33, 88, 216, 0.32);
    box-shadow: 0 16px 32px rgba(33, 88, 216, 0.12);
}

.inspection-session__item.is-completed {
    background: rgba(246, 248, 255, 0.96);
}

.inspection-session__item-main {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.inspection-session__item-headline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.inspection-session__item-title {
    font-size: 15px;
    line-height: 1.3;
    color: #1e293b;
}

.inspection-session__item-code {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #3b82f6;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.inspection-session__item-subline {
    font-size: 13px;
    line-height: 1.4;
    color: #64748b;
}

.inspection-session__item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.inspection-session__item-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
    flex-wrap: wrap;
}

.inspection-session__item-actions .btn {
    min-width: 92px;
    justify-content: center;
}

.inspection-session__finish {
    padding: 14px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #fcfdff;
}

/* ===== Devices module ===== */
.devices-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.devices-toolbar__row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.devices-toolbar__actions {
    display: inline-flex;
    gap: 10px;
    margin-left: auto;
}

.devices-filters,
.devices-sort {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.devices-search-right {
    min-width: 220px;
    margin-left: auto;
}

.devices-search-right input {
    width: 100%;
}

.devices-list-card .module-list__body {
    display: grid;
    gap: 14px;
}

.devices-explorer,
.locations-explorer,
.categories-explorer {
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 10px;
    align-items: stretch;
}

.devices-tree,
.locations-tree,
.categories-tree {
    height: 640px;
}

.devices-list-pane,
.locations-list-pane,
.categories-list-pane {
    display: grid;
    gap: 14px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(47, 91, 255, 0.12);
    border-radius: 14px;
    padding: 8px 12px;
    height: 640px;
    overflow: auto;
}

.devices-list-pane .device-card,
.locations-list-pane .location-card,
.categories-list-pane .category-card {
    background: transparent;
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0;
    box-shadow: none;
    padding: 10px 2px;
    cursor: default;
}

.devices-list-pane .device-card:last-child,
.locations-list-pane .location-card:last-child,
.categories-list-pane .category-card:last-child {
    border-bottom: 0;
}

.devices-list-pane .device-card:hover,
.locations-list-pane .location-card:hover,
.categories-list-pane .category-card:hover {
    transform: none;
    box-shadow: none;
    background: rgba(47, 91, 255, 0.06);
    border-radius: 12px;
}

.devices-list-pane .device-card.is-active,
.locations-list-pane .location-card.is-active,
.categories-list-pane .category-card.is-active {
    border-color: transparent;
    box-shadow: none;
    background: rgba(47, 91, 255, 0.12);
    border-radius: 12px;
}

.device-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.device-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.device-card.is-active {
    border-color: rgba(47, 91, 255, 0.35);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.16);
}

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

.device-card__title {
    font-size: 16px;
    font-weight: 600;
}

.device-card__labels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.device-card__labels span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7a879c;
}

.device-card__labels strong {
    display: block;
    margin-top: 4px;
    color: #111827;
}

.device-card__actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.devices-detail {
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    position: relative;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px) scaleY(0.98);
    transform-origin: top;
    padding: 0 20px;
    margin-top: 0;
    transition:
        max-height 0.6s ease,
        padding 0.6s ease,
        margin-top 0.6s ease,
        opacity 0.35s ease,
        transform 0.35s ease;
    will-change: max-height, opacity, transform;
}

.devices-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, rgba(47, 91, 255, 0.45), rgba(0, 194, 184, 0.35));
}

.device-card.is-active + .devices-detail {
    margin-top: -8px;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-top: 1px solid rgba(47, 91, 255, 0.25);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.12);
}

.device-card.is-active + .devices-detail::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 24px;
    right: 24px;
    height: 16px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, rgba(47, 91, 255, 0.14), rgba(47, 91, 255, 0));
    pointer-events: none;
}

.devices-detail.is-open {
    max-height: 2600px;
    opacity: 1;
    transform: translateY(0) scaleY(1);
    padding: 20px;
    margin-top: 12px;
}

.devices-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.devices-detail__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.devices-detail__body {
    display: grid;
    gap: 16px;
}

.devices-detail-top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 16px;
    align-items: start;
}

.devices-detail-photo {
    width: 180px;
    height: 180px;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #f3f6ff;
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.devices-detail-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.device-photo__fallback {
    font-size: 13px;
    font-weight: 600;
    color: #5c6a82;
}

.devices-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px 18px;
}

.devices-detail-card {
    background: #f6f8ff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 12px;
}

.devices-detail-card span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a879c;
    margin-bottom: 6px;
}

.devices-detail-card--full {
    grid-column: 1 / -1;
}

.devices-detail-actions,
.devices-detail-alert {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    align-items: end;
}

.devices-detail-alert {
    padding: 12px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid rgba(251, 146, 60, 0.35);
}

.devices-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
}

.inspection-card-assignment {
    display: grid;
    gap: 12px;
    background: #f8faff;
}

.inspection-card-assignment > span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a879c;
}

.inspection-card-assignment__controls {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) auto auto;
    gap: 10px;
    align-items: end;
}

.inspection-card-assignment__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 12px;
    font-size: 13px;
}

.inspection-card-assignment__meta strong {
    color: #0f172a;
}

.inspection-card-assignment__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.inspection-cards-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.inspection-cards-toolbar__row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.inspection-cards-toolbar__actions {
    display: inline-flex;
    gap: 10px;
    margin-left: auto;
}

.inspection-cards-search-right {
    min-width: 240px;
    margin-left: auto;
}

.inspection-cards-search-right input {
    width: 100%;
}

.inspection-cards-list-card .module-list__body {
    display: grid;
    gap: 14px;
}

.inspection-card-template-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.inspection-card-template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.inspection-card-template-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.inspection-card-template-card__title {
    font-size: 16px;
    font-weight: 600;
}

.inspection-card-template-card__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.inspection-card-template-card__meta span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7a879c;
}

.inspection-card-template-card__meta strong {
    display: block;
    margin-top: 4px;
    color: #111827;
}

.inspection-card-template-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.inspection-card-template-fields {
    display: grid;
    gap: 12px;
}

.inspection-card-template-fields__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.inspection-card-template-fields__list {
    display: grid;
    gap: 10px;
}

.inspection-card-template-fields__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.92);
}

.inspection-card-template-fields__row .module-field {
    margin: 0;
}

.inspection-cards-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
}

.inspection-card-editor-modal {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 14px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.inspection-card-editor__header-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.inspection-card-editor__toolbar-panel {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: #f8faff;
    padding: 10px 12px;
}

.inspection-card-editor__toolbar-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.inspection-card-editor__toolbar-summary::-webkit-details-marker {
    display: none;
}

.inspection-card-editor__toolbar-summary:focus-visible {
    outline: 2px solid rgba(37, 99, 235, 0.4);
    outline-offset: 6px;
    border-radius: 10px;
}

.inspection-card-editor__toolbar-summary-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.inspection-card-editor__toolbar-summary-copy strong {
    font-size: 14px;
    color: #0f172a;
}

.inspection-card-editor__toolbar-summary-copy span {
    font-size: 12px;
    color: #64748b;
}

.inspection-card-editor__toolbar-summary-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    white-space: nowrap;
}

.inspection-card-editor__toolbar-summary-label--closed {
    display: none;
}

.inspection-card-editor__toolbar-panel:not([open]) .inspection-card-editor__toolbar-summary-label--open {
    display: none;
}

.inspection-card-editor__toolbar-panel:not([open]) .inspection-card-editor__toolbar-summary-label--closed {
    display: inline;
}

.inspection-card-editor__toolbar-summary::after {
    content: '▾';
    font-size: 14px;
    color: #64748b;
    transition: transform 0.2s ease;
}

.inspection-card-editor__toolbar-panel[open] .inspection-card-editor__toolbar-summary::after {
    transform: rotate(180deg);
}

.inspection-card-editor__toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
}

.inspection-card-editor__toolbar .module-field {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 0 0 auto;
    white-space: nowrap;
}

.inspection-card-editor__toolbar .module-field > span {
    white-space: nowrap;
}

.inspection-card-editor__toolbar .btn {
    flex: 0 0 auto;
}

.inspection-card-editor__toolbar input[type="color"] {
    width: 104px;
    min-width: 104px;
}

.inspection-card-editor__tool-symbol {
    min-width: 52px;
    padding-inline: 12px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

.inspection-card-editor__zoom-field {
    min-width: 520px;
    flex: 1 1 520px;
}

.inspection-card-editor__zoom-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
    min-width: 0;
    flex: 1 1 auto;
}

.inspection-card-editor__zoom-controls input[type="range"] {
    flex: 1 1 auto;
    min-width: 240px;
}

.inspection-card-editor__zoom-value {
    min-width: 54px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    text-align: right;
}

.inspection-card-editor__toolbar .btn.is-active {
    border-color: rgba(37, 99, 235, 0.5);
    background: #dbeafe;
    color: #1e3a8a;
}

#device_inspection_card_clear {
    margin-left: auto;
}

.inspection-card-editor__body {
    display: grid;
    gap: 14px;
    max-height: none;
    min-height: 0;
    overflow: auto;
    padding: 4px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.inspection-card-page {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.inspection-card-page__header {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
}

.inspection-card-page__canvas-wrap {
    position: relative;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    margin: 0 auto;
}

.inspection-card-page__pdf {
    width: 100%;
    height: auto;
    display: block;
}

.inspection-card-page__draw {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
    cursor: crosshair;
}

.inspection-card-page__draw[data-tool="text"] {
    cursor: text;
}

.inspection-card-page__draw[data-tool="mark_x"],
.inspection-card-page__draw[data-tool="mark_check"] {
    cursor: copy;
}

.inspection-card-editor__actions {
    justify-content: flex-end;
}

/* ===== Storage module ===== */
.storage-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.storage-toolbar__row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.storage-filters,
.storage-sort {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.storage-search-right {
    min-width: 220px;
    margin-left: auto;
}

.storage-search-right input {
    width: 100%;
}

.storage-tree {
    height: 640px;
}

.storage-tree__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 4px 8px 8px;
    padding-left: calc(8px + (var(--inventory-tree-depth, 0) * 20px));
}

.storage-tree__inventory {
    font-size: 12px;
}

.storage-list-card .module-list__body {
    display: grid;
    gap: 14px;
}

.storage-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.storage-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.storage-card.is-active {
    border-color: rgba(47, 91, 255, 0.35);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.16);
}

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

.storage-card__title {
    font-size: 16px;
    font-weight: 600;
}

.storage-card__actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.storage-detail {
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    position: relative;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px) scaleY(0.98);
    transform-origin: top;
    padding: 0 20px;
    margin-top: 0;
    transition:
        max-height 0.6s ease,
        padding 0.6s ease,
        margin-top 0.6s ease,
        opacity 0.35s ease,
        transform 0.35s ease;
    will-change: max-height, opacity, transform;
}

.storage-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, rgba(47, 91, 255, 0.45), rgba(0, 194, 184, 0.35));
}

.storage-card.is-active + .storage-detail {
    margin-top: -8px;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-top: 1px solid rgba(47, 91, 255, 0.25);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.12);
}

.storage-card.is-active + .storage-detail::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 24px;
    right: 24px;
    height: 16px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, rgba(47, 91, 255, 0.14), rgba(47, 91, 255, 0));
    pointer-events: none;
}

.storage-detail.is-open {
    max-height: 2400px;
    opacity: 1;
    transform: translateY(0) scaleY(1);
    padding: 20px;
    margin-top: 12px;
}

.storage-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.storage-detail__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.storage-detail__body {
    display: grid;
    gap: 16px;
}

.storage-detail-card {
    background: #f6f8ff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
}

.storage-detail-card span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a879c;
    margin-bottom: 6px;
}

.storage-detail-section h5 {
    margin: 0 0 8px;
}

.storage-detail-list {
    display: grid;
    gap: 10px;
}

.storage-item {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
    display: grid;
    gap: 4px;
}

/* ===== Tasks module ===== */
.tasks-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.tasks-toolbar__row {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    flex-wrap: wrap;
}

.tasks-filters,
.tasks-sort {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.tasks-search-right {
    min-width: 220px;
    margin-left: auto;
}

.tasks-search-right input {
    width: 100%;
}

.tasks-list-card .module-list__body {
    display: grid;
    gap: 14px;
}

.task-card {
    background: rgba(255, 255, 255, 0.96);
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 16px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.12);
}

.task-card.is-active {
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.16);
}

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

.task-card__title {
    font-size: 16px;
    font-weight: 600;
}

.task-card__meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.task-card__meta span {
    display: block;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7a879c;
}

.task-card__meta strong {
    display: block;
    margin-top: 4px;
    color: #111827;
}

.task-card__actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.task-chip {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
}

.task-card--open {
    border-color: rgba(239, 68, 68, 0.28);
    box-shadow: 0 12px 24px rgba(239, 68, 68, 0.12);
}

.task-card--open .task-chip {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
}

.task-card--progress {
    border-color: rgba(249, 115, 22, 0.3);
    box-shadow: 0 12px 24px rgba(249, 115, 22, 0.12);
}

.task-card--progress .task-chip {
    background: rgba(249, 115, 22, 0.16);
    color: #c2410c;
}

.task-card--done {
    border-color: rgba(34, 197, 94, 0.28);
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.12);
}

.task-card--done .task-chip {
    background: rgba(34, 197, 94, 0.16);
    color: #15803d;
}

.tasks-detail {
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    position: relative;
    max-height: 0;
    opacity: 0;
    transform: translateY(-8px) scaleY(0.98);
    transform-origin: top;
    padding: 0 20px;
    margin-top: 0;
    transition:
        max-height 0.6s ease,
        padding 0.6s ease,
        margin-top 0.6s ease,
        opacity 0.35s ease,
        transform 0.35s ease;
    will-change: max-height, opacity, transform;
}

.tasks-detail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 24px;
    right: 24px;
    height: 2px;
    background: linear-gradient(90deg, rgba(47, 91, 255, 0.45), rgba(0, 194, 184, 0.35));
}

.task-card.is-active + .tasks-detail {
    margin-top: -8px;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    border-top: 1px solid rgba(47, 91, 255, 0.25);
    box-shadow: 0 18px 34px rgba(47, 91, 255, 0.12);
}

.task-card.is-active + .tasks-detail::after {
    content: '';
    position: absolute;
    top: -12px;
    left: 24px;
    right: 24px;
    height: 16px;
    border-radius: 16px 16px 0 0;
    background: linear-gradient(180deg, rgba(47, 91, 255, 0.14), rgba(47, 91, 255, 0));
    pointer-events: none;
}

.tasks-detail.is-open {
    max-height: 2200px;
    opacity: 1;
    transform: translateY(0) scaleY(1);
    padding: 20px;
    margin-top: 12px;
}

.tasks-detail__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.tasks-detail__actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tasks-detail__body {
    display: grid;
    gap: 16px;
}

.tasks-detail__timeline {
    margin-top: 18px;
}

.tasks-timeline__body {
    margin-top: 10px;
    display: grid;
    gap: 16px;
    position: relative;
    padding-left: 18px;
}

.tasks-timeline__body::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: rgba(47, 91, 255, 0.35);
}

.tasks-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
}

.tasks-detail-card {
    background: #f6f8ff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 12px;
}

.tasks-detail-card span {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #7a879c;
    margin-bottom: 6px;
}

.tasks-detail-section h5 {
    margin: 0 0 8px;
}

.tasks-detail-list {
    display: grid;
    gap: 8px;
}

.task-subtask {
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: #ffffff;
}

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

.task-subtask__check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.task-subtask__title {
    display: inline-block;
}

.task-subtask__actions {
    display: inline-flex;
    gap: 6px;
    flex-wrap: wrap;
}

.task-subtask__meta {
    margin-top: 6px;
    font-size: 12px;
    color: #7a879c;
}

.task-subtask__details {
    margin-top: 8px;
    color: #475569;
    white-space: pre-wrap;
}

.task-subtask.is-done .task-subtask__title {
    text-decoration: line-through;
    color: #94a3b8;
}

.tasks-subtasks-editor {
    display: grid;
    gap: 10px;
}

.tasks-subtasks-list {
    display: grid;
    gap: 10px;
}

.subtask-editor {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    padding: 12px;
    background: #f8fafc;
    display: grid;
    gap: 8px;
}

.subtask-editor__row {
    display: grid;
    grid-template-columns: minmax(160px, 1.6fr) minmax(140px, 1fr) auto auto;
    gap: 8px;
    align-items: center;
}

.subtask-title,
.subtask-assignee,
.subtask-details {
    width: 100%;
}

.subtask-done {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #475569;
    white-space: nowrap;
}

.tasks-attachment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: #ffffff;
}

.tasks-attachment__thumb img {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.tasks-attachment__meta {
    flex: 1;
    min-width: 0;
}

@media (max-width: 900px) {
    .subtask-editor__row {
        grid-template-columns: 1fr;
    }
}

.tasks-empty {
    padding: 16px;
    text-align: center;
    color: var(--muted);
}

.range-field {
    display: flex;
    align-items: center;
    gap: 12px;
}

.range-field input[type="range"] {
    flex: 1;
}

.range-field input[type="number"] {
    width: 90px;
}

/* ===== Vehicle module panels ===== */
.vehicle-panel {
    display: none;
}
.vehicle-panel.is-active {
    display: block;
}
.vehicle-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.vehicle-detail-actions {
    display: inline-flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ===== Modal base ===== */
.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}
.modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.25s ease;
}

body.modal-open {
    overflow: hidden;
}

#inspections_modal,
#device_inspection_card_modal {
    --viewport-modal-gap: 8px;
    padding: 0;
    align-items: stretch;
    justify-content: stretch;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top, rgba(59, 130, 246, 0.15), rgba(10, 22, 45, 0.6));
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.25s ease;
}
.modal.is-open .modal__backdrop {
    opacity: 1;
}
.modal__content {
    position: relative;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    padding: 20px;
    width: min(720px, 100%);
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.25);
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(18px) scale(0.98);
    transition: transform 0.35s ease, opacity 0.35s ease;
}

#inspections_modal .modal__content.inspection-modal,
#device_inspection_card_modal .modal__content.inspection-card-editor-modal {
    width: calc(100vw - (var(--viewport-modal-gap) * 2));
    max-width: calc(100vw - (var(--viewport-modal-gap) * 2));
    height: calc(100vh - (var(--viewport-modal-gap) * 2));
    min-height: calc(100vh - (var(--viewport-modal-gap) * 2));
    max-height: calc(100vh - (var(--viewport-modal-gap) * 2));
    margin: var(--viewport-modal-gap);
    overflow: hidden;
}

@supports (height: 100dvh) {
    #inspections_modal .modal__content.inspection-modal,
    #device_inspection_card_modal .modal__content.inspection-card-editor-modal {
        height: calc(100dvh - (var(--viewport-modal-gap) * 2));
        min-height: calc(100dvh - (var(--viewport-modal-gap) * 2));
        max-height: calc(100dvh - (var(--viewport-modal-gap) * 2));
    }
}

.modal.is-open .modal__content {
    opacity: 1;
    transform: translateY(0) scale(1);
}
.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.dialog-modal {
    --dialog-accent: #2563eb;
}
.dialog-modal--info {
    --dialog-accent: #2563eb;
}
.dialog-modal--success {
    --dialog-accent: #16a34a;
}
.dialog-modal--warning {
    --dialog-accent: #f97316;
}
.dialog-modal--error {
    --dialog-accent: #dc2626;
}
.dialog-modal .modal__content {
    width: min(520px, 100%);
    padding: 22px 24px;
}
.dialog-modal__header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.dialog-modal__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4));
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.8);
    position: relative;
}
.dialog-modal__icon::after {
    content: '';
    position: absolute;
    inset: 10px;
    border-radius: 10px;
    background: var(--dialog-accent);
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}
.dialog-modal__text h4 {
    margin: 0;
    font-size: 18px;
}
.dialog-modal__message {
    margin: 6px 0 0;
    white-space: pre-line;
}
.dialog-modal__close {
    margin-left: auto;
    padding: 6px 10px;
    line-height: 1;
}
.dialog-modal__input {
    margin-top: 10px;
}
.dialog-modal__actions {
    margin-top: 16px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

html.performance-mode *,
html.performance-mode *::before,
html.performance-mode *::after {
    animation: none !important;
    transition: none !important;
}

html.performance-mode .sidebar,
html.performance-mode .user-chip,
html.performance-mode .card,
html.performance-mode .section,
html.performance-mode .module-card,
html.performance-mode .admin-card,
html.performance-mode .orders-detail,
html.performance-mode .comrades-detail,
html.performance-mode .locations-detail,
html.performance-mode .suppliers-detail,
html.performance-mode .categories-detail,
html.performance-mode .devices-detail,
html.performance-mode .storage-detail,
html.performance-mode .tasks-detail,
html.performance-mode .modal__backdrop,
html.performance-mode .modal__content {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}

html.performance-mode .sidebar,
html.performance-mode .card,
html.performance-mode .section,
html.performance-mode .module-card,
html.performance-mode .admin-card,
html.performance-mode .orders-detail,
html.performance-mode .comrades-detail,
html.performance-mode .locations-detail,
html.performance-mode .suppliers-detail,
html.performance-mode .categories-detail,
html.performance-mode .devices-detail,
html.performance-mode .storage-detail,
html.performance-mode .tasks-detail,
html.performance-mode .modal__content {
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1) !important;
}

html.performance-mode .sidebar::before,
html.performance-mode .orders-detail::before,
html.performance-mode .comrades-detail::before,
html.performance-mode .locations-detail::before,
html.performance-mode .suppliers-detail::before,
html.performance-mode .categories-detail::before,
html.performance-mode .devices-detail::before,
html.performance-mode .storage-detail::before,
html.performance-mode .tasks-detail::before,
html.performance-mode .task-card.is-active + .tasks-detail::after,
html.performance-mode .dialog-modal__icon::after {
    content: none !important;
}

html.performance-mode .orders-detail,
html.performance-mode .comrades-detail,
html.performance-mode .locations-detail,
html.performance-mode .suppliers-detail,
html.performance-mode .categories-detail,
html.performance-mode .devices-detail,
html.performance-mode .storage-detail,
html.performance-mode .tasks-detail {
    will-change: auto;
}

html.performance-mode .btn:hover,
html.performance-mode .nav__item:hover,
html.performance-mode .nav__item.is-active,
html.performance-mode .dashboard-tile.is-dragging {
    transform: none !important;
}

html.performance-mode .modal__backdrop {
    background: rgba(10, 22, 45, 0.48);
}

@media (max-width: 720px) {
    .modal {
        padding: 16px;
    }
    .modal__content {
        width: 100%;
        border-radius: 18px;
        max-height: 88vh;
    }
    #inspections_modal,
    #device_inspection_card_modal {
        --viewport-modal-gap: 16px;
    }
    .dialog-modal__actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }
    .dialog-modal__actions .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .modal,
    .modal__backdrop,
    .modal__content {
        transition: none;
    }
}

@media (max-width: 1480px) and (min-width: 721px) {
    #inspections_modal,
    #device_inspection_card_modal {
        --viewport-modal-gap: 10px;
    }

    #inspections_modal .modal__content.inspection-modal,
    #device_inspection_card_modal .modal__content.inspection-card-editor-modal {
        padding: 18px;
        border-radius: 20px;
    }

    .inspection-modal #inspectionsForm,
    .inspection-session__work .module-form {
        grid-template-columns: 1fr;
        padding-right: 0;
    }

    .inspection-session__layout {
        grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
        gap: 14px;
    }

    .inspection-session__list {
        padding-right: 2px;
    }

    .inspection-card-editor__toolbar {
        align-items: center;
    }

    .inspection-session__group-summary {
        justify-content: flex-start;
    }
}

@media (max-height: 960px) and (min-width: 721px) {
    #inspections_modal,
    #device_inspection_card_modal {
        --viewport-modal-gap: 10px;
    }

    #inspections_modal .modal__content.inspection-modal,
    #device_inspection_card_modal .modal__content.inspection-card-editor-modal {
        padding: 16px;
        border-radius: 20px;
    }

    .inspection-modal,
    .inspection-modal .inspection-session,
    .inspection-session__layout {
        gap: 12px;
    }

    .inspection-modal #inspectionsForm,
    .inspection-session__work .module-form {
        grid-template-columns: 1fr;
    }

    .inspection-session__layout {
        grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
    }

    .inspection-session__list,
    .inspection-session__work .module-form,
    .inspection-modal .inspections-wizard,
    .inspection-modal #inspectionsForm {
        padding-right: 2px;
    }

    .inspection-session__group,
    .inspection-session__item,
    .inspection-session__finish {
        padding: 12px;
    }

    .inspection-session__header {
        gap: 10px;
    }

    .inspection-session__progress {
        padding: 10px 12px;
    }

    .inspection-session__group-summary {
        justify-content: flex-start;
    }
}

@media (max-width: 1180px) and (min-width: 721px) {
    .inspection-modal {
        overflow: auto;
        padding-right: 4px;
    }

    .inspection-modal .inspection-session {
        grid-template-rows: auto auto auto;
        overflow: visible;
    }

    .inspection-session__layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        height: auto;
        overflow: visible;
    }

    .inspection-session__list,
    .inspection-session__work,
    .inspection-session__work .module-form {
        overflow: visible;
        padding-right: 0;
    }

    .inspection-session__work {
        grid-template-rows: auto auto;
    }
}

@media (max-width: 1200px) {
    .module-grid {
        grid-template-columns: 1fr;
    }
    .inventory-explorer {
        grid-template-columns: 1fr;
    }
    .devices-explorer,
    .locations-explorer,
    .categories-explorer {
        grid-template-columns: 1fr;
    }
    .inventory-tree {
        height: auto;
        max-height: none;
    }
    .devices-tree,
    .locations-tree,
    .categories-tree {
        height: auto;
        max-height: none;
    }
    .inventory-list-pane {
        height: auto;
        max-height: none;
    }
    .devices-list-pane,
    .locations-list-pane,
    .categories-list-pane {
        height: auto;
        max-height: none;
    }
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    .module-list__header {
        flex-direction: column;
        align-items: flex-start;
    }
    .module-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }
    .orders-layout {
        grid-template-columns: 1fr;
    }
    .orders-summary {
        justify-content: flex-start;
        text-align: left;
        width: 100%;
    }
    .procurement-submission-item {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .lending-submission-item {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .orders-filters {
        flex-wrap: wrap;
    }
    .orders-toolbar__row--filters {
        flex-wrap: wrap;
    }
}

@media (max-width: 720px) {
    .content {
        padding: 20px 16px 32px;
    }
    .topbar h2 {
        font-size: 22px;
    }
    .topbar p {
        font-size: 13px;
    }
    .topbar__actions {
        width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }
    .section__header,
    .module-header,
    .orders-detail__header,
    .comrades-detail__header,
    .locations-detail__header,
    .suppliers-detail__header,
    .categories-detail__header {
        flex-direction: column;
        align-items: flex-start;
    }
    .module-header__actions,
    .orders-detail__actions,
    .comrades-detail__actions {
        width: 100%;
    }
    .module-row,
    .admin-row {
        padding: 12px;
    }
    .module-list__footer,
    .comrades-pagination {
        width: 100%;
        justify-content: flex-start;
    }
    .comrades-page-size-field {
        width: 100%;
    }
    .inventory-workspace {
        padding: 10px;
    }
    .inventory-tree__title {
        font-size: 22px;
    }
    .inventory-list-pane {
        padding: 8px;
    }
    .devices-list-pane {
        padding: 8px;
    }
    .orders-toolbar__row {
        flex-direction: column;
        align-items: flex-start;
    }
    .orders-toolbar__row--filters {
        align-items: stretch;
    }
    .storage-toolbar__row {
        flex-direction: column;
        align-items: flex-start;
    }
    .storage-search-right {
        width: 100%;
        margin-left: 0;
    }
    .locations-toolbar__row {
        flex-direction: column;
        align-items: flex-start;
    }
    .suppliers-toolbar__row {
        flex-direction: column;
        align-items: flex-start;
    }
    .categories-toolbar__row {
        flex-direction: column;
        align-items: flex-start;
    }
    .tasks-toolbar__row {
        flex-direction: column;
        align-items: flex-start;
    }
    .tasks-search-right {
        width: 100%;
        margin-left: 0;
    }
    .orders-filters {
        flex-wrap: wrap;
    }
    .orders-search-right {
        margin-left: 0;
        width: 100%;
    }
    .orders-sort--inline {
        padding-left: 0;
        border-left: none;
        margin-left: 0;
    }
    .module-form {
        grid-template-columns: 1fr;
    }
    .metric-split {
        grid-template-columns: 1fr;
    }
    .comrades-detail-top {
        grid-template-columns: 1fr;
    }
    .comrades-detail-photo {
        width: 100%;
        height: 200px;
    }
    .comrades-search-right {
        width: 100%;
        margin-left: 0;
    }
    .devices-detail-top {
        grid-template-columns: 1fr;
    }
    .devices-detail-photo {
        width: 100%;
        height: 200px;
    }
    .devices-search-right {
        width: 100%;
        margin-left: 0;
    }
    .locations-search-right {
        width: 100%;
        margin-left: 0;
    }
    .suppliers-search-right {
        width: 100%;
        margin-left: 0;
    }
    .inspection-cards-search-right {
        width: 100%;
        margin-left: 0;
    }
    .categories-search-right {
        width: 100%;
        margin-left: 0;
    }
    .inspection-card-assignment__controls {
        grid-template-columns: 1fr;
    }
    .inspection-card-assignment__actions {
        width: 100%;
    }
    .inspection-card-assignment__actions .btn {
        flex: 1 1 auto;
    }
    .inspection-card-field-results__row,
    .inspection-card-template-fields__row {
        grid-template-columns: 1fr;
    }
    .inspection-card-editor__toolbar-summary {
        flex-wrap: wrap;
    }

    .inspection-card-editor__zoom-field {
        min-width: 420px;
        flex-basis: 420px;
    }

    .inspection-card-editor__zoom-controls input[type="range"] {
        min-width: 180px;
    }
    .inspection-card-editor__body {
        max-height: none;
    }
    .inspection-session__layout {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .inspection-session__list {
        max-height: none;
        padding-right: 0;
    }
    .inspections-wizard {
        grid-template-columns: 1fr;
    }
    .inspection-session__header,
    .inspections-wizard__actions {
        align-items: stretch;
    }
    .inspection-session__header-actions,
    .inspections-wizard__buttons {
        width: 100%;
    }
    .inspection-session__header-actions .btn,
    .inspections-wizard__buttons .btn {
        flex: 1 1 0;
    }
    .inspection-session__group-toggle {
        align-items: flex-start;
        flex-direction: column;
    }

    .inspection-session__group-summary {
        justify-content: flex-start;
    }

    .inspection-session__item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .inspection-session__item-actions {
        flex-direction: row;
        width: 100%;
    }
    .inspection-session__item-actions .btn {
        flex: 1 1 calc(50% - 8px);
        min-width: 0;
    }

    body {
        overflow-x: hidden;
    }

    .section,
    .module-card,
    .card,
    .admin-card,
    .orders-detail,
    .comrades-detail,
    .locations-detail,
    .suppliers-detail,
    .categories-detail {
        padding-left: 16px;
        padding-right: 16px;
    }

    .table__row {
        grid-template-columns: 1fr;
        align-items: flex-start;
        gap: 6px;
    }

    .task {
        flex-direction: column;
        gap: 12px;
    }

    .module-search input,
    .admin-search input {
        min-width: 0;
        width: 100%;
    }

    .module-filters select,
    .orders-filters > *,
    .orders-sort > * {
        min-width: 0;
        width: 100%;
    }

    .admin-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        border-radius: 16px;
    }

    .module-tabs {
        width: 100%;
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        border-radius: 16px;
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        scrollbar-width: thin;
    }

    .module-tabs::-webkit-scrollbar {
        height: 8px;
    }

    .module-tabs::-webkit-scrollbar-thumb {
        background: rgba(31, 42, 68, 0.28);
        border-radius: 999px;
    }

    .module-tabs::-webkit-scrollbar-track {
        background: transparent;
    }

    .admin-tab,
    .btn {
        white-space: normal;
        text-align: center;
    }

    .module-tab {
        flex: 0 0 auto;
        white-space: nowrap;
        text-align: center;
    }

    .admin-actions,
    .module-actions,
    .orders-detail__actions,
    .comrades-detail__actions,
    .locations-detail__actions,
    .suppliers-detail__actions,
    .categories-detail__actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .admin-actions .btn,
    .module-actions .btn,
    .orders-detail__actions .btn,
    .comrades-detail__actions .btn,
    .locations-detail__actions .btn,
    .suppliers-detail__actions .btn,
    .categories-detail__actions .btn {
        width: 100%;
    }

    .module-row,
    .admin-row,
    .order-card,
    .comrade-card,
    .location-card,
    .supplier-card,
    .category-card,
    .vehicle-card,
    .vehicle-eq-row,
    .attachment-row,
    .timeline-item {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .orders-attachment__pdf {
        height: 260px;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 14px 12px 28px;
    }

    .topbar h2 {
        font-size: 20px;
        line-height: 1.2;
    }

    .section,
    .module-card,
    .card,
    .admin-card,
    .orders-detail,
    .comrades-detail,
    .locations-detail,
    .suppliers-detail,
    .categories-detail {
        border-radius: 16px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .metric {
        font-size: 28px;
    }

    .metric--small {
        font-size: 18px;
    }

    .sidebar {
        width: min(92vw, 320px);
    }
}
