:root{
  --bg:#ffffff;
  --bg-elevated:#ffffff;
  --panel:#ffffff;
  --panel-soft:#f7f9f9;
  --panel-strong:#eef3f3;
  --surface:#ffffff;
  --surface-light:#ffffff;

  --ink:#1f2a2b;
  --ink-soft:#485253;
  --ink-muted:#6b7677;
  --muted:#7a8687;

  --line:#d9e2e2;
  --line-strong:#c5d1d1;
  --line-soft:rgba(72,82,83,.12);

  --accent:#199588;
  --accent-strong:#13786d;
  --accent-ink:#ffffff;

  --primary:#199588;
  --primary-strong:#13786d;

  --secondary:#485253;
  --secondary-strong:#353d3e;

  --success:#16a34a;
  --success-strong:#15803d;
  --success-ink:#ffffff;

  --danger:#dc2626;
  --danger-strong:#b91c1c;
  --danger-ink:#ffffff;

  --warning:#f59e0b;
  --warning-soft:#fff7ed;

  --shadow-sm:0 4px 14px rgba(31,42,43,.08);
  --shadow-md:0 10px 28px rgba(31,42,43,.10);
  --shadow-lg:0 18px 44px rgba(31,42,43,.12);

  --radius-sm:8px;
  --radius-md:12px;
  --radius-lg:16px;
  --radius-xl:20px;

  --dashboard-dark:#ffffff;
  --dashboard-card:#ffffff;
  --dashboard-accent:#199588;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

html{
  scroll-behavior:smooth;
}

html,
body{
  margin:0;
  padding:0;
  min-height:100%;
  background:#ffffff;
  color:var(--ink);
  font:14px/1.5 system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
}

body{
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}

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

a:hover{
  text-decoration:none;
}

img{
  max-width:100%;
  height:auto;
}

h1,
h2,
h3{
  margin:0 0 10px;
  line-height:1.2;
  letter-spacing:-.02em;
  color:var(--ink);
}

h1{
  font-size:clamp(22px, 2.8vw, 30px);
}

h2{
  font-size:20px;
}

h3{
  font-size:17px;
}

p{
  margin:0 0 10px;
}

small{
  font-size:11px;
}

.container{
  width:100%;
  max-width:100%;
  margin:0;
  padding:24px;
}

.card{
  background:var(--panel);
  border:1px solid var(--line-soft);
  border-radius:var(--radius-lg);
  padding:16px;
  box-shadow:var(--shadow-md);
  margin-bottom:16px;
}

.dashboard-card-dark{
  background:var(--dashboard-card);
  border:1px solid var(--line-soft);
  border-radius:var(--radius-lg);
  padding:20px;
  box-shadow:var(--shadow-md);
}

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

.empty-state-text{
  margin:0;
  color:var(--muted);
}

/* =========================================
   GRID
   ========================================= */
.row{
  display:grid;
  grid-template-columns:repeat(12, minmax(0, 1fr));
  gap:12px;
}

.col-1{grid-column:span 1}
.col-2{grid-column:span 2}
.col-3{grid-column:span 3}
.col-4{grid-column:span 4}
.col-5{grid-column:span 5}
.col-6{grid-column:span 6}
.col-7{grid-column:span 7}
.col-8{grid-column:span 8}
.col-9{grid-column:span 9}
.col-10{grid-column:span 10}
.col-11{grid-column:span 11}
.col-12{grid-column:span 12}

/* =========================================
   FORMS
   ========================================= */
label{
  display:block;
  margin:0 0 6px;
  color:var(--ink-soft);
  font-size:13px;
  font-weight:500;
}

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

input,
select,
textarea{
  width:100%;
  background:var(--surface);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:9px 11px;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

textarea{
  min-height:100px;
  resize:vertical;
}

input::placeholder,
textarea::placeholder{
  color:var(--ink-muted);
}

input:focus,
select:focus,
textarea:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(25,149,136,.16);
}

.app-form{
  align-items:end;
}

.form-field label{
  display:block;
  margin:0 0 6px;
}

.form-actions{
  margin-top:10px;
}

.form-panels{
  align-items:start;
}

.form-field--action{
  display:flex;
  align-items:flex-end;
}

.inline-form{
  display:inline;
}

.form-helper-text{
  display:block;
  margin-top:4px;
  font-size:11px;
  color:var(--muted);
}

/* =========================================
   BUTTONS
   ========================================= */
.actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:auto;
  min-height:40px;
  padding:9px 14px;
  border-radius:var(--radius-sm);
  border:1px solid var(--line-strong);
  background:var(--secondary);
  color:#ffffff;
  text-decoration:none;
  cursor:pointer;
  transition:transform .12s ease, opacity .12s ease, border-color .12s ease, filter .12s ease, background .12s ease;
}

