:root {
    --chrome: #d7e1ea;
    --chrome-dark: #aab8c3;
    --paper: #f5f7f8;
    --panel: #edf3f7;
    --panel-soft: #f8fbfd;
    --line: #96a8b4;
    --line-soft: #c9d4dc;
    --ink: #16232c;
    --muted: #5d6b75;
    --title: #1e7084;
    --title-dark: #0f5264;
    --accent: #f5a400;
    --danger: #f09ca1;
    --danger-strong: #c93843;
    --success: #72d78c;
    --success-strong: #167f3c;
    --warning: #f4d36b;
    --info: #8ecdf0;
    --white: #ffffff;
    --shadow: 0 18px 44px rgba(23, 36, 48, 0.22);
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.35;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.72), rgba(226, 233, 239, 0.72)),
        repeating-linear-gradient(45deg, rgba(18, 91, 113, 0.08) 0 1px, transparent 1px 16px),
        #cfd9e2;
}

button,
input,
select {
    font: inherit;
}

a {
    color: inherit;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 0;
}

.app-body {
    min-height: 100vh;
    padding: 0;
}

.login-shell,
.app-window {
    width: 100%;
}

.login-window,
.app-window {
    overflow: hidden;
    border: 1px solid #4c7482;
    background: var(--chrome);
    box-shadow: var(--shadow);
}

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

.titlebar {
    min-height: 30px;
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 4px 8px;
    border-bottom: 1px solid #092f3b;
    background: linear-gradient(#237e95, #155b70);
    color: var(--white);
    font-weight: 700;
}

.titlebar-brand,
.titlebar-user {
    display: flex;
    align-items: center;
}

.titlebar-brand {
    gap: 8px;
    min-width: 0;
}

.titlebar-brand span:last-child,
.titlebar-user span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-mark {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 10px;
    letter-spacing: 0;
}

.titlebar-user {
    gap: 7px;
    min-width: 0;
    font-size: 12px;
}

.titlebar-dot {
    width: 4px;
    height: 4px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent);
}

.titlebar-logout {
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border: 1px solid rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.18);
    color: var(--white);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.titlebar-logout:hover {
    background: rgba(255, 255, 255, 0.3);
}

