/* ============================================================
   VenixHosting — Dark Glassmorphism Dashboard Stylesheet
   ============================================================ */

/* ----------------------------------------------------------
   1. CSS Reset & Box Sizing
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  scroll-behavior: smooth;
}

body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, blockquote, dl, dd {
  margin: 0;
}

ul, ol { list-style: none; }
a { text-decoration: none; color: inherit; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; width: 100%; }

/* ----------------------------------------------------------
   2. Root Variables (HSL converted)
   ---------------------------------------------------------- */
:root {
  --background:            hsl(222, 47%, 11%);
  --foreground:            hsl(210, 40%, 98%);

  --card:                  hsl(217, 33%, 17%);
  --card-foreground:       hsl(210, 40%, 98%);

  --popover:               hsl(224, 71%, 8%);
  --popover-foreground:    hsl(210, 40%, 98%);

  --primary:               hsl(217, 91%, 60%);
  --primary-foreground:    hsl(222, 47%, 11%);

  --secondary:             hsl(217, 33%, 17%);
  --secondary-foreground:  hsl(210, 40%, 98%);

  --muted:                 hsl(217, 33%, 22%);
  --muted-foreground:      hsl(215, 20%, 65%);

  --accent:                hsl(262, 83%, 58%);
  --accent-foreground:     hsl(210, 40%, 98%);

  --destructive:           hsl(0, 85%, 60%);
  --destructive-foreground:hsl(210, 40%, 98%);

  --success:               hsl(142, 71%, 45%);
  --success-foreground:    hsl(210, 40%, 98%);

  --warning:               hsl(38, 92%, 50%);
  --warning-foreground:    hsl(222, 47%, 11%);

  --border:                hsl(217, 33%, 22%);
  --input:                 hsl(217, 33%, 22%);
  --ring:                  hsl(217, 91%, 60%);
  --radius:                0.75rem;

  --sidebar-background:    hsl(222, 47%, 8%);
  --sidebar-foreground:    hsl(210, 40%, 98%);
  --sidebar-primary:       hsl(217, 91%, 60%);
  --sidebar-accent:        hsl(217, 33%, 17%);
  --sidebar-border:        hsl(217, 33%, 15%);

  --navbar-height:         4rem;
  --sidebar-width:         16rem;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif,
               "Apple Color Emoji", "Segoe UI Emoji";
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
               "Liberation Mono", "Courier New", monospace;
}

/* ----------------------------------------------------------
   3. Body Styles
   ---------------------------------------------------------- */
body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ----------------------------------------------------------
   4. Layout: App Main (sidebar offset + navbar offset)
   ---------------------------------------------------------- */
.app-main {
  margin-left: var(--sidebar-width);
  padding-top: var(--navbar-height);
  min-height: 100vh;
}

.content-wrapper {
  padding: 1.5rem 2rem 2rem;
}

/* ----------------------------------------------------------
   5. Glass Card
   ---------------------------------------------------------- */