.btn:hover{
  transform:translateY(-1px);
  opacity:.98;
  filter:brightness(1.03);
}

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

.btn-ghost{
  background:#ffffff;
  border:1px dashed var(--line-strong);
  color:var(--ink);
}

.btn-success{
  background:var(--success);
  border-color:var(--success);
  color:var(--success-ink);
}

.btn-danger{
  background:var(--danger);
  border-color:var(--danger);
  color:var(--danger-ink);
}

.btn-icon{
  width:38px;
  height:38px;
  padding:0;
  border-radius:8px;
  background:var(--secondary);
  border:1px solid var(--secondary);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex-shrink:0;
  transition:transform .12s ease, opacity .12s ease, border-color .12s ease, filter .12s ease, background .12s ease;
  color:#ffffff;
}

.btn-icon svg{
  width:17px;
  height:17px;
  flex-shrink:0;
}

.btn-icon:hover{
  transform:translateY(-1px);
  opacity:.98;
  filter:brightness(1.03);
}

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

.btn-icon.btn-success{
  background:var(--success);
  border-color:var(--success);
  color:#ffffff;
}

.btn-icon.btn-danger{
  background:var(--danger);
  border-color:var(--danger);
  color:#ffffff;
}

.btn-icon.btn-ghost{
  background:#ff8800;
  border:1px dashed var(--line-strong);
  color:var(--ink);
}

.btn-icon--xl{
  width:48px;
  height:48px;
  border-radius:10px;
}

.btn-icon--xl svg{
  width:20px;
  height:20px;
}

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

.btn-protokoll-wide{
  width:100%;
  padding:11px 14px;
  font-size:14px;
  border-radius:8px;
  background:var(--accent);
  border:0;
  color:var(--accent-ink);
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin-top:14px;
  font-weight:600;
  cursor:pointer;
  transition:transform .12s ease, opacity .12s ease;
}

.btn-protokoll-wide svg{
  width:17px;
  height:17px;
}

.btn-protokoll-wide:hover{
  opacity:.94;
  transform:translateY(-1px);
}

/* =========================================
   ACCESSIBILITY
   ========================================= */
.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,1,1);
  white-space:nowrap;
  border:0;
}

/* =========================================
   FLASH
   ========================================= */
.flash{
  padding:11px 13px;
  border-radius:10px;
  background:#ecfdf5;
  color:#166534;
  border:1px solid rgba(22,163,74,.18);
  margin-bottom:12px;
}

.flash-err{
  background:#fef2f2;
  color:#b91c1c;
  border-color:rgba(220,38,38,.18);
}

/* =========================================
   BADGES
   ========================================= */
.badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:3px 9px;
  border-radius:999px;
  background:#eef3f3;
  color:var(--secondary);
  font-size:11px;
  font-weight:600;
  line-height:1.2;
}

.badge-link{
  text-decoration:none;
}

.badge-success{
  background:#dcfce7;
  color:#166534;
}

.badge-danger{
  background:#fee2e2;
  color:#b91c1c;
}
.badge-request{
  background:#fff7ed;
  color:#b45309;
}
.badge-neutral{
  background:#eceff0;
  color:#485253;
}

.badge-info{
  background:#dff5f2;
  color:var(--accent);
}

/* =========================================
   TABLES
   ========================================= */
.table-wrapper{
  overflow-x:auto;
}

.table{
  width:100%;
  border-collapse:collapse;
  min-width:1200px;
}

.table th,
.table td{
  border-bottom:1px solid var(--line);
  padding:9px 8px;
  text-align:left;
  vertical-align:top;
  color:var(--ink);
  font-size:13px;
}

.table thead th{
  color:var(--secondary);
  font-weight:600;
  font-size:13px;
  background:#f7f9f9;
  position:sticky;
  top:0;
}

.data-table{
  min-width:820px;
}

.table-actions-col{
  width:120px;
}

