/* =====================================================================
   Xion-Group – Reseller-Dashboard
   Dark Premium Theme
   ===================================================================== */

:root {
  --xg-bg:           #0b0b0f;
  --xg-surface:      #131318;
  --xg-surface-2:    #1a1a21;
  --xg-surface-hov:  #1e1e26;
  --xg-border:       rgba(255, 255, 255, 0.07);
  --xg-border-light: rgba(255, 255, 255, 0.04);
  --xg-text:         #e8e8ec;
  --xg-text-muted:   rgba(255, 255, 255, 0.55);
  --xg-accent:       #60a5fa;
  --xg-accent-2:     #818cf8;
  --xg-accent-soft:  rgba(96, 165, 250, 0.12);
  --xg-success:      #4ade80;
  --xg-warn:         #fbbf24;
  --xg-danger:       #f87171;
  --xg-radius:       10px;
  --xg-radius-lg:    14px;
  --xg-shadow:       0 2px 8px rgba(0, 0, 0, 0.25);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--xg-bg);
  color: var(--xg-text);
  font-family: 'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--xg-accent); text-decoration: none; transition: color .15s; }
a:hover { color: #93c5fd; text-decoration: none; }
code, .xg-mono {
  font-family: 'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* ===== Layout ======================================================= */
.xg-layout { display: flex; min-height: 100vh; }

/* --- Sidebar --- */
.xg-sidebar {
  width: 250px;
  flex-shrink: 0;
  background: var(--xg-surface);
  border-right: 1px solid var(--xg-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.xg-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--xg-border);
  color: var(--xg-text);
  text-decoration: none;
}
.xg-sidebar__brand:hover { text-decoration: none; color: var(--xg-text); }
.xg-sidebar__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--xg-accent), var(--xg-accent-2));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: -0.02em;
}
.xg-sidebar__name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.xg-sidebar__nav { padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.xg-sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--xg-text-muted);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
  border: 1px solid transparent;
}
.xg-sidebar__link i { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.7; }
.xg-sidebar__link:hover {
  background: var(--xg-surface-hov);
  color: var(--xg-text);
  text-decoration: none;
}
.xg-sidebar__link:hover i { opacity: 1; }
.xg-sidebar__link.is-active {
  background: var(--xg-accent-soft);
  color: var(--xg-accent);
  border-color: rgba(96, 165, 250, 0.2);
}
.xg-sidebar__link.is-active i { opacity: 1; }
.xg-sidebar__link--logout { color: rgba(248, 113, 113, 0.8); }
.xg-sidebar__link--logout:hover { background: rgba(248, 113, 113, 0.08); color: var(--xg-danger); }
.xg-sidebar__bottom { padding: 12px; border-top: 1px solid var(--xg-border); }

/* --- Main Area --- */
.xg-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.xg-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  border-bottom: 1px solid var(--xg-border);
  background: var(--xg-surface);
  position: sticky;
  top: 0;
  z-index: 10;
}
.xg-topbar__title { font-size: 13px; color: var(--xg-text-muted); font-weight: 500; }
.xg-topbar__user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--xg-text-muted); }
.xg-topbar__user i { width: 18px; height: 18px; }
.xg-content {
  padding: 36px 40px 64px;
  flex: 1;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

/* ===== Typography =================================================== */
.xg-page-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.02em; }
.xg-muted { color: var(--xg-text-muted); margin: 0 0 24px; font-size: 14px; }
.xg-muted--sm { font-size: 12px; margin-top: 8px; }

/* ===== Page Header ================================================== */
.xg-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 24px;
  padding: 28px 32px;
  border-radius: var(--xg-radius-lg);
  background: var(--xg-surface);
  border: 1px solid var(--xg-border);
}
.xg-page-header__text { min-width: 0; }
.xg-page-header__sub { margin: 6px 0 0; font-size: 13.5px; color: var(--xg-text-muted); }
.xg-page-header__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ===== Server Table Cell ============================================ */
.xg-server-cell { display: flex; flex-direction: column; gap: 2px; }
.xg-server-cell__name { font-weight: 600; font-size: 13.5px; }
.xg-server-cell__uuid { font-size: 11px; color: var(--xg-text-muted); }
.xg-server-cell__spec { font-size: 12.5px; color: var(--xg-text-muted); }

