/* ============================================================
   VPS CONTROL PANEL — Premium Dark Black Theme v3
   Enhanced • Polished • Production Ready
   ============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Core palette - Deep Black Theme */
  --bg-primary: #000000;
  --bg-secondary: #050507;
  --bg-tertiary: #0a0a0e;
  --bg-card: #0c0c10;
  --bg-card-hover: #121218;
  --bg-elevated: #16161c;
  --bg-input: #08080b;
  --bg-overlay: rgba(0, 0, 0, 0.85);
  --bg-glass: rgba(12, 12, 16, 0.75);
  --bg-glass-strong: rgba(12, 12, 16, 0.94);

  /* Borders */
  --border-primary: #1a1a22;
  --border-secondary: #252530;
  --border-hover: #353545;
  --border-focus: #4a4a5a;
  --border-glass: rgba(255, 255, 255, 0.06);
  --border-subtle: rgba(255, 255, 255, 0.03);

  /* Text */
  --text-primary: #fafafa;
  --text-secondary: #a8a8b3;
  --text-tertiary: #6b6b78;
  --text-muted: #42424d;
  --text-inverse: #050507;

  /* Accent / brand - Elegant purple-blue gradient */
  --accent: #ffffff;
  --accent-hover: #e8e8ec;
  --accent-soft: #d0d0d8;
  --accent-muted: rgba(255, 255, 255, 0.05);
  --accent-muted-hover: rgba(255, 255, 255, 0.09);
  --accent-glow: rgba(255, 255, 255, 0.12);

  /* Status colors - More vibrant */
  --success: #10b981;
  --success-bright: #34d399;
  --success-bg: rgba(16, 185, 129, 0.08);
  --success-bg-strong: rgba(16, 185, 129, 0.14);
  --success-border: rgba(16, 185, 129, 0.25);

  --warning: #f59e0b;
  --warning-bright: #fbbf24;
  --warning-bg: rgba(245, 158, 11, 0.08);
  --warning-border: rgba(245, 158, 11, 0.25);

  --danger: #ef4444;
  --danger-bright: #f87171;
  --danger-bg: rgba(239, 68, 68, 0.08);
  --danger-bg-strong: rgba(239, 68, 68, 0.14);
  --danger-border: rgba(239, 68, 68, 0.25);

  --info: #6366f1;
  --info-bright: #818cf8;
  --info-bg: rgba(99, 102, 241, 0.08);
  --info-border: rgba(99, 102, 241, 0.25);

  --purple: #a855f7;
  --purple-bright: #c084fc;
  --purple-bg: rgba(168, 85, 247, 0.08);

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #ffffff 0%, #d4d4d8 100%);
  --grad-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --grad-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  --grad-info: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  --grad-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  --grad-purple: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
  --grad-surface: linear-gradient(160deg, rgba(255,255,255,0.03) 0%, transparent 60%);
  --grad-card-top: linear-gradient(180deg, rgba(255,255,255,0.02) 0%, transparent 100%);
  --grad-hero: linear-gradient(135deg, #0a0a0e 0%, #050507 50%, #000000 100%);

  /* Animated gradient borders */
  --grad-border: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);

  /* Sizing */
  --sidebar-width: 264px;
  --sidebar-collapsed: 68px;
  --header-height: 64px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6);
  --shadow-xl: 0 24px 48px rgba(0, 0, 0, 0.7);
  --shadow-2xl: 0 32px 64px rgba(0, 0, 0, 0.8);
  --shadow-glow: 0 0 32px rgba(255, 255, 255, 0.03);
  --shadow-inner: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  --shadow-colored: 0 8px 32px rgba(99, 102, 241, 0.12);

  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-bounce: 600ms cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', Consolas, monospace;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(ellipse 900px 600px at 10% -10%, rgba(99, 102, 241, 0.04), transparent),
    radial-gradient(ellipse 800px 500px at 90% 110%, rgba(168, 85, 247, 0.03), transparent);
  background-attachment: fixed;
}

a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover { color: var(--text-primary); }

img { max-width: 100%; display: block; }

button { font-family: inherit; }

::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--text-primary);
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-secondary);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

* { scrollbar-width: thin; scrollbar-color: var(--border-secondary) transparent; }

:focus-visible {
  outline: 2px solid var(--info);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}

/* ---------- Ambient background ---------- */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient-bg::before,
.ambient-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
}

.ambient-bg::before {
  top: -25%;
  left: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12), transparent 70%);
  animation: ambientFloat1 30s ease-in-out infinite alternate;
}

.ambient-bg::after {
  bottom: -25%;
  right: -15%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.08), transparent 70%);
  animation: ambientFloat2 35s ease-in-out infinite alternate;
}

@keyframes ambientFloat1 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(80px, 60px) scale(1.15); }
  100% { transform: translate(40px, 100px) scale(1.05); }
}

@keyframes ambientFloat2 {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-60px, -80px) scale(1.2); }
  100% { transform: translate(-100px, -40px) scale(1.1); }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

.text-sm { font-size: 0.8125rem; }
.text-xs { font-size: 0.75rem; }
.text-muted { color: var(--text-tertiary); }
.text-secondary { color: var(--text-secondary); }
.text-mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: -0.01em;
}

/* ---------- Animated Text Effects ---------- */
.text-gradient {
  background: linear-gradient(135deg, #ffffff 0%, #a8a8b3 50%, #6b6b78 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

.text-gradient-color {
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

.text-gradient-success {
  background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.text-glow {
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.3), 0 0 40px rgba(255, 255, 255, 0.1);
}

.text-glow-color {
  text-shadow: 0 0 20px rgba(99, 102, 241, 0.5), 0 0 40px rgba(99, 102, 241, 0.2);
}

.text-glow-success {
  text-shadow: 0 0 20px rgba(16, 185, 129, 0.5), 0 0 40px rgba(16, 185, 129, 0.2);
}

.text-shimmer {
  background: linear-gradient(
    90deg,
    var(--text-muted) 0%,
    var(--text-primary) 50%,
    var(--text-muted) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: textShimmer 3s ease-in-out infinite;
}

@keyframes textShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.text-typewriter {
  overflow: hidden;
  border-right: 2px solid var(--text-primary);
  white-space: nowrap;
  animation: typewriter 3s steps(40) 1s 1 normal both,
             blinkCursor 500ms steps(40) infinite normal;
}

@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blinkCursor {
  from { border-right-color: var(--text-primary); }
  to { border-right-color: transparent; }
}

.text-fade-in {
  animation: textFadeIn 0.8s ease both;
}

@keyframes textFadeIn {
  from { opacity: 0; transform: translateY(20px); filter: blur(8px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.text-slide-up {
  animation: textSlideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes textSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.text-scale-in {
  animation: textScaleIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes textScaleIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

.text-blur-in {
  animation: textBlurIn 0.8s ease both;
}

@keyframes textBlurIn {
  from { opacity: 0; filter: blur(12px); }
  to { opacity: 1; filter: blur(0); }
}

.text-bounce-in {
  animation: textBounceIn 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) both;
}

@keyframes textBounceIn {
  from { opacity: 0; transform: scale(0.3) translateY(40px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ============================================================
   AUTH PAGES (Enhanced)
   ============================================================ */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  position: relative;
  z-index: 1;
  background:
    radial-gradient(ellipse 700px 500px at 50% 0%, rgba(99, 102, 241, 0.06), transparent),
    radial-gradient(ellipse 600px 500px at 50% 100%, rgba(168, 85, 247, 0.04), transparent);
}

.auth-container {
  width: 100%;
  max-width: 440px;
  animation: authEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes authEnter {
  from { opacity: 0; transform: translateY(40px) scale(0.95); filter: blur(10px); }
  to   { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.auth-logo {
  text-align: center;
  margin-bottom: 36px;
}

.auth-logo img {
  height: 52px;
  width: auto;
  margin: 0 auto 18px;
  border-radius: var(--radius-lg);
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.6));
  animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.auth-logo h1 {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 0%, #a8a8b3 50%, #6b6b78 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 4s ease infinite;
}

.auth-logo p {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  margin-top: 10px;
  animation: textFadeIn 0.8s ease 0.2s both;
}

.auth-card {
  position: relative;
  background: var(--bg-glass-strong);
  backdrop-filter: blur(32px) saturate(1.5);
  -webkit-backdrop-filter: blur(32px) saturate(1.5);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-2xl);
  padding: 40px 36px;
  box-shadow:
    var(--shadow-2xl),
    var(--shadow-glow),
    var(--shadow-inner);
  overflow: hidden;
  animation: cardEnter 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(30px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.auth-card::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(99, 102, 241, 0.03),
    transparent,
    rgba(168, 85, 247, 0.03),
    transparent
  );
  animation: rotateGlow 20s linear infinite;
  pointer-events: none;
}

@keyframes rotateGlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.auth-card .form-group:last-of-type {
  margin-bottom: 24px;
}

.auth-card .btn-lg {
  margin-top: 4px;
}

.auth-footer {
  text-align: center;
  margin-top: 28px;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  animation: textFadeIn 0.8s ease 0.3s both;
}

.auth-footer a {
  color: var(--text-primary);
  font-weight: 500;
  margin-left: 4px;
  border-bottom: 1px solid transparent;
  transition: all var(--transition-fast);
  position: relative;
}

.auth-footer a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--grad-primary);
  transition: width var(--transition-base);
}

.auth-footer a:hover::after {
  width: 100%;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-primary);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform var(--transition-slow);
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: -1px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.05), transparent);
  pointer-events: none;
}

.sidebar-brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid var(--border-primary);
  gap: 12px;
  flex-shrink: 0;
  background: var(--grad-card-top);
}

.sidebar-brand img {
  height: 34px;
  width: 34px;
  border-radius: var(--radius-md);
  object-fit: contain;
  background: var(--bg-tertiary);
  padding: 2px;
  transition: transform var(--transition-spring);
}

.sidebar-brand:hover img {
  transform: rotate(-5deg) scale(1.05);
}

.sidebar-brand span {
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: linear-gradient(135deg, #ffffff 0%, #a8a8b3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 16px 12px;
}

.sidebar-section { margin-bottom: 12px; }

.sidebar-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 8px 12px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 450;
  transition: all var(--transition-fast);
  cursor: pointer;
  border: 1px solid transparent;
  position: relative;
  user-select: none;
  margin-bottom: 2px;
  overflow: hidden;
}

.sidebar-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent);
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
}

.sidebar-link:hover::before {
  transform: translateX(100%);
}

.sidebar-link:hover {
  background: var(--accent-muted);
  color: var(--text-primary);
  transform: translateX(2px);
}

.sidebar-link.active {
  background: var(--accent-muted-hover);
  color: var(--text-primary);
  font-weight: 550;
  border-color: var(--border-glass);
  box-shadow: var(--shadow-inner);
}

.sidebar-link.active::after {
  content: '';
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--grad-primary);
  border-radius: var(--radius-full);
  box-shadow: 0 0 16px rgba(255, 255, 255, 0.5);
  animation: sidebarIndicator 0.3s ease both;
}

@keyframes sidebarIndicator {
  from { height: 0; opacity: 0; }
  to { height: 20px; opacity: 1; }
}

.sidebar-link svg,
.sidebar-link .icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.65;
  transition: all var(--transition-fast);
}

.sidebar-link:hover svg,
.sidebar-link.active svg { opacity: 1; }

.sidebar-link.active svg {
  filter: drop-shadow(0 0 8px rgba(255,255,255,0.3));
}

.sidebar-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  background: var(--border-secondary);
  color: var(--text-secondary);
  padding: 1px 8px;
  border-radius: var(--radius-full);
  min-width: 22px;
  text-align: center;
  transition: all var(--transition-fast);
}

