:root {
  color-scheme: dark;
  --bg: #0b0c0f;
  --panel: #121419;
  --panel-2: #171a20;
  --line: #292d35;
  --text: #f4f4f1;
  --muted: #9499a3;
  --lime: #c9ff52;
  --lime-dark: #98cf24;
  --blue: #73a7ff;
  --orange: #ffac5a;
  --pink: #ff7ea8;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); font-size: 16px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.login-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 70% 20%, rgba(201,255,82,.09), transparent 30%), var(--bg); }
.login-card { width: min(420px, 100%); padding: 36px; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 80px #0008; }
.login-card h1 { font-size: 2rem; margin: 10px 0 8px; letter-spacing: -.04em; }
.login-card .brand-mark { margin-bottom: 26px; }
.login-card label, .form-grid label { display: grid; gap: 8px; margin-top: 18px; color: #c6c9cf; font-size: .88rem; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid var(--line); background: #0d0f13; color: var(--text); border-radius: 10px; padding: 12px 13px; outline: none; transition: .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--lime-dark); box-shadow: 0 0 0 3px rgba(201,255,82,.1); }
.brand-mark { width: 36px; height: 36px; display: inline-grid; place-items: center; background: var(--lime); color: #111; border-radius: 9px; font-weight: 900; transform: rotate(-4deg); }
.eyebrow { color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .13em; margin: 0 0 7px; }
.muted { color: var(--muted); margin: 0 0 24px; line-height: 1.55; }
.form-error { min-height: 20px; color: #ff8492; font-size: .85rem; }
.button { border: 1px solid var(--line); border-radius: 10px; padding: 11px 16px; color: var(--text); background: var(--panel-2); font-weight: 750; transition: transform .15s, border-color .15s, background .15s; }
.button:hover { transform: translateY(-1px); border-color: #4b505a; }
.button.primary { background: var(--lime); color: #10120b; border-color: var(--lime); }
.button.primary:hover { background: #d8ff7d; }
.button.full { width: 100%; margin-top: 6px; }
.button.ghost { background: transparent; }
.button.danger { color: #ff8b95; border-color: #593039; }
.app { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { height: 100vh; position: sticky; top: 0; padding: 26px 18px 18px; border-right: 1px solid var(--line); background: #0d0f13; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px 30px; font-weight: 820; letter-spacing: -.02em; }
nav { display: grid; gap: 6px; }
.nav-item { border: 0; color: #b9bec7; background: transparent; padding: 11px 12px; border-radius: 9px; text-align: left; font-weight: 650; display: flex; gap: 11px; }
.nav-item.active { background: #1b1e24; color: white; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--line); padding: 18px 8px 2px; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .78rem; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px rgba(201,255,82,.5); }
.icon-button { margin-left: auto; border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; padding: 5px; }
main { min-width: 0; padding: 42px clamp(22px, 4vw, 60px) 60px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.topbar h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.055em; line-height: 1; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 22px; }
.metrics article { min-height: 135px; padding: 22px; background: var(--panel); display: flex; flex-direction: column; border-right: 1px solid var(--line); }
.metrics article:last-child { border-right: 0; }
.metrics span { color: var(--muted); font-size: .82rem; font-weight: 650; }
.metrics strong { font-size: 2rem; letter-spacing: -.04em; margin: 12px 0 4px; }
.metrics small { color: #747983; font-size: .75rem; }
.metrics .accent-metric { background: var(--lime); color: #111; }
.metrics .accent-metric span, .metrics .accent-metric small { color: #405019; }
.workspace { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-height: 420px; overflow: hidden; }
.toolbar { min-height: 72px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.search { flex: 1; max-width: 430px; position: relative; }
.search span { position: absolute; left: 13px; top: 10px; color: var(--muted); font-size: 1.3rem; }
.search input { padding-left: 40px; background: #0e1014; }
.select-wrap { display: flex; align-items: center; gap: 10px; margin-left: auto; color: var(--muted); font-size: .78rem; }
.select-wrap select { min-width: 130px; padding-block: 10px; }
.view-toggle { display: flex; border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.view-toggle button { border: 0; background: transparent; color: var(--muted); border-radius: 6px; padding: 6px 9px; }
.view-toggle button.active { background: #2a2e36; color: white; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 790px; }
th { text-align: left; color: #6f7580; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; padding: 13px 18px; border-bottom: 1px solid var(--line); }
td { padding: 17px 18px; border-bottom: 1px solid #22262d; vertical-align: middle; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #171a20; }
tbody tr[data-open-order] { cursor: pointer; }
.customer { display: flex; align-items: center; gap: 12px; }
.avatar { width: 36px; height: 36px; flex: 0 0 auto; display: grid; place-items: center; background: #252a32; border: 1px solid #363b45; border-radius: 10px; color: var(--lime); font-size: .78rem; font-weight: 850; }
.customer strong, .project strong { display: block; font-size: .9rem; }
.customer small, .project small { color: var(--muted); display: block; margin-top: 4px; max-width: 280px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .76rem; }
.pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 99px; padding: 6px 9px; font-size: .72rem; font-weight: 750; border: 1px solid; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.anfrage { color: #b8bec8; border-color: #3b414b; background: #242830; }
.pill.angebot { color: var(--blue); border-color: #304a71; background: #18243a; }
.pill.in_arbeit { color: var(--orange); border-color: #694526; background: #342516; }
.pill.feedback { color: var(--pink); border-color: #623045; background: #351a25; }
.pill.fertig { color: var(--lime); border-color: #4d6522; background: #202b12; }
.pill.offen { color: #b8bec8; border-color: #3b414b; background: #242830; }
.priority { font-size: .74rem; color: var(--muted); text-transform: capitalize; }
.priority.hoch { color: #ff7f8c; }
.date { color: #c7cad0; font-size: .82rem; white-space: nowrap; }
.date.overdue { color: #ff7f8c; }
.row-action { border: 0; background: transparent; color: var(--muted); font-size: 1.2rem; border-radius: 6px; padding: 4px 8px; }
.row-action:hover { background: #282c34; color: white; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.open-order-button { border: 0; background: transparent; color: var(--lime); padding: 7px 4px; font-size: .75rem; font-weight: 800; white-space: nowrap; }
.open-order-button:hover { color: white; }
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; padding: 16px; overflow-x: auto; }
.column { background: #0e1014; border: 1px solid #242831; border-radius: 12px; min-height: 320px; padding: 12px; }
.column-head { display: flex; justify-content: space-between; align-items: center; padding: 3px 3px 13px; font-size: .78rem; font-weight: 750; }
.column-head span:last-child { color: var(--muted); }
.order-card { background: #191c22; border: 1px solid #2a2e37; border-radius: 10px; padding: 14px; margin-bottom: 9px; cursor: pointer; }
.order-card:hover { border-color: #4a505b; transform: translateY(-1px); }
.order-card h3 { font-size: .88rem; margin: 0 0 6px; }
.order-card p { font-size: .76rem; color: var(--muted); margin: 0 0 14px; }
.card-meta { display: flex; justify-content: space-between; color: #aeb3bd; font-size: .72rem; }
.card-open { display: block; margin-top: 15px; color: var(--lime); font-size: .72rem; font-weight: 800; }
.empty { text-align: center; padding: 72px 24px; color: var(--muted); }
.empty strong { display: block; color: white; font-size: 1.05rem; margin-bottom: 7px; }
.detail-topbar { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 30px; }
.back-button { border: 0; background: transparent; color: var(--muted); padding: 8px 0; font-weight: 700; }
.back-button:hover { color: var(--text); }
.detail-actions { display: flex; gap: 10px; }
.detail-hero { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.detail-hero h1 { margin: 0 0 22px; font-size: clamp(2.2rem, 5vw, 4.3rem); letter-spacing: -.06em; line-height: .98; }
.detail-customer { display: flex; align-items: center; gap: 12px; }
.detail-customer strong, .detail-customer small { display: block; }
.detail-customer small { color: var(--muted); margin-top: 3px; font-size: .8rem; }
.avatar.large { width: 43px; height: 43px; }
.detail-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 18px; }
.detail-stats article { min-height: 118px; background: var(--panel); padding: 20px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.detail-stats article:last-child { border-right: 0; }
.detail-stats span { color: var(--muted); font-size: .78rem; font-weight: 650; }
.detail-stats strong { font-size: 1.8rem; letter-spacing: -.04em; margin: 12px 0 4px; }
.detail-stats .stat-text { font-size: 1.05rem; margin-top: 20px; }
.detail-stats small { color: #747983; font-size: .75rem; }
.progress { height: 5px; margin-top: auto; background: #2a2e35; border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--lime); border-radius: inherit; }
.order-note { background: #111318; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.order-note p:last-child { color: #c6cad1; margin: 0; line-height: 1.6; }
.design-section { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0; font-size: 1.35rem; }
.button.compact { padding: 9px 12px; font-size: .82rem; }
.design-row { display: grid; grid-template-columns: 42px minmax(220px, 1fr) 150px 140px 36px; gap: 16px; align-items: center; padding: 18px 20px; border-bottom: 1px solid #23272e; }
.design-row:last-child { border-bottom: 0; }
.design-index { color: #555c67; font-size: .78rem; font-weight: 800; }
.design-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.design-title h3 { margin: 0; font-size: .95rem; }
.design-main p { color: var(--muted); font-size: .78rem; margin: 6px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 560px; }
.design-meta { display: grid; gap: 6px; color: var(--muted); font-size: .76rem; }
.design-meta strong { color: var(--text); }
.quick-status { padding: 9px 10px; font-size: .76rem; }
dialog { color: var(--text); width: min(650px, calc(100% - 28px)); background: var(--panel); border: 1px solid #363b45; border-radius: 18px; padding: 0; box-shadow: 0 30px 100px #000c; }
dialog::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
dialog form { padding: 26px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 6px; }
.dialog-head h2 { margin: 0; font-size: 1.45rem; letter-spacing: -.03em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.span-2 { grid-column: 1 / -1; }
textarea { resize: vertical; }
.dialog-actions { display: grid; grid-template-columns: auto 1fr auto auto; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.toast { position: fixed; right: 24px; bottom: 24px; background: var(--text); color: #111; border-radius: 10px; padding: 12px 16px; font-weight: 720; transform: translateY(30px); opacity: 0; pointer-events: none; transition: .25s; z-index: 20; }
.toast.show { transform: translateY(0); opacity: 1; }
@media (max-width: 1050px) {
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics article:nth-child(2) { border-right: 0; }
  .metrics article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .detail-stats { grid-template-columns: 1fr 1fr; }
  .detail-stats article:nth-child(2) { border-right: 0; }
  .detail-stats article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .design-row { grid-template-columns: 36px minmax(200px, 1fr) 130px 36px; }
  .quick-status { grid-column: 2 / 4; grid-row: 2; }
}
@media (max-width: 760px) {
  .app { display: block; }
  .sidebar { height: auto; position: static; padding: 16px 18px; flex-direction: row; align-items: center; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; }
  nav { display: none; }
  .sidebar-foot { margin: 0 0 0 auto; border: 0; padding: 0; }
  .sidebar-foot > span:not(.online-dot) { display: none; }
  main { padding: 28px 16px 40px; }
  .topbar { align-items: center; margin-bottom: 24px; }
  .topbar h1 { font-size: 2rem; }
  .topbar .button { font-size: 0; padding: 12px; }
  .topbar .button span { font-size: 1.2rem; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metrics article { min-height: 115px; padding: 17px; }
  .metrics strong { font-size: 1.55rem; }
  .toolbar { flex-wrap: wrap; }
  .search { max-width: none; flex-basis: 100%; }
  .select-wrap { margin-left: 0; flex: 1; }
  .select-wrap span { display: none; }
  .select-wrap select { width: 100%; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .dialog-actions { grid-template-columns: 1fr 1fr; }
  .dialog-actions span { display: none; }
  .detail-topbar, .detail-hero { align-items: flex-start; }
  .detail-actions { flex-wrap: wrap; justify-content: flex-end; }
  .detail-actions .button { font-size: .78rem; padding: 9px 10px; }
  .design-row { grid-template-columns: 28px 1fr 34px; gap: 10px; }
  .design-meta { grid-column: 2; display: flex; gap: 12px; }
  .quick-status { grid-column: 2; grid-row: auto; }
}
@media (max-width: 460px) {
  .metrics { grid-template-columns: 1fr; }
  .metrics article { border-right: 0; border-bottom: 1px solid var(--line); }
  .metrics article:last-child { border-bottom: 0; }
  .login-card { padding: 28px 22px; }
}