.table-actions{
  justify-content:flex-start;
  align-items:center;
}

/* =========================================
   APP HEADER
   ========================================= */
.app-header{
  padding:18px 22px;
  background:#ffffff;
}

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

.app-header__brand{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
}

.app-header__logo{
  max-height:60px;      /* maximale Höhe */
  max-width:180px;      /* maximale Breite */

  width:auto;
  height:auto;

  object-fit:contain;
  flex-shrink:0;
}

.app-header__logo-placeholder{
  width:64px;
  height:64px;
  border:1px dashed #c7d1d4;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#f8fbfb;
  color:#7b878c;
  font-size:13px;
  flex-shrink:0;
}

.app-header__text{
  min-width:0;
}

.app-header__title{
  margin:0;
  font-size:28px;
  line-height:1.15;
}

.app-header__subtitle{
  margin-top:6px;
  font-size:14px;
  color:#6b757a;
}

@media (max-width:640px){
  .app-header__brand{
    gap:12px;
  }

  .app-header__logo,
  .app-header__logo-placeholder{
    width:48px;
    height:48px;
  }

  .app-header__title{
    font-size:22px;
  }

  .app-header__subtitle{
    font-size:13px;
  }
}
/* =========================================
   APP NAVIGATION
   ========================================= */
.app-nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
  padding:14px;
  background:#ffffff;
}

.app-nav__link{
  display:inline-flex;
  align-items:center;
  justify-content:flex-start;
  gap:10px;
  flex:0 0 auto;
  width:auto;
  min-width:max-content;
  max-width:100%;
  height:42px;
  padding:0 14px;
  border-radius:8px;
  background:#ffffff;
  border:1px solid var(--line-strong);
  box-shadow:var(--shadow-sm);
  color:var(--secondary);
  text-decoration:none;
  white-space:nowrap;
  line-height:1;
  transition:transform .12s ease, filter .12s ease, border-color .12s ease, background .12s ease;
}

.app-nav__link:hover{
  transform:translateY(-1px);
  filter:brightness(1.01);
  border-color:var(--accent);
  background:#f7fbfb;
}

.app-nav__link:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:3px;
}

.app-nav__link svg{
  width:17px;
  height:17px;
  flex:0 0 17px;
  display:block;
  color:var(--accent);
}

.app-nav__label{
  display:inline-block;
  flex:0 0 auto;
  font-size:13px;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
}

.app-nav a,
.app-nav a span,
.app-nav a svg{
  vertical-align:middle;
}

/* =========================================
   PAGE SECTIONS
   ========================================= */
.page-section{
  padding:18px;
}

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

.page-section__title{
  margin:0;
  font-size:20px;
  line-height:1.2;
  color:var(--ink);
}

.page-section--center{
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  min-height:180px;
}

/* =========================================
   DASHBOARD
   ========================================= */
.dashboard-container{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.dashboard-container--modern{
  display:flex;
  flex-direction:column;
  gap:20px;
}

.dashboard-section{
  padding:20px;
}

.dashboard-hero__top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  flex-wrap:wrap;
}

.dashboard-hero__text{
  margin:8px 0 0;
  color:var(--ink-soft);
  line-height:1.5;
}

.dashboard-role-badge{
  display:inline-flex;
  align-items:center;
  padding:8px 12px;
  border-radius:999px;
  background:var(--panel-soft);
  border:1px solid var(--line);
  color:var(--secondary);
  font-size:13px;
  font-weight:600;
}

.dashboard-quicklinks{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:18px;
}

.dashboard-quicklink{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 14px;
  border-radius:12px;
  background:#ffffff;
  border:1px solid var(--line);
  color:var(--ink);
  text-decoration:none;
  font-weight:600;
  transition:all .18s ease;
}

.dashboard-quicklink:hover{
  border-color:var(--accent);
  color:var(--accent);
  background:#f7fbfb;
}

.kpi-row{
  display:flex;
  gap:16px;
  flex-wrap:wrap;
}

.kpi-card{
  flex:1;
  min-width:220px;
  background:#ffffff;
  padding:20px 24px;
  border-radius:16px;
  box-shadow:var(--shadow-md);
  border:1px solid var(--line-soft);
  transition:transform .2s ease, box-shadow .2s ease;
}

.kpi-card:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow-lg);
}

.kpi-card--warn{
  border:1px solid rgba(220,38,38,.18);
}