.sidebar-link.active .sidebar-badge {
  background: var(--accent);
  color: var(--text-inverse);
}

.sidebar-footer {
  border-top: 1px solid var(--border-primary);
  padding: 12px;
  flex-shrink: 0;
  background: var(--grad-card-top);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.sidebar-user:hover {
  background: var(--accent-muted);
  border-color: var(--border-glass);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--bg-elevated), var(--border-secondary));
  border: 1px solid var(--border-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--text-primary);
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  transition: all var(--transition-spring);
}

.sidebar-user:hover .user-avatar {
  transform: scale(1.08);
  border-color: var(--border-hover);
}

.user-info { flex: 1; min-width: 0; }

.user-info .name {
  font-size: 0.8125rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info .role {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
  margin-top: 1px;
}

/* Mobile sidebar */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 200;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  color: var(--text-primary);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-md);
}

.sidebar-toggle:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  transform: scale(1.05);
}

.sidebar-toggle:active {
  transform: scale(0.95);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
  z-index: 99;
}

/* ---------- Main Content ---------- */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-header {
  height: var(--header-height);
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: rgba(5, 5, 7, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 50;
  flex-shrink: 0;
  gap: 16px;
}

.page-header-left { flex: 1; min-width: 0; }

.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  color: var(--text-tertiary);
}

.breadcrumbs a { color: var(--text-tertiary); }
.breadcrumbs a:hover { color: var(--text-secondary); }
.breadcrumbs .sep { opacity: 0.4; }
.breadcrumbs .current {
  color: var(--text-primary);
  font-weight: 600;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.page-content {
  flex: 1;
  padding: 28px;
  animation: pageEnter 0.4s ease both;
  max-width: 1600px;
  width: 100%;
}

@keyframes pageEnter {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CARDS & PANELS
   ============================================================ */
.card {
  position: relative;
  background: var(--bg-card);
  background-image: var(--grad-card-top);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  pointer-events: none;
}

.card:hover {
  border-color: var(--border-secondary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border-primary);
  gap: 12px;
  flex-wrap: wrap;
}

.card-header-title {
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-header-subtitle {
  font-size: 0.8125rem;
  color: var(--text-tertiary);
  margin-top: 3px;
}

.card-body { padding: 22px; }

.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.card-glass {
  background: var(--bg-glass);
  backdrop-filter: blur(24px) saturate(1.4);
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  border-color: var(--border-glass);
  box-shadow: var(--shadow-glow);
}

/* ---------- Stat Cards (Enhanced) ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  position: relative;
  background: var(--bg-card);
  background-image:
    radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.02), transparent 50%),
    var(--grad-card-top);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all var(--transition-base);
  overflow: hidden;
  animation: statEnter 0.5s ease both;
}

.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes statEnter {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.stat-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-lg), var(--shadow-colored);
}

.stat-card:hover::before { opacity: 1; }

.stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 10px;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(180deg, #ffffff 0%, #a8a8b3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform var(--transition-spring);
}

.stat-card:hover .stat-value {
  transform: scale(1.05);
}

.stat-card .stat-change {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 8px;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  font-size: 1.25rem;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-spring);
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(-5deg);
}

.stat-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-surface);
}

.stat-icon.green  { background: var(--success-bg);  color: var(--success-bright); border: 1px solid var(--success-border); }
.stat-icon.blue   { background: var(--info-bg);     color: var(--info-bright);    border: 1px solid var(--info-border); }
.stat-icon.yellow { background: var(--warning-bg);  color: var(--warning-bright); border: 1px solid var(--warning-border); }
.stat-icon.red    { background: var(--danger-bg);   color: var(--danger-bright);  border: 1px solid var(--danger-border); }
.stat-icon.purple { background: var(--purple-bg);   color: var(--purple-bright);  border: 1px solid rgba(168, 85, 247, 0.25); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 18px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 550;
  line-height: 1.4;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
  letter-spacing: -0.005em;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
}

.btn:hover::before {
  transform: translateX(100%);
}

.btn:active:not(:disabled) { transform: scale(0.96); }

.btn:disabled,
.btn.loading {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.btn.loading .btn-text { visibility: hidden; }

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  top: 50%;
  left: 50%;
  margin: -8px 0 0 -8px;
}

.btn-primary {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border-color: var(--border-secondary);
}

.btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover {
  background: var(--accent-muted);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--grad-danger);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn-danger-outline:hover {
  background: var(--danger-bg);
  border-color: var(--danger);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--grad-success);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.4);
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-info {
  background: var(--grad-info);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-info:hover {
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-sm { padding: 5px 12px; font-size: 0.75rem; }
.btn-lg { padding: 13px 28px; font-size: 0.9375rem; font-weight: 600; }

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon.sm { width: 30px; height: 30px; }

.btn-group { display: flex; gap: 6px; flex-wrap: wrap; }

/* Button pulse animation */
.btn-pulse {
  animation: btnPulse 2s ease-in-out infinite;
}

@keyframes btnPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(255, 255, 255, 0); }
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: -0.005em;
}

.form-label .required { color: var(--danger); margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover { border-color: var(--border-hover); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--info);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
  background: var(--bg-secondary);
}

.form-input::placeholder { color: var(--text-muted); }

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b6b78' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 20px;
  padding-right: 36px;
  cursor: pointer;
}

.search-input-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 300px;
}

.search-icon {
  flex-shrink: 0;
  opacity: 0.4;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-input-wrapper input {
  flex: 1;
}

.resource-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-muted);
  color: var(--text-primary);
  flex-shrink: 0;
}

/* OS Logo Styling */
.os-logo {
  display: inline-block;
  flex-shrink: 0;
  margin-right: 6px;
  vertical-align: middle;
  object-fit: contain;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  line-height: 1;
}

.os-logo-small {
  width: 18px;
  height: 18px;
}

.os-logo-medium {
  width: 28px;
  height: 28px;
}

.os-logo-large {
  width: 40px;
  height: 40px;
}

.form-textarea { resize: vertical; min-height: 80px; }

.form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

.form-error {
  font-size: 0.75rem;
  color: var(--danger);
  margin-top: 6px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 8px 0;
}

.form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--info);
  cursor: pointer;
  border-radius: var(--radius-xs);
}

.form-check label {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}

/* File upload */
.file-upload {
  display: flex;
  align-items: center;
  gap: 14px;
}

.file-upload-preview {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-secondary);
  overflow: hidden;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.file-upload-preview:hover {
  border-color: var(--border-hover);
}

.file-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrapper {
  overflow-x: auto;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.table th {
  text-align: left;
  padding: 12px 18px;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-primary);
  white-space: nowrap;
  user-select: none;
  background: var(--bg-secondary);
  position: sticky;
  top: 0;
}

.table th.sortable {
  cursor: pointer;
  transition: color var(--transition-fast);
}

.table th.sortable:hover { color: var(--text-primary); }

.table th .sort-icon {
  display: inline-block;
  margin-left: 5px;
  opacity: 0.35;
  transition: all var(--transition-fast);
}

.table th.sorted .sort-icon { opacity: 1; }

.table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-primary);
  color: var(--text-secondary);
  vertical-align: middle;
}

.table tbody tr {
  transition: all var(--transition-fast);
}

.table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

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

.table td.primary-cell {
  color: var(--text-primary);
  font-weight: 550;
}

.table .actions-cell {
  text-align: right;
  white-space: nowrap;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  line-height: 1.5;
}

.badge-success {
  background: var(--success-bg);
  color: var(--success-bright);
  border: 1px solid var(--success-border);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger-bright);
  border: 1px solid var(--danger-border);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning-bright);
  border: 1px solid var(--warning-border);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info-bright);
  border: 1px solid var(--info-border);
}

.badge-default {
  background: var(--accent-muted);
  color: var(--text-secondary);
  border: 1px solid var(--border-secondary);
}

.badge-pulse {
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot.green  { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.red    { background: var(--danger);  box-shadow: 0 0 8px var(--danger);  }
.status-dot.yellow { background: var(--warning); box-shadow: 0 0 8px var(--warning); }
.status-dot.blue   { background: var(--info);    box-shadow: 0 0 8px var(--info);    }

.status-dot.pulse {
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-card);
  background-image: var(--grad-card-top);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-2xl), var(--shadow-glow);
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-spring);
  position: relative;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  pointer-events: none;
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-primary);
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1.125rem;
  line-height: 1;
}

.modal-close:hover {
  background: var(--accent-muted);
  color: var(--text-primary);
  transform: rotate(90deg);
}

.modal-body { padding: 24px; }

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid var(--border-primary);
  background: var(--bg-secondary);
}

/* ============================================================
   DROPDOWN
   ============================================================ */
.dropdown { position: relative; display: inline-block; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 190px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  padding: 5px;
  box-shadow: var(--shadow-xl);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(0.96);
  transition: all var(--transition-fast);
  transform-origin: top right;
}

.dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-sans);
  font-weight: 500;
}

.dropdown-item:hover {
  background: var(--accent-muted);
  color: var(--text-primary);
}

.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-bg); }

.dropdown-divider {
  height: 1px;
  background: var(--border-primary);
  margin: 5px 0;
}

/* Sidebar footer dropdown override */
.sidebar-footer .dropdown-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  top: auto;
  left: 12px;
  right: 12px;
  min-width: auto;
  transform-origin: bottom center;
}

/* ============================================================
   TOOLBAR / SEARCH
   ============================================================ */
.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 380px;
}

.search-input-wrapper .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: 0.875rem;
}

.search-input-wrapper input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  outline: none;
}

.search-input-wrapper input:focus {
  border-color: var(--info);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.filter-select {
  padding: 9px 34px 9px 12px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b6b78' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 10px center;
  background-repeat: no-repeat;
  background-size: 20px;
  cursor: pointer;
  outline: none;
  transition: all var(--transition-fast);
}

.filter-select:focus { border-color: var(--info); }

/* ============================================================
   TOASTS
   ============================================================ */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-elevated);
  background-image: var(--grad-card-top);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: toastIn 0.5s var(--transition-spring) both;
  font-size: 0.8125rem;
  min-width: 300px;
  pointer-events: auto;
  position: relative;
  overflow: hidden;
}

.toast.removing { animation: toastOut 0.3s ease both; }

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.toast-body { flex: 1; }

.toast-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.toast-message { color: var(--text-secondary); line-height: 1.5; }

.toast-dismiss {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.125rem;
  padding: 2px;
  line-height: 1;
  transition: all var(--transition-fast);
}