.menubar {
    min-height: 27px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2px;
    padding: 0 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(#f7dbe1, #f0cbd3);
}

.login-menu {
    justify-content: flex-start;
}

.menubar-main,
.menubar-context {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

.menubar-main {
    flex: 1 1 auto;
}

.menubar-context {
    flex: 0 1 auto;
    justify-content: flex-end;
}

.menubar a,
.login-menu span {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 9px;
    color: #1b4654;
    text-decoration: none;
}

.menubar a.active,
.menubar a:hover {
    border: 1px solid #9bb5c2;
    background: rgba(255, 255, 255, 0.62);
}

.menubar-context a {
    font-weight: 700;
    white-space: nowrap;
}

.menubar-item {
    position: relative;
    display: inline-flex;
    align-items: center;
    align-self: stretch;
}

.menubar-item > a {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 9px;
    color: #1b4654;
    text-decoration: none;
    user-select: none;
}

.menubar-item.active > a,
.menubar-item:hover > a {
    border: 1px solid #9bb5c2;
    background: rgba(255, 255, 255, 0.62);
}

.submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 200;
    list-style: none;
    margin: 0;
    padding: 2px;
    min-width: 140px;
    border: 1px solid #9bb5c2;
    border-top: none;
    background: linear-gradient(#f7dbe1, #f0cbd3);
    box-shadow: 2px 4px 8px rgba(23, 36, 48, 0.18);
}

.menubar-item:hover .submenu {
    display: block;
}

.submenu li {
    list-style: none;
}

.submenu a {
    display: block;
    height: auto;
    padding: 5px 12px;
    white-space: nowrap;
    border: 1px solid transparent;
    color: #1b4654;
    text-decoration: none;
}

.submenu a:hover {
    background: rgba(255, 255, 255, 0.62);
    border-color: #9bb5c2;
}

.toolbar {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(#eff5f8, #d7e3eb);
}

.admin-toolbar {
    min-height: 29px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-bottom: 1px solid #b9c8d0;
    background: #f4f8fa;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.admin-toolbar .command-button {
    min-width: auto;
    min-height: 23px;
    padding: 2px 8px;
    font-size: 12px;
    line-height: 1.2;
}

.admin-toolbar .toolbar-check,
.admin-toolbar .search-box {
    min-height: 23px;
    color: #25404b;
    font-size: 12px;
}

.admin-toolbar .toolbar-select,
.admin-toolbar .search-box input {
    min-height: 23px;
    padding: 2px 6px;
    font-size: 12px;
}

.admin-toolbar .search-box {
    min-width: 190px;
    flex: 0 1 280px;
    margin-left: auto;
}

.toolbar button,
.panel-title button {
    width: 24px;
    height: 24px;
    border: 1px solid #7894a3;
    border-radius: 2px;
    color: #124757;
    background: linear-gradient(#ffffff, #c9d9e3);
    cursor: pointer;
    font-weight: 700;
}

.toolbar button:hover,
.panel-title button:hover {
    border-color: #3d7488;
    background: linear-gradient(#ffffff, #b6d5e3);
}

.toolbar-separator {
    width: 1px;
    height: 25px;
    margin: 0 3px;
    background: var(--line);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 280px;
}

.toolbar .search-box {
    flex: 1 1 360px;
    max-width: 720px;
}

.search-box input,
.login-form input:not([type="checkbox"]),
.login-form select {
    width: 100%;
    min-height: 25px;
    border: 1px solid #8da4af;
    padding: 3px 7px;
    background: var(--white);
    color: var(--ink);
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--title);
}

.toolbar-check {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}

.toolbar-select {
    min-height: 25px;
    border: 1px solid #8da4af;
    padding: 3px 7px;
    background: var(--white);
    color: var(--ink);
}

.dashboard-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    gap: 6px;
    padding: 6px;
}

.left-column,
.center-column,
.action-rail {
    min-width: 0;
}

.left-column,
.center-column {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel {
    min-width: 0;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.panel-title {
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 2px 4px 2px 8px;
    border-bottom: 1px solid #115165;
    background: linear-gradient(#287c92, #185f72);
    color: var(--white);
    font-weight: 700;
    text-align: center;
}

.panel-title span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel-title button {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    padding: 0;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.12);
}

.panel-tools {
    display: flex;
    gap: 3px;
}

.panel-body {
    padding: 8px;
}

.identity-panel {
    min-height: 220px;
}

.identity-block {
    display: grid;
    gap: 8px;
    min-height: 120px;
}

.identity-name {
    font-weight: 700;
    color: #123d4a;
}

.note-box {
    min-height: 62px;
    margin-top: 12px;
    padding: 7px;
    border: 1px solid var(--line-soft);
    background: #fbfdff;
}

.note-box strong {
    display: block;
    margin-bottom: 4px;
    color: #b6202d;
}

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

.compact-list {
    display: grid;
    gap: 6px;
}

.compact-list div,
.record-line {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 5px;
    border-bottom: 1px dotted var(--line-soft);
}

.compact-list strong,
.record-line strong {
    color: #153f4c;
}

.module-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    gap: 6px;
}

.module-card {
    min-height: 112px;
    display: grid;
    gap: 3px;
    align-content: center;
    padding: 10px;
    border: 1px solid var(--line);
    background: linear-gradient(#fdfefe, #dde9ef);
}

.module-card-link {
    color: var(--ink);
    text-decoration: none;
}

.module-card-link:hover {
    outline: 2px solid #2f8dbc;
    outline-offset: -2px;
}

.module-card span {
    color: var(--muted);
    font-weight: 700;
}

.module-card strong {
    font-size: 28px;
    line-height: 1;
    color: #133f4d;
}

.module-card em {
    font-style: normal;
}

.module-card small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    line-height: 1.35;
}

.module-group {
    display: grid;
    gap: 6px;
}

.section-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    min-height: 28px;
    padding: 2px 4px;
}

.section-heading span {
    color: #9b1f2d;
    font-size: 16px;
    font-weight: 700;
}

.section-heading em {
    color: var(--muted);
    font-style: normal;
}

.secondary-modules {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.module-ok {
    border-left: 5px solid var(--success-strong);
}

.module-warning {
    border-left: 5px solid var(--accent);
}

.module-danger {
    border-left: 5px solid var(--danger-strong);
}

.module-info {
    border-left: 5px solid #2f89b5;
}

.activity-panel {
    min-height: 330px;
}

.table-wrap {
    overflow: auto;
    padding: 0;
}

.data-grid {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: var(--white);
}

.data-grid th,
.data-grid td {
    height: 31px;
    padding: 5px 7px;
    border: 1px solid #aab7bf;
    text-align: left;
    vertical-align: middle;
}

.data-grid th {
    position: sticky;
    top: 0;
    z-index: 1;
    color: #1d3340;
    background: linear-gradient(#f9fbfc, #d8e2e9);
    font-weight: 700;
}

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

.data-grid tbody tr:hover,
.data-grid tbody tr.is-selected {
    outline: 2px solid #2f8dbc;
    outline-offset: -2px;
}

.admin-edit-link {
    color: #075d87;
    font-weight: 700;
    text-decoration: none;
}

.admin-edit-row:hover .admin-edit-link,
.admin-edit-link:hover {
    text-decoration: underline;
}

.row-success {
    background: #dff7e5;
}

.row-danger {
    background: #ffd8db;
}

.row-warning {
    background: #fff0bd;
}

.row-info {
    background: #dff2fb;
}

.state-pill {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 1px 7px;
    border: 1px solid rgba(0, 0, 0, 0.16);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
}

.bottom-panels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.timeline,
.warning-list {
    display: grid;
    gap: 6px;
}

.timeline div,
.warning-list div {
    min-height: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 4px;
    border-bottom: 1px dotted var(--line-soft);
}

.timeline span {
    min-width: 42px;
    color: #007099;
    font-weight: 700;
}

.warning-list div::before {
    width: 7px;
    height: 7px;
    content: "";
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--accent);
}

.action-rail {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.rail-button,
.command-button {
    min-height: 31px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    padding: 5px 8px;
    border: 1px solid #8a9ca6;
    color: #17333e;
    background: linear-gradient(#ffffff, #d8e4eb);
    text-decoration: none;
    cursor: pointer;
}

.rail-button span {
    width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    border: 1px solid #a6b4bc;
    background: #f9fbfd;
    font-weight: 700;
}

.rail-button.primary,
.command-button.primary {
    border-color: #c78300;
    background: linear-gradient(#ffc85a, #f0a20d);
    color: #2d240f;
    font-weight: 700;
}

.rail-button.danger {
    border-color: #b6565c;
    color: #7a1e25;
}

.rail-card {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    background: var(--panel-soft);
}

.status-line {
    display: block;
    padding-left: 10px;
    border-left: 4px solid var(--line);
}

.status-line.ok {
    border-left-color: var(--success-strong);
}

.status-line.warning {
    border-left-color: var(--accent);
}

.status-line.info {
    border-left-color: #2f89b5;
}

.statusbar {
    min-height: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 8px;
    border-top: 1px solid var(--line);
    background: linear-gradient(#d8f5fb, #aee5ef);
    color: #174756;
    font-size: 12px;
}

.login-window {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-content {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(360px, 1fr) minmax(380px, 470px);
    gap: 8px;
    padding: 8px;
    background: linear-gradient(135deg, #dce8f2, #f3f6f8);
}

.login-record {
    display: grid;
    gap: 8px;
}

.mini-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.metric-preview {
    min-height: 70px;
    display: grid;
    place-items: center;
    color: #174b5a;
    font-size: 32px;
    font-weight: 700;
}

.login-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(100vh - 78px);
    padding: 22px;
    border: 1px solid var(--line);
    background:
        linear-gradient(rgba(255, 255, 255, 0.93), rgba(255, 255, 255, 0.93)),
        repeating-linear-gradient(90deg, rgba(30, 112, 132, 0.12) 0 1px, transparent 1px 34px);
}

.login-heading {
    margin-bottom: 18px;
}

.login-kicker {
    color: #9b1f2d;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
}

.login-heading h1 {
    margin: 4px 0 0;
    color: #9b1f2d;
    font-size: 24px;
    font-weight: 500;
}

.form-alert {
    margin-bottom: 12px;
    padding: 8px;
    border: 1px solid #c9646b;
    background: #ffdfe1;
    color: #7b1f26;
}

.login-form {
    display: grid;
    gap: 13px;
}

.login-form label:not(.toolbar-check) {
    display: grid;
    gap: 5px;
    color: #223b47;
    font-weight: 700;
}

.form-options,
.login-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.form-options a {
    color: #126d86;
}

.command-button {
    justify-content: center;
    min-width: 116px;
}

.module-page-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    grid-template-areas:
        "hero hero"
        "sidebar workspace";
    gap: 6px;
    padding: 6px;
}

.module-hero {
    grid-area: hero;
}

.module-sidebar {
    grid-area: sidebar;
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
}

.module-workspace {
    grid-area: workspace;
    display: grid;
    align-content: start;
    gap: 6px;
    min-width: 0;
}

.module-hero-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 14px;
    align-items: stretch;
}

.module-kicker {
    color: #9b1f2d;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.module-hero h1 {
    margin: 2px 0 8px;
    color: #9b1f2d;
    font-size: 28px;
    font-weight: 500;
}

.module-hero p {
    max-width: 900px;
    margin: 0;
    color: var(--muted);
}

.module-hero-stat {
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--line);
    background: linear-gradient(#fdfefe, #dde9ef);
}

.module-hero-stat span {
    color: var(--muted);
    font-weight: 700;
}

.module-hero-stat strong {
    color: #133f4d;
    font-size: 30px;
    line-height: 1;
}

.module-hero-stat em {
    font-style: normal;
}

.vehicle-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    align-content: start;
    gap: 6px;
    padding: 6px;
}

.vehicle-toolbar .command-button {
    white-space: nowrap;
}

.vehicle-heading-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 12px;
    align-items: stretch;
}

.vehicle-heading h1 {
    margin: 2px 0 6px;
    color: #9b1f2d;
    font-size: 22px;
    font-weight: 500;
}

.vehicle-heading p {
    max-width: 920px;
    margin: 0;
    color: var(--muted);
}

.vehicle-scope-list {
    align-content: center;
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.52);
}

.vehicle-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 6px;
}

.vehicle-stat {
    display: grid;
    gap: 2px;
    padding: 8px;
    border-left: 5px solid var(--title);
}

.vehicle-stat span {
    color: var(--muted);
    font-weight: 700;
}

.vehicle-stat strong {
    color: #133f4d;
    font-size: 24px;
    line-height: 1;
}

.vehicle-stat em {
    color: var(--muted);
    font-style: normal;
}

.vehicle-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.vehicle-inventory-panel,
.vehicle-technical-panel {
    grid-column: 1 / -1;
}

.vehicle-data-grid {
    min-width: 780px;
}

.vehicle-inventory-panel .vehicle-data-grid,
.vehicle-technical-panel .vehicle-data-grid {
    min-width: 920px;
}

.vehicle-xp-window {
    width: min(100%, 560px);
}

.action-list {
    display: grid;
    gap: 6px;
}

.action-list button {
    min-height: 30px;
    border: 1px solid #8a9ca6;
    color: #17333e;
    background: linear-gradient(#ffffff, #d8e4eb);
    text-align: left;
    cursor: pointer;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(160px, 1fr));
    gap: 8px;
}

.filter-grid label {
    display: grid;
    gap: 4px;
    color: #223b47;
    font-weight: 700;
}

.filter-grid input,
.filter-grid select {
    min-height: 27px;
    border: 1px solid #8da4af;
    padding: 3px 7px;
    background: var(--white);
    color: var(--ink);
}

.admin-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    gap: 6px;
    padding: 6px;
}

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

.admin-back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--title);
    text-decoration: none;
    font-weight: 500;
}

