/* Customer panel: Dark-mode coverage of cards, tables, forms, dialogs and the overview contrast. */
/* ═════════════════════════════════════════════════
 *  IT4Y_DARK_MODE_COMPREHENSIVE_V1 — Complete dark-mode coverage
 *  Sidebar + header already worked. This fills every other surface.
 * ═════════════════════════════════════════════════ */

/* Body bg in dark mode (page background behind cards) */
body.dark {
  background: #0b1220 !important;
  color: #e5e7eb !important;
}

/* Generic card surface */
body.dark .card,
body.dark .panel,
body.dark .it4dash,
body.dash[data-theme="dark"] .card,
html[data-theme="dark"] .card {
  background: #111827 !important;
  border-color: #1f2937 !important;
  color: #e5e7eb !important;
}

/* The welcome banner */
body.dark .welcome-banner,
body.dark .welcome,
body.dark .hero {
  background: linear-gradient(135deg, #111827 0%, rgba(34,160,255,.08) 100%) !important;
  border-color: #1f2937 !important;
  color: #e5e7eb !important;
}

/* Stat tiles */
body.dark .stat,
body.dark .stats .stat,
body.dark a.stat {
  background: #111827 !important;
  border: 1px solid #1f2937 !important;
  color: #e5e7eb !important;
}
body.dark .stat:hover { background: #1f2937 !important; }
body.dark .stat .l,
body.dark .stat .label,
body.dark .stat .sublabel { color: #94a3b8 !important; }

/* Section header strip (the blue gradient "My Virtual Servers" bar) */
body.dark .sec-h,
body.dark .section-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #1d4ed8 100%) !important;
  color: #f3f4f6 !important;
}

/* VPS / resource cards */
body.dark .vps-card,
body.dark .resource-card,
body.dark .item-card {
  background: #111827 !important;
  border: 1px solid #1f2937 !important;
  color: #e5e7eb !important;
}

/* Tab buttons (Overview / Terminal / Backups …) */
body.dark .tab-btn,
body.dark .tab-button,
body.dark [role="tab"],
body.dark .vps-tab {
  background: #1f2937 !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
body.dark .tab-btn.active,
body.dark .tab-button.active,
body.dark [role="tab"][aria-selected="true"],
body.dark .vps-tab.active {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #fff !important;
}

/* Page main background (behind cards) */
body.dark main,
body.dark .app-main,
body.dark #main-content,
body.dark #view-root,
body.dark .main-content {
  background: #0b1220 !important;
  color: #e5e7eb !important;
}

/* Tables */
body.dark table,
body.dark .table {
  background: transparent !important;
  color: #e5e7eb !important;
}
body.dark thead,
body.dark thead th {
  background: #1f2937 !important;
  color: #cbd5e1 !important;
  border-color: #334155 !important;
}
body.dark td,
body.dark th { border-color: #1f2937 !important; }
body.dark tbody tr:hover { background: rgba(255,255,255,.03) !important; }

/* Pills / badges baseline */
body.dark .pill,
body.dark .badge,
body.dark .chip {
  background: #1f2937 !important;
  color: #cbd5e1 !important;
}
body.dark .pill.green { background: rgba(34,197,94,.18) !important; color: #4ade80 !important; }
body.dark .pill.red,
body.dark .pill.danger { background: rgba(239,68,68,.18) !important; color: #fca5a5 !important; }
body.dark .pill.yellow,
body.dark .pill.amber,
body.dark .pill.warning { background: rgba(245,158,11,.18) !important; color: #fbbf24 !important; }
body.dark .pill.blue,
body.dark .pill.info { background: rgba(59,130,246,.18) !important; color: #93c5fd !important; }
body.dark .pill.gray,
body.dark .pill.muted { background: rgba(148,163,184,.16) !important; color: #cbd5e1 !important; }

/* Form inputs */
body.dark input[type="text"],
body.dark input[type="email"],
body.dark input[type="password"],
body.dark input[type="search"],
body.dark input[type="number"],
body.dark input[type="tel"],
body.dark input[type="url"],
body.dark select,
body.dark textarea {
  background: #0b1220 !important;
  border-color: #334155 !important;
  color: #e5e7eb !important;
}
body.dark input::placeholder,
body.dark textarea::placeholder { color: #6b7280 !important; }
body.dark input:focus,
body.dark select:focus,
body.dark textarea:focus {
  border-color: #22a0ff !important;
  box-shadow: 0 0 0 3px rgba(34,160,255,.18) !important;
}

/* Buttons (preserve color identity, only fix the ghost variants) */
body.dark .btn.ghost,
body.dark button.ghost {
  background: transparent !important;
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
body.dark .btn.ghost:hover,
body.dark button.ghost:hover {
  background: rgba(255,255,255,.06) !important;
  color: #fff !important;
}

/* Modal / drawer / dialog */
body.dark .modal,
body.dark .modal-content,
body.dark .drawer,
body.dark .dialog,
body.dark dialog,
body.dark .popover,
body.dark .dropdown-menu,
body.dark .menu {
  background: #111827 !important;
  border: 1px solid #1f2937 !important;
  color: #e5e7eb !important;
}
body.dark .modal-backdrop,
body.dark .backdrop { background: rgba(0,0,0,.6) !important; }

/* Toasts */
body.dark .toast {
  background: #1f2937 !important;
  border: 1px solid #334155 !important;
  color: #e5e7eb !important;
}

/* Code / kbd */
body.dark code,
body.dark kbd,
body.dark pre {
  background: #1f2937 !important;
  color: #e5e7eb !important;
  border-color: #334155 !important;
}

/* Headings / titles */
body.dark h1, body.dark h2, body.dark h3, body.dark h4, body.dark h5, body.dark h6 {
  color: #f3f4f6 !important;
}

/* Borders / dividers */
body.dark hr,
body.dark .divider,
body.dark .border { border-color: #1f2937 !important; }

/* Links */
body.dark a:not(.btn):not(.pill):not(.nav-item) { color: #93c5fd; }

/* Empty states */
body.dark .empty,
body.dark .empty-state {
  background: transparent !important;
  color: #94a3b8 !important;
}

/* Search/command palette */
body.dark .search-input,
body.dark [class*="search"]:not(.icon) {
  background: #111827 !important;
  color: #e5e7eb !important;
}









/* "More" / "Less" button */
.it4y-banner-toggle {
  background: transparent !important;
  border: 1px solid var(--border, #d1d5db) !important;
  color: var(--text-dim, #6b7280) !important;
  padding: 3px 10px !important;
  font-size: 11px !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  margin-left: auto !important;
}
.it4y-banner-toggle:hover {
  background: rgba(34,160,255,.08) !important;
  color: var(--brand, #22a0ff) !important;
  border-color: var(--brand, #22a0ff) !important;
}
body.dark .it4y-banner-toggle {
  border-color: #334155 !important;
  color: #cbd5e1 !important;
}
body.dark .it4y-banner-toggle:hover {
  background: rgba(34,160,255,.12) !important;
  color: #93c5fd !important;
}

.it4y-banner-dismiss:hover { background: rgba(239,68,68,.12) !important; color: #ef4444 !important; }
body.dark .it4y-banner-dismiss { color: #94a3b8 !important; }


/* end IT4Y_TKT_BANNER_COLLAPSE_V1 */

/* ═════════════════════════════════════════════════
 *  IT4Y_ADMIN_OVERVIEW_CONTRAST_V1 — fix Overview status-pills + numbers
 * ═════════════════════════════════════════════════ */

/* Card text + numbers in dark mode */
body.dark .card .num,
body.dark .card .count,
body.dark .card .stat-num,
body.dark .card .pill + strong,
body.dark .card strong,
body.dark .card td,
body.dark .card .row,
body.dark .card span:not(.pill):not(.badge):not(.chip) {
  color: #e5e7eb !important;
}

/* Status pills baseline (all variants) */
body.dark .pill,
body.dark .status-pill,
body.dark [class*="pill-"],
body.dark [class*="status-"],
body.dark .badge {
  background: rgba(148,163,184,.18) !important;
  color: #cbd5e1 !important;
  border: 1px solid rgba(148,163,184,.24) !important;
}

/* Specific status colors — keep semantic intent in dark */
body.dark .pill.trialing,    body.dark .status-trialing,    body.dark [class*="trialing"]    {background: rgba(168,85,247,.18) !important;
  color: #d8b4fe !important; border-color: rgba(168,85,247,.32) !important; }
body.dark .pill.active,      body.dark .status-active,      body.dark [class*="-active"]     {background: rgba(34,197,94,.18) !important;
  color: #4ade80 !important; border-color: rgba(34,197,94,.32) !important; }
body.dark .pill.past_due,    body.dark .status-past_due,    body.dark [class*="past_due"]    {background: rgba(239,68,68,.18) !important;
  color: #fca5a5 !important; border-color: rgba(239,68,68,.32) !important; }
body.dark .pill.suspended,   body.dark .status-suspended,   body.dark [class*="suspended"]   {background: rgba(245,158,11,.18) !important;
  color: #fbbf24 !important; border-color: rgba(245,158,11,.32) !important; }
body.dark .pill.grace,       body.dark .status-grace,       body.dark [class*="-grace"]      {background: rgba(245,158,11,.18) !important;
  color: #fbbf24 !important; border-color: rgba(245,158,11,.32) !important; }
body.dark .pill.provisioning,body.dark .status-provisioning,body.dark [class*="provisioning"]{background: rgba(59,130,246,.18) !important;
  color: #93c5fd !important; border-color: rgba(59,130,246,.32) !important; }
body.dark .pill.failed,      body.dark .status-failed,      body.dark [class*="-failed"]     {background: rgba(239,68,68,.22) !important;
  color: #fca5a5 !important; border-color: rgba(239,68,68,.40) !important; }
body.dark .pill.terminated,  body.dark .status-terminated,  body.dark [class*="terminated"]  {background: rgba(100,116,139,.22) !important;
  color: #cbd5e1 !important; border-color: rgba(100,116,139,.40) !important; }
body.dark .pill.suspending,  body.dark [class*="suspending"]                                {background: rgba(245,158,11,.18) !important;
  color: #fbbf24 !important; border-color: rgba(245,158,11,.32) !important; }
body.dark .pill.pending,     body.dark [class*="-pending"]                                  {background: rgba(245,158,11,.18) !important;
  color: #fbbf24 !important; border-color: rgba(245,158,11,.32) !important; }
body.dark .pill.paid,        body.dark [class*="-paid"]                                     {background: rgba(34,197,94,.18) !important;
  color: #4ade80 !important; border-color: rgba(34,197,94,.32) !important; }
body.dark .pill.draft,       body.dark [class*="-draft"]                                    {background: rgba(148,163,184,.18) !important;
  color: #cbd5e1 !important; border-color: rgba(148,163,184,.24) !important; }
body.dark .pill.void,        body.dark [class*="-void"]                                     {background: rgba(239,68,68,.18) !important;
  color: #fca5a5 !important; border-color: rgba(239,68,68,.32) !important; }
body.dark .pill.refunded,    body.dark [class*="-refunded"]                                 {background: rgba(168,85,247,.18) !important;
  color: #d8b4fe !important; border-color: rgba(168,85,247,.32) !important; }

/* Status pill provider-hue overrides */
body.dark .pill.hetzner, body.dark [class*="-hetzner"] {background: rgba(239,68,68,.18) !important; color: #fca5a5 !important;
  border-color: rgba(239,68,68,.32) !important; }
body.dark .pill.manual,  body.dark [class*="-manual"]  {background: rgba(148,163,184,.18) !important; color: #cbd5e1 !important;
  border-color: rgba(148,163,184,.24) !important; }
body.dark .pill.mock,    body.dark [class*="-mock"]    {background: rgba(20,184,166,.18) !important; color: #5eead4 !important;
  border-color: rgba(20,184,166,.32) !important; }

/* Overview "Subscriptions by status" etc. cards — force number-column readable */
body.dark .card h3,
body.dark .card h2,
body.dark .card .card-title { color: #f3f4f6 !important; }

/* Row spacing in those cards (numbers right-aligned, pills left) */
body.dark .card .row > *:last-child,
body.dark .card .row > b:last-child,
body.dark .card .row strong:last-child { color: #f3f4f6 !important; font-weight: 600 !important; }

/* end IT4Y_ADMIN_OVERVIEW_CONTRAST_V1 */