.toast-dismiss:hover { 
  color: var(--text-primary);
  transform: rotate(90deg);
}

/* ============================================================
   LOADING / SKELETON
   ============================================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--bg-card-hover) 50%,
    var(--bg-tertiary) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--radius-md);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text { height: 14px; margin-bottom: 10px; width: 80%; }
.skeleton-text.short  { width: 40%; }
.skeleton-text.medium { width: 60%; }
.skeleton-text.full   { width: 100%; }

.skeleton-circle { width: 32px; height: 32px; border-radius: 50%; }
.skeleton-card { height: 140px; border-radius: var(--radius-lg); }

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-primary);
}

.skeleton-row .skeleton-text { margin-bottom: 0; }

.loading-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.loading-overlay.active { opacity: 1; visibility: visible; }

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-secondary);
  border-top-color: var(--info);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.loading-spinner.sm { width: 16px; height: 16px; border-width: 2px; }

.inline-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-secondary);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
}

.page-transition { animation: fadeSlideUp 0.4s ease both; }

/* ============================================================
   EMPTY / ERROR STATES
   ============================================================ */
.empty-state,
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 24px;
  text-align: center;
  animation: emptyEnter 0.6s ease both;
}

@keyframes emptyEnter {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.empty-state-icon,
.error-state-icon {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  transition: transform var(--transition-spring);
}

.empty-state-icon:hover,
.error-state-icon:hover {
  transform: scale(1.1) rotate(-5deg);
}

.empty-state-icon {
  background: var(--accent-muted);
  color: var(--text-muted);
  border: 1px solid var(--border-glass);
}

.error-state-icon {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger-border);
}

.empty-state-title,
.error-state-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.empty-state-text,
.error-state-text {
  color: var(--text-tertiary);
  font-size: 0.875rem;
  max-width: 360px;
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ============================================================
   404 PAGE
   ============================================================ */
.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}

.not-found-code {
  font-size: 7rem;
  font-weight: 800;
  letter-spacing: -0.06em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-muted) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 16px;
  animation: notFoundFloat 4s ease-in-out infinite;
}

@keyframes notFoundFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ============================================================
   VPS CARDS
   ============================================================ */
.vps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.vps-card {
  position: relative;
  background: var(--bg-card);
  background-image: var(--grad-card-top);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 22px;
  cursor: pointer;
  transition: all var(--transition-base);
  overflow: hidden;
  animation: cardEnter 0.5s ease both;
}

.vps-card:nth-child(1) { animation-delay: 0.05s; }
.vps-card:nth-child(2) { animation-delay: 0.1s; }
.vps-card:nth-child(3) { animation-delay: 0.15s; }
.vps-card:nth-child(4) { animation-delay: 0.2s; }
.vps-card:nth-child(5) { animation-delay: 0.25s; }
.vps-card:nth-child(6) { animation-delay: 0.3s; }

.vps-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--grad-info);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.vps-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(99, 102, 241, 0.05), transparent 50%);
  opacity: 0;
  transition: opacity var(--transition-base);
  pointer-events: none;
}

.vps-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-xl), var(--shadow-colored);
}

.vps-card:hover::before { opacity: 1; }
.vps-card:hover::after { opacity: 1; }

.vps-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}

.vps-card-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  word-break: break-word;
}

.vps-card-id {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.vps-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  font-size: 0.8125rem;
}

.vps-card-detail {
  color: var(--text-tertiary);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 500;
}

.vps-card-detail span {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: none;
  letter-spacing: 0;
  word-break: break-all;
}

.vps-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-primary);
}

/* ============================================================
   VPS DETAIL PAGE
   ============================================================ */
.vps-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.info-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.info-value {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  word-break: break-word;
  line-height: 1.5;
}

/* Resource cards */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.resource-item {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 18px;
  background: var(--bg-secondary);
  background-image: var(--grad-card-top);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-primary);
  transition: all var(--transition-base);
  overflow: hidden;
}

.resource-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--border-secondary);
  transition: background var(--transition-fast);
}

.resource-item:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.resource-item:hover::before { background: var(--grad-info); }

.resource-icon {
  font-size: 24px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  flex-shrink: 0;
  transition: all var(--transition-spring);
}

.resource-item:hover .resource-icon {
  transform: scale(1.1) rotate(-5deg);
}

.resource-info { flex: 1; min-width: 0; }

.resource-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.resource-value {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.resource-sub {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 3px;
  font-family: var(--font-mono);
}

/* IP list */
.ip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ip-list .ip-tag {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.ip-list .ip-tag:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Raw JSON */
.raw-json {
  background: #030305;
  color: #6ee7b7;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  max-height: 500px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.raw-json-container {
  background: #030305;
  color: var(--text-secondary);
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-primary);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  max-height: 500px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

/* Console */
.console-container {
  background: #000;
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-md);
  min-height: 320px;
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: #0f0;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 60px rgba(0, 255, 0, 0.03);
}

.console-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 280px;
  color: var(--text-muted);
  gap: 12px;
  text-align: center;
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 24px;
  align-items: start;
}

.profile-sidebar-card { text-align: center; }

.profile-avatar {
  width: 96px;
  height: 96px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--bg-elevated), var(--border-secondary));
  border: 2px solid var(--border-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 auto 20px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  box-shadow: var(--shadow-xl);
  transition: all var(--transition-spring);
}

.profile-avatar:hover {
  transform: scale(1.08);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-2xl), var(--shadow-glow);
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border-primary);
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 0;
}

.tab {
  position: relative;
  padding: 12px 20px;
  font-size: 0.8125rem;
  font-weight: 550;
  color: var(--text-tertiary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
  margin-bottom: -1px;
  user-select: none;
  background: none;
  border-left: none;
  border-right: none;
  border-top: none;
  font-family: var(--font-sans);
  white-space: nowrap;
}

.tab:hover { color: var(--text-secondary); }

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

.tab-content { display: none; animation: tabEnter 0.3s ease; }
.tab-content.active { display: block; }

@keyframes tabEnter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 24px;
}

.pagination-btn {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-secondary);
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8125rem;
  transition: all var(--transition-fast);
  font-family: var(--font-sans);
}

.pagination-btn:hover {
  background: var(--accent-muted);
  border-color: var(--border-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.pagination-btn.active {
  background: var(--info);
  color: #fff;
  border-color: var(--info);
  box-shadow: 0 2px 12px rgba(99, 102, 241, 0.4);
}

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

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(60px) scale(0.9); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(60px) scale(0.9); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.5; }
}

@keyframes countUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 20px rgba(99, 102, 241, 0.2); }
  50% { box-shadow: 0 0 40px rgba(99, 102, 241, 0.4); }
}

@keyframes borderGlow {
  0%, 100% { border-color: var(--border-primary); }
  50% { border-color: var(--info); }
}

.animate-count { animation: countUp 0.4s ease both; }
.animate-glow { animation: glowPulse 3s ease-in-out infinite; }
.animate-border { animation: borderGlow 3s ease-in-out infinite; }

/* Staggered animations */
.stagger-1 { animation-delay: 0.05s !important; }
.stagger-2 { animation-delay: 0.1s !important; }
.stagger-3 { animation-delay: 0.15s !important; }
.stagger-4 { animation-delay: 0.2s !important; }
.stagger-5 { animation-delay: 0.25s !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .vps-detail-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  .profile-grid { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .page-content { padding: 24px 20px; }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .sidebar-overlay.active { display: block; }
  .main-content { margin-left: 0; }

  .page-content { padding: 20px 16px; }
  .page-header { padding: 0 16px 0 66px; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .vps-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }

  .toolbar { flex-direction: column; align-items: stretch; }
  .search-input-wrapper { max-width: none; }
  .filter-select { width: 100%; }

  .modal { max-width: calc(100vw - 32px); }
  .btn-group { flex-direction: column; }
  .btn-group .btn { width: 100%; }

  .toast-container {
    left: 16px;
    right: 16px;
    max-width: none;
  }

  .auth-card { padding: 32px 24px; }
  .auth-logo h1 { font-size: 1.5rem; }

  .resource-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-wrapper { padding: 16px; }
  .auth-card { padding: 28px 20px; border-radius: var(--radius-xl); }
  .card-header { padding: 14px 16px; }
  .card-body { padding: 16px; }
  .vps-card-details { grid-template-columns: 1fr; }
  .not-found-code { font-size: 4.5rem; }
  .table th, .table td { padding: 10px 12px; }
  .tabs { gap: 0; }
  .tab { padding: 10px 14px; font-size: 0.75rem; }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.flex-wrap { flex-wrap: wrap; }

.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-6 { margin-bottom: 24px; }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }
.ml-auto { margin-left: auto; }

.w-full { width: 100%; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.hidden { display: none !important; }

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

.relative { position: relative; }

/* ============================================================
   SKELETON LOADING SCREENS — Professional Shimmer Effect
   ============================================================ */

/* Skeleton Base Styles */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-tertiary) 0%,
    var(--bg-card-hover) 50%,
    var(--bg-tertiary) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
  border-radius: var(--radius-md);
}

/* Skeleton Sizes */
.skeleton-text {
  height: 12px;
  margin: 8px 0;
  border-radius: var(--radius-sm);
}

.skeleton-text.full { width: 100%; }
.skeleton-text.half { width: 50%; }
.skeleton-text.short { width: 30%; }

.skeleton-card {
  height: 200px;
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
}

.skeleton-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}

.skeleton-row > div {
  height: 16px;
  border-radius: var(--radius-sm);
}

/* VPS Card Skeleton */
.vps-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.vps-card-skeleton {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vps-card-skeleton-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.vps-card-skeleton-title { flex: 1; }

.vps-card-skeleton-title .skeleton-text {
  height: 20px;
  margin-bottom: 8px;
}

.vps-card-skeleton-title .skeleton-text.small {
  height: 14px;
  width: 60%;
}

.vps-card-skeleton-badge {
  width: 60px;
  height: 24px;
  border-radius: var(--radius-full);
}

.vps-card-skeleton-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.vps-card-skeleton-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.vps-card-skeleton-item .skeleton-text {
  height: 14px;
  width: 45%;
}

.vps-card-skeleton-item .skeleton-text.value { width: 30%; }

.vps-card-skeleton-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.vps-card-skeleton-actions .skeleton {
  height: 32px;
  border-radius: var(--radius-md);
}

/* Table Row Skeleton */
.table-skeleton {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-skeleton-row {
  display: grid;
  grid-template-columns: 1fr 1.5fr 2fr 1fr 0.8fr 1.2fr 0.8fr;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  align-items: center;
}

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

.table-skeleton-row > div {
  height: 16px;
  border-radius: var(--radius-sm);
}

/* Detail Page Skeleton */
.detail-skeleton {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.detail-skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.detail-skeleton-card-title {
  height: 20px;
  width: 150px;
  margin-bottom: 20px;
  border-radius: var(--radius-md);
}

.detail-skeleton-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.detail-skeleton-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.detail-skeleton-item .label {
  height: 12px;
  width: 80px;
  border-radius: var(--radius-sm);
}

.detail-skeleton-item .value {
  height: 18px;
  width: 100%;
  border-radius: var(--radius-sm);
}

/* Stats Grid Skeleton */
.stats-skeleton {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-skeleton {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  gap: 16px;
}

.stat-skeleton-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.stat-skeleton-content { flex: 1; }

.stat-skeleton-label {
  height: 12px;
  width: 80px;
  margin-bottom: 10px;
  border-radius: var(--radius-sm);
}

.stat-skeleton-value {
  height: 24px;
  width: 120px;
  border-radius: var(--radius-md);
}

/* Pulse animation for subtle effect */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.skeleton-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================================
   SPECIAL EFFECTS
   ============================================================ */

/* Glass morphism card */
.glass-card {
  background: rgba(12, 12, 16, 0.6);
  backdrop-filter: blur(24px) saturate(1.5);
  -webkit-backdrop-filter: blur(24px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-xl);
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

/* Gradient border effect */
.gradient-border {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.5), rgba(168, 85, 247, 0.3), transparent, rgba(99, 102, 241, 0.5));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Neon glow effect */
.neon-glow {
  box-shadow: 
    0 0 5px rgba(99, 102, 241, 0.3),
    0 0 20px rgba(99, 102, 241, 0.2),
    0 0 40px rgba(99, 102, 241, 0.1);
}

/* Scanline effect for console */
.scanlines::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px
  );
  pointer-events: none;
}

/* Typing cursor */
.typing-cursor::after {
  content: '|';
  animation: blinkCursor 1s step-end infinite;
  color: var(--info);
}

@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Particle dot animation */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--info);
  border-radius: 50%;
  opacity: 0;
  animation: particleFloat 4s ease-in-out infinite;
}

