:root {
  /* Computent-CI: Dunkelblau #0A1D2C, Orange #FF6B05, Grau #54595F, Hellgrau #F6F6F6, Grün #009D4F */
  --brand: #FF6B05; --navy: #0A1D2C;
  --bg: #f6f6f6; --panel: #ffffff; --panel2: #f0f2f4; --text: #333333; --muted: #54595f; --line: #e1e4e8;
  --accent: #0a1d2c; --accent-weak: #fff0e5; --accent-text: #ffffff;
  --p1: #d92d20; --p2: #e8710a; --p3: #2f6fed; --p4: #7a8499;
  --ok: #007a3d; --ok-bg: #e2f5ea; --warn: #a14a00; --warn-bg: #fff1e0; --bad: #b42318; --bad-bg: #fdeceb; --info-bg: #e8f0ff;
  --shadow: 0 1px 2px rgba(10,29,44,.06), 0 1px 3px rgba(10,29,44,.08);
  --radius: 8px; --sidebar: 240px;
  --font: "sommet", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #07141f; --panel: #0e2234; --panel2: #15304a; --text: #e6ebf0; --muted: #9db0c0; --line: #1f3b55;
    --accent: #ff8b3e; --accent-weak: #3a2412; --accent-text: #0a1d2c;
    --p1: #ff6b61; --p2: #ffa257; --p3: #6ea0ff; --p4: #9aa4b8;
    --ok: #3fd18a; --ok-bg: #0f3324; --warn: #ffb866; --warn-bg: #3a2a12; --bad: #ff8a80; --bad-bg: #3d1a18; --info-bg: #14305a;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 4px; } h2 { font-size: 16px; margin: 0 0 10px; } h3 { font-size: 13px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.boot { padding: 40px; color: var(--muted); }
.muted { color: var(--muted); } .small { font-size: 12px; } .right { text-align: right; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .spread { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }

/* Shell */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--panel); border-right: 1px solid var(--line); padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 4px 8px 14px; }
.brand .logo { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-weight: 800; }
.logo-img { display: block; height: 36px; width: auto; background: #fff; border-radius: 6px; padding: 3px 6px; }
.sidebar .logo-img { height: 40px; } .brand .sub { font-size: 11px; color: var(--muted); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--text); margin-bottom: 2px; }
.nav a:hover { background: var(--panel2); text-decoration: none; } .nav a.active { background: var(--accent-weak); color: var(--accent); font-weight: 600; box-shadow: inset 3px 0 0 var(--brand); }
.nav .sec { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 14px 10px 4px; }
.nav .ico { width: 18px; text-align: center; }
.badge-count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 99px; font-size: 11px; padding: 0 7px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { border-bottom: 2px solid var(--brand) !important; display: flex; gap: 12px; align-items: center; padding: 10px 22px; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.content { padding: 22px; max-width: 1500px; width: 100%; }
.search-wrap { position: relative; flex: 1 1 320px; max-width: 520px; margin-right: auto; }
.topbar select { max-width: 210px; }
.search-wrap input { width: 100%; }
.search-results { position: absolute; top: 40px; left: 0; right: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(0,0,0,.18); padding: 8px; max-height: 420px; overflow: auto; z-index: 30; }
.search-results h4 { margin: 8px 6px 4px; font-size: 11px; color: var(--muted); text-transform: uppercase; } .search-results a { display: block; padding: 5px 8px; border-radius: 6px; color: var(--text); } .search-results a:hover { background: var(--panel2); text-decoration: none; }
.menu-btn { display: none; }

/* Controls */
input, select, textarea, button { font: inherit; color: inherit; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=month], input[type=datetime-local], input[type=search], input:not([type]), select, textarea {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; min-width: 0;
}
textarea { width: 100%; resize: vertical; min-height: 90px; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
button, .btn { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 7px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
button:hover { background: var(--panel2); } button:disabled { opacity: .5; cursor: not-allowed; }
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; } button.primary:hover { background: var(--brand); border-color: var(--brand); color: #0a1d2c; }
button.danger { color: var(--bad); } button.ghost { border-color: transparent; background: transparent; } button.ghost:hover { background: var(--panel2); } button.sm { padding: 3px 8px; font-size: 12px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.grid { display: grid; gap: 14px; } .grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: none; padding: 8px 12px; color: var(--muted); white-space: nowrap; }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.pillbar { display: flex; gap: 6px; flex-wrap: wrap; } .pillbar button { border-radius: 99px; padding: 4px 12px; font-size: 13px; } .pillbar button.active { background: var(--accent-weak); color: var(--accent); border-color: var(--accent); font-weight: 600; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 9px 12px; background: var(--panel2); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; } .tbl tbody tr:hover { background: var(--panel2); } .tbl tr.click { cursor: pointer; }
.tbl-wrap { overflow-x: auto; }
.empty { padding: 36px; text-align: center; color: var(--muted); }

/* Chips & status */
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 99px; padding: 1px 9px; font-size: 12px; font-weight: 500; background: var(--panel2); color: var(--text); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); } .chip.warn { background: var(--warn-bg); color: var(--warn); } .chip.bad { background: var(--bad-bg); color: var(--bad); } .chip.info { background: var(--info-bg); color: var(--p3); } .chip.accent { background: var(--accent-weak); color: var(--accent); }
.prio { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; } .prio.p1 { background: var(--p1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--p1) 25%, transparent); } .prio.p2 { background: var(--p2); } .prio.p3 { background: var(--p3); } .prio.p4 { background: var(--p4); }
.vip { color: #b7791f; font-weight: 700; }

/* KPI */
.kpi { cursor: pointer; transition: transform .1s; } .kpi:hover { transform: translateY(-1px); }
.kpi .n { font-size: 30px; font-weight: 700; line-height: 1.1; } .kpi .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.kpi.bad .n { color: var(--bad); } .kpi.warn .n { color: var(--warn); } .kpi.ok .n { color: var(--ok); }
.bars .b { display: grid; grid-template-columns: 150px 1fr 40px; gap: 8px; align-items: center; margin: 5px 0; }
.bars .track { background: var(--panel2); border-radius: 99px; height: 10px; overflow: hidden; } .bars .fill { height: 100%; background: var(--brand); border-radius: 99px; }
.bars .lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spark { display: flex; align-items: flex-end; gap: 2px; height: 90px; } .spark i { flex: 1; background: var(--brand); min-height: 2px; border-radius: 2px 2px 0 0; opacity: .85; }

/* Ticket detail */
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 18px; align-items: start; }
.side .field { margin-bottom: 11px; } .side label, .form label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 3px; } .side select, .side input { width: 100%; }
.timeline > div { display: grid; grid-template-columns: 34px 1fr; gap: 10px; margin-bottom: 14px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-weak); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.avatar.cust { background: var(--ok-bg); color: var(--ok); } .avatar.sys { background: var(--panel2); color: var(--muted); }
.bubble { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; } .bubble.internal { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.bubble .meta { font-size: 12px; color: var(--muted); margin-bottom: 4px; } .bubble .body { white-space: pre-wrap; word-wrap: break-word; }
.event { font-size: 12px; color: var(--muted); padding-left: 44px; margin: -6px 0 10px; }
.banner { border-radius: 8px; padding: 8px 12px; margin-bottom: 12px; background: var(--warn-bg); color: var(--warn); }
.banner.info { background: var(--info-bg); color: var(--p3); } .banner.bad { background: var(--bad-bg); color: var(--bad); }
.sla-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--panel2); } .sla-box .t { font-weight: 600; }

