:root {
    color-scheme: dark;
    --bg: #0a1018;
    --side: #0d1520;
    --panel: #101b29;
    --sub: #152235;
    --line: #24354a;
    --text: #eef5fa;
    --muted: #a4b3c5;
    --accent: #67e7c7;
    --ink: #071e1b;
    --danger: #ff9e91;
    --shadow: 0 16px 42px #03070e35;
}

:root[data-theme=light] {
    color-scheme: light;
    --bg: #edf3f5;
    --side: #f7fbfc;
    --panel: #fff;
    --sub: #e6eff3;
    --line: #c7d7df;
    --text: #102938;
    --muted: #466276;
    --accent: #007a64;
    --ink: #fff;
    --danger: #b22d31;
    --shadow: 0 16px 42px #0c404015;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 15px/1.5 "Segoe UI",system-ui,sans-serif;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

button {
    cursor: pointer;
}

a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

h1,h2,p {
    margin: 0;
}

h1 {
    font-size: clamp(33px,5vw,56px);
    letter-spacing: -.055em;
    line-height: 1.05;
    overflow-wrap: anywhere;
}

h2 {
    font-size: 20px;
    letter-spacing: -.025em;
}

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

.sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

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

.eyebrow {
    font: 700 11px/1.5 ui-monospace,monospace;
    letter-spacing: .18em;
    color: var(--accent);
    margin: 0 0 12px;
}

.arrow {
    color: var(--accent);
}

.money,.balance {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.balance {
    font-size: 28px;
    color: var(--accent);
}

.workspace {
    display: grid;
    grid-template-columns: 238px minmax(0,1fr);
    min-height: 100vh;
}

.sidebar {
    background: var(--side);
    border-right: 1px solid var(--line);
    padding: 26px 17px;
    display: flex;
    flex-direction: column;
    gap: 42px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--text);
    font-weight: 850;
    letter-spacing: .1em;
    white-space: nowrap;
}

.brand:hover {
    text-decoration: none;
}

.brand small {
    display: block;
    font-size: 9px;
    letter-spacing: .17em;
    font-weight: 700;
}

.mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 9px 9px 14px 9px;
    background: var(--accent);
    color: var(--ink);
    font-size: 25px;
    font-weight: 900;
    letter-spacing: 0;
}

.sidebar nav {
    display: grid;
    gap: 5px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 650;
}

.sidebar nav i,.stats i,.featuregrid i {
    color: var(--accent);
    font-style: normal;
    font-size: 21px;
    line-height: 1;
}

.sidebar nav a:hover,.sidebar nav .selected {
    background: var(--sub);
    border-color: var(--line);
    color: var(--text);
    text-decoration: none;
}

.sidebar nav .selected {
    box-shadow: inset 3px 0 var(--accent);
}

.account {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding: 15px 9px 0;
    overflow-wrap: anywhere;
}

.account small,.account strong {
    display: block;
}

.text-button {
    border: 0;
    background: none;
    color: var(--accent);
    padding: 7px 0;
    text-decoration: underline;
}

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

.top {
    height: 72px;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    padding: 0 34px;
    gap: 20px;
    background: var(--side);
}

.top nav {
    margin-left: auto;
}

.top nav a {
    font-weight: 700;
}

.theme {
    margin-left: auto;
    background: var(--sub);
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 9px;
    width: 40px;
    height: 40px;
    font-size: 20px;
}

.public .theme {
    margin-left: 0;
}

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

.breadcrumb b {
    padding: 0 8px;
    color: var(--accent);
}

main {
    max-width: 1440px;
    margin: auto;
    padding: 32px 34px 44px;
}

.public main {
    max-width: 1330px;
}

.public .top {
    padding-inline: max(24px,calc((100vw - 1262px)/2));
}

.heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.heading p:not(.eyebrow) {
    margin-top: 8px;
    color: var(--muted);
}

.heading h1 {
    margin-top: 6px;
}

.hero {
    position: relative;
    overflow: hidden;
    border-radius: 21px;
    border: 1px solid #315366;
    box-shadow: var(--shadow);
    isolation: isolate;
    background: #102437;
    color: #f1fafc;
    background-image: linear-gradient(90deg,#081522 2%,#0b1a28df 29%,#0c1c2870 60%,#0d21262c 100%),url(truck.webp);
    background-size: cover;
    background-position: center 58%;
}

.hero:after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: linear-gradient(0deg,#07101db0,transparent 50%),repeating-linear-gradient(0deg,#9be8f208 0 1px,transparent 1px 6px);
}

.hero .eyebrow {
    color: #67e7c7;
}

.hero-copy {
    padding: clamp(27px,5vw,71px);
    max-width: 750px;
}

.landing {
    min-height: 515px;
    display: flex;
    align-items: center;
}

.landing h1 {
    font-size: clamp(48px,8.3vw,118px);
    line-height: .94;
    letter-spacing: -.081em;
}

.landing em {
    font-style: normal;
    color: #67e7c7;
}

.landing p:not(.eyebrow) {
    max-width: 410px;
    color: #c1d1dd;
    margin-top: 22px;
    font-size: 17px;
}

.buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 29px;
}

.hero-caption {
    position: absolute;
    bottom: 19px;
    right: 23px;
    color: #cfdee5;
    font: 700 10px ui-monospace,monospace;
    letter-spacing: .19em;
}

.dashboard-hero {
    margin-bottom: 20px;
}

.dashboard-hero .hero-copy {
    padding: 31px 39px;
}

.dashboard-hero h2 {
    font-size: clamp(28px,4vw,48px);
    line-height: 1.03;
    margin-bottom: 19px;
}

.hero .secondary {
    background: #0e1c2cba;
    border-color: #698198;
    color: #f1fafc;
}