.kpi-value{
  font-size:36px;
  font-weight:700;
  color:var(--accent);
  margin-bottom:6px;
}

.kpi-label{
  color:var(--secondary);
  font-size:13px;
  opacity:.9;
}

.next-trip-card{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:18px;
  align-items:start;
  padding:18px;
  border:1px solid var(--line-soft);
  border-radius:18px;
  background:#ffffff;
}

.next-trip-card__date{
  border-radius:16px;
  background:var(--panel-soft);
  padding:16px 14px;
  text-align:center;
}

.next-trip-card__day{
  font-size:16px;
  font-weight:700;
  color:var(--ink);
}

.next-trip-card__time{
  margin-top:6px;
  font-size:24px;
  font-weight:700;
  color:var(--accent);
}

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

.next-trip-card__route{
  font-size:20px;
  font-weight:700;
  color:var(--ink);
  line-height:1.3;
}

.next-trip-card__meta{
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px 18px;
  margin-top:14px;
}

.next-trip-card__actions{
  margin-top:18px;
}

.trip-group + .trip-group{
  margin-top:24px;
}

.trip-group__title{
  margin:0 0 12px;
  font-size:18px;
  color:var(--ink);
}

.trip-list{
  display:flex;
  flex-direction:column;
  gap:14px;
  margin-top:14px;
}

.trip-card{
  background:#ffffff;
  border-radius:14px;
  padding:16px 20px;
  display:flex;
  gap:20px;
  border:1px solid var(--line-soft);
  box-shadow:var(--shadow-sm);
  align-items:stretch;
}

.trip-card--structured{
  display:grid;
  grid-template-columns:90px 1fr;
  gap:16px;
}

.trip-left{
  width:28%;
  min-width:140px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
}

.trip-right{
  width:72%;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}

.trip-card__topline{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-bottom:10px;
}

.trip-date{
  font-size:24px;
  font-weight:600;
  color:var(--accent);
}

.trip-time{
  margin-top:4px;
  font-size:16px;
  color:var(--ink);
}

.trip-title{
  font-size:18px;
  font-weight:600;
  color:var(--ink);
  margin-bottom:4px;
}

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

.trip-line{
  font-size:14px;
  color:var(--secondary);
}

.trip-line.small{
  font-size:12px;
  opacity:.75;
}

.trip-arrow,
.trip-title .trip-arrow{
  color:var(--accent);
  font-weight:700;
}

.trip-status{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}

.trip-status--success{
  background:#ecfdf3;
  color:#027a48;
}

.trip-status--info{
  background:#eff8ff;
  color:#175cd3;
}

.trip-status--warning{
  background:#fffaeb;
  color:#b54708;
}

.trip-status--danger{
  background:#fef3f2;
  color:#b42318;
}

.trip-status--neutral{
  background:#f4f4f5;
  color:#52525b;
}
/* =========================================
   LOGIN
   ========================================= */

.login-wrap{
  width:100%;
  display:flex;
  justify-content:center;
  align-items:center;
  padding:60px 16px;
}
.login-box{
  width:100%;
  max-width:420px;
  margin:0 auto;

  background:#ffffff;
  border:1px solid rgba(72,82,83,0.14);
  border-radius:20px;
  box-shadow:0 18px 50px rgba(0,0,0,0.08);

  padding:28px 24px;
}
.login-box__header{
  text-align:center;
  margin-bottom:22px;
}

.login-logo{
  display:block;
  max-width:120px;
  max-height:80px;
  width:auto;
  height:auto;
  margin:0 auto 14px;
}

.login-logo-placeholder{
  width:90px;
  height:90px;
  margin:0 auto 14px;
  border:1px dashed #c7d1d4;
  border-radius:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#7b878c;
  font-size:14px;
  background:#f8fbfb;
}

.login-title{
  margin:0;
  font-size:28px;
  font-weight:700;
  color:#1f2a2e;
}

.login-error{
  margin:0 0 18px;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid rgba(220,38,38,0.18);
  background:#fff1f1;
  color:#b42318;
  font-size:14px;
  text-align:center;
}