.card,
.glass-card {
  background: hsla(217, 33%, 17%, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsla(217, 33%, 30%, 0.35);
  border-radius: var(--radius);
  color: var(--card-foreground);
}

.card-hoverable:hover {
  border-color: hsla(217, 91%, 60%, 0.45);
  box-shadow: 0 0 20px hsla(217, 91%, 60%, 0.08),
              0 8px 32px hsla(0, 0%, 0%, 0.25);
  transform: translateY(-2px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.card-header {
  padding: 1.25rem 1.5rem 0.75rem;
}

.card-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
}

.card-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.card-content {
  padding: 1rem 1.5rem;
}

.card-footer {
  padding: 0.75rem 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* ----------------------------------------------------------
   6. Gradient Primary
   ---------------------------------------------------------- */
.gradient-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}

/* ----------------------------------------------------------
   7. Text Gradient
   ---------------------------------------------------------- */
.text-gradient {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* ----------------------------------------------------------
   8. Stat Cards & Stat Icons
   ---------------------------------------------------------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.stat-info { display: flex; flex-direction: column; gap: 0.25rem; }

.stat-label {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  font-weight: 500;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-change {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

.stat-change.up   { color: var(--success); }
.stat-change.down { color: var(--destructive); }

.stat-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
  background: linear-gradient(135deg, hsla(217, 91%, 60%, 0.2), hsla(262, 83%, 58%, 0.2));
  color: var(--primary);
}

.stat-icon.success { background: hsla(142, 71%, 45%, 0.15); color: var(--success); }
.stat-icon.warning { background: hsla(38, 92%, 50%, 0.15); color: var(--warning); }
.stat-icon.destructive { background: hsla(0, 85%, 60%, 0.15); color: var(--destructive); }
.stat-icon.accent  { background: hsla(262, 83%, 58%, 0.15); color: var(--accent); }

/* ----------------------------------------------------------
   9. Page Header / Title / Subtitle
   ---------------------------------------------------------- */
.page-header {
  margin-bottom: 1.75rem;
}

.page-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  line-height: 1.3;
}

.page-subtitle {
  font-size: 0.9375rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

/* ----------------------------------------------------------
   10. Section Title, Info Row, Info Label, Info Value
   ---------------------------------------------------------- */
.section-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0;
  border-bottom: 1px solid hsla(217, 33%, 22%, 0.5);
  gap: 1rem;
}

.info-row:last-child { border-bottom: none; }

.info-label {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  font-weight: 500;
  min-width: 120px;
  flex-shrink: 0;
}

.info-value {
  font-size: 0.875rem;
  color: var(--foreground);
  font-weight: 400;
  text-align: right;
  word-break: break-all;
}

/* ----------------------------------------------------------
   11. Buttons
   ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1;
  padding: 0.625rem 1.25rem;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.5;
  pointer-events: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  border: none;
}

.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 20px hsla(217, 91%, 60%, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: hsla(217, 33%, 22%, 0.5);
  border-color: var(--primary);
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border: none;
}

.btn-ghost:hover {
  background: hsla(217, 33%, 22%, 0.5);
}

.btn-destructive {
  background: var(--destructive);
  color: var(--destructive-foreground);
  border: none;
}

.btn-destructive:hover {
  filter: brightness(1.1);
  box-shadow: 0 0 16px hsla(0, 85%, 60%, 0.3);
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
  border: none;
}

.btn-secondary:hover {
  background: var(--muted);
}

.btn-success {
  background: var(--success);
  color: var(--success-foreground);
  border: none;
}

.btn-success:hover {
  filter: brightness(1.1);
}

.btn-sm {
  padding: 0.375rem 0.875rem;
  font-size: 0.8125rem;
  border-radius: calc(var(--radius) - 2px);
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
}

.btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
}

.btn-icon.btn-sm {
  width: 1.875rem;
  height: 1.875rem;
}

/* ----------------------------------------------------------
   12. Form Inputs
   ---------------------------------------------------------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.form-input,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="date"] {
  width: 100%;
  padding: 0.5625rem 0.875rem;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 0.875rem;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder,
input::placeholder {
  color: var(--muted-foreground);
  opacity: 0.7;
}

.form-input:focus,
input:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(217, 91%, 60%, 0.15);
}

.form-input:disabled,
input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.form-error {
  font-size: 0.8125rem;
  color: var(--destructive);
  margin-top: 0.125rem;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

/* ----------------------------------------------------------
   13. Labels
   ---------------------------------------------------------- */
label,
.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--foreground);
  display: block;
  margin-bottom: 0.25rem;
}

.form-label-required::after {
  content: " *";
  color: var(--destructive);
}

/* ----------------------------------------------------------
   14. Badges
   ---------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1875rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-default {
  background: var(--primary);
  color: var(--primary-foreground);
}

.badge-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
}

.badge-destructive {
  background: hsla(0, 85%, 60%, 0.15);
  color: var(--destructive);
}

.badge-success {
  background: hsla(142, 71%, 45%, 0.15);
  color: var(--success);
}

.badge-warning {
  background: hsla(38, 92%, 50%, 0.15);
  color: var(--warning);
}

.badge-accent {
  background: hsla(262, 83%, 58%, 0.15);
  color: var(--accent);
}

.badge-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

/* ----------------------------------------------------------
   15. Tables
   ---------------------------------------------------------- */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  font-size: 0.875rem;
}

thead {
  background: hsla(217, 33%, 17%, 0.6);
}

th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid hsla(217, 33%, 22%, 0.4);
  color: var(--foreground);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background-color 0.15s ease;
}

tbody tr:hover {
  background: hsla(217, 33%, 22%, 0.35);
}