.admin-back-link:hover {
    text-decoration: underline;
}

.admin-hero-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 14px;
    align-items: stretch;
}

.admin-hero-body h1 {
    margin: 2px 0 8px;
    color: #9b1f2d;
    font-size: 24px;
    font-weight: 500;
}

.admin-hero-body p {
    max-width: 980px;
    margin: 0;
    color: var(--muted);
}

.admin-modal-layer {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: grid;
    place-items: start center;
    padding: 92px 16px 24px;
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 22, 31, 0.26);
    cursor: default;
}

.admin-xp-window {
    position: relative;
    z-index: 1;
    width: min(100%, 520px);
    max-height: calc(100vh - 118px);
    overflow: hidden;
    border: 1px solid #0b3f92;
    border-radius: 7px 7px 3px 3px;
    background: #ece9d8;
    box-shadow:
        0 18px 38px rgba(0, 0, 0, 0.34),
        inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.admin-xp-titlebar {
    min-height: 29px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 5px 3px 9px;
    border-bottom: 1px solid #003c74;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(#2f7bf2 0%, #1762d0 48%, #0747a6 100%);
    color: #fff;
    font-weight: 700;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.45);
}

.admin-xp-titlebar span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-xp-close {
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    border: 1px solid #8e2a18;
    border-radius: 3px;
    background: linear-gradient(#f6b19a, #d64122 54%, #a8170c);
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.42);
}