.login-form{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.login-form .form-field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.login-form label{
  font-size:14px;
  font-weight:600;
  color:#1f2a2e;
}

.login-form input{
  width:100%;
  min-height:46px;
  padding:0 14px;
  border:1px solid #d5dde0;
  border-radius:12px;
  background:#ffffff;
  font-size:14px;
  color:#1f2a2e;
  outline:none;
  transition:border-color 0.18s ease, box-shadow 0.18s ease;
}

.login-form input:focus{
  border-color:#199588;
  box-shadow:0 0 0 4px rgba(25,149,136,0.12);
}

.btn-login{
  width:100%;
  min-height:46px;
  margin-top:4px;
  font-weight:700;
  border-radius:12px;
}

.login-help{
  margin:4px 0 0;
  font-size:13px;
  color:#6b757a;
  text-align:center;
  line-height:1.5;
}

@media (max-width:640px){
  .login-wrap{
    min-height:auto;
    padding:20px 12px;
    align-items:flex-start;
  }

  .login-box{
    max-width:100%;
    padding:22px 18px;
    border-radius:16px;
  }

  .login-title{
    font-size:24px;
  }

  .login-logo-placeholder{
    width:76px;
    height:76px;
    border-radius:14px;
  }
}

/* =========================================
   CHAT
   ========================================= */
.chat-page{
  min-height:100vh;
  background:#ffffff;
}

.chat-shell{
  width:min(960px, 100%);
  margin:0 auto;
  padding:24px;
}

.chat-layout{
  display:grid;
  grid-template-rows:auto 1fr auto;
  gap:16px;
  min-height:calc(100vh - 48px);
}

.chat-header-panel{
  background:linear-gradient(135deg, var(--accent) 0%, var(--secondary) 100%);
  color:#fff;
  border-radius:18px;
  padding:18px 20px;
  box-shadow:var(--shadow-md);
}

.chat-header-panel__eyebrow{
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
  opacity:.78;
  margin-bottom:6px;
}

.chat-header-panel__title{
  margin:0;
  font-size:clamp(22px, 3vw, 28px);
  line-height:1.15;
  color:#fff;
}

.chat-header-panel__meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:12px;
}

.chat-header-panel .badge{
  background:rgba(255,255,255,.18);
  color:#fff;
}

.chat-box{
  background:#ffffff;
  border-radius:18px;
  padding:16px;
  overflow-y:auto;
  min-height:360px;
  max-height:62vh;
  box-shadow:var(--shadow-md);
  border:1px solid var(--line-soft);
}

.chat-msg{
  width:fit-content;
  max-width:min(70%, 560px);
  padding:9px 12px;
  margin-bottom:10px;
  border-radius:12px;
  background:#eef3f3;
  color:var(--ink);
  line-height:1.45;
  word-break:break-word;
  font-size:13px;
}

.chat-me{
  margin-left:auto;
  background:var(--accent);
  color:#fff;
}

.chat-input{
  display:flex;
  gap:10px;
  margin-top:10px;
}

.chat-input-bar{
  display:flex;
  gap:12px;
  align-items:center;
  background:#ffffff;
  border:1px solid var(--line-soft);
  border-radius:18px;
  padding:10px;
  box-shadow:var(--shadow-sm);
}

.chat-input-field{
  width:auto;
  flex:1;
  min-width:0;
  background:#ffffff;
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:12px;
  padding:11px 13px;
}

.chat-input-field::placeholder{
  color:var(--ink-muted);
}

.chat-send-button{
  width:auto;
  flex:0 0 auto;
  padding:11px 16px;
  border-radius:12px;
  border:0;
  background:var(--accent);
  color:#fff;
  font-weight:600;
  cursor:pointer;
  transition:transform .12s ease, opacity .12s ease;
}

.chat-send-button:hover{
  opacity:.95;
  transform:translateY(-1px);
}

.chat-state-card{
  max-width:520px;
  margin:12vh auto 0;
  text-align:center;
}

.chat-state-title{
  margin:0 0 10px;
  font-size:24px;
  color:var(--ink);
}

.chat-state-text{
  margin:0;
  color:var(--muted);
}

/* =========================================
   CUSTOMERS
   ========================================= */
.page-layout{
  align-items:start;
}

.customer-table{
  min-width:980px;
}

.details-row{
  display:none;
}

.details-row.is-open{
  display:table-row;
}

.customer-details{
  padding:8px 0 4px;
}

.details-block{
  padding:13px 14px;
  background:#ffffff;
  border:1px solid var(--line);
  border-radius:12px;
}

