/* Searlane Cockpit – Design nach Grillardor-Plattform-Prototyp */
:root {
  --ink: #181614;
  --paper: #f4f0ea;
  --card: #fdfcfa;
  --line: #e5ded3;
  --line-soft: #f0eae1;
  --muted: #6f6a63;
  --faint: #8a847b;
  --flame: #ce5533;
  --flame-dark: #a83f22;
  --sage: #9aa58c;
  --sage-dark: #5d6b4f;
  --sand: #d1b499;
  --coal: #141311;
  --coal-2: #1d1b18;
  --coal-3: #26241f;
  --coal-line: #2b2926;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--paper); }
body { font-family: 'Albert Sans', sans-serif; color: var(--ink); font-size: 14px; }
a { color: var(--flame); text-decoration: none; }
a:hover { color: var(--flame-dark); text-decoration: underline; }
::selection { background: var(--flame); color: #fff; }
h1, h2, h3, .display { font-family: 'Sora', sans-serif; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--coal); }
.login-card { width: 360px; background: var(--coal-2); border: 1px solid var(--coal-line); border-radius: 12px; padding: 36px; }
.login-card img { width: 170px; display: block; filter: invert(1); margin-bottom: 8px; }
.login-tagline { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--flame); margin-bottom: 28px; }
.login-card label { display: block; font-size: 12px; color: #a9a49c; margin-bottom: 6px; }
.login-card input, .login-card select {
  width: 100%; padding: 11px 12px; border-radius: 6px; border: 1px solid #3a3733;
  background: var(--coal); color: var(--paper); font-size: 14px; font-family: inherit; margin-bottom: 16px;
}
.login-card select { margin-bottom: 24px; }
.login-hint { font-size: 11px; color: #7d7a74; margin-top: 18px; line-height: 1.6; }
.login-error { font-size: 12px; color: #e08a6d; margin-top: 12px; }

/* ---------- Layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 224px; flex-shrink: 0; background: var(--coal); color: var(--paper); display: flex; flex-direction: column; padding: 28px 0; }
.sidebar-brand { padding: 0 24px 24px; border-bottom: 1px solid var(--coal-line); }
.sidebar-brand img { width: 150px; display: block; filter: invert(1); }
.sidebar-brand div { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--flame); margin-top: 10px; }
.nav { display: flex; flex-direction: column; gap: 2px; padding: 18px 12px; }
.nav-item { padding: 11px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; color: #a9a49c; border-left: 3px solid transparent; }
.nav-item:hover { background: var(--coal-3); }
.nav-item.active { background: var(--coal-3); color: var(--paper); border-left-color: var(--flame); }
.sidebar-footer { margin-top: auto; padding: 18px 24px 0; border-top: 1px solid var(--coal-line); font-size: 11px; line-height: 1.7; color: #7d7a74; }
.sidebar-footer .group-label { color: var(--sage); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 10px; margin-bottom: 6px; }
.userbox { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--coal-line); display: flex; align-items: center; gap: 9px; }
.avatar { width: 30px; height: 30px; flex-shrink: 0; border-radius: 99px; background: var(--flame); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 12px; }
.userbox .who { flex: 1; min-width: 0; }
.userbox .who .name { color: var(--paper); font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox .who .role { font-size: 10px; }
.logout { cursor: pointer; color: #a9a49c; font-size: 11px; }
.logout:hover { color: var(--flame); }
.pw-link { cursor: pointer; color: #7d7a74; font-size: 10px; margin-top: 2px; }
.pw-link:hover { color: var(--flame); }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20, 19, 17, .55); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { width: 380px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 28px 30px; }
.modal h2 { font-weight: 600; font-size: 17px; margin: 0 0 4px; }
.modal .cardsub { font-size: 12px; color: var(--faint); margin: 0 0 18px; }
.modal label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.modal input { width: 100%; padding: 10px 12px; border: 1px solid #cfc7bb; border-radius: 6px; font-size: 14px; font-family: inherit; margin-bottom: 14px; background: #fff; }

.main { flex: 1; min-width: 0; padding: 28px 34px 48px; }
.page-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-head h1 { font-weight: 600; font-size: 24px; margin: 0; }
.page-head .sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.page-head .actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.flash { font-size: 12px; color: var(--sage-dark); background: #e4e8dd; border: 1px solid var(--sage); padding: 6px 12px; border-radius: 6px; }

/* ---------- Chips & Buttons ---------- */
.chiprow { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.chiprow .rowlabel { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
.chip { font-size: 13px; font-weight: 500; padding: 6px 13px; border-radius: 99px; cursor: pointer; border: 1px solid #cfc7bb; background: var(--card); color: var(--ink); }
.chip.active { background: var(--coal); color: var(--paper); border-color: var(--coal); }
.chip.wg { font-size: 12px; padding: 5px 12px; color: var(--muted); border-color: #dcd4c8; }
.chip.wg.active { background: var(--sage); color: #fff; border-color: var(--sage); }
.legend { margin-left: auto; display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 99px; margin-right: 5px; }

.btn { display: inline-block; padding: 9px 18px; border: none; border-radius: 6px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-primary { background: var(--flame); color: #fff; }
.btn-primary:hover { background: var(--flame-dark); }
.btn-dark { background: var(--coal); color: #fff; }
.btn-dark:hover { background: var(--coal-line); }
.btn-ghost { font-size: 13px; font-weight: 600; padding: 9px 16px; border-radius: 6px; border: 1px solid #cfc7bb; background: var(--card); cursor: pointer; color: var(--ink); }
.btn-ghost:hover { border-color: var(--flame); color: var(--flame); }
.btn-receive { font-size: 12px; font-weight: 600; color: var(--sage-dark); cursor: pointer; border: 1px solid var(--sage); border-radius: 6px; padding: 4px 10px; background: #f2f4ee; }
.btn-receive:hover { background: #e4e8dd; }

/* ---------- Karten & KPIs ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; }
.card h2 { font-weight: 600; font-size: 15px; margin: 0 0 16px; }
.card .cardsub { font-size: 12px; color: var(--faint); margin: -12px 0 16px; }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; }
.kpi .label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpi .value { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 26px; margin-top: 8px; }
.kpi .sub { font-size: 12px; color: var(--faint); margin-top: 4px; }

.grid-2 { display: grid; grid-template-columns: minmax(320px, 3fr) minmax(260px, 2fr); gap: 14px; margin-bottom: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.grid-orders { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 900px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Charts ---------- */
.month-chart { display: flex; align-items: flex-end; gap: 8px; height: 150px; }
.month-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.month-col .val { font-size: 10px; color: var(--faint); }
.month-col .bar { width: 100%; border-radius: 4px 4px 0 0; background: var(--sand); }
.month-col .bar.current { background: var(--flame); }
.month-col .lab { font-size: 10px; color: var(--muted); }
.hbar-track { height: 9px; border-radius: 99px; background: #eee8de; overflow: hidden; }
.hbar-track.tall { height: 14px; }
.hbar { height: 100%; border-radius: 99px; }
.hbar-row { margin-bottom: 11px; }
.hbar-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 4px; }

/* ---------- Listen & Tabellen ---------- */
.rank-row { display: flex; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); font-size: 13px; }
.rank-num { font-family: 'Sora', sans-serif; font-weight: 600; color: var(--flame); width: 20px; }

.table { background: var(--card); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.table-scroll { overflow-x: auto; }
.lager-cols { display: grid; grid-template-columns: 80px minmax(160px, 2fr) 90px 90px 62px 96px 96px 90px 88px 110px; gap: 0 12px; min-width: 980px; }
.table-head { padding: 12px 18px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); background: #f8f5f0; }
.table-row { padding: 11px 18px; font-size: 13px; border-bottom: 1px solid var(--line-soft); align-items: center; background: var(--card); }
.table-row.low { background: #fdf6f3; }
.t-r { text-align: right; }
.badge { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.badge.clickable { cursor: pointer; }
.badge-neu { background: #f7ddd4; color: var(--flame-dark); }
.badge-bestaetigt { background: #f0e4d5; color: #8a6538; }
.badge-versendet { background: #e4e8dd; color: var(--sage-dark); }
.badge-erledigt { background: #eee8de; color: var(--faint); }
.badge-eta { background: #eee8de; color: var(--muted); }

.order-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid #eee8de; border-radius: 8px; font-size: 13px; background: #fff; }
.container-row { padding: 13px 16px; border: 1px solid #eee8de; border-radius: 8px; background: #fff; }
.form-section { border-top: 1px solid #eee8de; padding-top: 16px; }
.form-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.form-row select, .form-row input { padding: 9px 10px; border: 1px solid #cfc7bb; border-radius: 6px; font-size: 13px; font-family: inherit; background: #fff; }
.footnote { font-size: 12px; color: var(--faint); margin-top: 12px; line-height: 1.7; }
.footnote code { font-family: monospace; background: #eee8de; padding: 1px 6px; border-radius: 4px; }