@keyframes particleFloat {
  0% { 
    opacity: 0; 
    transform: translateY(0) scale(0); 
  }
  20% { 
    opacity: 0.6; 
    transform: translateY(-20px) scale(1); 
  }
  100% { 
    opacity: 0; 
    transform: translateY(-100px) scale(0); 
  }
}

/* Ripple effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 10%, transparent 10.01%);
  transform: scale(0);
  opacity: 0;
  transition: transform 0.5s, opacity 0.5s;
  pointer-events: none;
}

.ripple:active::after {
  transform: scale(4);
  opacity: 1;
  transition: 0s;
}

/* Shimmer loading bar */
.shimmer-bar {
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--info) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmerBar 1.5s ease-in-out infinite;
  border-radius: var(--radius-full);
}

@keyframes shimmerBar {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Floating animation */
.float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Scale pulse for notifications */
.scale-pulse {
  animation: scalePulse 2s ease-in-out infinite;
}

@keyframes scalePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Rotate animation */
.rotate-slow {
  animation: rotateSlow 20s linear infinite;
}

@keyframes rotateSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  position: relative;
  padding: 60px 40px;
  border-radius: var(--radius-2xl);
  background: var(--grad-hero);
  border: 1px solid var(--border-primary);
  overflow: hidden;
  margin-bottom: 32px;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    transparent,
    rgba(99, 102, 241, 0.03),
    transparent,
    rgba(168, 85, 247, 0.03),
    transparent
  );
  animation: rotateSlow 30s linear infinite;
  pointer-events: none;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #a8a8b3 50%, #6b6b78 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
}

.hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
}

/* ============================================================
   PROGRESS BARS
   ============================================================ */
.progress-bar {
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--grad-info);
  transition: width var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: shimmerBar 2s ease-in-out infinite;
}

.progress-bar-fill.success { background: var(--grad-success); }
.progress-bar-fill.warning { background: var(--grad-warning); }
.progress-bar-fill.danger { background: var(--grad-danger); }

/* ============================================================
   TOOLTIPS
   ============================================================ */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-primary);
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  pointer-events: none;
  z-index: 1000;
  box-shadow: var(--shadow-lg);
}

.tooltip:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

/* ============================================================
   DIVIDERS
   ============================================================ */
.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-primary), transparent);
  margin: 24px 0;
}

.divider-vertical {
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--border-primary), transparent);
  margin: 0 16px;
}

/* ============================================================
   AVATAR GROUP
   ============================================================ */
.avatar-group {
  display: flex;
}

.avatar-group .user-avatar {
  margin-left: -8px;
  border: 2px solid var(--bg-card);
  transition: all var(--transition-fast);
}

.avatar-group .user-avatar:first-child {
  margin-left: 0;
}

.avatar-group .user-avatar:hover {
  transform: translateY(-4px) scale(1.1);
  z-index: 10;
}

/* ============================================================
   KEYBOARD SHORTCUT
   ============================================================ */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-secondary);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-secondary);
  box-shadow: var(--shadow-xs);
}

/* ============================================================
   NOTIFICATION DOT
   ============================================================ */
.notification-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  animation: notificationPulse 2s ease-in-out infinite;
}

@keyframes notificationPulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); 
  }
  50% { 
    box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); 
  }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ============================================================
   API KEYS STYLING
   ============================================================ */
.api-key-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.api-key-status.active {
  background: var(--success-bg);
  color: var(--success-bright);
  border: 1px solid var(--success-border);
}

.api-key-status.inactive {
  background: var(--warning-bg);
  color: var(--warning-bright);
  border: 1px solid var(--warning-border);
}

/* API Key input with copy button */
.api-key-input-group {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.api-key-input-group .form-input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: -0.01em;
}

.api-key-input-group .btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* API Key display code block */
.api-key-code-block {
  display: block;
  padding: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-secondary);
  overflow-x: auto;
  word-break: break-all;
}

/* Modal for API key display */
#modal-api-key-created .alert {
  margin-bottom: 16px;
}

#modal-api-key-created .form-group {
  margin-bottom: 16px;
}

#modal-api-key-created .api-key-code-block {
  margin-top: 8px;
}

/* Admin API Keys table styling */
#admin-api-keys-table thead th {
  text-align: left;
  padding: 11px 18px;
  font-weight: 600;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-card);
}

#admin-api-keys-table tbody tr {
  border-bottom: 1px solid var(--border-primary);
  transition: background var(--transition-fast);
}

#admin-api-keys-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

#admin-api-keys-table td {
  padding: 12px 18px;
  font-size: 0.8125rem;
}

#admin-api-keys-table .actions-cell {
  text-align: right;
}

/* Last used / created timestamp styling */
#admin-api-keys-table .text-muted {
  color: var(--text-tertiary);
  font-size: 0.75rem;
}

/* Search input in API Keys tab */
#admin-api-keys-search {
  width: 100%;
  max-width: 300px;
}

/* Status badge in API Keys */
#admin-api-keys-table .badge {
  font-size: 0.6875rem;
  padding: 3px 10px;
}

/* ============================================================
   Convy-style user panel (post-login, non-admin view)
   ============================================================ */
.rz-shell {
  min-height: 100vh;
  background: #0a0a0a;
  color: #e5e5e5;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  display: flex;
  flex-direction: column;
}

/* Top nav */
.rz-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid #161616;
  background: #0a0a0a;
  position: sticky;
  top: 0;
  z-index: 50;
}
.rz-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #ffffff;
  font-size: 0.9375rem;
  letter-spacing: -0.01em;
}
.rz-brand img {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  object-fit: contain;
  background: #111;
}
.rz-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rz-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 6px 6px 14px;
  background: #111;
  border: 1px solid #1c1c1c;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.rz-user-pill:hover { border-color: #2a2a2a; background: #141414; }