/* Board */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: var(--panel2); border-radius: var(--radius); padding: 8px; min-height: 200px; } .col.over { outline: 2px dashed var(--accent); }
.col h4 { margin: 4px 6px 8px; font-size: 12px; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; }
.tcard { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--p4); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; cursor: grab; box-shadow: var(--shadow); }
.tcard.p1 { border-left-color: var(--p1); } .tcard.p2 { border-left-color: var(--p2); } .tcard.p3 { border-left-color: var(--p3); }
.tcard .t { font-weight: 600; margin: 2px 0; }

/* Modal & toasts */
.overlay { position: fixed; inset: 0; background: rgba(8,10,25,.55); display: grid; place-items: start center; padding: 5vh 16px; z-index: 100; overflow: auto; }
.modal { background: var(--panel); border-radius: 14px; width: min(720px, 100%); box-shadow: 0 20px 60px rgba(0,0,0,.35); } .modal.wide { width: min(960px, 100%); }
.modal header { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); } .modal header h2 { margin: 0; }
.modal .body { padding: 18px; } .modal footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; } .form .full { grid-column: 1 / -1; } .form input:not([type=checkbox]), .form select { width: 100%; } .form .hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
.form .chk { display: flex; align-items: center; gap: 8px; padding-top: 22px; } .form .chk label { margin: 0; color: var(--text); font-size: 14px; }
#toasts { position: fixed; right: 16px; bottom: 16px; display: grid; gap: 8px; z-index: 200; }
.toast { background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.3); max-width: 380px; } .toast.err { background: var(--bad); color: #fff; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #0a1d2c, #15304a); }
.login .brand { justify-content: center; }
.login .card { width: min(400px, 100%); padding: 28px; } .login input { width: 100%; margin: 4px 0 12px; }
.timer { background: var(--accent-weak); color: var(--accent); border-radius: 99px; padding: 3px 12px; font-variant-numeric: tabular-nums; display: inline-flex; gap: 8px; align-items: center; }
.md h2, .md h3 { margin: 12px 0 6px; text-transform: none; letter-spacing: 0; color: var(--text); font-size: 15px; } .md code { background: var(--panel2); padding: 1px 5px; border-radius: 4px; } .md pre { background: var(--panel2); padding: 10px; border-radius: 8px; overflow: auto; } .md ul, .md ol { padding-left: 22px; }
.progress { height: 8px; background: var(--panel2); border-radius: 99px; overflow: hidden; } .progress > i { display: block; height: 100%; background: var(--ok); } .progress.warn > i { background: var(--warn); } .progress.bad > i { background: var(--bad); }
code.block { display: block; background: var(--panel2); padding: 10px 12px; border-radius: 8px; overflow: auto; white-space: pre; font-size: 12px; }

@media (max-width: 1000px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -260px; width: 240px; z-index: 50; transition: left .2s; box-shadow: 0 0 40px rgba(0,0,0,.3); } .sidebar.open { left: 0; }
  .menu-btn { display: inline-flex; } .ticket-layout { grid-template-columns: 1fr; } .grid.c4, .grid.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .content { padding: 14px; } .topbar { padding: 8px 12px; } .form { grid-template-columns: 1fr; }
}
@media (max-width: 600px) { .grid.c2, .grid.c3, .grid.c4 { grid-template-columns: 1fr; } .bars .b { grid-template-columns: 100px 1fr 34px; } }

.tbl td.subj { min-width: 260px; }

@media (max-width: 1000px) {
  .topbar { flex-wrap: wrap; } .search-wrap { order: 10; flex-basis: 100%; max-width: none; margin: 0; } .topbar select { max-width: 150px; }
}
@media (max-width: 700px) { .hide-sm { display: none; } .sidebar .nav::after { content: ''; } }
.only-sm { display: none; } @media (max-width: 700px) { .only-sm { display: block; } }

.plan td.plan-cell { vertical-align: top; min-width: 130px; height: 74px; cursor: pointer; border-left: 1px solid var(--line); }
.plan td.today { background: var(--accent-weak); } .plan th.today-h { color: var(--brand); } .plan td.absent { background: repeating-linear-gradient(45deg, var(--warn-bg), var(--warn-bg) 6px, transparent 6px, transparent 12px); }
.appt { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--brand); border-radius: 6px; padding: 2px 6px; margin: 2px 0; font-size: 12px; cursor: pointer; }
.appt button { padding: 0 4px; float: right; }