/* ===== Buttons ====================================================== */
.xg-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--xg-border);
  background: var(--xg-surface-2);
  color: var(--xg-text);
  text-decoration: none;
  transition: all .15s ease;
  white-space: nowrap;
}
.xg-btn:hover { background: var(--xg-surface-hov); text-decoration: none; border-color: rgba(255,255,255,0.12); }
.xg-btn--sm { padding: 7px 12px; font-size: 12.5px; border-radius: 6px; }
.xg-btn--primary {
  background: var(--xg-accent);
  color: #0f172a;
  border-color: var(--xg-accent);
  box-shadow: 0 2px 12px rgba(96, 165, 250, 0.25);
}
.xg-btn--primary:hover { background: #93c5fd; border-color: #93c5fd; box-shadow: 0 4px 20px rgba(96, 165, 250, 0.35); }
.xg-btn--ghost { background: transparent; border-color: var(--xg-border); color: var(--xg-text-muted); }
.xg-btn--ghost:hover { background: var(--xg-surface-hov); color: var(--xg-text); }
.xg-btn--danger { background: rgba(248, 113, 113, 0.1); color: var(--xg-danger); border-color: rgba(248, 113, 113, 0.3); }
.xg-btn--danger:hover { background: rgba(248, 113, 113, 0.2); }
.xg-btn i { width: 16px; height: 16px; }
.xg-inline-form { display: inline; margin: 0; }

/* ===== Dashboard Hero =============================================== */
.xg-dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 28px;
  padding: 32px 36px;
  border-radius: var(--xg-radius-lg);
  background: var(--xg-surface);
  border: 1px solid var(--xg-border);
  position: relative;
  overflow: hidden;
}
.xg-dash-hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.10) 0%, transparent 65%);
  pointer-events: none;
}
.xg-dash-hero::after {
  content: '';
  position: absolute;
  bottom: -50%;
  left: 20%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(129, 140, 248, 0.06) 0%, transparent 65%);
  pointer-events: none;
}
.xg-dash-hero__text { position: relative; z-index: 1; }
.xg-dash-hero__greet {
  margin: 0 0 4px;
  font-size: 13px;
  color: var(--xg-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.xg-dash-hero__title {
  margin: 0 0 8px;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.xg-dash-hero__sub { margin: 0; font-size: 13.5px; color: var(--xg-text-muted); }
.xg-dash-hero__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; z-index: 1; }

/* ===== KPI Cards ==================================================== */
.xg-dash-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 28px;
}

.xg-kpi {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px 18px;
  background: var(--xg-surface);
  border: 1px solid var(--xg-border);
  border-radius: var(--xg-radius);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.xg-kpi:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}
.xg-kpi--accent {
  background: linear-gradient(145deg, rgba(96, 165, 250, 0.06) 0%, var(--xg-surface) 70%);
  border-color: rgba(96, 165, 250, 0.15);
}
.xg-kpi__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--xg-accent-soft);
  color: var(--xg-accent);
  flex-shrink: 0;
}
.xg-kpi__icon i { width: 20px; height: 20px; }
.xg-kpi__icon--warn    { background: rgba(251, 191, 36, 0.12); color: var(--xg-warn); }
.xg-kpi__icon--success { background: rgba(74, 222, 128, 0.12); color: var(--xg-success); }
.xg-kpi__icon--info    { background: rgba(148, 163, 184, 0.12); color: #94a3b8; }
.xg-kpi__body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.xg-kpi__label {
  font-size: 11.5px;
  color: var(--xg-text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.xg-kpi__value { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.xg-kpi__hint { font-size: 12px; color: var(--xg-text-muted); }
.xg-kpi__hint a { font-weight: 500; }
.xg-kpi__bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 3px;
  margin: 8px 0 4px;
  overflow: hidden;
}
.xg-kpi__bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--xg-accent), #93c5fd);
  border-radius: 3px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Dashboard Grid =============================================== */
.xg-dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  align-items: start;
}

/* ===== Panels ======================================================= */
.xg-panel {
  background: var(--xg-surface);
  border: 1px solid var(--xg-border);
  border-radius: var(--xg-radius);
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
}
.xg-panel--wide { grid-column: span 2; }
.xg-panel--full { grid-column: span 3; }
.xg-panel--pair {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: stretch;
}

.xg-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.xg-panel__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.xg-panel__title i { width: 17px; height: 17px; color: var(--xg-accent); opacity: 0.8; }
.xg-panel__meta { font-size: 12px; color: var(--xg-text-muted); }
.xg-panel__link { font-size: 12.5px; font-weight: 500; }

.xg-panel__chart {
  position: relative;
  flex: 1;
  width: 100%;
  height: 240px;
  min-height: 200px;
}
.xg-panel--wide .xg-panel__chart,
.xg-panel--full .xg-panel__chart { height: 220px; min-height: 200px; }
.xg-panel__chart canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
}
.xg-panel__chart--donut {
  height: 240px;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.xg-donut-center {
  position: absolute;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  text-align: center;
  pointer-events: none;
}
.xg-donut-center__val { display: block; font-size: 28px; font-weight: 700; color: var(--xg-text); }
.xg-donut-center__lbl { font-size: 11px; color: var(--xg-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }

.xg-panel__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 36px;
  color: var(--xg-text-muted);
  text-align: center;
}
.xg-panel__empty i { width: 36px; height: 36px; opacity: 0.3; }
.xg-panel__empty p { margin: 0; font-size: 13px; }
.xg-panel__empty--sm { padding: 20px; }

/* ===== Server Rows ================================================== */
.xg-dash-servers { display: flex; flex-direction: column; }
.xg-dash-server-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 4px;
  border-bottom: 1px solid var(--xg-border-light);
  transition: background 0.1s;
}
.xg-dash-server-row:hover { background: rgba(255, 255, 255, 0.02); }
.xg-dash-server-row:last-child { border-bottom: none; }
.xg-dash-server-row__name { font-weight: 600; font-size: 13.5px; display: block; }
.xg-dash-server-row__spec { font-size: 12px; color: var(--xg-text-muted); display: block; margin-top: 3px; }
.xg-dash-server-row__price { font-size: 12.5px; color: var(--xg-text-muted); }