.hero .primary {
    background: #67e7c7;
    color: #071e1b;
    border-color: #67e7c7;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 43px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 750;
    text-align: center;
}

.button:hover {
    text-decoration: none;
    filter: brightness(1.1);
}

.primary {
    background: var(--accent);
    color: var(--ink);
    border-color: var(--accent);
}

.secondary {
    color: var(--text);
    background: var(--sub);
    border-color: var(--line);
}

.panel {
    border: 1px solid var(--line);
    background: var(--panel);
    border-radius: 14px;
    box-shadow: var(--shadow);
    min-width: 0;
}

.stats,.featuregrid {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
}

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

.featuregrid {
    grid-template-columns: repeat(3,minmax(0,1fr));
    margin-top: 18px;
}

.featuregrid article,.stats article {
    padding: 20px;
}

.featuregrid h2 {
    margin: 8px 0 4px;
}

.featuregrid p,.stats span,footer {
    color: var(--muted);
}

.stats span,.stats strong {
    display: block;
}

.stats span {
    font-size: 13px;
    margin: 9px 0 2px;
}

.stats strong {
    font-size: clamp(17px,2.2vw,29px);
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 17px 20px;
}

.tablewrap {
    overflow-x: auto;
}

table {
    border-collapse: collapse;
    width: 100%;
    min-width: 590px;
    text-align: left;
}

th,td {
    padding: 12px 16px;
    border-top: 1px solid var(--line);
}

th {
    background: var(--sub);
    color: var(--muted);
    font-size: 12px;
}

td small,td strong {
    display: block;
}

td:first-child {
    max-width: 380px;
    overflow-wrap: anywhere;
}

.rowlink {
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.status {
    display: inline-flex;
    border: 1px solid var(--line);
    background: var(--sub);
    color: var(--text);
    border-radius: 100px;
    padding: 4px 9px;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.status.driving,.status.settled,.status.open {
    color: var(--accent);
}

.status.cancelled,.urgent-text {
    color: var(--danger);
}

.empty {
    padding: 32px 21px;
    color: var(--muted);
    border-top: 1px solid var(--line);
}

.empty strong {
    color: var(--text);
}

.filters,.pagination {
    display: flex;
    align-items: end;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px;
}

.message {
    margin-bottom: 17px;
    border-radius: 8px;
    border: 1px solid var(--accent);
    padding: 11px 15px;
    color: var(--accent);
    background: var(--panel);
}

.message.error {
    border-color: var(--danger);
    color: var(--danger);
}

.auth {
    max-width: 460px;
    margin: 5vh auto;
    padding: 30px;
}

.auth h1,.auth p:last-child {
    margin-bottom: 15px;
}

.auth p:last-child {
    margin: 15px 0 0;
}

.formgrid {
    display: grid;
    gap: 13px;
}

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

.wide {
    grid-column: 1/-1;
}

label {
    display: grid;
    gap: 5px;
    font-weight: 650;
    color: var(--muted);
    font-size: 13px;
}

input,select,textarea {
    width: 100%;
    min-height: 43px;
    padding: 8px 10px;
    background: var(--side);
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--text);
}

textarea {
    resize: vertical;
}

fieldset {
    margin: 0 0 19px;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 10px;
    min-width: 0;
}

legend {
    padding: 0 7px;
    font-weight: 800;
}

.edit,.pad {
    padding: 22px;
}

.edit {
    max-width: 960px;
}

.detailgrid {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 15px;
    align-items: start;
}

dl {
    margin-bottom: 0;
}

dl div {
    display: grid;
    grid-template-columns: minmax(95px,.8fr) 1.2fr;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

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

dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.timeline {
    margin-top: 13px;
    border-left: 2px solid var(--accent);
    padding-left: 10px;
    overflow-wrap: anywhere;
}

.timeline small,.userrow small {
    display: block;
}

.actions {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.userrow {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.userrow form {
    display: flex;
    gap: 6px;
}

.userrow small {
    overflow-wrap: anywhere;
}

@media(max-width:1020px) {
    .workspace {
        grid-template-columns: 185px minmax(0,1fr);
    }
    .sidebar {
        padding-inline: 12px;
    }
    .top,main {
        padding-inline: 22px;
    }
    .stats {
        grid-template-columns: repeat(2,minmax(0,1fr));
    }
    .detailgrid {
        grid-template-columns: 1fr;
    }
}

@media(max-width:680px) {
    .workspace {
        display: block;
    }
    .sidebar {
        position: static;
        height: auto;
        gap: 12px;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 14px;
    }
    .sidebar nav {
        display: flex;
        gap: 6px;
        overflow: auto;
    }
    .sidebar nav a {
        white-space: nowrap;
        padding: 7px 9px;
        font-size: 13px;
    }
    .sidebar nav i {
        display: none;
    }
    .account {
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 4px 0 0;
        flex-wrap: wrap;
    }
    .account form {
        margin-left: auto;
    }
    .top {
        height: 58px;
    }
    main {
        padding: 19px 13px 31px;
    }
    .featuregrid,.cols {
        grid-template-columns: 1fr;
    }
    .landing {
        min-height: 445px;
        background-position: 61% center;
    }
    .dashboard-hero .hero-copy {
        padding: 23px;
    }
    .heading {
        align-items: flex-start;
    }
    .stats article,.pad,.edit {
        padding: 14px;
    }
}

.ets2-panel {
    display: grid;
    gap: 12px;
    justify-items: start;
    margin-top: 15px;
}

.ets2-panel form {
    width: min(100%, 740px);
    align-items: end;
}

.ets2-ferry[hidden] {
    display: none;
}

.catalog-panel {
    margin-bottom: 15px;
}

[data-route-end] label[hidden] {
    display: none;
}