.details-block + .details-block{
  margin-top:14px;
}

.details-block__label{
  display:inline-flex;
  align-items:center;
  margin-bottom:10px;
  padding:4px 10px;
  border-radius:999px;
  background:#eef3f3;
  color:var(--secondary);
  font-size:11px;
  font-weight:600;
}

.details-block__label--spaced{
  margin-top:2px;
}

.details-item{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:8px 0;
  border-bottom:1px solid rgba(72,82,83,.10);
}

.details-item:last-of-type{
  border-bottom:0;
}

.details-item__text{
  min-width:0;
  color:var(--ink);
  word-break:break-word;
  font-size:13px;
}

.customer-subform{
  margin-top:10px;
}

.customer-subform--edit{
  background:#f7f9f9;
  border:1px solid var(--line);
  border-radius:10px;
  padding:10px;
}

/* =========================================
   RESERVATION
   ========================================= */
.reservation-form{
  align-items:end;
}

.reservation-form__action{
  display:flex;
  align-items:flex-end;
}

/* =========================================
   TRIP LOG
   ========================================= */
.trip-log-page{
  background:#ffffff;
  color:var(--ink);
}

.trip-log-page .page-section__title,
.trip-log-page .proto-block__title,
.trip-log-page label,
.trip-log-page p,
.trip-log-page strong{
  color:var(--ink);
}

.trip-log-page input,
.trip-log-page textarea,
.trip-log-page select{
  background:#ffffff;
  color:var(--ink);
  border:1px solid var(--line);
}

.trip-log-page .btn{
  background:var(--secondary);
  border:1px solid var(--secondary);
  color:#fff;
}

.trip-log-page .btn-primary{
  background:var(--accent);
  color:#fff;
}

.trip-log-page .btn-primary:hover{
  background:var(--accent-strong);
}

.proto-block{
  background:#ffffff;
  padding:14px;
  border-radius:10px;
  border:1px solid var(--line);
  margin-bottom:18px;
}

.proto-block__title{
  margin:0 0 10px;
}

.trip-log-details p{
  margin:0 0 9px;
}

.trip-log-detail-group{
  margin-bottom:10px;
}

.trip-log-inline-actions{
  display:flex;
  gap:10px;
  margin-top:10px;
  flex-wrap:wrap;
}

.signature-canvas{
  display:block;
  max-width:100%;
  border:1px solid var(--line);
  background:#fff;
  border-radius:6px;
}

.trip-log-signature-note{
  color:var(--success-strong);
  margin:10px 0 0;
}

.save-bar{
  position:sticky;
  bottom:0;
  background:#ffffff;
  padding:12px;
  text-align:center;
  border-top:1px solid var(--line);
  margin-top:20px;
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
  z-index:5;
}

.payment-highlight{
  background:#f7fbfb;
  border:2px solid var(--accent);
  border-radius:12px;
  padding:16px;
  margin-top:14px;
}

.payment-highlight__label{
  font-size:.9rem;
  color:var(--secondary);
  margin-bottom:8px;
  font-weight:700;
}

.payment-highlight__amount{
  font-size:2rem;
  font-weight:800;
  color:var(--accent);
  line-height:1.1;
}

.payment-highlight__hint{
  margin-top:8px;
  font-size:.9rem;
  color:var(--secondary);
}

.price-breakdown{
  margin-top:10px;
  padding-top:10px;
  border-top:1px dashed var(--accent);
  color:var(--secondary);
  font-size:.9rem;
}

.passenger-list{
  margin:0;
  padding-left:20px;
}

.passenger-list li{
  margin-bottom:6px;
}

.trip-log-chat-box{
  height:300px;
}

/* =========================================
   TRIP LOG VIEW
   ========================================= */
.proto-card-dark{
  background:#ffffff;
  border-radius:14px;
  padding:16px;
  margin-bottom:18px;
  border:1px solid var(--line);
}

.proto-card-dark__title{
  margin:0 0 12px;
  color:var(--ink);
}

.proto-line{
  margin-bottom:9px;
  color:var(--ink);
}

.proto-text-block{
  color:var(--ink);
  line-height:1.55;
}

.proto-media-block + .proto-media-block{
  margin-top:16px;
}

.proto-img{
  width:min(280px, 100%);
  border-radius:8px;
  margin:10px 0 0;
  border:1px solid var(--line);
  display:block;
}

