/* STRIM Portal – gemeinsames Stylesheet (eCrome Group Design) */
:root {
  --red: #E30613; --red-dark: #b8050f; --red-soft: #fdecec;
  --ink: #2f2f33; --ink-2: #55565b; --muted: #8a8b90; --line: #e6e6e9; --line-2: #f0f0f2;
  --bg: #f6f6f7; --card: #ffffff; --side: #ffffff;
  --ok: #1f8a4c; --ok-soft: #e7f5ec; --warn: #b45309; --warn-soft: #fdf3e2; --info: #1d5fa8; --info-soft: #e8f0fb;
  --radius: 10px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--red); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 16px; margin: 0 0 10px; font-weight: 650; }
h3 { font-size: 14px; margin: 0 0 8px; font-weight: 650; color: var(--ink-2); text-transform: uppercase; letter-spacing: .04em; }
small, .muted { color: var(--muted); }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
[hidden] { display: none !important; }

/* Logo */
.logo { font-weight: 800; font-size: 19px; letter-spacing: -.02em; white-space: nowrap; }
.logo .e { color: var(--red); } .logo .g { color: #8d8e92; font-weight: 700; }
.logo sup { font-size: 10px; }

/* Layout */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--side) 236px, var(--bg) 236px); }
.side { background: var(--side); border-right: 1px solid var(--line); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.side .logo { padding: 2px 10px 4px; }
.side .product { padding: 0 10px 16px; color: var(--muted); font-size: 12px; border-bottom: 1px solid var(--line-2); margin-bottom: 10px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-weight: 500; margin: 1px 0; border-left: 3px solid transparent; }
.nav a:hover { background: var(--line-2); text-decoration: none; color: var(--ink); }
.nav a.active { background: var(--red-soft); color: var(--red-dark); border-left-color: var(--red); }
.nav a .cnt { margin-left: auto; background: var(--red); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11.5px; font-weight: 700; }
.nav .sep { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 14px 10px 4px; }
.nav svg { width: 17px; height: 17px; flex: none; }
.side .me { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid var(--line-2); font-size: 13px; }
.side .me b { display: block; } .side .me .role { color: var(--muted); font-size: 12px; }
.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar .crumbs { color: var(--muted); font-size: 13px; }
.topbar .crumbs a { color: var(--muted); }
.topbar .spacer { flex: 1; }
.content { padding: 24px 28px 60px; max-width: 1400px; }
.pagehead { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.pagehead .sub { color: var(--muted); margin-top: 3px; }
.pagehead .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.menu-btn { display: none; }

/* Cards, grid */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 16px; }
.grid > .card { margin-top: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card .card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card .card-head h2 { margin: 0; } .card .card-head .actions { margin-left: auto; display: flex; gap: 6px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .g21 { grid-template-columns: 2fr 1fr; } .g12 { grid-template-columns: 1fr 2fr; }
.kpi { padding: 16px 18px; } .kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.kpi .l { color: var(--muted); font-size: 13px; } .kpi .s { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.kpi.alert .v { color: var(--red); }
.progress { height: 8px; background: var(--line-2); border-radius: 6px; overflow: hidden; margin-top: 8px; }
.progress > i { display: block; height: 100%; background: var(--red); border-radius: 6px; }
.progress.ok > i { background: var(--ok); }

/* Definition lists */
.dl { display: grid; grid-template-columns: 150px 1fr; gap: 7px 14px; font-size: 14px; }
.dl dt { color: var(--muted); } .dl dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.dl dd select { max-width: 100%; }

/* Tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: #fafafb; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: #fbfbfc; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .nowrap { white-space: nowrap; }
.tbl td.wide { min-width: 230px; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.badge.red { background: var(--red-soft); color: var(--red-dark); } .badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); } .badge.info { background: var(--info-soft); color: var(--info); }
.badge.dark { background: var(--ink); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; background: var(--muted); }
.dot.red { background: var(--red); } .dot.ok { background: var(--ok); } .dot.warn { background: #e59a1a; }

/* Buttons & forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { border-color: #cfcfd4; background: #fafafa; }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; } .btn.primary:hover { background: var(--red-dark); }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--line-2); }
.btn.danger { color: var(--red-dark); } .btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
label.f { display: block; margin-bottom: 12px; } label.f > span { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; }
label.f > span i { font-weight: 400; color: var(--muted); font-style: normal; }
input, select, textarea { font: inherit; color: var(--ink); width: 100%; border: 1px solid #d6d6db; border-radius: 8px; padding: 8px 10px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(227, 6, 19, .18); border-color: var(--red); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--red); }
textarea { min-height: 80px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > * { flex: none; } .row .grow { flex: 1; min-width: 160px; } .row .spacer { flex: 1; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select { width: auto; min-width: 150px; }
.filters input[type=search] { min-width: 240px; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.fgrid .full { grid-column: 1 / -1; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--ink-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.active { color: var(--red); border-bottom-color: var(--red); } .tabs a:hover { text-decoration: none; color: var(--ink); }

/* Modal, toast */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 20, 24, .45); display: flex; align-items: flex-start; justify-content: center; z-index: 50; padding: 40px 16px; overflow-y: auto; }
.modal { background: #fff; border-radius: 12px; width: 100%; max-width: 620px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal.wide { max-width: 900px; }
.modal header { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal header h2 { margin: 0; } .modal header .x { margin-left: auto; }
.modal .body { padding: 18px 20px; } .modal footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-2); background: #fafafb; border-radius: 0 0 12px 12px; }
.toast-box { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 80; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); max-width: 380px; font-size: 13.5px; }
.toast.err { background: var(--red-dark); } .toast.ok { background: var(--ok); }
.alert { padding: 10px 14px; border-radius: 8px; background: var(--info-soft); color: var(--info); font-size: 13.5px; margin-bottom: 14px; }
.alert.warn { background: var(--warn-soft); color: var(--warn); } .alert.err { background: var(--red-soft); color: var(--red-dark); }
.alert.ok { background: var(--ok-soft); color: var(--ok); }

/* Timeline / chat */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before { content: ''; position: absolute; left: -7px; top: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--muted); }
.timeline li.status::before { border-color: var(--red); } .timeline li.out::before { border-color: var(--info); background: var(--info); }
.timeline li.in::before { border-color: var(--ok); background: var(--ok); } .timeline li.internal::before { border-color: var(--warn); }
.timeline .meta { font-size: 12px; color: var(--muted); } .timeline .txt { margin-top: 2px; white-space: pre-wrap; }
.timeline .orig { font-size: 12.5px; color: var(--muted); margin-top: 3px; border-left: 2px solid var(--line); padding-left: 8px; }
.quote { background: #fafafb; border: 1px solid var(--line-2); border-radius: 8px; padding: 12px 14px; white-space: pre-wrap; }
.quote .lang { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumbs a, .thumbs .t { width: 96px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; background: #fafafb; font-size: 12px; color: var(--muted); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }

/* Bars */
.bars .bar { display: grid; grid-template-columns: 130px 1fr 44px; gap: 10px; align-items: center; margin: 7px 0; font-size: 13px; }
.bars .bar .track { height: 10px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.bars .bar .track i { display: block; height: 100%; background: var(--red); border-radius: 6px; }
.bars .bar .n { text-align: right; color: var(--ink-2); font-variant-numeric: tabular-nums; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: linear-gradient(145deg, #2c2c30 0%, #1c1c20 100%); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art .logo .g { color: #b9babe; }
.login-art h1 { font-size: 34px; line-height: 1.15; max-width: 460px; font-weight: 700; }
.login-art p { color: #c9cacf; max-width: 440px; font-size: 15.5px; }
.login-art .stripe { position: absolute; right: -80px; top: -80px; width: 320px; height: 320px; border-radius: 50%; border: 40px solid rgba(227, 6, 19, .85); }
.login-art ul { color: #c9cacf; padding-left: 18px; max-width: 440px; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 32px; background: #fff; }
.login-form form { width: 100%; max-width: 360px; }
.login-form h2 { font-size: 22px; margin-bottom: 4px; }
.demo-box { margin-top: 22px; font-size: 12.5px; background: var(--bg); border-radius: 8px; padding: 12px; color: var(--ink-2); }
.demo-box button { margin: 3px 4px 0 0; }

.lang-switch select { width: auto; padding: 5px 8px; font-size: 13px; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--line); border-top-color: var(--red); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { padding: 40px; text-align: center; color: var(--muted); }
.qr-box svg { width: 160px; height: 160px; }
.copy { cursor: pointer; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g21, .g12 { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; background: var(--bg); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 40; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.2); }
  body.nav-open .side { transform: none; }
  .menu-btn { display: inline-flex; }
  .content { padding: 16px; } .topbar { padding: 10px 16px; }
  .g2, .g3, .g4, .fgrid { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; gap: 2px; } .dl dd { margin-bottom: 8px; }
  .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; }
  .filters input, .filters select, .filters input[type=search] { min-width: 0; width: 100%; }
}
@media print { .side, .topbar, .actions, .filters { display: none !important; } .shell { display: block; } body { background: #fff; } .card { box-shadow: none; } }
.grid + .card, .card + .grid { margin-top: 16px; }