.rz-user-name {
  font-size: 0.8125rem;
  color: #e5e5e5;
  font-weight: 500;
}
.rz-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2563eb;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* Dropdown menu attached to pill */
.rz-user-menu {
  position: absolute;
  top: 60px;
  right: 24px;
  min-width: 200px;
  background: #111;
  border: 1px solid #1c1c1c;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  display: none;
  z-index: 60;
}
.rz-user-menu.open { display: block; }
.rz-user-menu button {
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  background: transparent;
  border: none;
  color: #c4c4c4;
  font-size: 0.8125rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
}
.rz-user-menu button:hover { background: #161616; color: #ffffff; }
.rz-user-menu .danger { color: #ef4444; }
.rz-user-menu .danger:hover { background: rgba(239,68,68,0.08); color: #ef4444; }

/* Tab row */
.rz-tabs {
  display: flex;
  gap: 0;
  padding: 0 24px;
  border-bottom: 1px solid #161616;
  background: #0a0a0a;
}
.rz-tab {
  padding: 14px 4px 12px;
  margin-right: 24px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: #8a8a8a;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease, border-color 0.15s ease;
  position: relative;
  bottom: -1px;
}
.rz-tab:hover { color: #c4c4c4; }
.rz-tab.active {
  color: #ffffff;
  border-bottom-color: #ffffff;
}

/* Body */
.rz-body {
  flex: 1;
  padding: 32px 24px;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

/* Utility row (show-all-servers etc.) */
.rz-utility-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 0.8125rem;
  color: #8a8a8a;
}

/* Search */
.rz-search-wrap {
  position: relative;
  margin-bottom: 40px;
}
.rz-search-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #5a5a5a;
  pointer-events: none;
}
.rz-search {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: #050505;
  border: 1px solid #1c1c1c;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s ease;
}
.rz-search::placeholder { color: #525252; }
.rz-search:hover { border-color: #262626; }
.rz-search:focus { border-color: #333; }

/* Empty state */
.rz-empty {
  text-align: center;
  color: #6b6b6b;
  padding: 80px 20px;
  font-size: 0.9375rem;
}

/* VPS list (grid of clean cards) */
.rz-vps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}
.rz-vps-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  transition: all 0.15s ease;
  cursor: pointer;
}
.rz-vps-row:hover { border-color: #2a2a2a; background: #111; }
.rz-vps-info { flex: 1; min-width: 0; }
.rz-vps-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fafafa;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.rz-vps-meta {
  font-size: 0.75rem;
  color: #6b6b6b;
  font-family: 'JetBrains Mono', monospace;
}
.rz-vps-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
}
.rz-vps-status.running { background: rgba(34,197,94,0.1); color: #22c55e; }
.rz-vps-status.stopped { background: rgba(239,68,68,0.1); color: #ef4444; }
.rz-vps-status.suspended { background: rgba(245,158,11,0.1); color: #f59e0b; }
.rz-vps-status .dot {
  width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}

/* VPS detail (clean card stack) */
.rz-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.rz-detail-title { font-size: 1.5rem; font-weight: 700; color: #ffffff; letter-spacing: -0.02em; }
.rz-detail-sub { font-size: 0.8125rem; color: #6b6b6b; margin-top: 4px; font-family: 'JetBrains Mono', monospace; }
.rz-card {
  background: #0d0d0d;
  border: 1px solid #1a1a1a;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 12px;
}
.rz-card-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #8a8a8a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.rz-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px 24px;
}
.rz-info-item { min-width: 0; }
.rz-info-label { font-size: 0.6875rem; color: #6b6b6b; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; }
.rz-info-value { font-size: 0.875rem; color: #fafafa; font-family: 'JetBrains Mono', monospace; word-break: break-word; }
.rz-info-value.plain { font-family: inherit; }

/* Profile page */
.rz-profile-card { text-align: center; padding: 40px 20px; }
.rz-profile-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: #2563eb; color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1.75rem; font-weight: 700; margin: 0 auto 16px;
  text-transform: uppercase;
}
.rz-profile-name { font-size: 1.25rem; font-weight: 600; color: #fff; margin-bottom: 4px; }
.rz-profile-role { font-size: 0.8125rem; color: #6b6b6b; }

@media (max-width: 640px) {
  .rz-topbar { padding: 12px 16px; }
  .rz-tabs { padding: 0 16px; overflow-x: auto; }
  .rz-tab { margin-right: 18px; white-space: nowrap; }
  .rz-body { padding: 20px 16px; }
  .rz-user-name { display: none; }
}

/* ============================================================
   TabiCloud footer bar (Convy style)
   ============================================================ */
.rz-footer {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #161616;
  background: #0a0a0a;
  margin-top: auto;
}
.rz-footer-left {
  font-size: 0.8125rem;
  color: #6b6b6b;
}

/* Convy-style blue toggle */
.rz-theme-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: #2563eb;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}
.rz-theme-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 22px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.rz-theme-toggle .rz-toggle-icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  pointer-events: none;
}
.rz-theme-toggle .rz-moon { left: 5px; }
.rz-theme-toggle .rz-sun  { right: 5px; }

/* ---------- Light theme for the user shell ---------- */
html.light-mode .rz-shell { background: #f5f5f5; color: #0a0a0a; }
html.light-mode .rz-topbar { background: #ffffff; border-bottom-color: #e5e5e5; }
html.light-mode .rz-brand { color: #0a0a0a; }
html.light-mode .rz-user-pill { background: #f4f4f4; border-color: #e5e5e5; }
html.light-mode .rz-user-name { color: #0a0a0a; }
html.light-mode .rz-tabs { background: #ffffff; border-bottom-color: #e5e5e5; }
html.light-mode .rz-tab { color: #666; }
html.light-mode .rz-tab:hover { color: #0a0a0a; }
html.light-mode .rz-tab.active { color: #0a0a0a; border-bottom-color: #0a0a0a; }
html.light-mode .rz-body { color: #0a0a0a; }
html.light-mode .rz-search { background: #ffffff; border-color: #e0e0e0; color: #0a0a0a; }
html.light-mode .rz-search::placeholder { color: #999; }
html.light-mode .rz-search-wrap svg { color: #999; }
html.light-mode .rz-empty { color: #666; }
html.light-mode .rz-vps-row { background: #ffffff; border-color: #e5e5e5; }
html.light-mode .rz-vps-row:hover { background: #f9f9f9; border-color: #d4d4d4; }
html.light-mode .rz-vps-name { color: #0a0a0a; }
html.light-mode .rz-vps-meta { color: #666; }
html.light-mode .rz-footer { background: #ffffff; border-top-color: #e5e5e5; }
html.light-mode .rz-footer-left { color: #666; }
html.light-mode .rz-detail-title { color: #0a0a0a; }
html.light-mode .rz-detail-sub { color: #666; }
html.light-mode .rz-card { background: #ffffff; border-color: #e5e5e5; }
html.light-mode .rz-card-title { color: #666; }
html.light-mode .rz-info-value { color: #0a0a0a; }
html.light-mode .rz-info-label { color: #666; }
html.light-mode .rz-profile-card { background: #ffffff; }
html.light-mode .rz-profile-name { color: #0a0a0a; }
html.light-mode .rz-profile-role { color: #666; }
html.light-mode .rz-user-menu { background: #ffffff; border-color: #e5e5e5; box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
html.light-mode .rz-user-menu button { color: #333; }
html.light-mode .rz-user-menu button:hover { background: #f4f4f4; color: #0a0a0a; }
html.light-mode .rz-user-menu .danger { color: #dc2626; }
html.light-mode .rz-user-menu .danger:hover { background: rgba(220,38,38,0.06); color: #dc2626; }

/* Toggle in light mode */
html.light-mode .rz-theme-toggle { background: #0a0a0a; }
html.light-mode .rz-theme-toggle::after { left: 2px; }

@media (max-width: 640px) {
  .rz-footer { padding: 14px 16px; }
}

/* New user page sections */
.rz-page { display: none; }
.rz-page[style*="display: block"], .rz-page[style*="display:block"] { display: block; }
.rz-page.active { display: block; }

.rz-page { display: none; }
.rz-page[style*="display:block"] { display: block; }
.rz-page[style*="display: block"] { display: block; }

/* User pill dropdown */
.rz-user-menu {
  position: absolute;
  top: 60px;
  right: 24px;
  min-width: 180px;
  background: #111111;
  border: 1px solid #1c1c1c;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.6);
  display: none;
  z-index: 999;
}
.rz-user-menu.open { display: block; }
.rz-user-menu button {
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  background: transparent;
  border: none;
  color: #c4c4c4;
  font-size: 0.8125rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 500;
  display: block;
}
.rz-user-menu button:hover { background: #1a1a1a; color: #ffffff; }
.rz-user-menu button.danger { color: #ef4444; }
.rz-user-menu button.danger:hover { background: rgba(239,68,68,0.08); color: #ef4444; }

html.light-mode .rz-user-menu {
  background: #ffffff;
  border-color: #e5e5e5;
  box-shadow: 0 12px 32px rgba(0,0,0,0.08);
}
html.light-mode .rz-user-menu button { color: #333333; }
html.light-mode .rz-user-menu button:hover { background: #f4f4f4; color: #0a0a0a; }

/* ============================================================
   Profile form elements
   ============================================================ */
.rz-form-group { margin-bottom: 16px; }
.rz-form-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #a3a3a3;
  margin-bottom: 8px;
}
.rz-form-input {
  width: 100%;
  padding: 11px 14px;
  background: #0a0a0a;
  border: 1px solid #262626;
  border-radius: 8px;
  color: #fafafa;
  font-size: 0.875rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.rz-form-input:hover { border-color: #333333; }
.rz-form-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}
.rz-form-hint {
  font-size: 0.75rem;
  color: #6b6b6b;
  margin-top: 6px;
}
.rz-form-msg {
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 12px;
}
.rz-form-msg.error {
  color: #ef4444;
  background: rgba(239,68,68,0.08);
  border: 1px solid rgba(239,68,68,0.2);
}
.rz-form-msg.success {
  color: #22c55e;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.2);
}

/* Light mode profile forms */
html.light-mode .rz-form-label { color: #666; }
html.light-mode .rz-form-input {
  background: #ffffff;
  border-color: #d4d4d4;
  color: #0a0a0a;
}
html.light-mode .rz-form-input:hover { border-color: #b8b8b8; }
html.light-mode .rz-form-input:focus { border-color: #2563eb; }
html.light-mode .rz-form-msg.error {
  background: rgba(239,68,68,0.05);
  color: #dc2626;
}
html.light-mode .rz-form-msg.success {
  background: rgba(34,197,94,0.06);
  color: #16a34a;
}
html.light-mode .rz-form-hint { color: #888; }

/* ============================================================
   Smooth logout overlay
   ============================================================ */
.rz-logout-overlay {
  position: fixed;
  inset: 0;
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.rz-logout-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.rz-logout-overlay .rz-logout-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid #1c1c1c;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: rzLogoutSpin 0.6s linear infinite;
}
@keyframes rzLogoutSpin { to { transform: rotate(360deg); } }

/* Fade out the whole shell during logout */
.rz-shell.rz-logout-fade {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

/* ============================================================
   Password UI — eye toggle, strength meter, requirements, match
   ============================================================ */
.rz-input-toggle-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.rz-input-toggle-wrap .rz-form-input {
  padding-right: 42px;
}
.rz-eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: #6b6b6b;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.15s;
}
.rz-eye-btn:hover { color: #a3a3a3; }

/* Strength meter */
.rz-strength { margin-top: 12px; }
.rz-strength-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}
.rz-strength-bars span {
  height: 4px;
  border-radius: 4px;
  background: #1c1c1c;
  transition: background 0.2s;
}
.rz-strength-bars span.s1 { background: #ef4444; }
.rz-strength-bars span.s2 { background: #f59e0b; }
.rz-strength-bars span.s3 { background: #3b82f6; }
.rz-strength-bars span.s4 { background: #22c55e; }
.rz-strength-label {
  font-size: 0.75rem;
  color: #6b6b6b;
  font-weight: 500;
}
.rz-strength-label.s1 { color: #ef4444; }
.rz-strength-label.s2 { color: #f59e0b; }
.rz-strength-label.s3 { color: #3b82f6; }
.rz-strength-label.s4 { color: #22c55e; }

/* Requirements checklist */
.rz-pw-reqs {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 16px;
}
.rz-pw-reqs li {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #6b6b6b;
  transition: color 0.15s;
}
.rz-pw-reqs li svg {
  flex-shrink: 0;
  opacity: 0.3;
  transition: opacity 0.15s, color 0.15s;
}
.rz-pw-reqs li.ok {
  color: #22c55e;
}
.rz-pw-reqs li.ok svg {
  opacity: 1;
  color: #22c55e;
}

/* Match hint */
.rz-match-hint {
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 8px;
}
.rz-match-hint.ok { color: #22c55e; }
.rz-match-hint.err { color: #ef4444; }

/* Disabled state on button */
.rz-card .btn[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Light mode overrides */
html.light-mode .rz-eye-btn { color: #999; }
html.light-mode .rz-eye-btn:hover { color: #333; }
html.light-mode .rz-strength-bars span { background: #e5e5e5; }
html.light-mode .rz-strength-bars span.s1 { background: #ef4444; }
html.light-mode .rz-strength-bars span.s2 { background: #f59e0b; }
html.light-mode .rz-strength-bars span.s3 { background: #3b82f6; }
html.light-mode .rz-strength-bars span.s4 { background: #22c55e; }
html.light-mode .rz-strength-label { color: #888; }
html.light-mode .rz-pw-reqs li { color: #888; }
html.light-mode .rz-pw-reqs li.ok { color: #16a34a; }
html.light-mode .rz-pw-reqs li.ok svg { color: #16a34a; }

/* ---------- Bigger TabiCloud brand (user shell topbar) ---------- */
.rz-topbar .rz-brand {
  gap: 14px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.rz-topbar .rz-brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}
.rz-topbar .rz-brand span {
  font-size: 1.35rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.025em;
}

/* Responsive: slightly smaller on phones */
@media (max-width: 640px) {
  .rz-topbar .rz-brand img { width: 34px; height: 34px; }
  .rz-topbar .rz-brand span { font-size: 1.15rem; }
  .rz-topbar .rz-brand { gap: 10px; }
}

/* ---------- Bigger brand in the sidebar (admin) + login footer ---------- */
.sidebar-brand img {
  height: 42px;
  width: 42px;
}
.sidebar-brand span {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.vz-brand-row img,
.vz-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
}
.vz-brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Light theme keeps brand readable */
html.light-mode .rz-topbar .rz-brand span { color: #0a0a0a; }
html.light-mode .sidebar-brand span { color: #0a0a0a; }

/* Slightly taller topbar to fit the bigger brand */
.rz-topbar {
  padding-top: 16px;
  padding-bottom: 16px;
}

/* ---------- Elongated TabiCloud brand ---------- */
.rz-topbar .rz-brand {
  gap: 16px;
}
.rz-topbar .rz-brand img {
  width: 44px;
  height: 44px;
  border-radius: 10px;
}
.rz-topbar .rz-brand span {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;         /* wide tracking = elongated feel */
  font-stretch: 110%;              /* wider glyphs if the font supports it */
  text-transform: none;
  font-family: 'Inter', sans-serif;
  transform: scaleX(1.08);         /* horizontal stretch */
  transform-origin: left center;
  display: inline-block;
}

/* Sidebar brand too */
.sidebar-brand span {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  transform: scaleX(1.05);
  transform-origin: left center;
  display: inline-block;
}

/* Login page brand */
.vz-brand-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  transform: scaleX(1.06);
  transform-origin: left center;
  display: inline-block;
}

/* Mobile — soften the elongation */
@media (max-width: 640px) {
  .rz-topbar .rz-brand span {
    font-size: 1.25rem;
    letter-spacing: 0.04em;
    transform: scaleX(1.04);
  }
  .rz-topbar .rz-brand img { width: 36px; height: 36px; }
}

/* When tabs are removed, add spacing between topbar and body */
.rz-tabs + .rz-body,
body:not(:has(.rz-tabs)) .rz-body {
  padding-top: 36px;
}

/* Clickable brand in the topbar */
.rz-topbar .rz-brand {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
  border-radius: 8px;
  padding: 4px 8px;
  margin-left: -8px;
}
.rz-topbar .rz-brand:hover {
  opacity: 0.85;
  background: rgba(255,255,255,0.03);
}
html.light-mode .rz-topbar .rz-brand:hover {
  background: rgba(0,0,0,0.04);
}

/* Clickable brand in the topbar */
.rz-topbar .rz-brand {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: opacity 0.15s;
  border-radius: 8px;
  padding: 4px 8px;
  margin-left: -8px;
}
.rz-topbar .rz-brand:hover {
  opacity: 0.85;
  background: rgba(255,255,255,0.03);
}
html.light-mode .rz-topbar .rz-brand:hover {
  background: rgba(0,0,0,0.04);
}

/* Give OS logos a subtle circle backdrop */
.rz-vps-os-logo {
  width: 20px;
  height: 20px;
  padding: 2px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  box-sizing: content-box;
}
html.light-mode .rz-vps-os-logo {
  background: rgba(0,0,0,0.05);
}

/* OS logo on VPS cards */
.rz-vps-name {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rz-vps-os-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
}

/* OS logo everywhere it's used */
.rz-vps-os-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 4px;
  display: inline-block;
  vertical-align: middle;
}
.vps-card-name {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vps-card-name .rz-vps-os-logo,
.table .primary-cell .rz-vps-os-logo {
  margin-right: 8px;
}
.table .primary-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
html.light-mode .rz-vps-os-logo {
  background: rgba(0,0,0,0.03);
}

/* ---------- Profile page layout fixes ---------- */
.rz-body {
  padding-bottom: 40px;
}

/* Sign out button in profile */
.rz-signout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: transparent;
  color: #ef4444;
  border: 1px solid rgba(239,68,68,0.35);
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
}
.rz-signout-btn:hover {
  background: rgba(239,68,68,0.08);
  border-color: #ef4444;
}

/* Card footer alignment */
.rz-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  gap: 8px;
}

html.light-mode .rz-signout-btn {
  color: #dc2626;
  border-color: rgba(220,38,38,0.3);
}
html.light-mode .rz-signout-btn:hover {
  background: rgba(220,38,38,0.06);
  border-color: #dc2626;
}

/* ---------- Anchored dropdown ---------- */
.rz-topbar {
  position: relative;   /* non-sticky */
}

/* Dropdown anchors to the pill; when the topbar sticks, this stays in view */
.rz-user-menu {
  position: fixed;
  top: 68px;
  right: 24px;
  z-index: 999;
}

/* Clickability safety net — ensure nothing eats the pointer events */
.rz-shell,
.rz-shell * {
  pointer-events: auto;
}
.rz-vps-row { cursor: pointer; }
.rz-vps-row * { pointer-events: none; }        /* let the row handle the click */
.rz-vps-row:hover { border-color: #2a2a2a; }
.rz-user-pill, .rz-brand, .rz-theme-toggle,
#rz-logout-btn, #rz-menu-profile, #rz-prof-signout { cursor: pointer; }

/* Ensure no other overlay is capturing clicks on top of the shell */
#global-loader { pointer-events: none; }
#global-loader.active { pointer-events: auto; }
.toast-container { pointer-events: none; }
.toast { pointer-events: auto; }

/* ============================================================
   FORCE pointer-events so nothing blocks clicks on the shell
   ============================================================ */
.ambient-bg,
#global-loader:not(.active),
.loading-overlay:not(.active),
.toast-container {
  pointer-events: none !important;
}

#app-view,
#user-shell,
#admin-shell,
.rz-shell,
.rz-topbar,
.rz-body,
.rz-footer {
  pointer-events: auto !important;
  position: relative;
  z-index: 1;
}

/* Loader only intercepts when actually loading */
#global-loader.active {
  pointer-events: auto !important;
  z-index: 5000;
}
.loading-overlay.active {
  pointer-events: auto !important;
}

/* OS logo on the VPS detail header */
.rz-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.rz-detail-header > div:first-child {
  display: flex;
  align-items: center;
  gap: 14px;
}
.rz-detail-os-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 6px;
}
.rz-detail-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.rz-detail-sub {
  font-size: 0.75rem;
  color: #6b6b6b;
  font-family: 'JetBrains Mono', monospace;
  margin-top: 4px;
}

html.light-mode .rz-detail-title { color: #0a0a0a; }
html.light-mode .rz-detail-sub   { color: #666666; }

html.light-mode .rz-ip-mask { color: #999; }
html.light-mode .rz-ip-mask:hover { color: #555; }
html.light-mode .rz-ip-revealed { color: #0a0a0a; }


/* ---------- Redacted IP (professional blur block) ---------- */
.rz-redacted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #6b6b6b;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  letter-spacing: 0.08em;
}
.rz-redacted:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.12);
  color: #a3a3a3;
}
.rz-redacted::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4a4a4a;
  flex-shrink: 0;
}
.rz-redacted:hover::before { background: #2563eb; }

.rz-revealed {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  background: rgba(37,99,235,0.08);
  border: 1px solid rgba(37,99,235,0.2);
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #60a5fa;
  cursor: pointer;
  user-select: text;
  transition: all 0.15s ease;
}
.rz-revealed:hover {
  background: rgba(37,99,235,0.12);
  border-color: rgba(37,99,235,0.3);
}
.rz-revealed::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

/* Light theme */
html.light-mode .rz-redacted {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.06);
  color: #888;
}
html.light-mode .rz-redacted:hover {
  background: rgba(0,0,0,0.06);
  color: #555;
}
html.light-mode .rz-redacted::before { background: #bbb; }
html.light-mode .rz-redacted:hover::before { background: #2563eb; }
html.light-mode .rz-revealed {
  background: rgba(37,99,235,0.08);
  color: #2563eb;
}

/* Copy-IP button */
.rz-copy-ip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  padding: 3px 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #6b6b6b;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.rz-copy-ip:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.12);
  color: #a3a3a3;
}
.rz-copy-ip svg {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
}
.rz-copy-ip.copied {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.25);
  color: #22c55e;
}

html.light-mode .rz-copy-ip {
  background: rgba(0,0,0,0.03);
  border-color: rgba(0,0,0,0.06);
  color: #888;
}
html.light-mode .rz-copy-ip:hover {
  background: rgba(0,0,0,0.05);
  color: #555;
}
html.light-mode .rz-copy-ip.copied {
  background: rgba(22,163,74,0.08);
  border-color: rgba(22,163,74,0.25);
  color: #16a34a;
}

/* ============================================================
   Power action icon buttons (Convy style)
   ============================================================ */
.rz-power-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.rz-power-btn {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1.5px solid;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
  position: relative;
}

.rz-power-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  transition: transform 0.2s ease;
}

.rz-power-btn:hover svg {
  transform: scale(1.1);
}

.rz-power-btn:active {
  transform: scale(0.94);
}

/* Variants — colors match the reference */
.rz-power-btn.stop {
  border-color: rgba(239,68,68,0.35);
  color: #ef4444;
}
.rz-power-btn.stop:hover {
  background: rgba(239,68,68,0.08);
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239,68,68,0.15);
}

.rz-power-btn.restart {
  border-color: rgba(245,158,11,0.35);
  color: #f59e0b;
}
.rz-power-btn.restart:hover {
  background: rgba(245,158,11,0.08);
  border-color: #f59e0b;
  box-shadow: 0 0 20px rgba(245,158,11,0.15);
}

.rz-power-btn.poweroff {
  border-color: rgba(239,68,68,0.35);
  color: #ef4444;
}
.rz-power-btn.poweroff:hover {
  background: rgba(239,68,68,0.08);
  border-color: #ef4444;
  box-shadow: 0 0 20px rgba(239,68,68,0.15);
}

.rz-power-btn.reload {
  border-color: rgba(59,130,246,0.35);
  color: #3b82f6;
}
.rz-power-btn.reload:hover {
  background: rgba(59,130,246,0.08);
  border-color: #3b82f6;
  box-shadow: 0 0 20px rgba(59,130,246,0.15);
}

.rz-power-btn.start {
  border-color: rgba(34,197,94,0.35);
  color: #22c55e;
}
.rz-power-btn.start:hover {
  background: rgba(34,197,94,0.08);
  border-color: #22c55e;
  box-shadow: 0 0 20px rgba(34,197,94,0.15);
}

/* Tooltip on hover */
.rz-power-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background: #16161c;
  color: #e5e5e5;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.6875rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
  border: 1px solid #262626;
  z-index: 10;
}
.rz-power-btn:hover::after {
  opacity: 1;
}

/* Light theme variants — borders stay colored but tinted lighter */
html.light-mode .rz-power-btn::after {
  background: #fff;
  color: #0a0a0a;
  border-color: #e5e5e5;
}

/* Row container: put buttons in a compact row */
.rz-power-actions-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
}

/* Header actions row (right side, inline with badge) */


.rz-detail-header .rz-power-btn svg {
  width: 16px;
  height: 16px;
}
/* Tooltip shows below the buttons now */
.rz-detail-header .rz-power-btn::after {
  bottom: -34px;
}

/* Responsive: wrap on small screens */
@media (max-width: 720px) {
  .rz-detail-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 16px !important;
  }
  .rz-detail-header > div:last-child {
    align-self: flex-start;
  }
}




.rz-detail-header .rz-power-btn svg {
  width: 16px;
  height: 16px;
}
/* Tooltip on the right side of the buttons */
.rz-detail-header .rz-power-btn::after {
  bottom: -34px;
}

@media (max-width: 720px) {
  .rz-detail-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 16px !important;
  }
}




.rz-detail-header .rz-power-btn svg {
  width: 16px;
  height: 16px;
}
/* Tooltip on the right side of the buttons */
.rz-detail-header .rz-power-btn::after {
  bottom: -34px;
}

@media (max-width: 720px) {
  .rz-detail-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 16px !important;
  }
}


/* ============================================================
   Detail header — clean three-part layout
   ============================================================ */
.rz-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

/* Left cluster: logo + title + power buttons, all on one line */
.rz-detail-header > div:first-child {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}

/* Right: the RUNNING badge */
.rz-detail-header > div:last-child {
  flex-shrink: 0;
  margin-left: auto;
}

/* Power buttons inline with the title */
.rz-detail-header .rz-power-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 8px;
}
.rz-detail-header .rz-power-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.rz-detail-header .rz-power-btn svg {
  width: 16px;
  height: 16px;
}
.rz-detail-header .rz-power-btn::after {
  bottom: -34px;
}

@media (max-width: 720px) {
  .rz-detail-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .rz-detail-header > div:last-child {
    margin-left: 0;
  }
}

/* ============================================================
   Confirmation modal — polished
   ============================================================ */
.rz-confirm-overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.75) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2500 !important;
}
.rz-confirm-overlay.active { display: flex !important; }

.rz-confirm-card {
  width: 100%;
  max-width: 440px;
  background: #0d0f14;
  border: 1px solid #1f2229;
  border-radius: 16px;
  padding: 26px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.8);
  animation: rzCModalIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes rzCModalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.rz-confirm-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}
.rz-confirm-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.rz-confirm-icon svg { width: 22px; height: 22px; }
.rz-confirm-icon.danger  { background: rgba(239,68,68,0.12);  color: #ef4444; border: 1px solid rgba(239,68,68,0.28); }
.rz-confirm-icon.warning { background: rgba(245,158,11,0.12); color: #f59e0b; border: 1px solid rgba(245,158,11,0.28); }
.rz-confirm-icon.primary { background: rgba(59,130,246,0.12); color: #3b82f6; border: 1px solid rgba(59,130,246,0.28); }

.rz-confirm-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #fafafa;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.rz-confirm-message {
  font-size: 0.875rem;
  color: #9a9aa5;
  line-height: 1.6;
  margin-bottom: 26px;
}

.rz-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.rz-confirm-btn {
  padding: 10px 20px;
  border-radius: 9px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  letter-spacing: -0.005em;
}
.rz-confirm-btn.cancel {
  background: transparent;
  color: #c4c4c4;
  border-color: #262a33;
}
.rz-confirm-btn.cancel:hover {
  background: #1a1c22;
  border-color: #343945;
  color: #fafafa;
}
.rz-confirm-btn.confirm {
  background: #ef4444;
  color: #ffffff;
}
.rz-confirm-btn.confirm:hover:not(:disabled) { background: #dc2626; }
.rz-confirm-btn.confirm.primary { background: #2563eb; }
.rz-confirm-btn.confirm.primary:hover:not(:disabled) { background: #1d4ed8; }
.rz-confirm-btn:disabled { opacity: 0.55; cursor: not-allowed; }

/* Light theme */
html.light-mode .rz-confirm-card {
  background: #ffffff;
  border-color: #e5e5e5;
}
html.light-mode .rz-confirm-title { color: #0a0a0a; }
html.light-mode .rz-confirm-message { color: #555; }
html.light-mode .rz-confirm-btn.cancel {
  color: #444;
  border-color: #d4d4d4;
}
html.light-mode .rz-confirm-btn.cancel:hover {
  background: #f5f5f5;
  color: #0a0a0a;
}

/* ============================================================
   Confirm modal — info note below the message
   ============================================================ */
.rz-confirm-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(59,130,246,0.06);
  border: 1px solid rgba(59,130,246,0.16);
  border-radius: 10px;
  margin: -12px 0 22px;
  font-size: 0.8125rem;
  color: #9bb6f8;
  line-height: 1.5;
}
.rz-confirm-note-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
  color: #3b82f6;
}
.rz-confirm-note-icon svg {
  width: 15px;
  height: 15px;
}
.rz-confirm-note-text {
  flex: 1;
}

/* Slightly warmer tone for poweroff (bigger warning) */
.rz-confirm-icon.danger ~ .rz-confirm-message + .rz-confirm-note,
.rz-confirm-overlay[data-action="poweroff"] .rz-confirm-note {
  background: rgba(239,68,68,0.06);
  border-color: rgba(239,68,68,0.16);
  color: #f3a3a3;
}
.rz-confirm-overlay[data-action="poweroff"] .rz-confirm-note-icon {
  color: #ef4444;
}

/* Light theme */
html.light-mode .rz-confirm-note {
  background: rgba(59,130,246,0.05);
  border-color: rgba(59,130,246,0.2);
  color: #2563eb;
}
html.light-mode .rz-confirm-overlay[data-action="poweroff"] .rz-confirm-note {
  background: rgba(239,68,68,0.05);
  border-color: rgba(239,68,68,0.2);
  color: #dc2626;
}


/* ============================================================
   Top-center toast popups (premium look)
   ============================================================ */
.rz-toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5000;
  pointer-events: none;
  max-width: calc(100vw - 32px);
}

.rz-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px 12px 16px;
  background: #14161d;
  border: 1px solid #23252e;
  border-radius: 12px;
  box-shadow:
    0 20px 48px rgba(0,0,0,0.5),
    0 4px 12px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.03);
  color: #e5e5e5;
  font-size: 0.875rem;
  font-weight: 500;
  min-width: 320px;
  max-width: 520px;
  opacity: 0;
  transform: translateY(-16px) scale(0.96);
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
  letter-spacing: -0.005em;
  line-height: 1.4;
}

.rz-toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Icon block */
.rz-toast-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rz-toast-icon svg {
  width: 14px;
  height: 14px;
}

/* Success — green */
.rz-toast-success {
  border-color: rgba(34,197,94,0.25);
  background: linear-gradient(180deg, #121a17 0%, #0d1411 100%);
}
.rz-toast-success .rz-toast-icon {
  background: rgba(34,197,94,0.14);
  color: #22c55e;
}
.rz-toast-success .rz-toast-text { color: #d1fae5; }

/* Error — red */
.rz-toast-error {
  border-color: rgba(239,68,68,0.28);
  background: linear-gradient(180deg, #1a1214 0%, #140c0e 100%);
}
.rz-toast-error .rz-toast-icon {
  background: rgba(239,68,68,0.14);
  color: #ef4444;
}
.rz-toast-error .rz-toast-text { color: #fee2e2; }

/* Info — blue */
.rz-toast-info {
  border-color: rgba(59,130,246,0.25);
  background: linear-gradient(180deg, #101826 0%, #0d121d 100%);
}
.rz-toast-info .rz-toast-icon {
  background: rgba(59,130,246,0.14);
  color: #3b82f6;
}
.rz-toast-info .rz-toast-text { color: #dbeafe; }

.rz-toast-text {
  flex: 1;
  word-break: break-word;
}

/* Progress bar at the bottom of the toast — visual timer */
.rz-toast::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: currentColor;
  opacity: 0.4;
  transform-origin: left;
  animation: rzToastTimer 3.5s linear forwards;
  border-radius: 0 0 12px 12px;
}
@keyframes rzToastTimer {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* Position relative so ::after anchors correctly */
.rz-toast { position: relative; overflow: hidden; }

/* Light theme */
html.light-mode .rz-toast {
  background: #ffffff;
  border-color: #e5e5e5;
  color: #0a0a0a;
  box-shadow: 0 20px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.08);
}
html.light-mode .rz-toast-success { background: #ecfdf5; border-color: rgba(34,197,94,0.3); }
html.light-mode .rz-toast-error   { background: #fef2f2; border-color: rgba(239,68,68,0.3); }
html.light-mode .rz-toast-info    { background: #eff6ff; border-color: rgba(59,130,246,0.3); }
html.light-mode .rz-toast-success .rz-toast-text { color: #065f46; }
html.light-mode .rz-toast-error   .rz-toast-text { color: #991b1b; }
html.light-mode .rz-toast-info    .rz-toast-text { color: #1e40af; }

@media (max-width: 640px) {
  .rz-toast-container { top: 16px; left: 16px; right: 16px; transform: none; }
  .rz-toast { min-width: 0; }
}

/* ============================================================
   Resources & Usage (additive)
   ============================================================ */
#rz-resources-section .rz-res-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
@media (max-width: 640px) {
  #rz-resources-section .rz-res-grid { grid-template-columns: 1fr; }
}

.rz-res-block { display: block; }

.rz-res-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.rz-res-icon {
  width: 22px; height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #8a8a8a;
  flex-shrink: 0;
}
.rz-res-icon svg { width: 18px; height: 18px; }
.rz-res-label {
  flex: 1;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e5e5e5;
}
.rz-res-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: #8a8a8a;
}
.rz-res-bar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rz-res-pct {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: rgba(34,197,94,0.08);
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #22c55e;
  font-family: 'JetBrains Mono', monospace;
  flex-shrink: 0;
}
.rz-res-pct.warn { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.25); color: #f59e0b; }
.rz-res-pct.danger { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.25); color: #ef4444; }
.rz-res-bar {
  flex: 1;
  height: 6px;
  background: #16181f;
  border-radius: 999px;
  overflow: hidden;
}
.rz-res-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #22c55e 0%, #16a34a 100%);
  border-radius: 999px;
  transition: width .5s ease;
}
.rz-res-fill.warn { background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%); }
.rz-res-fill.danger { background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%); }

/* IN / OUT */
.rz-res-inout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}
.rz-res-in, .rz-res-out {
  padding: 14px 18px;
  border-radius: 12px;
  border: 1px solid;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.rz-res-in {
  background: rgba(59,130,246,0.06);
  border-color: rgba(59,130,246,0.25);
}
.rz-res-out {
  background: rgba(239,68,68,0.06);
  border-color: rgba(239,68,68,0.2);
}
.rz-res-inout-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.rz-res-in .rz-res-inout-label { color: #60a5fa; }
.rz-res-out .rz-res-inout-label { color: #f87171; }
.rz-res-inout-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.875rem;
  font-weight: 600;
  color: #e5e5e5;
}

/* Meta row */
.rz-res-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding-top: 16px;
  border-top: 1px solid #1a1a1a;
}
@media (max-width: 640px) {
  .rz-res-meta { grid-template-columns: 1fr; }
}
.rz-res-meta-item {
  display: flex;
  align-items: center;
  gap: 12px;
}
.rz-res-meta-icon {
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #6b6b6b;
  flex-shrink: 0;
}
.rz-res-meta-icon svg { width: 18px; height: 18px; }
.rz-res-meta-label {
  font-size: 0.6875rem;
  color: #6b6b6b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 3px;
}
.rz-res-meta-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fafafa;
}

/* Light theme */
html.light-mode #rz-resources-section .rz-res-label { color: #0a0a0a; }
html.light-mode #rz-resources-section .rz-res-value { color: #666; }
html.light-mode #rz-resources-section .rz-res-bar { background: #f0f0f0; }
html.light-mode #rz-resources-section .rz-res-meta-value { color: #0a0a0a; }
html.light-mode #rz-resources-section .rz-res-meta { border-top-color: #e5e5e5; }
html.light-mode .rz-res-in { background: rgba(59,130,246,0.05); }
html.light-mode .rz-res-out { background: rgba(239,68,68,0.04); }
html.light-mode .rz-res-inout-value { color: #0a0a0a; }

/* ============================================================
   Performance graphs — side by side, fixed layout
   ============================================================ */
#rz-graphs-section .rz-graphs-grid {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
  align-items: start !important;
}
@media (max-width: 700px) {
  #rz-graphs-section .rz-graphs-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Each graph box */
#rz-graphs-section .rz-graph-box {
  background: #0a0a0a !important;
  border: 1px solid #1a1a1a !important;
  border-radius: 12px !important;
  padding: 16px !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

/* Header row inside each box */
#rz-graphs-section .rz-graph-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
  margin-bottom: 12px !important;
}

#rz-graphs-section .rz-graph-label {
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #e5e5e5 !important;
}

#rz-graphs-section .rz-graph-value {
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #22c55e !important;
}

/* The canvas must fill the box width */
#rz-graphs-section .rz-graph-canvas {
  display: block !important;
  width: 100% !important;
  height: 140px !important;
  max-width: 100% !important;
}

/* Hide any extra graph boxes we don't use */
#rz-graphs-section .rz-graph-box:nth-child(3),
#rz-graphs-section .rz-graph-box:nth-child(4) {
  display: none !important;
}

/* Light theme */
html.light-mode #rz-graphs-section .rz-graph-box {
  background: #fafafa !important;
  border-color: #e5e5e5 !important;
}
html.light-mode #rz-graphs-section .rz-graph-label {
  color: #0a0a0a !important;
}


/* Server management */
:root {
  --fleet-accent: #a5b4fc;
  --fleet-accent-bg: rgba(129, 140, 248, 0.14);
}
html.light-mode {
  --fleet-accent: #4338ca;
  --fleet-accent-bg: #eef2ff;
}
.fleet-kicker {
  display: block;
  color: var(--fleet-accent);
  font-size: 0.71rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}
.fleet-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 24px;
  border: 1px solid var(--border-primary);
  border-radius: 16px;
  background: linear-gradient(120deg, var(--fleet-accent-bg), transparent 75%), var(--bg-card);
}
.fleet-heading h1 {
  margin: 4px 0;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  letter-spacing: -0.04em;
}
.fleet-heading p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.88rem;
}
.fleet-heading .rz-search-wrap { margin: 0; }

.vps-management {
  padding: 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--text-primary);
}
.vps-management header { margin-bottom: 14px; }
.vps-management h2, .vps-management-dialog h2 {
  margin: 4px 0 0;
  font-size: 1.28rem;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.vps-management-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
  gap: 10px;
}
.vps-management-action {
  display: flex;
  gap: 12px;
  align-items: center;
  text-align: left;
  color: inherit;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  font: inherit;
  padding: 13px;
  cursor: pointer;
  transition: background-color 150ms, border-color 150ms;
}
.vps-management-action:hover {
  border-color: var(--fleet-accent);
  background: var(--bg-card-hover);
}
.vps-management-action:focus-visible, .vps-management-dialog :focus-visible {
  outline: 2px solid var(--fleet-accent);
  outline-offset: 3px;
}
.vps-management-icon {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--fleet-accent-bg);
  color: var(--fleet-accent);
}
.vps-management-icon svg {
  width: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.vps-management-action strong, .vps-management-action small { display: block; }
.vps-management-action strong { font-size: 0.86rem; }
.vps-management-action small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 0.76rem;
  line-height: 1.4;
}
.vps-management-danger .vps-management-icon {
  color: var(--danger);
  background: var(--danger-bg-strong);
}
.vps-management-danger:hover { border-color: var(--danger); }

.vps-management-dialog {
  width: min(calc(100% - 28px), 480px);
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  color: var(--text-primary);
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.45);
}
.vps-management-dialog::backdrop {
  background: rgba(4, 7, 16, 0.68);
  backdrop-filter: blur(4px);
}
.vps-dialog-content { padding: 24px; }
.vps-dialog-description {
  margin: 10px 0 18px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  overflow-wrap: anywhere;
}
.vps-management-dialog fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.vps-management-dialog fieldset + fieldset:not([hidden]) { margin-top: 14px; }
.vps-management-dialog label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.84rem;
  font-weight: 600;
}
.vps-management-dialog small {
  display: block;
  margin: 5px 0 12px;
  color: var(--text-secondary);
}
.vps-management-dialog select { color-scheme: dark; }
html.light-mode .vps-management-dialog select { color-scheme: light; }
.vps-management-dialog .vps-erase-confirm {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-bottom: 0;
  padding: 12px;
  border: 1px solid var(--danger-border);
  border-radius: 8px;
  background: var(--danger-bg);
}
.vps-erase-confirm input { margin-top: 3px; }
.vps-dialog-error {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 0.84rem;
}
.vps-dialog-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 24px;
  border-top: 1px solid var(--border-primary);
  background: var(--bg-tertiary);
}
@media (max-width: 540px) {
  .fleet-heading, .vps-management { padding: 16px; }
  .fleet-heading .rz-search-wrap { width: 100%; }
}

/* VPS and fleet monitoring */
.login-portal-switch {
  display: inline-block;
  margin-top: 20px;
  color: var(--fleet-accent);
  font-size: 0.82rem;
  font-weight: 600;
  text-underline-offset: 3px;
}
.login-portal-switch:hover { text-decoration: underline; }

.admin-overview { margin-bottom: 16px; }
.monitoring-panel {
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--border-primary);
  border-radius: 14px;
  background: var(--bg-card);
  color: var(--text-primary);
}
.monitoring-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px 18px;
  margin-bottom: 14px;
}
.monitoring-heading h2 {
  font-size: 1.28rem;
  letter-spacing: -0.025em;
}
.monitoring-heading p, .monitoring-caption {
  color: var(--text-secondary);
  font-size: 0.76rem;
}
.monitoring-charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr));
  gap: 10px;
}
.monitoring-metric {
  min-width: 0;
  padding: 13px 14px 10px;
  border: 1px solid var(--border-primary);
  border-radius: 10px;
  background: var(--bg-tertiary);
  --monitoring-color: var(--fleet-accent);
}
.monitoring-ram { --monitoring-color: #34d399; }
.monitoring-bandwidth { --monitoring-color: #fbbf24; }
html.light-mode .monitoring-ram { --monitoring-color: #047857; }
html.light-mode .monitoring-bandwidth { --monitoring-color: #a16207; }
.monitoring-metric h3 { font-size: 0.85rem; }
.monitoring-value {
  margin: 3px 0 6px;
  color: var(--monitoring-color);
  font-size: 1.3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.monitoring-metric svg {
  display: block;
  width: 100%;
  margin-bottom: 6px;
}
.monitoring-metric svg text { fill: var(--text-secondary); font-size: 11px; }
.monitoring-gridline { stroke: var(--border-secondary); stroke-dasharray: 4 4; }
.monitoring-line {
  fill: none;
  stroke: var(--monitoring-color);
  stroke-width: 2.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.monitoring-dot { fill: var(--monitoring-color); }
.monitoring-empty-chart {
  display: grid;
  min-height: 85px;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 7px;
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.78rem;
}
.monitoring-activity {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border-primary);
}
.monitoring-activity h3 { margin-bottom: 6px; font-size: 0.94rem; }
.monitoring-events {
  list-style: none;
  max-height: 225px;
  overflow: auto;
  padding: 0;
}
.monitoring-events li {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 8px 0;
  font-size: 0.81rem;
}
.monitoring-events li + li { border-top: 1px solid var(--border-primary); }
.monitoring-events time { color: var(--text-secondary); font-size: 0.76rem; }
.monitoring-status-running { color: var(--success); }
.monitoring-status-suspended, .monitoring-error { color: var(--danger); }
.monitoring-status-action { color: var(--fleet-accent); }
.monitoring-error { margin-top: 10px; font-size: 0.78rem; }

@media (max-width: 540px) {
  .monitoring-panel { padding: 14px; }
}

/* TabiCloud alerts and expiry controls */
:root {
  --fleet-accent: #72dfff;
  --fleet-accent-bg: rgba(56, 189, 248, 0.13);
  --notice-warning: #f9c566;
  --notice-critical: #fca5a5;
  --notice-border: rgba(80, 159, 211, 0.22);
}
html.light-mode {
  --fleet-accent: #075985;
  --fleet-accent-bg: #e0f2fe;
  --notice-warning: #854d0e;
  --notice-critical: #991b1b;
  --notice-border: #c9e1ee;
}
.admin-overview {
  background: linear-gradient(110deg, var(--fleet-accent-bg), transparent 74%), var(--bg-card);
  border-color: var(--notice-border);
}
.notice-panel {
  padding: 18px 20px;
  margin-bottom: 16px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--notice-border);
  border-radius: 14px;
}
.notice-panel header, .notice-list li, .expiry-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
}
.notice-panel header { margin-bottom: 10px; }
.notice-panel h2 {
  margin: 3px 0 0;
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}
.notice-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.notice-list li {
  padding: 10px 0;
  border-top: 1px solid var(--border-primary);
}
.notice-list li:last-child { padding-bottom: 0; }
.notice-list strong, .expiry-strip strong { font-size: 0.87rem; }
.notice-meta, .notice-empty {
  color: var(--text-secondary);
  font-size: 0.78rem;
}
.notice-meta { margin-inline-start: 8px; }
.notice-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.notice-actions { display: flex; flex-wrap: wrap; gap: 6px; }
#vps-expiry-dialog button[hidden] { display: none; }
.notice-chip {
  display: inline-block;
  vertical-align: middle;
  padding: 3px 8px;
  border: 1px solid var(--border-secondary);
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 650;
  white-space: nowrap;
}
.notice-neutral { color: var(--text-secondary); background: var(--bg-tertiary); }
.notice-warning { color: var(--notice-warning); border-color: var(--warning-border); background: var(--warning-bg); }
.notice-critical { color: var(--notice-critical); border-color: var(--danger-border); background: var(--danger-bg); }
.expiry-strip {
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid var(--notice-border);
  border-radius: 10px;
  background: var(--bg-card);
}
.expiry-strip strong { margin-inline-end: 8px; }
.expiry-cell { display: flex; align-items: flex-start; flex-direction: column; gap: 6px; }
.vps-table-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 0 16px 12px;
}
.vps-table-filters input { flex: 1 1 220px; }
.vps-table-filters select { width: min(100%, 165px); }
#admin-vps-table .actions-cell .btn-group { flex-wrap: wrap; gap: 5px; }
#rz-overview-list .rz-vps-info .notice-chip { margin-top: 5px; }
#vps-expiry-date { color-scheme: dark; }
html.light-mode #vps-expiry-date { color-scheme: light; }
@media (max-width: 540px) {
  .notice-panel { padding: 14px; }
  .notice-meta { display: block; margin: 0; }
  .vps-table-filters select { width: 100%; }
}