.admin-xp-close:hover {
    background: linear-gradient(#ffd0bf, #e55739 54%, #b82012);
}

.admin-xp-body {
    max-height: calc(100vh - 150px);
    overflow: auto;
}

.admin-xp-window .admin-form {
    padding: 12px;
    border-left: 0;
    background: #ece9d8;
}

.admin-xp-window .admin-form legend {
    color: #1d1d1d;
    font-weight: 700;
}

.admin-xp-window .admin-form label {
    color: #1d1d1d;
}

.admin-xp-window .admin-form input,
.admin-xp-window .admin-form select {
    border-color: #7f9db9;
    background: #fff;
}

.admin-xp-window .admin-form-actions {
    padding-top: 4px;
    border-top: 1px solid #d1cdb7;
}

.disabled-link {
    opacity: 0.5;
    pointer-events: none;
    cursor: default;
}

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

.admin-notice {
    margin: 8px;
    padding: 7px 9px;
    border: 1px solid #d0aa45;
    background: #fff5cf;
    color: #654a09;
    font-weight: 700;
}

.admin-notice-success {
    border-color: #6ca56f;
    background: #e7f6e8;
    color: #245a2a;
}

.admin-notice-error {
    border-color: #c96a6a;
    background: #ffe2e2;
    color: #7a1f1f;
}

.empty-cell {
    color: var(--muted);
    font-style: italic;
    text-align: center;
}

.admin-table-zone {
    min-width: 0;
}

.access-badge {
    min-height: 18px;
    display: inline-flex;
    align-items: center;
    padding: 1px 6px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.14);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.access-badge.is-open {
    color: #e8ffe9;
}

.access-badge.is-locked {
    color: #fff1c4;
}

.admin-form {
    min-width: 0;
    padding: 8px;
    border-left: 1px solid var(--line);
    background: #eef4f7;
}

.admin-form fieldset {
    display: grid;
    gap: 9px;
    margin: 0;
    padding: 0;
    border: 0;
}

.admin-form fieldset:disabled {
    opacity: 0.62;
}

.admin-form legend {
    margin-bottom: 2px;
    color: #9b1f2d;
    font-weight: 700;
}

.admin-form label {
    display: grid;
    gap: 4px;
    color: #223b47;
    font-weight: 700;
}

.admin-form input,
.admin-form select {
    min-height: 27px;
    border: 1px solid #8da4af;
    padding: 3px 7px;
    background: var(--white);
    color: var(--ink);
}

.admin-password-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
}

