:root {
  --bg: #f4f7fb;
  --panel: #fff;
  --ink: #15233b;
  --muted: #6e7d94;
  --line: #e3e9f2;
  --nav: #0d192d;
  --nav-soft: #172640;
  --brand: #1967ff;
  --brand-dark: #0c51d8;
  --cyan: #2bd4c6;
  --success: #16a36a;
  --warning: #e99b14;
  --danger: #dc4c64;
  --shadow: 0 16px 45px rgba(20, 39, 72, .08);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 'Segoe UI Variable Text', 'Segoe UI', sans-serif; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 20px; height: 20px; fill: currentColor; }

.app-shell { min-height: 100vh; display: flex; }
.sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: 252px; padding: 27px 18px 22px; display: flex; flex-direction: column; overflow-y: auto; color: #aebbd0; background: linear-gradient(180deg, #0d192d, #091324); }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 9px; color: #fff; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: linear-gradient(135deg, var(--brand), #55a3ff); box-shadow: 0 8px 28px rgba(25, 103, 255, .35); font: 800 20px/1 'Segoe UI Variable Display', 'Segoe UI', sans-serif; }
.brand b { display: block; letter-spacing: .11em; font: 800 16px/1 'Segoe UI Variable Display', 'Segoe UI', sans-serif; }
.brand small { display: block; margin-top: 5px; color: #7184a2; font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.main-nav { margin-top: 48px; }
.main-nav > p { margin: 0 12px 10px; color: #5f718d; font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.main-nav a { min-height: 46px; margin: 5px 0; padding: 0 13px; display: flex; align-items: center; gap: 13px; border-radius: 11px; font-weight: 600; transition: .2s ease; }
.main-nav a:hover { color: #fff; background: rgba(255,255,255,.045); }
.main-nav a.active { color: #fff; background: linear-gradient(90deg, rgba(25,103,255,.24), rgba(25,103,255,.06)); box-shadow: inset 3px 0 var(--brand); }
.main-nav a.active svg { color: #5ea1ff; }
.main-nav em { min-width: 22px; height: 22px; margin-left: auto; display: grid; place-items: center; border-radius: 8px; background: #253855; color: #fff; font-size: 11px; font-style: normal; }
.sidebar-status { margin-top: auto; padding: 14px; display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.07); border-radius: 13px; background: rgba(255,255,255,.03); }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 5px rgba(43,212,198,.1); }
.sidebar-status b, .sidebar-status small { display: block; }
.sidebar-status b { color: #dae5f4; font-size: 12px; }
.sidebar-status small { color: #607491; font-size: 10px; }

.app-main { width: calc(100% - 252px); margin-left: 252px; }
.topbar { height: 88px; padding: 0 38px; display: flex; align-items: center; gap: 18px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.85); backdrop-filter: blur(12px); }
.topbar p, .topbar h1 { margin: 0; }
.topbar p { color: var(--muted); font-size: 11px; }
.topbar h1 { font: 800 22px/1.25 'Segoe UI Variable Display', 'Segoe UI', sans-serif; letter-spacing: -.03em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 15px; }
.topbar-actions form { margin: 0; }
.user-chip { display: flex; align-items: center; gap: 10px; }
.user-chip > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--ink); font-weight: 700; }
.user-chip b, .user-chip small { display: block; }
.user-chip b { font-size: 12px; line-height: 1.2; }
.user-chip small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 600; text-transform: uppercase; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); cursor: pointer; }
.menu-button { display: none; }
.content { max-width: 1600px; margin: 0 auto; padding: 30px 38px 55px; }

.alert { margin-bottom: 20px; padding: 13px 16px; border: 1px solid; border-radius: 12px; font-weight: 600; }
.alert-success { color: #086f48; border-color: #aee6d0; background: #e9fbf4; }
.alert-error { color: #a82b42; border-color: #f5b8c4; background: #fff0f3; }
.eyebrow { color: var(--brand); font-size: 10px; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.hero-strip { min-height: 168px; padding: 31px 36px; display: flex; align-items: center; justify-content: space-between; overflow: hidden; position: relative; border-radius: 22px; color: #fff; background: radial-gradient(circle at 82% 50%, rgba(42,132,255,.48), transparent 25%), linear-gradient(115deg, #10213b 0%, #173765 52%, #176bf0 115%); box-shadow: 0 18px 45px rgba(18, 65, 138, .18); }
.hero-strip:after { content: ''; position: absolute; width: 380px; height: 380px; right: -120px; top: -230px; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; box-shadow: 0 0 0 40px rgba(255,255,255,.025), 0 0 0 90px rgba(255,255,255,.02); }
.hero-strip .eyebrow { color: #74dcff; }
.hero-strip h2 { margin: 7px 0 4px; font: 800 31px/1.15 'Segoe UI Variable Display', 'Segoe UI', sans-serif; letter-spacing: -.04em; }
.hero-strip p { margin: 0; color: #abc4e8; }
.hero-pulse { z-index: 1; min-width: 165px; padding: 18px; display: grid; grid-template-columns: 18px 1fr; gap: 2px 8px; border: 1px solid rgba(255,255,255,.12); border-radius: 14px; background: rgba(8,25,53,.35); backdrop-filter: blur(8px); }
.hero-pulse span { width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 6px rgba(43,212,198,.12); }
.hero-pulse b { font-size: 12px; }
.hero-pulse small { grid-column: 2; color: #8fa8cc; }

.metric-grid { margin: 22px 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.metric-card { min-height: 124px; padding: 21px; display: flex; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 8px 30px rgba(22,40,72,.035); transition: .2s ease; }
.metric-card:hover { transform: translateY(-2px); border-color: #c7d7ef; box-shadow: var(--shadow); }
.metric-icon { width: 46px; height: 46px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: var(--brand); background: #edf4ff; }
.metric-card:nth-child(2) .metric-icon { color: #7b55d9; background: #f3efff; }
.metric-card:nth-child(3) .metric-icon { color: #0e9f8e; background: #e8fbf7; }
.metric-card:nth-child(4) .metric-icon { color: #d9880d; background: #fff6e5; }
.metric-card p, .metric-card strong, .metric-card small { display: block; margin: 0; }
.metric-card p { color: var(--muted); font-size: 11px; font-weight: 600; }
.metric-card strong { margin: 2px 0; font: 800 26px/1 'Segoe UI Variable Display', 'Segoe UI', sans-serif; }
.metric-card small { color: #98a4b6; font-size: 9px; }
.metric-card > i { margin-left: auto; align-self: flex-start; color: #aeb9c9; font-style: normal; }

.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); box-shadow: 0 8px 30px rgba(22,40,72,.035); }
.panel-head { min-height: 80px; padding: 20px 23px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 3px 0 0; font: 800 17px/1.2 'Segoe UI Variable Display', 'Segoe UI', sans-serif; }
.text-link { color: var(--brand); font-size: 11px; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 15px 20px; text-align: left; border-bottom: 1px solid #edf1f6; }
th { color: #8997aa; background: #fbfcfe; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
td { font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fbfdff; }
td b, td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.empty-cell { height: 150px; color: var(--muted); text-align: center; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 7px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.badge:before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-active, .badge-online, .badge-resolved { color: #09825c; background: #e9f9f3; }
.badge-pending, .badge-waiting, .badge-normal, .badge-unknown { color: #a16808; background: #fff4dc; }
.badge-suspended, .badge-offline, .badge-error, .badge-urgent { color: #c23750; background: #ffedf1; }
.badge-open, .badge-in_progress, .badge-high { color: #135fc9; background: #eaf2ff; }
.badge-closed, .badge-archived, .badge-terminated, .badge-low { color: #66758c; background: #eef1f5; }
.badge-published { color: #09825c; background: #e9f9f3; }
.badge-draft { color: #a16808; background: #fff4dc; }
.badge-sent { color: #135fc9; background: #eaf2ff; }
.badge-paid { color: #09825c; background: #e9f9f3; }
.badge-overdue, .badge-cancelled { color: #c23750; background: #ffedf1; }
.badge-new, .badge-processing { color: #135fc9; background: #eaf2ff; }
.badge-answered { color: #09825c; background: #e9f9f3; }
.badge-spam { color: #66758c; background: #eef1f5; }
.activity-list { padding: 8px 20px; }
.activity-list > div { min-height: 66px; display: flex; align-items: center; gap: 11px; border-bottom: 1px solid #edf1f6; }
.activity-list > div:last-child { border: 0; }
.activity-icon { width: 34px; height: 34px; display: grid; place-items: center; color: var(--brand); border-radius: 10px; background: #edf4ff; }
.activity-icon svg { width: 16px; }
.activity-list p { min-width: 0; margin: 0; flex: 1; }
.activity-list b, .activity-list small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.activity-list b { font-size: 11px; }
.activity-list small { color: var(--muted); font-size: 9px; }

.page-actions { min-height: 52px; margin-bottom: 18px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.page-actions p { margin: 0; color: var(--muted); }
.action-group { display: flex; gap: 9px; flex-wrap: wrap; }
.count-chip { min-width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: var(--brand); background: #edf4ff; font-size: 11px; font-weight: 800; }
.btn { min-height: 40px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.btn-primary { color: #fff; background: var(--brand); box-shadow: 0 8px 20px rgba(25,103,255,.2); }
.btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }
.btn-ghost { color: var(--ink); border-color: var(--line); background: #fff; }
.btn-ghost:hover { border-color: #b9c9df; background: #f9fbfe; }
.btn-block { width: 100%; }
.table-toolbar { min-height: 72px; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.search { width: min(360px, 100%); height: 40px; padding: 0 13px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 10px; background: #f9fbfd; }
.search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.inline-actions { display: flex; gap: 5px; }
.inline-actions button { width: 29px; height: 29px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; }
.inline-actions button:hover { color: var(--brand); border-color: #b8cdf0; }

.modal { width: min(690px, calc(100% - 30px)); padding: 0; border: 0; border-radius: 20px; color: var(--ink); box-shadow: 0 35px 100px rgba(6,18,38,.34); }
.modal::backdrop { background: rgba(6,15,31,.65); backdrop-filter: blur(4px); }
.modal form { padding: 0; }
.modal-head { padding: 22px 25px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 4px 0 0; font: 800 21px 'Segoe UI Variable Display', 'Segoe UI', sans-serif; }
.modal-head button { border: 0; background: transparent; color: #8795aa; font-size: 27px; cursor: pointer; }
.form-grid { padding: 24px 25px; display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-stack { display: grid; gap: 17px; }
.form-grid label, .form-stack label { display: grid; gap: 7px; color: #526077; font-size: 11px; font-weight: 700; }
.form-grid label.full { grid-column: 1 / -1; }
input, select, textarea { width: 100%; border: 1px solid #d9e1ec; border-radius: 10px; background: #fff; color: var(--ink); outline: 0; transition: .18s ease; }
input, select { height: 42px; padding: 0 12px; }
textarea { padding: 11px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #78a7f7; box-shadow: 0 0 0 3px rgba(25,103,255,.09); }
.check { display: flex !important; grid-template-columns: 18px 1fr; align-items: center; }
.check input { width: 17px; height: 17px; }
.form-note { margin: 0 25px 5px; padding: 12px 14px; color: #52657e; border-radius: 10px; background: #eef5ff; font-size: 11px; }
.modal-actions { padding: 17px 25px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line); background: #fbfcfe; }

.node-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 19px; }
.node-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 8px 30px rgba(22,40,72,.035); }
.node-card-head { display: flex; align-items: center; justify-content: space-between; }
.node-symbol { width: 45px; height: 45px; display: grid; place-items: center; color: var(--brand); border-radius: 13px; background: #edf4ff; }
.node-card h2 { margin: 18px 0 4px; font: 800 18px 'Segoe UI Variable Display', 'Segoe UI', sans-serif; }
.node-card > p { margin: 0; color: var(--muted); font-size: 11px; }
.node-stats { margin: 22px 0; display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 12px; background: #fafbfd; }
.node-stats div { padding: 13px 8px; text-align: center; border-right: 1px solid var(--line); }
.node-stats div:last-child { border: 0; }
.node-stats b, .node-stats small { display: block; }
.node-stats b { font: 800 15px 'Segoe UI Variable Display', 'Segoe UI', sans-serif; }
.node-stats small { margin-top: 2px; color: var(--muted); font-size: 8px; text-transform: uppercase; }
.node-error { margin: -10px 0 15px; padding: 9px; color: #b92f48; border-radius: 8px; background: #fff0f3; font-size: 10px; }
.empty-state { padding: 35px 20px; color: var(--muted); text-align: center; }
.empty-state.large { min-height: 360px; grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.empty-state.large > span { width: 70px; height: 70px; display: grid; place-items: center; color: var(--brand); border-radius: 22px; background: #edf4ff; }
.empty-state h2 { margin: 18px 0 5px; color: var(--ink); font: 800 20px 'Segoe UI Variable Display', 'Segoe UI', sans-serif; }
.empty-state p { margin: 0 0 20px; }

.ticket-board { display: grid; grid-template-columns: repeat(4, minmax(230px, 1fr)); align-items: start; gap: 16px; overflow-x: auto; }
.ticket-column { min-height: 300px; padding: 12px; border-radius: 16px; background: #eaf0f7; }
.column-head { height: 46px; padding: 0 4px; display: flex; align-items: center; justify-content: space-between; }
.column-head h2 { margin: 0; font: 800 12px 'Segoe UI Variable Display', 'Segoe UI', sans-serif; }
.column-head span { min-width: 23px; height: 23px; display: grid; place-items: center; border-radius: 8px; color: var(--muted); background: #fff; font-size: 10px; font-weight: 700; }
.ticket-card { margin-bottom: 11px; padding: 16px; border: 1px solid #dfe6ef; border-radius: 13px; background: #fff; box-shadow: 0 6px 16px rgba(24,45,77,.05); }
.ticket-card > div { display: flex; align-items: center; justify-content: space-between; }
.ticket-card > div > b { color: var(--brand); font-size: 9px; letter-spacing: .04em; }
.ticket-card h3 { margin: 13px 0 6px; font-size: 12px; }
.ticket-card p { min-height: 42px; margin: 0; color: var(--muted); font-size: 10px; }
.ticket-card footer { margin: 14px -16px 0; padding: 12px 16px 0; display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); color: #8190a5; font-size: 9px; }
.ticket-card select { height: 32px; margin-top: 12px; font-size: 10px; }

.account-grid { max-width: 980px; }
.account-card { text-align: center; }
.account-details { padding: 28px; }
.account-details > span { width: 64px; height: 64px; margin: 0 auto 14px; display: grid; place-items: center; border-radius: 20px; color: #fff; background: var(--ink); font-size: 23px; font-weight: 800; }
.account-details h3 { margin: 0; font-size: 16px; }
.account-details p { margin: 4px 0 24px; color: var(--muted); }
.account-details dl { margin: 0; border: 1px solid var(--line); border-radius: 12px; text-align: left; }
.account-details dl > div { padding: 12px 14px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.account-details dl > div:last-child { border: 0; }
.account-details dt { color: var(--muted); }
.account-details dd { margin: 0; font-weight: 700; }

.billing-metrics { margin-bottom: 20px; }
.billing-metrics .metric-card strong { font-size: 20px; }
.status-form { display: flex; align-items: center; gap: 9px; }
.status-form select { min-width: 140px; }
.status-form.compact select { min-width: 125px; }
.status-form.compact .btn { min-height: 34px; padding-inline: 11px; }
.contact-message { min-width: 320px; max-width: 560px; white-space: normal; }
.contact-message small { max-height: 5.4em; overflow: auto; line-height: 1.5; }
.invoice-sheet { width: min(980px, 100%); margin: 0 auto; padding: 54px 60px 30px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 15px 50px rgba(22,40,72,.06); }
.invoice-sheet > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.invoice-sheet > header > div { display: flex; align-items: center; gap: 11px; }
.invoice-sheet > header > div:last-child { align-items: flex-end; flex-direction: column; gap: 5px; text-align: right; }
.invoice-sheet > header b, .invoice-sheet > header small { display: block; }
.invoice-sheet > header b { font-size: 17px; letter-spacing: .05em; }
.invoice-sheet > header small { color: var(--muted); font-size: 8px; font-weight: 500; }
.invoice-sheet > header > div:last-child > span:first-child { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.invoice-sheet > header strong { font-size: 20px; }
.invoice-logo { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: var(--ink); font-size: 19px; font-weight: 900; }
.invoice-addresses { margin: 65px 0 42px; display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.invoice-addresses > div > * { display: block; }
.invoice-addresses small { margin-bottom: 13px; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.invoice-addresses strong { margin-bottom: 5px; font-size: 14px; }
.invoice-addresses span { margin-top: 3px; color: #5f6d80; font-size: 11px; }
.invoice-addresses dl { margin: 0; }
.invoice-addresses dl div { padding: 7px 0; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); }
.invoice-addresses dt { color: var(--muted); }
.invoice-addresses dd { margin: 0; font-weight: 700; }
.invoice-items { white-space: normal; }
.invoice-items th:first-child, .invoice-items td:first-child { width: 55px; }
.invoice-items th:not(:nth-child(2)), .invoice-items td:not(:nth-child(2)) { text-align: right; white-space: nowrap; }
.invoice-total { margin: 26px 0 35px auto; width: min(340px,100%); }
.invoice-total dl { margin: 0; }
.invoice-total dl div { padding: 8px 0; display: flex; justify-content: space-between; }
.invoice-total dl div:last-child { margin-top: 7px; padding-top: 15px; border-top: 2px solid var(--ink); font-size: 15px; font-weight: 800; }
.invoice-total dd { margin: 0; font-weight: 700; }
.invoice-note { padding: 15px; color: #52657e; border-radius: 10px; background: #f4f7fb; font-size: 11px; }
.invoice-sheet > footer { margin-top: 45px; padding-top: 16px; color: var(--muted); border-top: 1px solid var(--line); font-size: 9px; text-align: center; }

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 30px; background: #081426; }
.login-shell { width: min(1040px, 100%); min-height: 650px; display: grid; grid-template-columns: .92fr 1.08fr; overflow: hidden; border: 1px solid rgba(255,255,255,.08); border-radius: 26px; background: #fff; box-shadow: 0 40px 120px rgba(0,0,0,.35); }
.login-panel { padding: 48px 62px; display: flex; flex-direction: column; }
.brand-login { padding: 0; color: var(--ink); }
.brand-login small { color: #8996aa; }
.login-copy { margin: 82px 0 34px; }
.login-copy h1 { margin: 8px 0 8px; font: 800 32px/1.15 'Segoe UI Variable Display', 'Segoe UI', sans-serif; letter-spacing: -.04em; }
.login-copy p { margin: 0; color: var(--muted); }
.login-foot { margin: auto 0 0; color: #98a4b6; font-size: 10px; text-align: center; }
.login-visual { position: relative; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 20% 20%, #1d4e93, transparent 35%), radial-gradient(circle at 85% 75%, #0a9b9b, transparent 30%), linear-gradient(135deg, #071326, #122d54); }
.login-visual:before { content: ''; position: absolute; inset: 0; opacity: .14; background-image: linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, #000, transparent); }
.orb { position: absolute; border-radius: 50%; filter: blur(3px); }
.orb-one { width: 280px; height: 280px; right: -100px; top: -60px; border: 1px solid rgba(94,161,255,.35); box-shadow: 0 0 80px rgba(25,103,255,.25), inset 0 0 60px rgba(25,103,255,.12); }
.orb-two { width: 190px; height: 190px; left: -60px; bottom: -50px; border: 1px solid rgba(43,212,198,.3); box-shadow: 0 0 70px rgba(43,212,198,.15); }
.terminal-card { z-index: 1; width: 320px; padding: 0 20px 16px; border: 1px solid rgba(255,255,255,.14); border-radius: 17px; color: #d8e6f8; background: rgba(7,18,36,.68); box-shadow: 0 30px 80px rgba(0,0,0,.35); backdrop-filter: blur(15px); }
.terminal-top { height: 48px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid rgba(255,255,255,.09); color: #6f87a9; font-size: 9px; }
.terminal-top i { width: 7px; height: 7px; border-radius: 50%; background: #526987; }
.terminal-top span { margin-left: auto; }
.terminal-line { height: 52px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,.07); font-size: 11px; }
.terminal-line span { color: #7f98b9; }
.terminal-line b { color: #58dbc7; font-size: 10px; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .node-grid { grid-template-columns: repeat(2, 1fr); }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .sidebar { transform: translateX(-100%); transition: transform .25s ease; box-shadow: 20px 0 60px rgba(0,0,0,.28); }
  .sidebar.open { transform: translateX(0); }
  .app-main { width: 100%; margin: 0; }
  .menu-button { display: grid; }
  .topbar { height: 76px; padding: 0 18px; }
  .topbar > div > p { display: none; }
  .content { padding: 22px 18px 45px; }
  .user-chip b { display: none; }
  .login-shell { grid-template-columns: 1fr; max-width: 500px; min-height: auto; }
  .login-visual { display: none; }
  .login-panel { min-height: 650px; padding: 42px; }
}

@media (max-width: 620px) {
  .hero-strip { min-height: 190px; padding: 27px; }
  .hero-strip h2 { font-size: 25px; }
  .hero-pulse { display: none; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 105px; }
  .node-grid { grid-template-columns: 1fr; }
  .page-actions { align-items: flex-start; flex-direction: column; }
  .page-actions .btn { width: 100%; }
  .action-group { width: 100%; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label.full { grid-column: auto; }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; }
  .login-body { padding: 0; background: #fff; }
  .login-shell { min-height: 100vh; border: 0; border-radius: 0; }
  .login-panel { min-height: 100vh; padding: 32px 25px; }
  .login-copy { margin-top: 70px; }
  .invoice-toolbar .action-group, .status-form { width: 100%; }
  .status-form { align-items: stretch; flex-direction: column; }
  .status-form select, .status-form .btn { width: 100%; }
  .invoice-sheet { padding: 30px 20px 22px; border-radius: 14px; }
  .invoice-sheet > header, .invoice-addresses { grid-template-columns: 1fr; flex-direction: column; }
  .invoice-sheet > header > div:last-child { align-items: flex-start; text-align: left; }
  .invoice-addresses { margin: 42px 0 28px; gap: 25px; }
}

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .invoice-toolbar, .alert { display: none !important; }
  .app-main { margin: 0; width: 100%; }
  .content { padding: 0; }
  .invoice-sheet { width: 100%; padding: 15mm; border: 0; border-radius: 0; box-shadow: none; }
}

.badge-awaiting_payment, .badge-provisioning { color: #a16808; background: #fff4dc; }
.badge-completed { color: #09825c; background: #e9f9f3; }
.badge-refunded { color: #66758c; background: #eef1f5; }
.config-product-head { margin-bottom: 20px; padding: 24px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.config-product-head > div { display: flex; align-items: center; gap: 15px; }
.config-product-head h2 { margin: 3px 0; font-size: 20px; }
.config-product-head p { margin: 0; color: var(--muted); }
.config-product-head dl { margin: 0; display: flex; gap: 30px; }
.config-product-head dl div { text-align: right; }
.config-product-head dt { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.config-product-head dd { margin: 3px 0 0; font-weight: 800; }
.config-section { margin-bottom: 20px; }
.config-section .panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.config-section > footer { padding: 14px 20px; border-top: 1px solid var(--line); }
.config-groups { display: grid; gap: 20px; }
.inline-toggle .btn, td form .btn { min-height: 32px; padding: 0 10px; font-size: 9px; }
.order-detail-grid { align-items: start; }
.order-totals { padding: 18px 22px; display: flex; justify-content: flex-end; gap: 30px; border-top: 1px solid var(--line); }
.order-totals span { color: var(--muted); }
.order-totals b { margin-left: 5px; color: var(--ink); }
.order-customer { padding: 23px; }
.order-customer > * { display: block; margin: 4px 0; }
.order-customer a { color: var(--brand); }
.order-customer hr { margin: 18px 0; border: 0; border-top: 1px solid var(--line); }
.order-customer p { margin-top: 18px; padding: 12px; border-radius: 10px; background: #f4f7fb; }
.order-events { margin-top: 20px; }
.btn-danger { color: #fff; border-color: #d9415d; background: #d9415d; }
.btn-danger:hover { background: #bd304b; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.modal-wide { width: min(860px, calc(100vw - 30px)); }
.inline-form { display:flex; align-items:center; gap:10px; padding:8px 0 14px 52px; flex-wrap:wrap; }
.inline-form input,.inline-form select { width:auto; min-width:150px; }
.btn-small { min-height:36px; padding:7px 12px; }
code { overflow-wrap:anywhere; }
@media (max-width: 700px) {
  .inline-form { padding-left:0; align-items:stretch; }
  .inline-form input,.inline-form select,.inline-form .btn { width:100%; }
  .modal-wide { width:calc(100vw - 18px); }
}
.stream-metrics { margin-bottom: 20px; }
.stream-node-grid { margin-bottom: 20px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.stream-node-grid .empty-state { grid-column: 1 / -1; }
.stream-table-panel { margin-top: 4px; }
.stream-hero { margin-bottom: 18px; padding: 30px; display: grid; grid-template-columns: minmax(0,1.25fr) minmax(360px,.75fr); align-items: center; gap: 35px; color: #fff; border: 0; background: radial-gradient(circle at 15% 15%,rgba(36,122,255,.42),transparent 36%),linear-gradient(135deg,#08172c,#123154); }
.stream-hero h2 { margin: 15px 0 5px; font: 800 28px 'Segoe UI Variable Display','Segoe UI',sans-serif; }
.stream-hero p { margin: 0 0 20px; color: #a9bdd7; }
.stream-hero audio { width: min(520px,100%); height: 42px; }
.stream-live { display: inline-flex; align-items: center; gap: 7px; color: #a7bad1; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.stream-live i { width: 8px; height: 8px; border-radius: 50%; background: #72839a; }
.stream-live.is-live { color: #63e3bc; }
.stream-live.is-live i { background: #42d8a7; box-shadow: 0 0 0 5px rgba(66,216,167,.13); }
.stream-hero dl { margin: 0; display: grid; grid-template-columns: repeat(2,1fr); border: 1px solid rgba(255,255,255,.14); border-radius: 15px; overflow: hidden; }
.stream-hero dl div { padding: 18px; border-right: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); }
.stream-hero dl div:nth-child(2n) { border-right: 0; }
.stream-hero dl div:nth-last-child(-n+2) { border-bottom: 0; }
.stream-hero dt { color: #8ca3c1; font-size: 9px; text-transform: uppercase; }
.stream-hero dd { margin: 5px 0 0; font-size: 22px; font-weight: 800; }
.stream-hero dd small { color: #8ca3c1; font-size: 10px; }
.stream-control { margin-bottom: 20px; padding: 20px 24px; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.stream-control h2 { margin: 4px 0; font-size: 15px; }
.stream-control p { margin: 0; color: var(--muted); font-size: 10px; }
.stream-actions { display: flex; gap: 8px; }
.stream-detail-grid { margin-bottom: 20px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.detail-list { margin: 0; padding: 0 22px 20px; }
.detail-list > div { padding: 11px 0; display: grid; grid-template-columns: 125px minmax(0,1fr); gap: 15px; border-bottom: 1px solid var(--line); }
.detail-list > div:last-child { border: 0; }
.detail-list dt { color: var(--muted); }
.detail-list dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-weight: 700; }
.monitor-bars { min-height: 205px; padding: 25px; display: flex; align-items: flex-end; gap: 7px; }
.monitor-bars > span { height: var(--level); min-height: 12px; flex: 1; border-radius: 5px 5px 2px 2px; background: #33c999; }
.monitor-bars > span.offline { background: #d7dee8; }
.monitor-bars > span.error { background: #e1556d; }
.monitor-bars .empty-state { width: 100%; align-self: center; }
@media (max-width: 620px) {
  .config-product-head { align-items: flex-start; flex-direction: column; }
  .config-product-head dl { width: 100%; justify-content: space-between; gap: 12px; }
  .config-product-head dl div { text-align: left; }
  .order-totals { align-items: flex-end; flex-direction: column; gap: 8px; }
  .stream-node-grid, .stream-detail-grid { grid-template-columns: 1fr; }
  .stream-hero { padding: 24px; grid-template-columns: 1fr; gap: 25px; }
  .stream-hero h2 { font-size: 23px; }
  .stream-control { align-items: stretch; flex-direction: column; }
  .stream-control .action-group, .stream-actions { width: 100%; flex-direction: column; }
  .stream-control .btn { width: 100%; }
  .detail-list > div { grid-template-columns: 1fr; gap: 4px; }
}

@media (min-width:621px) and (max-width:1100px) {
  .stream-node-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stream-hero { grid-template-columns: 1fr; }
}

/* Eigenständiges Kundenportal */
.portal-login-shell { grid-template-columns: .95fr 1.05fr; }
.portal-login-visual { background: radial-gradient(circle at 72% 22%,rgba(46,137,255,.32),transparent 28%),linear-gradient(145deg,#081629,#102e55 60%,#105fc8); }
.portal-login-visual .terminal-card { border-color: rgba(114,180,255,.22); background: rgba(6,22,45,.72); }
.portal-customer { margin: 30px 8px -24px; padding: 14px; display: flex; flex-direction: column; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: rgba(255,255,255,.035); }
.portal-customer small { color: #5f718d; font-size: 8px; font-weight: 800; letter-spacing: .13em; }
.portal-customer b { margin-top: 5px; color: #e6edf8; font-size: 12px; }
.portal-customer span { color: #7789a4; font-size: 9px; }
.portal-nav-icon { width: 22px; color: #7890b1; text-align: center; font-size: 16px; }
.portal-hero { background: radial-gradient(circle at 82% 50%,rgba(39,205,190,.28),transparent 25%),linear-gradient(115deg,#10213b 0%,#144376 58%,#117f88 120%); }
.portal-shell .metric-grid { grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); }
.portal-metric-icon { font-weight: 900; }
.metric-card > i { margin-left: auto; color: #a8b4c4; font-style: normal; }
.portal-stream-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.portal-stream-card { padding: 24px; }
.portal-stream-card > div:first-child { display: flex; align-items: center; justify-content: space-between; }
.portal-stream-card h2 { margin: 22px 0 5px; font: 800 21px 'Segoe UI Variable Display','Segoe UI',sans-serif; }
.portal-stream-card > p { min-height: 21px; margin: 0 0 18px; color: var(--muted); }
.portal-stream-card audio { width: 100%; height: 40px; }
.portal-stream-card dl { margin: 20px 0; display: grid; grid-template-columns: repeat(2,1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.portal-stream-card dl div { padding: 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.portal-stream-card dl div:nth-child(2n) { border-right: 0; }
.portal-stream-card dl div:nth-last-child(-n+2) { border-bottom: 0; }
.portal-stream-card dt { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.portal-stream-card dd { margin: 3px 0 0; font-size: 11px; font-weight: 800; }
.portal-stream-card .stream-live { color: #7789a1; }
.portal-stream-card .stream-live.is-live { color: #06966e; }
.portal-stream-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.portal-stream-hero { border-radius: 18px; }
.portal-settings-form .form-grid { padding-bottom: 22px; }
.portal-settings-form input[type="color"] { padding: 5px; cursor: pointer; }
.schedule-list { padding: 0 22px 20px; display: grid; gap: 9px; }
.schedule-list article { padding: 12px; display: grid; grid-template-columns: 120px 1fr; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfe; }
.schedule-list time { color: var(--muted); font-size: 9px; }
.schedule-list time b, .schedule-list strong, .schedule-list small { display: block; }
.schedule-list time b { margin-top: 2px; color: var(--ink); font-size: 11px; }
.schedule-list strong { font-size: 11px; }
.schedule-list small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.workload-node-grid { margin-bottom: 20px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.workload-node-grid .empty-state { grid-column: 1 / -1; }
.workload-table-panel { margin-bottom: 20px; }
.hosting-grid { align-items: start; grid-template-columns: repeat(2,minmax(0,1fr)); }
.workload-catalog-list { padding: 0 20px 20px; display: grid; gap: 9px; }
.workload-catalog-list article { padding: 12px; display: grid; grid-template-columns: 38px 1fr auto; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 11px; }
.workload-catalog-list article > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: #152a47; font-weight: 900; }
.workload-catalog-list b,.workload-catalog-list small { display: block; }
.workload-catalog-list small,.workload-catalog-list em { color: var(--muted); font-size: 9px; font-style: normal; }
.portal-workload-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.portal-workload-card { padding: 23px; }
.portal-workload-card header { margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; }
.workload-kind { width: 46px; height: 46px; display: inline-grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(135deg,#1769ff,#52a4ff); font-weight: 900; }
.workload-kind-application { background: linear-gradient(135deg,#6750d8,#9d79ff); }
.workload-kind-voice { background: linear-gradient(135deg,#079684,#39d4bd); }
.workload-kind-musicbot { background: linear-gradient(135deg,#d57912,#f2b34a); }
.portal-workload-card h2 { margin: 5px 0; font-size: 20px; }
.portal-workload-card > p { min-height: 42px; margin: 0; color: var(--muted); }
.portal-workload-card dl { margin: 18px 0; display: grid; grid-template-columns: repeat(2,1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 12px; }
.portal-workload-card dl div { min-width: 0; padding: 11px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.portal-workload-card dl div:nth-child(2n) { border-right: 0; }
.portal-workload-card dl div:nth-last-child(-n+2) { border-bottom: 0; }
.portal-workload-card dt { color: var(--muted); font-size: 8px; text-transform: uppercase; }
.portal-workload-card dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 10px; font-weight: 800; }
.workload-hero { margin-bottom: 18px; padding: 29px; display: grid; grid-template-columns: 1fr minmax(360px,.75fr); align-items: center; gap: 35px; color: #fff; border: 0; background: radial-gradient(circle at 15% 15%,rgba(62,139,255,.38),transparent 36%),linear-gradient(135deg,#08172c,#18375d); }
.workload-hero > div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 0 14px; }
.workload-hero .workload-kind { grid-row: 1 / 4; }
.workload-hero .eyebrow { color: #76ddec; }
.workload-hero h2 { margin: 3px 0; font-size: 27px; }
.workload-hero p { margin: 0; color: #a9bdd7; }
.workload-hero dl { margin: 0; display: grid; grid-template-columns: repeat(2,1fr); overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 15px; }
.workload-hero dl div { padding: 16px; border-right: 1px solid rgba(255,255,255,.1); border-bottom: 1px solid rgba(255,255,255,.1); }
.workload-hero dl div:nth-child(2n) { border-right: 0; }
.workload-hero dl div:nth-last-child(-n+2) { border-bottom: 0; }
.workload-hero dt { color: #8ca3c1; font-size: 8px; text-transform: uppercase; }
.workload-hero dd { margin: 4px 0 0; font-weight: 800; }
.workload-detail-grid { margin-bottom: 20px; grid-template-columns: repeat(2,minmax(0,1fr)); }
.portal-switch-form { padding: 0 22px 22px; display: grid; gap: 15px; }
.portal-switch-form label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 700; }
.portal-switch-form select { height: 42px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.package-grid { padding: 0 22px 22px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.package-grid article { padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fbfcfe; }
.package-grid article > span { color: var(--brand); font-size: 8px; font-weight: 900; letter-spacing: .12em; }
.package-grid h3 { margin: 7px 0 3px; font-size: 13px; }
.package-grid p { margin: 0 0 14px; color: var(--muted); font-size: 9px; }
.package-grid article > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.package-grid form { margin: 0; }
.workload-configs { margin-top: 20px; }
.config-editor { padding: 0 22px 22px; }
.config-editor + .config-editor { padding-top: 20px; border-top: 1px solid var(--line); }
.config-editor header { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.config-editor b,.config-editor small { display: block; }
.config-editor small { color: var(--muted); font-size: 9px; }
.config-editor textarea { width: 100%; padding: 15px; resize: vertical; border: 1px solid #203450; border-radius: 12px; color: #d5e4f7; background: #0c192b; font: 12px/1.55 Consolas,'Courier New',monospace; tab-size: 2; }
.portal-ticket-list { display: grid; gap: 14px; }
.portal-ticket { padding: 0; overflow: hidden; }
.portal-ticket summary { padding: 20px 23px; display: flex; align-items: center; justify-content: space-between; gap: 25px; cursor: pointer; list-style: none; }
.portal-ticket summary::-webkit-details-marker { display: none; }
.portal-ticket summary > span:first-child { display: grid; gap: 2px; }
.portal-ticket summary b { color: var(--brand); font-size: 9px; letter-spacing: .07em; }
.portal-ticket summary strong { font-size: 14px; }
.portal-ticket summary small { color: var(--muted); font-size: 9px; }
.portal-ticket[open] summary { border-bottom: 1px solid var(--line); background: #fbfcfe; }
.ticket-thread { padding: 22px; display: grid; gap: 13px; background: #f5f8fc; }
.ticket-message { max-width: 82%; padding: 15px 17px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.ticket-message.support { justify-self: end; border-color: #cbdfff; background: #edf5ff; }
.ticket-message.internal { border-color: #f2d8a5; background: #fff8e9; }
.ticket-message header { display: flex; justify-content: space-between; gap: 25px; color: var(--muted); font-size: 9px; }
.ticket-message header b { color: var(--ink); }
.ticket-message p { margin: 9px 0 0; overflow-wrap: anywhere; font-size: 11px; }
.ticket-reply-form { padding: 3px 0 0; display: grid; gap: 12px; }
.ticket-reply-form label:not(.check) { display: grid; gap: 6px; color: #536176; font-size: 10px; font-weight: 700; }
.ticket-reply-form textarea { width: 100%; padding: 12px; resize: vertical; border: 1px solid #cfd8e5; border-radius: 11px; background: #fff; color: var(--ink); }
.ticket-reply-form > .btn { justify-self: end; }
.ticket-thread-button { width: 100%; margin-top: 11px; padding: 8px; border: 1px solid #d9e4f3; border-radius: 9px; color: var(--brand); background: #f5f9ff; font-size: 9px; font-weight: 800; cursor: pointer; }
.ticket-thread-modal { max-height: calc(100vh - 40px); overflow: auto; }
.admin-ticket-thread { max-height: 430px; overflow: auto; }
.admin-reply-form { padding: 18px 25px 0; }
.admin-reply-form .modal-actions { margin: 3px -25px 0; }

@media (max-width:1100px) {
  .portal-stream-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workload-node-grid,.portal-workload-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .workload-hero { grid-template-columns: 1fr; }
  .package-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width:820px) {
  .portal-login-shell { grid-template-columns: 1fr; }
  .portal-login-visual { display: none; }
  .portal-customer { margin-top: 25px; }
}

@media (max-width:620px) {
  .portal-stream-grid { grid-template-columns: 1fr; }
  .workload-node-grid,.portal-workload-grid,.hosting-grid,.workload-detail-grid,.package-grid { grid-template-columns: 1fr; }
  .portal-ticket summary { align-items: flex-start; flex-direction: column; gap: 12px; }
  .ticket-message { max-width: 100%; }
  .ticket-message.support { justify-self: stretch; }
  .ticket-message header { flex-direction: column; gap: 2px; }
  .ticket-reply-form > .btn { width: 100%; }
  .portal-stream-actions { grid-template-columns: 1fr; }
  .schedule-list article { grid-template-columns: 1fr; gap: 5px; }
  .workload-hero { padding: 23px; }
  .workload-hero > div { grid-template-columns: 1fr; }
  .workload-hero .workload-kind { grid-row: auto; margin-bottom: 12px; }
  .workload-catalog-list article { grid-template-columns: 38px 1fr; }
  .workload-catalog-list em { grid-column: 2; }
  .config-editor header { align-items: stretch; flex-direction: column; }
}