/* ===== Invoice List ================================================= */
.xg-dash-invoices { list-style: none; margin: 0; padding: 0; }
.xg-dash-invoices li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px 4px;
  border-bottom: 1px solid var(--xg-border-light);
  font-size: 13px;
}
.xg-dash-invoices li:last-child { border-bottom: none; }
.xg-dash-invoices__period { color: var(--xg-text-muted); }
.xg-dash-invoices__amount { font-weight: 600; }

/* ===== Cards (used in Billing/Other pages) ========================== */
.xg-grid { display: grid; gap: 16px; }
.xg-grid--cards { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-bottom: 32px; }

.xg-card {
  background: var(--xg-surface);
  border: 1px solid var(--xg-border);
  border-radius: var(--xg-radius);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.xg-card--inline { max-width: 360px; margin-bottom: 28px; }
.xg-card__label { font-size: 11.5px; color: var(--xg-text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500; }
.xg-card__value { font-size: 22px; font-weight: 700; }
.xg-card__hint  { font-size: 12px; color: var(--xg-text-muted); }

/* ===== Sections ===================================================== */
.xg-section { margin-top: 32px; }
.xg-section__title { font-size: 16px; font-weight: 700; margin: 0 0 14px; }
.xg-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

/* ===== Preistabelle (legacy) ======================================== */
.xg-pricetable {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.xg-pricetable > div {
  background: var(--xg-surface);
  border: 1px solid var(--xg-border);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.xg-pricetable span  { font-size: 12px; color: var(--xg-text-muted); }
.xg-pricetable strong { font-size: 14px; font-weight: 600; }

/* ===== Tabelle ====================================================== */
.xg-tablewrap {
  background: var(--xg-surface);
  border: 1px solid var(--xg-border);
  border-radius: var(--xg-radius);
  overflow: auto;
}
.xg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.xg-table th, .xg-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--xg-border-light);
  white-space: nowrap;
}
.xg-table th {
  background: rgba(255, 255, 255, 0.02);
  font-weight: 600;
  color: var(--xg-text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.xg-table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }
.xg-table tbody tr:last-child td { border-bottom: none; }

/* ===== Badges ======================================================= */
.xg-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--xg-text);
  letter-spacing: 0.01em;
}
.xg-badge--pending     { background: rgba(251, 191, 36, 0.15); color: var(--xg-warn); }
.xg-badge--active      { background: rgba(74, 222, 128, 0.15); color: var(--xg-success); }
.xg-badge--suspended   { background: rgba(248, 113, 113, 0.15); color: var(--xg-danger); }
.xg-badge--terminated  { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }
.xg-badge--open        { background: rgba(248, 113, 113, 0.15); color: var(--xg-danger); }
.xg-badge--ack         { background: rgba(251, 191, 36, 0.15); color: var(--xg-warn); }
.xg-badge--resolved    { background: rgba(74, 222, 128, 0.15); color: var(--xg-success); }
.xg-badge--paid        { background: rgba(74, 222, 128, 0.15); color: var(--xg-success); }
.xg-badge--void        { background: rgba(148, 163, 184, 0.15); color: #94a3b8; }

/* ===== Formulare ==================================================== */
.xg-form { display: flex; flex-direction: column; gap: 16px; max-width: 480px; }
.xg-form--grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  max-width: 880px;
}
.xg-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.xg-field > span { color: var(--xg-text-muted); font-weight: 500; font-size: 12.5px; }
.xg-field input, .xg-field select {
  background: var(--xg-surface-2);
  border: 1px solid var(--xg-border);
  border-radius: 8px;
  padding: 11px 14px;
  color: var(--xg-text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.xg-field input:focus, .xg-field select:focus {
  outline: none;
  border-color: var(--xg-accent);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}
.xg-form__actions { grid-column: 1 / -1; display: flex; gap: 12px; align-items: center; padding-top: 8px; }

/* ===== Empty / Alerts =============================================== */
.xg-empty {
  border: 1px dashed rgba(255, 255, 255, 0.1);
  border-radius: var(--xg-radius);
  padding: 32px;
  text-align: center;
  color: var(--xg-text-muted);
  background: var(--xg-surface);
}
.xg-alert { padding: 14px 18px; border-radius: 8px; margin-bottom: 18px; font-size: 13px; }
.xg-alert--error   { background: rgba(248, 113, 113, 0.1); color: var(--xg-danger); border: 1px solid rgba(248, 113, 113, 0.25); }
.xg-alert--success { background: rgba(74, 222, 128, 0.1);  color: var(--xg-success); border: 1px solid rgba(74, 222, 128, 0.25); }

/* ===== Login ======================================================== */
.xg-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: var(--xg-bg);
}
.xg-login__card {
  width: 100%;
  max-width: 400px;
  background: var(--xg-surface);
  border: 1px solid var(--xg-border);
  border-radius: var(--xg-radius-lg);
  padding: 40px 36px;
  box-shadow: var(--xg-shadow);
}
.xg-login__brand { text-align: center; margin-bottom: 28px; }
.xg-login__logo {
  display: inline-block;
  font-size: 26px;
  font-weight: 700;
  color: var(--xg-accent);
  letter-spacing: -0.02em;
}
.xg-login__sub { color: var(--xg-text-muted); font-size: 13px; margin: 8px 0 0; }
.xg-login__footer { text-align: center; font-size: 12px; color: var(--xg-text-muted); margin-top: 20px; }
.xg-login .xg-btn { width: 100%; justify-content: center; }

/* ===== Responsive =================================================== */

/* 1440p+ (2560px viewport with sidebar = ~2300px content) */
@media (min-width: 1600px) {
  .xg-content { padding: 44px 56px 72px; }
  .xg-dash-kpis { grid-template-columns: repeat(4, 1fr); gap: 20px; }
  .xg-dash-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .xg-panel__chart { height: 280px; min-height: 280px; }
  .xg-panel--wide .xg-panel__chart { height: 240px; min-height: 240px; }
  .xg-panel__chart--donut { height: 280px; min-height: 280px; }
  .xg-dash-hero { padding: 36px 44px; }
  .xg-dash-hero__title { font-size: 30px; }
  .xg-kpi { padding: 24px 22px; }
  .xg-kpi__value { font-size: 26px; }
  .xg-panel { padding: 24px 28px; }
}

/* Ultra-wide (3440px+) */
@media (min-width: 2200px) {
  .xg-content { padding: 48px 72px 80px; }
  .xg-dash-kpis { gap: 24px; }
  .xg-dash-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .xg-panel__chart { height: 320px; min-height: 320px; }
  .xg-panel__chart--donut { height: 320px; min-height: 320px; }
}

/* Normal desktop (1200-1599px) */
@media (max-width: 1599px) and (min-width: 1201px) {
  .xg-dash-kpis { grid-template-columns: repeat(4, 1fr); }
  .xg-dash-grid { grid-template-columns: repeat(3, 1fr); }
}

/* Smaller desktop / tablet landscape */
@media (max-width: 1200px) {
  .xg-dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .xg-dash-grid { grid-template-columns: 1fr 1fr; }
  .xg-panel--wide { grid-column: span 2; }
  .xg-panel--full { grid-column: span 2; }
  .xg-panel--pair { grid-column: span 2; }
  .xg-content { padding: 28px 24px 56px; }
}

/* Tablet portrait */
@media (max-width: 900px) {
  .xg-dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .xg-dash-grid { grid-template-columns: 1fr; }
  .xg-panel--wide,
  .xg-panel--full,
  .xg-panel--pair { grid-column: span 1; }
  .xg-panel--pair { grid-template-columns: 1fr; }
}

/* Mobile / collapsed sidebar */
@media (max-width: 768px) {
  .xg-sidebar { width: 64px; }
  .xg-sidebar__name,
  .xg-sidebar__link span { display: none; }
  .xg-sidebar__link { justify-content: center; padding: 10px; }
  .xg-sidebar__brand { justify-content: center; padding: 20px 12px; }
  .xg-content { padding: 20px 16px 48px; }
  .xg-dash-hero { padding: 24px 20px; }
  .xg-dash-hero__title { font-size: 20px; }
  .xg-topbar { padding: 12px 16px; }
  .xg-dash-kpis { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* Small mobile */
@media (max-width: 520px) {
  .xg-dash-kpis { grid-template-columns: 1fr; }
  .xg-dash-grid { grid-template-columns: 1fr; }
  .xg-panel--wide,
  .xg-panel--full { grid-column: span 1; }
  .xg-dash-hero__actions { width: 100%; }
  .xg-dash-hero__actions .xg-btn { flex: 1; justify-content: center; }
}