/* ----------------------------------------------------------
   16. Navigation Links
   ---------------------------------------------------------- */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.875rem;
  border-radius: calc(var(--radius) - 2px);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--sidebar-foreground);
  transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
  background: hsla(217, 33%, 22%, 0.5);
}

.nav-link.active {
  background: hsla(217, 91%, 60%, 0.12);
  color: var(--sidebar-primary);
  font-weight: 500;
}

.nav-link .nav-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-link.active .nav-icon {
  opacity: 1;
  color: var(--sidebar-primary);
}

/* ----------------------------------------------------------
   17. Sidebar
   ---------------------------------------------------------- */
.sidebar a:hover {
  background: hsla(217, 33%, 22%, 0.5);
}

.sidebar button:hover {
  background: hsla(217, 33%, 22%, 0.5);
}

/* ----------------------------------------------------------
   18. Navbar
   ---------------------------------------------------------- */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  background: hsla(222, 47%, 11%, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.mobile-menu-btn {
  display: none;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--foreground);
  font-size: 1.25rem;
}

/* ----------------------------------------------------------
   19. Auth Layout
   ---------------------------------------------------------- */
.auth-layout {
  display: flex;
  min-height: 100vh;
}

.auth-decorative {
  display: none;
  flex: 1;
  background: linear-gradient(135deg, var(--background), hsl(262, 50%, 14%));
  position: relative;
  overflow: hidden;
}

.auth-decorative-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 3rem;
  text-align: center;
}

.auth-decorative::before {
  content: "";
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(217, 91%, 60%, 0.15), transparent 70%);
  top: 20%;
  left: 30%;
  animation: float 6s ease-in-out infinite;
}

.auth-decorative::after {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, hsla(262, 83%, 58%, 0.12), transparent 70%);
  bottom: 15%;
  right: 20%;
  animation: float 8s ease-in-out infinite reverse;
}

.auth-form-side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-form-container {
  width: 100%;
  max-width: 420px;
}