.admin-password-generate {
    min-height: 27px;
    white-space: nowrap;
}

.admin-form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-top: 4px;
}

@media (max-width: 980px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
    }

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

    .module-page-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "hero"
            "sidebar"
            "workspace";
    }

    .vehicle-heading-body,
    .vehicle-board {
        grid-template-columns: 1fr;
    }

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

    .admin-hero-body,
    .admin-section-grid {
        grid-template-columns: 1fr;
    }

    .admin-form {
        border-top: 1px solid var(--line);
        border-left: 0;
    }

    .action-rail {
        display: grid;
        grid-template-columns: repeat(5, minmax(120px, 1fr));
    }

    .rail-card {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 12px;
    }

    .login-body,
    .app-body {
        padding: 0;
    }

    .login-content {
        grid-template-columns: 1fr;
    }

    .login-form-panel {
        min-height: auto;
    }

    .module-strip,
    .secondary-modules,
    .bottom-panels,
    .filter-grid,
    .module-hero-body,
    .vehicle-heading-body,
    .vehicle-stats,
    .admin-form-actions,
    .admin-password-row,
    .action-rail {
        grid-template-columns: 1fr;
    }

    .toolbar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .admin-toolbar {
        align-items: stretch;
        flex-wrap: wrap;
    }

    .admin-toolbar .command-button {
        width: auto;
    }

    .admin-toolbar .search-box {
        min-width: min(100%, 220px);
        flex: 1 1 220px;
        margin-left: 0;
    }

    .admin-modal-layer {
        align-items: start;
        padding: 70px 8px 16px;
    }

    .admin-xp-window {
        max-height: calc(100vh - 86px);
    }

    .admin-xp-body {
        max-height: calc(100vh - 118px);
    }

    .menubar {
        align-items: stretch;
        flex-direction: column;
        padding: 2px 8px;
    }

    .menubar-main,
    .menubar-context {
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .search-box {
        min-width: min(100%, 280px);
        flex: 1 1 240px;
    }

    .titlebar {
        grid-template-columns: 1fr auto;
    }

    .titlebar-logout {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
    }

    .titlebar-user {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
    }

    .statusbar,
    .form-options,
    .login-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .command-button {
        width: 100%;
    }
}
