@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --navy: #00152d; --navy-2: #000b1d; --blue: #12c7dc; --blue-soft: #e8fbfe;
  --cyan-dark: #0099b4; --kleinsorge-button: linear-gradient(180deg, #19cfe5 0%, #08acc6 100%);
  --bg: #f3f5f9; --card: #fff; --text: #17213a; --muted: #74809a; --line: #e6e9f0;
  --red: #e5484d; --red-bg: #fff0f0; --amber: #e59600; --amber-bg: #fff8e5;
  --green: #1c9b67; --green-bg: #eaf8f2; --shadow: 0 10px 35px rgba(22,31,55,.07);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "DM Sans", system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.shell { min-height: 100vh; }
.topbar { position: sticky; top: 0; z-index: 10; min-height: 0; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px max(24px, calc((100vw - 1440px)/2)); background: rgba(255,255,255,.98); color: var(--text); box-shadow: 0 16px 45px rgba(16,32,39,.10); border-bottom:1px solid rgba(15,45,60,.12); backdrop-filter: blur(18px); }
.brand { display:flex; align-items:center; justify-content:flex-start; }
.brand-logo { display:flex; align-items:center; }
.brand-mark { display:flex; align-items:center; justify-content:center; width:min(532px,40vw); overflow:visible; padding:0; background:transparent; border:0; border-radius:0; box-shadow:none; }
.brand-mark img { width:100%; height:auto; max-height:none; object-fit:contain; border-radius:0; display:block; filter:drop-shadow(0 10px 16px rgba(0,0,0,.10)); }
.topbar .brand-mark { width:clamp(300px,30vw,420px); max-height:112px; transform:translateX(-6.26%); }
.topbar .brand-mark img { width:auto; max-width:100%; max-height:112px; }
.brand-text { display:flex; min-width:0; flex-direction:column; line-height:1; text-shadow:0 10px 28px rgba(0,0,0,.36); }
.brand-text strong { color:#061843; font-size:clamp(42px,4vw,64px); font-weight:800; letter-spacing:-3px; }
.brand-text strong span { color:#12c7dc; }
.brand-text small { margin-top:12px; color:rgba(7,20,44,.58); font-size:clamp(10px,.9vw,15px); font-weight:700; letter-spacing:5px; text-transform:uppercase; white-space:nowrap; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.role-badge { display:inline-flex; align-items:center; min-height:34px; padding:0 12px; border-radius:99px; border:1px solid var(--line); background:#f8fafc; color:var(--muted); font-size:12px; font-weight:800; }
.role-badge.admin { background:var(--blue-soft); border-color:#b8f0f6; color:var(--cyan-dark); }
.role-badge.viewer { background:#f3f5f9; color:#657089; }
.container { width: min(1440px, calc(100% - 48px)); margin: auto; padding: 38px 0 60px; }
.eyebrow { margin: 0 0 7px; color: var(--blue); font-size: 12px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(28px, 4vw, 42px); letter-spacing: -1.5px; }
h2, h3, p { margin-top: 0; }
.subtitle { margin: 9px 0 0; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 0; border-radius: 9px; background: var(--kleinsorge-button); color: white; font-weight: 600; box-shadow:0 14px 32px rgba(3,171,199,.22); transition: .2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 38px rgba(3,171,199,.32); }
.btn-light { background: white; color: var(--text); border: 1px solid var(--line); }
.btn-ghost { background: transparent; color: var(--text); box-shadow:none; border:1px solid var(--line); }
.btn-danger { background: white; color: var(--red); border: 1px solid #f2c9cb; }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; }
.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin: 32px 0; }
.summary { position: relative; overflow: hidden; padding: 22px; text-align:left; background: var(--card); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); color:inherit; cursor:pointer; transition:.2s ease; }
.summary:hover { transform:translateY(-3px); box-shadow:0 18px 42px rgba(22,31,55,.13); }
.summary.active { border-color:rgba(18,199,220,.55); box-shadow:0 18px 46px rgba(18,199,220,.16); }
.summary.active::before { content:""; position:absolute; inset:auto 18px 14px 18px; height:3px; border-radius:99px; background:var(--kleinsorge-button); }
.summary.red.active { border-color:rgba(255,77,87,.38); box-shadow:0 18px 46px rgba(255,77,87,.13); }
.summary.red.active::before { background:var(--red); }
.summary.amber.active { border-color:rgba(245,158,11,.42); box-shadow:0 18px 46px rgba(245,158,11,.14); }
.summary.amber.active::before { background:var(--amber); }
.summary.green.active { border-color:rgba(45,166,107,.38); box-shadow:0 18px 46px rgba(45,166,107,.13); }
.summary.green.active::before { background:var(--green); }
.summary::after { content: ""; position: absolute; right: -20px; top: -25px; width: 85px; height: 85px; border-radius: 50%; background: var(--tone, var(--blue-soft)); }
.summary-label { color: var(--muted); font-size: 13px; font-weight: 600; }
.summary-value { display: block; margin-top: 6px; font-size: 30px; font-weight: 700; }
.summary.red { --tone: var(--red-bg); }.summary.amber { --tone: var(--amber-bg); }.summary.green { --tone: var(--green-bg); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 34px 0 18px; }
.toolbar h2 { margin: 0; font-size: 20px; }
.toolbar-controls { display: flex; gap: 10px; }
.search, select, input, textarea { border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--text); outline: none; }
.search { min-width: 250px; padding: 11px 14px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(18,199,220,.14); }
input:disabled, select:disabled, textarea:disabled { background:#f8fafc; color:#5d687d; cursor:not-allowed; opacity:1; }
.vehicle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.vehicle-card { position: relative; display:flex; flex-direction:column; padding: 0; overflow: hidden; text-align: left; background: white; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); color: inherit; transition: .2s ease; }
.vehicle-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(22,31,55,.12); }
.vehicle-photo { position: relative; display:grid; place-items:center; height: 220px; background-color:#00152d; background-position:center 62%; background-size:cover; background-repeat:no-repeat; }
.vehicle-photo::after { content:""; position:absolute; inset:45% 0 0; background:linear-gradient(transparent,rgba(5,10,20,.48)); }
.vehicle-placeholder { position:relative; z-index:1; display:grid; place-items:center; width:86px; height:86px; border:1px solid rgba(255,255,255,.28); border-radius:24px; background:rgba(255,255,255,.12); color:rgba(255,255,255,.9); font-size:31px; letter-spacing:-1px; backdrop-filter:blur(8px); }
.category { position:absolute; z-index:1; left:16px; top:16px; padding:6px 10px; border-radius:99px; background:rgba(12,20,38,.78); color:white; font-size:11px; font-weight:700; backdrop-filter:blur(8px); }
.card-accent { height: 5px; background: var(--status); }
.card-main { display:flex; flex:1; flex-direction:column; padding: 21px; }
.card-head { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.card-head h3 { margin: 0 0 8px; font-size: 19px; }
.license-plate { display:inline-flex; align-items:stretch; min-height:28px; overflow:hidden; border:2px solid #141923; border-radius:5px; background:linear-gradient(180deg,#fff,#f3f4f6); color:#111827; box-shadow:inset 0 0 0 1px rgba(255,255,255,.9), 0 3px 8px rgba(22,31,55,.08); font-family:"Arial Narrow","DIN Condensed","Roboto Condensed",Arial,sans-serif; font-weight:900; letter-spacing:1.6px; line-height:1; }
.plate-eu { display:flex; align-items:center; justify-content:center; width:25px; background:#064a99; color:#fff; font-size:12px; font-weight:800; letter-spacing:0; }
.country-code { line-height:1; transform:translateY(1px); }
.plate-number { display:flex; align-items:center; padding:3px 10px 2px; font-size:17px; text-transform:uppercase; white-space:nowrap; }
.license-plate-empty { min-height:26px; border-color:#c6ccd8; background:#f4f6fa; color:#7a8498; box-shadow:none; font-family:inherit; font-size:12px; font-weight:700; letter-spacing:.2px; }
.license-plate-empty span { display:flex; align-items:center; padding:4px 10px; }
.badge { height: fit-content; padding: 6px 10px; border-radius: 99px; background: var(--status-bg); color: var(--status); font-size: 11px; font-weight: 700; white-space: nowrap; }
.metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.open-entry { min-height:64px; margin:-4px 0 18px; padding:11px 12px; overflow:hidden; border-left:3px solid var(--status); border-radius:8px; background:var(--status-bg); }.open-entry-placeholder { opacity:0; pointer-events:none; }.open-entry span { display:block; margin-bottom:3px; color:var(--status); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.7px; }.open-entry strong { display:block; overflow:hidden; color:var(--text); font-size:13px; text-overflow:ellipsis; white-space:nowrap; }
.metric { color: var(--muted); font-size: 12px; }.metric strong { display: block; margin-top: 5px; color: var(--text); font-size: 14px; font-weight: 600; }
.card-foot { display: flex; justify-content: space-between; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.empty { grid-column: 1/-1; padding: 60px 20px; text-align: center; color: var(--muted); background: white; border: 1px dashed #cbd1dd; border-radius: 16px; }
.back { margin-bottom: 24px; }
.detail-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.detail-plate { margin-top:12px; }
.detail-plate .license-plate { min-height:36px; border-radius:7px; }
.detail-plate .plate-eu { width:32px; font-size:15px; }
.detail-plate .plate-number { padding:5px 14px 4px; font-size:22px; letter-spacing:2px; }
.detail-plate .license-plate-empty { min-height:32px; font-size:13px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, .8fr); gap: 22px; align-items: start; }
.panel { padding: 26px; background: white; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 20px; }.panel h2 { margin-bottom: 22px; font-size: 18px; }
.panel-title-row { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:20px; }
.panel-title-row h2 { margin:0 0 5px; }
.panel-title-row p { margin:0; color:var(--muted); font-size:12px; }
.panel-title-row>span { flex:0 0 auto; padding:7px 10px; border-radius:99px; background:var(--blue-soft); color:var(--cyan-dark); font-size:12px; font-weight:700; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 19px; }
.field { display: flex; flex-direction: column; gap: 7px; }.field.full { grid-column: 1/-1; }
label { color: #505c74; font-size: 12px; font-weight: 700; }
input, select, textarea { width: 100%; padding: 11px 12px; }
textarea { min-height: 105px; resize: vertical; }
.side-sticky { position: sticky; top: 96px; }.status-box { padding: 18px; border-radius: 12px; background: var(--status-bg); border-left: 4px solid var(--status); }
.status-box strong { display: block; color: var(--status); }.status-box span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
.action-stack { display: grid; gap: 10px; margin-top: 18px; }
.readonly-note { margin-top:18px; padding:14px; border-radius:12px; background:#f8fafc; border:1px solid var(--line); }
.readonly-note strong,.readonly-note span { display:block; }
.readonly-note strong { color:var(--text); }
.readonly-note span { margin-top:5px; color:var(--muted); font-size:12px; line-height:1.4; }
.readonly-form .panel { position:relative; }
.file-drop { display: block; padding: 24px 15px; border: 1px dashed #bec6d5; border-radius: 12px; text-align: center; color: var(--muted); cursor: pointer; }.file-drop input { display:none; }
.files { display: grid; gap: 8px; margin-top: 12px; }.file-item { display:flex; justify-content:space-between; gap: 8px; padding:9px; border-radius:8px; background:var(--bg); font-size:12px; }
.trip-form { display:grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap:12px; padding:16px; border:1px solid var(--line); border-radius:14px; background:#f8fafc; }
.trip-form .field { gap:5px; }
.trip-form input,.trip-form select { padding:9px 10px; }
.trip-add { grid-column: span 4; justify-self:start; margin-top:2px; }
.trip-list { display:grid; gap:10px; margin-top:16px; }
.trip-row { display:grid; grid-template-columns:minmax(0,1fr) auto 32px; gap:12px; align-items:center; padding:13px 14px; border:1px solid var(--line); border-radius:13px; background:white; }
.trip-row strong,.trip-row span,.trip-row small { display:block; }
.trip-row>div:first-child span { margin-top:4px; color:var(--text); font-weight:700; }
.trip-row small { margin-top:4px; color:var(--muted); font-size:11px; }
.trip-km { text-align:right; }
.trip-km strong { color:var(--cyan-dark); font-size:14px; }
.trip-km span { margin-top:4px; color:var(--muted); font-size:11px; }
.trip-delete { width:30px; height:30px; border:0; border-radius:50%; background:var(--red-bg); color:var(--red); font-size:18px; line-height:1; }
.trip-empty { padding:16px; border:1px dashed #cbd1dd; border-radius:13px; background:#fbfcfe; color:var(--muted); font-size:13px; text-align:center; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 30; transform: translate(-50%, 120px); padding: 12px 18px; border-radius: 10px; background: var(--navy); color: white; box-shadow: var(--shadow); opacity: 0; transition: .25s; }.toast.show { transform: translate(-50%, 0); opacity: 1; }
.fleet-hero { min-height:410px; display:flex; align-items:flex-end; color:white; background:linear-gradient(90deg,rgba(0,11,29,.96) 0%,rgba(0,21,45,.78) 44%,rgba(0,153,180,.2)), var(--hero-image), radial-gradient(circle at 78% 30%, rgba(25,207,229,.28), transparent 32%), linear-gradient(135deg,rgba(0,11,29,.98),rgba(0,21,45,.9) 55%,rgba(0,153,180,.38)); background-position:center; background-size:cover; }
.fleet-hero-content { width:min(1440px,calc(100% - 48px)); margin:0 auto; padding:70px 0; }.fleet-hero h1 { max-width:700px; font-size:clamp(42px,6vw,72px); letter-spacing:-3px; }.fleet-hero p:not(.eyebrow) { max-width:590px; margin:18px 0 26px; color:#d9e0ed; font-size:18px; }.hero-pills { display:flex; flex-wrap:wrap; gap:10px; }.hero-pills span { padding:8px 12px; border:1px solid rgba(255,255,255,.25); border-radius:99px; background:rgba(255,255,255,.1); font-size:12px; backdrop-filter:blur(8px); }.dashboard-content { padding-top:30px; }
.login-page { min-height:100vh; display:grid; grid-template-columns:minmax(0,1.35fr) minmax(400px,.65fr); background:white; }.login-visual { position:relative; isolation:isolate; display:flex; flex-direction:column; justify-content:space-between; min-height:100vh; padding:0 clamp(35px,6vw,90px) 42px; overflow:hidden; color:white; background:linear-gradient(145deg,#000b1d,#00152d 58%,#001a3b); }.login-photo { position:absolute; inset:0; z-index:-2; background-position:center; background-size:cover; background-repeat:no-repeat; transform:scale(1.02); }.login-visual::after { content:""; position:absolute; inset:0; z-index:-1; background:linear-gradient(180deg,rgba(0,21,45,.12),rgba(0,11,29,.74)), radial-gradient(circle at 72% 28%, rgba(25,207,229,.18), transparent 34%); }.login-logo-bar { display:flex; justify-content:center; margin:0 calc(clamp(35px,6vw,90px) * -1); padding:16px clamp(35px,6vw,90px); background:rgba(255,255,255,.97); border-bottom:1px solid rgba(216,221,232,.9); box-shadow:0 8px 30px rgba(7,13,28,.08); }.login-logo-bar .brand-mark { width:clamp(330px,42vw,520px); max-height:138px; }.login-logo-bar .brand-mark img { width:auto; max-width:100%; max-height:138px; }.login-claim { padding-bottom:5vh; }.login-claim h1 { font-size:clamp(45px,6vw,78px); line-height:.98; letter-spacing:-4px; }.login-claim>p:last-child { margin-top:22px; color:#dce3ef; font-size:18px; }.login-panel { display:grid; place-items:center; padding:35px; background:radial-gradient(circle at 78% 24%, rgba(18,199,220,.22), transparent 32%), radial-gradient(circle at 24% 84%, rgba(6,74,153,.35), transparent 38%), linear-gradient(145deg,#000b1d 0%,#00152d 54%,#001a3b 100%); }.login-card { width:min(100%,400px); padding:34px; border:1px solid rgba(216,221,232,.82); border-radius:24px; background:rgba(255,255,255,.96); box-shadow:0 24px 70px rgba(0,0,0,.28); }.login-icon { display:grid; place-items:center; width:54px; height:54px; margin-bottom:28px; border-radius:16px; background:var(--blue-soft); color:var(--cyan-dark); }.login-icon .icon { width:28px;height:28px; }.login-card h2 { margin-bottom:7px; font-size:38px; letter-spacing:-1px; }.login-card .field { margin-top:20px; }.login-button { width:100%; margin-top:24px; min-height:50px; }.login-card small { display:block; margin-top:22px; color:var(--muted); text-align:center; }.login-error { margin-top:18px; padding:11px 13px; color:var(--red); background:var(--red-bg); border-radius:9px; font-size:13px; }
@media (max-width: 1000px) { .vehicle-grid { grid-template-columns: repeat(2,1fr); }.summary-grid { grid-template-columns: repeat(2,1fr); }.form-layout { grid-template-columns: 1fr; }.side-sticky { position: static; }.trip-form { grid-template-columns:repeat(2,minmax(0,1fr)); }.trip-add { grid-column:span 2; } }
@media (max-width: 760px) { .login-page { grid-template-columns:1fr; }.login-visual { min-height:42vh; padding:0 25px 25px; }.login-logo-bar { display:flex; justify-content:center; margin:0 -25px; padding:16px 25px; }.login-claim { padding:35px 0 10px; }.login-claim h1 { font-size:42px; letter-spacing:-2px; }.login-panel { padding:42px 25px; }.fleet-hero { min-height:360px; }.fleet-hero-content { width:calc(100% - 36px); padding:48px 0; } }
@media (max-width: 650px) { .topbar { min-height: 0; padding: 14px; align-items: stretch; flex-direction: column; gap:10px; }.brand { justify-content:flex-start; font-size: 15px; }.brand-mark { width:min(100%,273px); padding:0; border-radius:0; }.brand-mark img { max-height:none; }.topbar .brand-mark { width:min(100%,273px); max-height:74px; }.topbar .brand-mark img { max-height:74px; }.login-logo-bar .brand-mark { width:min(100%,320px); max-height:86px; }.login-logo-bar .brand-mark img { max-height:86px; }.topbar .btn span { display:none; }.nav-actions { width:100%; justify-content:center; gap:8px; }.nav-actions .btn { flex:1 1 0; max-width:170px; }.container { width: min(100% - 28px, 1440px); padding-top: 26px; }.summary-grid { gap: 10px; margin: 24px 0; }.summary { padding: 16px; }.summary-value { font-size: 25px; }.toolbar { align-items: stretch; flex-direction: column; }.toolbar-controls { flex-direction: column; }.search { min-width: 0; }.vehicle-grid { grid-template-columns: 1fr; }.vehicle-photo { height:250px; }.detail-heading { align-items: flex-start; flex-direction: column; }.form-grid { grid-template-columns: 1fr; }.field.full { grid-column: auto; }.panel { padding: 19px; }.panel-title-row { flex-direction:column; }.trip-form { grid-template-columns:1fr; }.trip-add { grid-column:auto; width:100%; }.trip-row { grid-template-columns:1fr; }.trip-km { text-align:left; }.trip-delete { justify-self:end; } }