.auth-form-card {
  background: hsla(217, 33%, 17%, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid hsla(217, 33%, 30%, 0.35);
  border-radius: var(--radius);
  padding: 2rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  text-align: center;
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.auth-footer {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.auth-footer a {
  color: var(--primary);
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

@media (min-width: 1024px) {
  .auth-decorative { display: flex; }
}

/* ----------------------------------------------------------
   20. Dropdown Menu
   ---------------------------------------------------------- */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.375rem);
  min-width: 200px;
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.375rem;
  z-index: 50;
  box-shadow: 0 10px 40px hsla(0, 0%, 0%, 0.4);
  display: none;
}

.dropdown.open .dropdown-menu {
  display: block;
  animation: fade-in 0.15s ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  border-radius: calc(var(--radius) - 4px);
  font-size: 0.875rem;
  color: var(--popover-foreground);
  cursor: pointer;
  transition: background-color 0.12s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: hsla(217, 33%, 22%, 0.5);
}

.dropdown-item.destructive {
  color: var(--destructive);
}

.dropdown-item.destructive:hover {
  background: hsla(0, 85%, 60%, 0.12);
}

.dropdown-separator {
  height: 1px;
  background: var(--border);
  margin: 0.375rem 0;
}

.dropdown-label {
  padding: 0.375rem 0.75rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
}

/* ----------------------------------------------------------
   21. Dialog / Modal
   ---------------------------------------------------------- */
.dialog-overlay {
  position: fixed;
  inset: 0;
  background: hsla(0, 0%, 0%, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fade-in 0.15s ease;
}

.dialog-overlay[hidden] { display: none; }

.dialog {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 480px;
  box-shadow: 0 16px 64px hsla(0, 0%, 0%, 0.5);
  animation: fade-in 0.2s ease;
}

.dialog-header {
  padding: 1.5rem 1.5rem 0.75rem;
}

.dialog-title {
  font-size: 1.125rem;
  font-weight: 600;
}

.dialog-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}

.dialog-body {
  padding: 0.75rem 1.5rem;
}

.dialog-footer {
  padding: 0.75rem 1.5rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.dialog-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--muted-foreground);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: color 0.15s ease;
}

.dialog-close:hover { color: var(--foreground); }

/* ----------------------------------------------------------
   22. Modal (JS-driven)
   ---------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  background: hsla(0, 0%, 0%, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal.active {
  display: flex;
  animation: fade-in 0.15s ease;
}

.modal-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 16px 64px hsla(0, 0%, 0%, 0.5);
  animation: fade-in 0.2s ease;
  position: relative;
}

/* ----------------------------------------------------------
   23. Toasts
   ---------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  pointer-events: none;
}

.toast {
  min-width: 300px;
  max-width: 420px;
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--foreground);
  box-shadow: 0 8px 32px hsla(0, 0%, 0%, 0.3);
  pointer-events: all;
  animation: slide-in 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.toast-success { border-left: 3px solid var(--success); }
.toast-success .toast-icon { color: var(--success); }

.toast-error { border-left: 3px solid var(--destructive); }
.toast-error .toast-icon { color: var(--destructive); }

.toast-info { border-left: 3px solid var(--primary); }
.toast-info .toast-icon { color: var(--primary); }

.toast-warning { border-left: 3px solid var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }

/* ----------------------------------------------------------
   24. Select Dropdown
   ---------------------------------------------------------- */
.form-select,
select {
  width: 100%;
  padding: 0.5625rem 2.25rem 0.5625rem 0.875rem;
  background-color: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 0.875rem;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ca3af' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1em;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select:focus,
select:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(217, 91%, 60%, 0.15);
}

.form-select option,
select option {
  background: var(--popover);
  color: var(--popover-foreground);
}

/* ----------------------------------------------------------
   25. Textarea
   ---------------------------------------------------------- */
.form-textarea,
textarea {
  width: 100%;
  padding: 0.5625rem 0.875rem;
  background: var(--input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--foreground);
  font-size: 0.875rem;
  line-height: 1.5;
  min-height: 5rem;
  resize: vertical;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-textarea::placeholder,
textarea::placeholder {
  color: var(--muted-foreground);
  opacity: 0.7;
}

.form-textarea:focus,
textarea:focus {
  outline: none;
  border-color: var(--ring);
  box-shadow: 0 0 0 3px hsla(217, 91%, 60%, 0.15);
}

/* ----------------------------------------------------------
   26. Progress Bars
   ---------------------------------------------------------- */
.progress {
  width: 100%;
  height: 0.5rem;
  background: var(--muted);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.4s ease;
}

.progress-fill.success { background: var(--success); }
.progress-fill.warning { background: var(--warning); }
.progress-fill.destructive { background: var(--destructive); }

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8125rem;
  margin-bottom: 0.375rem;
}

.progress-label span:last-child {
  color: var(--muted-foreground);
}

/* ----------------------------------------------------------
   27. Tabs
   ---------------------------------------------------------- */
.tabs {
  display: flex;
  flex-direction: column;
}

.tabs-list {
  display: flex;
  gap: 0.125rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  overflow-x: auto;
}

.tab-trigger {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  margin-bottom: -1px;
}

.tab-trigger:hover {
  color: var(--foreground);
}

.tab-trigger.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  padding: 1.25rem 0;
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ----------------------------------------------------------
   28. Animations
   ---------------------------------------------------------- */
@keyframes glow {
  0%, 100% {
    box-shadow: 0 0 12px hsla(217, 91%, 60%, 0.25),
                0 0 30px hsla(217, 91%, 60%, 0.08);
  }
  50% {
    box-shadow: 0 0 20px hsla(217, 91%, 60%, 0.4),
                0 0 50px hsla(217, 91%, 60%, 0.15);
  }
}
.animate-glow { animation: glow 2s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
.animate-float { animation: float 3s ease-in-out infinite; }

@keyframes pulse-ring {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.2); opacity: 0; }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.animate-shimmer {
  background: linear-gradient(90deg, transparent 0%, hsla(217, 91%, 60%, 0.08) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fade-in 0.3s ease; }

@keyframes spin {
  to { transform: rotate(360deg); }
}
.animate-spin { animation: spin 1s linear infinite; }

@keyframes slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
.animate-slide-in { animation: slide-in 0.3s ease; }

@keyframes slide-out {
  from { transform: translateX(0);    opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}
.animate-slide-out { animation: slide-out 0.25s ease forwards; }

@keyframes scale-in {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.animate-scale-in { animation: scale-in 0.2s ease; }

/* ----------------------------------------------------------
   29. Responsive — Tablet (<1024px)
   ---------------------------------------------------------- */
@media (max-width: 1023px) {
  .sidebar,
  aside#sidebar {
    transform: translateX(-100%);
  }
  .sidebar.mobile-open,
  aside#sidebar.mobile-open {
    transform: translateX(0) !important;
    box-shadow: 8px 0 32px hsla(0, 0%, 0%, 0.4);
  }
  .app-main {
    margin-left: 0;
  }
  #mobile-menu-btn {
    display: flex !important;
  }
}

/* ----------------------------------------------------------
   30. Responsive — Small Tablet (<768px)
   ---------------------------------------------------------- */
@media (max-width: 767px) {
  .content-wrapper {
    padding: 1.25rem 1rem;
  }
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .page-title {
    font-size: 1.375rem;
  }
  .page-header-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .dialog,
  .modal-content {
    max-width: calc(100% - 2rem);
  }
  .form-row {
    grid-template-columns: 1fr;
  }
}

/* ----------------------------------------------------------
   31. Responsive — Phone (<480px)
   ---------------------------------------------------------- */
@media (max-width: 479px) {
  .content-wrapper {
    padding: 1rem 0.75rem;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .toast-container {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
  }
  .toast {
    min-width: auto;
    max-width: none;
  }
  .auth-form-card {
    padding: 1.25rem;
  }
  table {
    font-size: 0.8125rem;
  }
  th, td {
    padding: 0.5rem 0.625rem;
  }
}

/* ----------------------------------------------------------
   32. Scrollbar
   ---------------------------------------------------------- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: hsla(217, 33%, 30%, 0.5);
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: hsla(217, 33%, 40%, 0.6);
}

* {
  scrollbar-width: thin;
  scrollbar-color: hsla(217, 33%, 30%, 0.5) transparent;
}

/* ----------------------------------------------------------
   33. Utility Classes
   ---------------------------------------------------------- */
.text-primary     { color: var(--primary); }
.text-accent      { color: var(--accent); }
.text-success     { color: var(--success); }
.text-destructive { color: var(--destructive); }
.text-warning     { color: var(--warning); }
.text-muted       { color: var(--muted-foreground); }
.text-foreground  { color: var(--foreground); }

.bg-primary     { background-color: var(--primary); }
.bg-accent      { background-color: var(--accent); }
.bg-success     { background-color: var(--success); }
.bg-destructive { background-color: var(--destructive); }
.bg-warning     { background-color: var(--warning); }
.bg-muted       { background-color: var(--muted); }
.bg-card        { background-color: var(--card); }

.font-mono { font-family: var(--font-mono); }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.text-center { text-align: center; }
.text-right  { text-align: right; }
.text-left   { text-align: left; }

.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-base { font-size: 1rem; line-height: 1.5rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }

.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }
.items-end      { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end    { justify-content: flex-end; }

.flex-col  { flex-direction: column; }
.flex-row  { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1    { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-5 { padding: 1.25rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }

.m-0 { margin: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.ml-auto { margin-left: auto; }
.mr-2 { margin-right: 0.5rem; }

.rounded     { border-radius: var(--radius); }
.rounded-lg  { border-radius: 0.625rem; }
.rounded-xl  { border-radius: var(--radius); }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.border        { border: 1px solid var(--border); }
.border-t      { border-top: 1px solid var(--border); }
.border-b      { border-bottom: 1px solid var(--border); }
.border-none   { border: none; }

.opacity-50 { opacity: 0.5; }
.opacity-70 { opacity: 0.7; }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }
.sticky   { position: sticky; }

.inset-0 { inset: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }

.whitespace-nowrap { white-space: nowrap; }

.pointer-events-none { pointer-events: none; }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

.select-none { user-select: none; }

.transition { transition: all 0.2s ease; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease; }

/* ----------------------------------------------------------
   Extra: Skeleton Loader
   ---------------------------------------------------------- */
.skeleton {
  background: linear-gradient(90deg, var(--muted) 25%, hsla(217, 33%, 28%, 0.6) 50%, var(--muted) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  border-radius: calc(var(--radius) - 4px);
}

.skeleton-text { height: 0.875rem; margin-bottom: 0.5rem; border-radius: 0.25rem; }
.skeleton-heading { height: 1.5rem; width: 60%; margin-bottom: 0.75rem; }
.skeleton-avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; }
.skeleton-card { height: 120px; }

/* ----------------------------------------------------------
   Extra: Separator
   ---------------------------------------------------------- */
.separator {
  height: 1px;
  width: 100%;
  background: var(--border);
}

.separator-vertical {
  width: 1px;
  height: 100%;
  background: var(--border);
}

/* ----------------------------------------------------------
   Extra: Avatar
   ---------------------------------------------------------- */
.avatar {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 600;
  font-size: 0.8125rem;
  flex-shrink: 0;
}

.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 1.75rem; height: 1.75rem; font-size: 0.6875rem; }
.avatar-lg { width: 3rem;    height: 3rem;    font-size: 1.125rem; }
.avatar-xl { width: 4rem;    height: 4rem;    font-size: 1.5rem; }

/* ----------------------------------------------------------
   Extra: Empty State
   ---------------------------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  color: var(--muted-foreground);
}

.empty-state-icon { font-size: 2.5rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state-title { font-size: 1.125rem; font-weight: 600; color: var(--foreground); margin-bottom: 0.375rem; }
.empty-state-description { font-size: 0.875rem; max-width: 360px; }

/* ----------------------------------------------------------
   Extra: Status Dot
   ---------------------------------------------------------- */
.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.online   { background: var(--success); box-shadow: 0 0 6px hsla(142, 71%, 45%, 0.4); }
.status-dot.offline  { background: var(--muted-foreground); }
.status-dot.warning  { background: var(--warning); box-shadow: 0 0 6px hsla(38, 92%, 50%, 0.4); }
.status-dot.error    { background: var(--destructive); box-shadow: 0 0 6px hsla(0, 85%, 60%, 0.4); }

/* ----------------------------------------------------------
   Extra: Spinner
   ---------------------------------------------------------- */
.spinner {
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--muted);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.spinner-sm { width: 1rem; height: 1rem; border-width: 1.5px; }
.spinner-lg { width: 2rem; height: 2rem; border-width: 3px; }

/* ----------------------------------------------------------
   Extra: Tooltip
   ---------------------------------------------------------- */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.375rem 0.625rem;
  background: var(--popover);
  color: var(--popover-foreground);
  font-size: 0.75rem;
  border-radius: calc(var(--radius) - 4px);
  border: 1px solid var(--border);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 60;
}

[data-tooltip]:hover::after {
  opacity: 1;
}

/* ----------------------------------------------------------
   Extra: Code Block
   ---------------------------------------------------------- */
.code-block {
  background: var(--popover);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-x: auto;
  color: var(--foreground);
}

code {
  font-family: var(--font-mono);
  font-size: 0.8125em;
  padding: 0.125em 0.375em;
  background: hsla(217, 33%, 22%, 0.5);
  border-radius: 0.25rem;
  color: var(--primary);
}

pre code {
  padding: 0;
  background: none;
  color: inherit;
}

/* ----------------------------------------------------------
   Extra: Breadcrumb
   ---------------------------------------------------------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--muted-foreground);
}

.breadcrumb-separator { opacity: 0.4; }
.breadcrumb-item { color: var(--muted-foreground); }
.breadcrumb-item:hover { color: var(--foreground); }
.breadcrumb-item.active { color: var(--foreground); font-weight: 500; }

/* ----------------------------------------------------------
   Extra: Pagination
   ---------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--foreground);
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.pagination-btn:hover { background: hsla(217, 33%, 22%, 0.5); }

.pagination-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}

.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.pagination-info {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin: 0 0.5rem;
}

/* ----------------------------------------------------------
   Responsive Grids for Service Control
   ---------------------------------------------------------- */
.service-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.service-info-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 1.5rem;
}

.service-controls-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.service-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stats-2col-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1023px) {
  .service-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .service-info-grid {
    grid-template-columns: 1fr;
  }
  .stats-2col-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .service-actions-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 639px) {
  .service-stats-grid {
    grid-template-columns: 1fr;
  }
  .service-controls-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ----------------------------------------------------------
   Print
   ---------------------------------------------------------- */
@media print {
  .sidebar, .navbar, .toast-container { display: none !important; }
  .app-main { margin-left: 0 !important; }
  body { background: #fff; color: #000; }
}