/* =========================================
   TRIPS
   ========================================= */
.trip-create-toggle-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin-bottom:18px;
  flex-wrap:wrap;
}

.trip-page-title{
  margin:0;
}

.trip-create-toggle-btn{
  display:inline-flex;
  align-items:center;
  gap:10px;
  width:auto !important;
  flex:0 0 auto;
  padding:10px 18px;
  border-radius:999px;
  background:linear-gradient(135deg,var(--accent),var(--secondary));
  color:#fff;
  font-weight:600;
  font-size:13px;
  border:none;
  cursor:pointer;
  box-shadow:var(--shadow-sm);
  transition:transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.trip-create-toggle-btn:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow-md);
  filter:brightness(1.03);
}

.trip-create-toggle-btn:active{
  transform:translateY(0);
  box-shadow:var(--shadow-sm);
}

.trip-create-toggle-btn .icon-chevron{
  transition:transform .25s ease;
}

.trip-create-toggle-btn.is-open .icon-chevron{
  transform:rotate(180deg);
}

.trip-create-panel{
  display:none;
  margin:16px 0 22px;
  padding:18px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#ffffff;
  box-shadow:var(--shadow-sm);
}

.trip-create-panel.is-open{
  display:block;
}

.trip-panel-title{
  margin:0 0 14px;
  font-weight:600;
  color:var(--ink);
}

.trip-pax-container{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.trip-pax-select{
  margin-bottom:0;
}

.address-helper-select{
  margin-bottom:6px;
}

.trips-table{
  min-width:1800px;
}

.trip-row--cancelled{
  color:var(--danger);
}

/* =========================================
   USERS
   ========================================= */
.user-list{
  gap:14px;
}

.user-card{
  align-items:center;
}

.user-card__identity{
  width:24%;
  min-width:180px;
}

.user-card__actions{
  margin-left:auto;
  align-items:center;
  justify-content:flex-end;
}

.role-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  margin-top:8px;
}

.role-badge--dispatcher{
  background:#dff5f2;
  color:var(--accent);
}

.role-badge--driver{
  background:#eef3f3;
  color:var(--secondary);
}

.role-badge--customer{
  background:#dcfce7;
  color:#166534;
}

.role-badge--default{
  background:#eceff0;
  color:var(--secondary);
}

.users-form-actions{
  margin-top:14px;
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 1100px){
  .customer-table{
    min-width:860px;
  }
}

@media (max-width: 900px){
  .col-6,
  .col-3,
  .col-9,
  .col-7,
  .col-5,
  .col-8,
  .col-2,
  .col-1{
    grid-column:span 12;
  }

  .data-table{
    min-width:720px;
  }

  .trip-create-toggle-row{
    align-items:flex-start;
  }

  .details-item{
    align-items:flex-start;
  }

  .form-field--action{
    align-items:flex-start;
  }

  .page-section--center{
    min-height:auto;
  }
}

@media (max-width: 860px){
  .kpi-row{
    flex-direction:column;
  }

  .trip-card{
    flex-direction:column;
    gap:14px;
  }

  .trip-left,
  .trip-right{
    width:100%;
  }

  .trip-left{
    min-width:0;
  }

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

  .user-card__identity,
  .user-card__actions{
    width:100%;
    min-width:0;
  }

  .user-card__actions{
    margin-left:0;
    justify-content:flex-start;
  }
}
@media (max-width: 640px){
  .container{
    padding:16px;
  }

  .app-header{
    padding:16px;
  }

  .app-nav{
    gap:8px;
    padding:12px;
  }

  .app-nav__link{
    width:100%;
    min-width:0;
    justify-content:flex-start;
  }

  .chat-shell{
    padding:16px;
  }

  .chat-layout{
    min-height:calc(100vh - 32px);
    gap:12px;
  }

  .chat-box{
    min-height:300px;
    max-height:none;
  }

  .chat-msg{
    max-width:88%;
  }

  .chat-input-bar{
    gap:10px;
    padding:10px;
  }

  .chat-send-button{
    padding:11px 15px;
  }
}

@media (max-width: 600px){
  .trip-log-page .btn-primary{
    width:100%;
  }

  .payment-highlight__amount{
    font-size:1.6rem;
  }

  .save-bar{
    justify-content:stretch;
  }

  .save-bar .btn{
    width:100%;
  }
}