@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN TOKENS - Enhanced for better visual hierarchy
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  /* Modern color palette with improved contrast and accessibility */
  --bg: #030712;
  --bg2: #0a0f1f;
  --bg3: #111827;
  --surface: #1e293b;
  --surface2: #273549;
  --surface3: #334155;
  --border: #475569;
  --border2: #64748b;
  --accent: #6366f1;
  --accent2: #818cf8;
  --accent-glow: rgba(99, 102, 241, 0.3);
  --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --green: #10b981;
  --green-glow: rgba(16, 185, 129, 0.25);
  --yellow: #f59e0b;
  --yellow-glow: rgba(245, 158, 11, 0.25);
  --red: #ef4444;
  --red-glow: rgba(239, 68, 68, 0.25);
  --purple: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.25);
  --cyan: #06b6d4;
  --cyan-glow: rgba(6, 182, 212, 0.25);
  --pink: #ec4899;
  --pink-glow: rgba(236, 72, 153, 0.25);
  --text: #f8fafc;
  --text2: #e2e8f0;
  --text3: #cbd5e1;
  --text4: #94a3b8;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* Enhanced spacing scale (8px base) */
  --space-xxs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;
  --space-5xl: 80px;

  /* Enhanced radii with consistent scale */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Modern shadows with depth system */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 24px 96px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
  --shadow-glow-lg: 0 0 80px rgba(99, 102, 241, 0.2);

  /* Enhanced transitions with modern easing */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);

  /* Layout dimensions */
  --sidebar-w: 280px;
  --header-h: 72px;
  --content-max: 1440px;
  --content-padding: 32px;

  /* Z-index layers */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
  --z-toast: 1080;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESET & BASE - Enhanced spacing and typography
   ═══════════════════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-size: 0.9375rem;
  /* 15px */
  line-height: 1.7;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding: 0;
  margin: 0;
}

/* Enhanced container system */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--content-padding);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--content-padding);
}

/* Spacing utilities */
.mt-0 {
  margin-top: 0 !important;
}

.mt-1 {
  margin-top: var(--space-xs) !important;
}

.mt-2 {
  margin-top: var(--space-sm) !important;
}

.mt-3 {
  margin-top: var(--space-md) !important;
}

.mt-4 {
  margin-top: var(--space-lg) !important;
}

.mt-5 {
  margin-top: var(--space-xl) !important;
}

.mt-6 {
  margin-top: var(--space-2xl) !important;
}

.mb-0 {
  margin-bottom: 0 !important;
}

.mb-1 {
  margin-bottom: var(--space-xs) !important;
}

.mb-2 {
  margin-bottom: var(--space-sm) !important;
}

.mb-3 {
  margin-bottom: var(--space-md) !important;
}

.mb-4 {
  margin-bottom: var(--space-lg) !important;
}

.mb-5 {
  margin-bottom: var(--space-xl) !important;
}

.mb-6 {
  margin-bottom: var(--space-2xl) !important;
}

.p-0 {
  padding: 0 !important;
}

.p-1 {
  padding: var(--space-xs) !important;
}

.p-2 {
  padding: var(--space-sm) !important;
}

.p-3 {
  padding: var(--space-md) !important;
}

.p-4 {
  padding: var(--space-lg) !important;
}

.p-5 {
  padding: var(--space-xl) !important;
}

.p-6 {
  padding: var(--space-2xl) !important;
}

/* Text alignment */
.text-left {
  text-align: left !important;
}

.text-center {
  text-align: center !important;
}

.text-right {
  text-align: right !important;
}

.text-justify {
  text-align: justify !important;
}

/* Text colors */
.text-primary {
  color: var(--accent) !important;
}

.text-success {
  color: var(--green) !important;
}

.text-warning {
  color: var(--yellow) !important;
}

.text-danger {
  color: var(--red) !important;
}

.text-info {
  color: var(--cyan) !important;
}

.text-muted {
  color: var(--text4) !important;
}

.text-light {
  color: var(--text2) !important;
}

.text-white {
  color: var(--text) !important;
}

/* Font weights */
.fw-light {
  font-weight: 300 !important;
}

.fw-normal {
  font-weight: 400 !important;
}

.fw-medium {
  font-weight: 500 !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.fw-bold {
  font-weight: 700 !important;
}

.fw-extrabold {
  font-weight: 800 !important;
}

.fw-black {
  font-weight: 900 !important;
}

/* Modern typography scale with better hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--text);
  letter-spacing: -0.025em;
}

h1 {
  font-size: 2.5rem;
  /* 40px */
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: var(--space-lg);
}

h2 {
  font-size: 2rem;
  /* 32px */
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-md);
}

h3 {
  font-size: 1.5rem;
  /* 24px */
  font-weight: 600;
  letter-spacing: -0.01em;
}

h4 {
  font-size: 1.25rem;
  /* 20px */
  font-weight: 600;
}

h5 {
  font-size: 1.125rem;
  /* 18px */
  font-weight: 600;
}

h6 {
  font-size: 1rem;
  /* 16px */
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text3);
}

p {
  margin-bottom: var(--space-lg);
  line-height: 1.7;
  color: var(--text2);
}

.lead {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--text3);
}

.small {
  font-size: 0.875rem;
  color: var(--text4);
}

.mono {
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: -0.01em;
}

a {
  color: var(--accent2);
  text-decoration: none;
  transition: all var(--transition-fast);
  font-weight: 500;
  position: relative;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a.button-like {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: var(--accent-gradient);
  color: white;
  border-radius: var(--radius);
  font-weight: 600;
  transition: all var(--transition);
}

a.button-like:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  text-decoration: none;
}

/* Enhanced scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg2);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
  border: 2px solid var(--bg2);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  border-color: var(--bg2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════════════════════ */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
}

.login-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: orbFloat 20s ease-in-out infinite;
}

.login-orb-1 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  top: -10%;
  left: -5%;
  animation-delay: 0s;
}

.login-orb-2 {
  width: 300px;
  height: 300px;
  background: var(--purple);
  bottom: -10%;
  right: -5%;
  animation-delay: -7s;
}

.login-orb-3 {
  width: 250px;
  height: 250px;
  background: var(--cyan);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -14s;
}

@keyframes orbFloat {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(30px, -40px) scale(1.1);
  }

  50% {
    transform: translate(-20px, 30px) scale(0.95);
  }

  75% {
    transform: translate(40px, 20px) scale(1.05);
  }
}

.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: rgba(12, 17, 32, 0.85);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(59, 130, 246, 0.08);
  animation: cardAppear 0.6s ease-out;
}

@keyframes cardAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-header {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.login-logo-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 0 30px var(--accent-glow);
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {

  0%,
  100% {
    box-shadow: 0 0 20px var(--accent-glow);
  }

  50% {
    box-shadow: 0 0 40px var(--accent-glow), 0 0 60px rgba(59, 130, 246, 0.1);
  }
}

.login-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text3);
  font-family: var(--mono);
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.login-alerts {
  margin-bottom: 20px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  font-size: 14px;
  z-index: 1;
}

.form-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px 12px 42px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
  color: var(--text4);
}

.toggle-password {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  padding: 4px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.toggle-password:hover {
  opacity: 1;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.login-btn:active {
  transform: translateY(0);
}

.login-btn-icon {
  font-size: 18px;
  transition: transform 0.3s;
}

.login-btn:hover .login-btn-icon {
  transform: translateX(4px);
}

.login-footer {
  text-align: center;
  margin-top: 28px;
  color: var(--text4);
  font-size: 11px;
}

.login-footer-sub {
  margin-top: 4px;
  font-size: 10px;
  color: var(--text4);
  opacity: 0.6;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR - Enhanced typography and contrast
   ═══════════════════════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--bg2) 0%, var(--bg3) 100%);
  border-right: 1px solid var(--border);
  z-index: 100;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
}

.sidebar-brand {
  padding: var(--space-xl) var(--space-lg) var(--space-lg);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.02);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  max-width: 100%;
}

.brand-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 8px 24px var(--accent-glow);
  flex-shrink: 0;
  overflow: hidden;
}

.brand-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
}

.brand-image-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-image {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.brand-logo.has-custom-logo {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-md);
  overflow: hidden;
}

.brand-logo.has-custom-logo .brand-name {
  font-size: 1.125rem;
  /* 18px */
}

.brand-logo.has-custom-logo .brand-sub {
  font-size: 0.75rem;
  /* 12px */
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-name {
  font-size: 1.125rem;
  /* 18px */
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.75rem;
  /* 12px */
  color: var(--text3);
  font-family: var(--mono);
  letter-spacing: 0.06em;
  font-weight: 500;
}

.sidebar-nav {
  flex: 1;
  padding: var(--space-lg) var(--space-md);
  overflow-y: auto;
}

.nav-section {
  margin-bottom: var(--space-xl);
}

.nav-section-label {
  font-size: 0.6875rem;
  /* 11px */
  font-weight: 700;
  color: var(--text3);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0 var(--space-md);
  margin-bottom: var(--space-sm);
  opacity: 0.8;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-md);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 0.875rem;
  /* 14px */
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
  position: relative;
}

.nav-link:hover {
  background: var(--surface);
  color: var(--text);
  transform: translateX(2px);
}

.nav-link.active {
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: white;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: white;
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  font-size: 1.125rem;
  /* 18px */
  width: 24px;
  text-align: center;
  flex-shrink: 0;
  opacity: 0.9;
}

.nav-external {
  margin-left: auto;
  font-size: 0.75rem;
  /* 12px */
  color: var(--text3);
  opacity: 0.7;
}

.sidebar-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.user-block {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: var(--space-md);
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

.user-name {
  font-size: 0.875rem;
  /* 14px */
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.75rem;
  /* 12px */
  color: var(--text3);
  font-family: var(--mono);
  font-weight: 500;
}

.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  background: var(--red-glow);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: var(--red);
  font-size: 0.875rem;
  /* 14px */
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.35);
  border-color: rgba(239, 68, 68, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.sidebar-toggle {
  display: none;
  position: fixed;
  top: var(--space-lg);
  left: var(--space-lg);
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  cursor: pointer;
  transition: var(--transition);
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  background: var(--surface2);
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-bottom: 44px;
}

/* TOPBAR */
.topbar {
  background: rgba(12, 17, 32, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  gap: 16px;
}

.topbar-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.page-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.page-subtitle {
  font-size: 12px;
  color: var(--text3);
  font-family: var(--mono);
}

.topbar-center {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.16em;
  color: var(--yellow);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.topbar-time {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text3);
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
}

/* ALERTS */
.alerts-container {
  padding: 16px 28px 0;
}

.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 10px;
  animation: slideDown 0.3s ease;
  position: relative;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-success {
  background: var(--green-glow);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--green);
}

.alert-error {
  background: var(--red-glow);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--red);
}

.alert-warning {
  background: var(--yellow-glow);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--yellow);
}

.alert-info {
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--accent2);
}

.alert-close {
  margin-left: auto;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 14px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.alert-close:hover {
  opacity: 1;
}

/* PAGE CONTENT */
.page-content {
  padding: 24px 28px;
  flex: 1;
}

.panel-footer {
  position: fixed;
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  z-index: 60;
  padding: 10px 28px 12px;
  border-top: 1px solid var(--border);
  background: rgba(12, 17, 32, 0.95);
  backdrop-filter: blur(8px);
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--yellow);
  font-family: var(--mono);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
/* Modern Button Styles with enhanced effects */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 6px 24px var(--accent-glow), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.01em;
  isolation: isolate;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  opacity: 0;
  transition: opacity var(--transition);
  z-index: -1;
}

.btn-primary::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, var(--accent2), var(--purple), var(--cyan));
  z-index: -2;
  filter: blur(12px);
  opacity: 0;
  transition: opacity var(--transition-slow);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 36px var(--accent-glow), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  background: linear-gradient(135deg, var(--accent2), #7c3aed);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-primary:hover::after {
  opacity: 0.6;
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
  transition: all 0.1s;
}

.btn-primary:focus-visible {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

.btn-primary.loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-primary.loading::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: var(--surface3);
  color: var(--text);
  border-color: var(--border2);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: transparent;
  color: var(--text2);
  border: 1.5px solid var(--border);
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-outline:hover {
  background: var(--surface);
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--red), #dc2626);
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #dc2626, #b91c1c);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

.btn-danger:active {
  transform: translateY(0);
}

/* Button sizes */
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: var(--radius-xs);
}

.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: var(--radius);
  font-weight: 700;
}

/* Icon buttons */
.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
}

.btn-icon.btn-primary {
  width: 44px;
  height: 44px;
}

.btn-icon.btn-secondary {
  width: 44px;
  height: 44px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   STAT CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--card-accent);
}

.stat-card.stat-blue {
  --card-accent: var(--accent);
}

.stat-card.stat-green {
  --card-accent: var(--green);
}

.stat-card.stat-amber {
  --card-accent: var(--yellow);
}

.stat-card.stat-purple {
  --card-accent: var(--purple);
}

.stat-card.stat-red {
  --card-accent: var(--red);
}

.stat-card.stat-cyan {
  --card-accent: var(--cyan);
}

.stat-card-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label {
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.stat-value {
  font-size: 28px;
  font-weight: 900;
  color: var(--text);
  font-family: var(--mono);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-icon-wrap {
  font-size: 20px;
}

/* Colorful icon circles */
.stat-icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  font-size: 20px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
  animation: iconPulse 3s ease-in-out infinite;
}

.si-blue {
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.si-green {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.si-amber {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.si-purple {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 4px 14px rgba(139, 92, 246, 0.35);
}

.si-red {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.si-cyan {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.35);
}

@keyframes iconPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

.stat-bar {
  margin-top: 12px;
  background: var(--bg2);
  border-radius: 4px;
  height: 5px;
  overflow: hidden;
}

.stat-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--card-accent), color-mix(in srgb, var(--card-accent) 60%, white));
  transition: width 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: barShine 2.5s ease-in-out infinite;
}

@keyframes barShine {
  0% {
    left: -100%;
  }

  50% {
    left: 100%;
  }

  100% {
    left: 100%;
  }
}

.stat-footer {
  margin-top: 10px;
}

.stat-trend {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--mono);
}

.trend-up {
  color: var(--green);
}

.trend-down {
  color: var(--red);
}

/* HIGHLIGHTS */
.highlight-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

.highlight-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.highlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.3s;
}

.highlight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.highlight-card:hover::before {
  opacity: 1;
}

/* Gradient variants */
.hl-gradient-1 {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(5, 150, 105, 0.06));
  border-color: rgba(16, 185, 129, 0.2);
}

.hl-gradient-1:hover {
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.15);
}

.hl-gradient-2 {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(37, 99, 235, 0.06));
  border-color: rgba(59, 130, 246, 0.2);
}

.hl-gradient-2:hover {
  border-color: rgba(59, 130, 246, 0.4);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15);
}

.hl-gradient-3 {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(109, 40, 217, 0.06));
  border-color: rgba(139, 92, 246, 0.2);
}

.hl-gradient-3:hover {
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 12px 40px rgba(139, 92, 246, 0.15);
}

/* Icon boxes */
.highlight-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}

.hib-1 {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.hib-2 {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.hib-3 {
  background: linear-gradient(135deg, #8b5cf6, #6d28d9);
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

/* Ring chart */
.highlight-ring {
  margin-left: auto;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.highlight-ring-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.highlight-ring-svg circle:last-of-type {
  transition: stroke-dasharray 1.2s ease;
}

.highlight-icon {
  font-size: 28px;
}

.highlight-info {
  display: flex;
  flex-direction: column;
}

.highlight-value {
  font-size: 24px;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--text);
}

.highlight-label {
  font-size: 11px;
  color: var(--text3);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════════ */
/* Modern Card Design with enhanced visual hierarchy */
.card {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(30, 41, 59, 0.8) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
  transition: all var(--transition);
  position: relative;
  box-shadow: var(--shadow-sm);
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03), rgba(139, 92, 246, 0.01));
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
  z-index: 0;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border2);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  opacity: 1;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(30, 41, 59, 0.6);
  position: relative;
  z-index: 1;
}

.card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 24px;
  right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border2), transparent);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: -0.01em;
}

.card-title-icon {
  font-size: 18px;
  opacity: 0.8;
}

.card-badge {
  background: linear-gradient(135deg, var(--accent-glow), rgba(99, 102, 241, 0.1));
  color: var(--accent2);
  font-size: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-family: var(--mono);
  font-weight: 600;
  border: 1px solid rgba(99, 102, 241, 0.2);
  backdrop-filter: blur(10px);
}

.card-action {
  font-size: 13px;
  color: var(--accent2);
  font-weight: 600;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background: rgba(99, 102, 241, 0.05);
}

.card-action:hover {
  color: var(--accent);
  background: rgba(99, 102, 241, 0.1);
  transform: translateX(2px);
}

.card-body {
  padding: 20px;
}

.card-body.no-pad {
  padding: 0;
}

.card-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* GRID LAYOUTS */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.grid-2>.card {
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DATA TABLE
   ═══════════════════════════════════════════════════════════════════════════ */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.data-table thead th {
  background: var(--bg2);
  color: var(--text3);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 5;
}

.data-table tbody tr {
  border-bottom: 1px solid rgba(30, 58, 95, 0.4);
  transition: background 0.15s;
}

.data-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.04);
}

.data-table tbody td {
  padding: 10px 14px;
  color: var(--text2);
  vertical-align: middle;
}

.col-sn {
  font-family: var(--mono);
  color: var(--text3) !important;
  font-size: 11px;
}

.col-name {
  color: var(--text) !important;
  font-weight: 600;
}

.col-id {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent2) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TAGS & BADGES
   ═══════════════════════════════════════════════════════════════════════════ */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.tag-issue {
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
}

.tag-branch {
  background: var(--cyan-glow);
  color: var(--cyan);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.tag-success {
  background: var(--green-glow);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.tag-admin {
  background: var(--red-glow);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.tag-staff {
  background: var(--accent-glow);
  color: var(--accent2);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.tag-user {
  background: var(--surface2);
  color: var(--text3);
  border: 1px solid var(--border);
}

/* STATUS PILLS */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  white-space: nowrap;
  transition: var(--transition);
}

.status-solved,
.status-pill.status-solved {
  background: var(--green-glow);
  color: var(--green);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-pending,
.status-pill.status-pending {
  background: var(--yellow-glow);
  color: var(--yellow);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-time-taken,
.status-pill.status-time-taken {
  background: var(--purple-glow);
  color: var(--purple);
  border: 1px solid rgba(139, 92, 246, 0.3);
}

.status-no-response,
.status-pill.status-no-response {
  background: var(--red-glow);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* STATUS DROPDOWN */
.status-dropdown {
  position: relative;
  display: inline-block;
}

.status-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  min-width: 150px;
  z-index: 200;
  box-shadow: var(--shadow-lg);
  display: none;
  overflow: hidden;
}

.status-menu.show {
  display: block;
  animation: menuAppear 0.15s ease;
}

@keyframes menuAppear {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.status-opt {
  padding: 9px 14px;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-opt:hover {
  background: var(--surface3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTION BUTTONS
   ═══════════════════════════════════════════════════════════════════════════ */
.action-btns {
  display: flex;
  gap: 5px;
}

.act-btn {
  padding: 5px 9px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  cursor: pointer;
  border: none;
  font-family: var(--font);
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.act-view {
  background: var(--purple-glow);
  color: var(--purple);
  border: 1px solid rgba(139, 92, 246, 0.2);
}

.act-view:hover {
  background: rgba(139, 92, 246, 0.3);
}

.act-edit {
  background: var(--accent-glow);
  color: var(--accent2);
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.act-edit:hover {
  background: rgba(59, 130, 246, 0.3);
}

.act-delete {
  background: var(--red-glow);
  color: var(--red);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.act-delete:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FILTERS
   ═══════════════════════════════════════════════════════════════════════════ */
.filters-bar {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--bg2);
  align-items: center;
}

.filter-input,
.filter-select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 12px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
  min-width: 0;
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--accent);
}

.filter-input::placeholder {
  color: var(--text4);
}

.filter-input {
  min-width: 160px;
  flex: 1;
}

.filter-date {
  min-width: 130px !important;
  flex: 0 !important;
}

.filter-select {
  min-width: 120px;
}

.filter-select option {
  background: var(--surface);
  color: var(--text);
}

.btn-filter {
  background: var(--accent-glow);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--accent2);
  padding: 7px 16px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
}

.btn-filter:hover {
  background: rgba(59, 130, 246, 0.3);
}

.btn-clear {
  background: none;
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--red);
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.btn-clear:hover {
  background: var(--red-glow);
}

/* ═══════════════════════════════════════════════════════════════════════════
   CHARTS (CSS-only)
   ═══════════════════════════════════════════════════════════════════════════ */
.chart-area {
  min-height: 280px;
  display: block;
  padding: 0;
}

.vchart {
  position: relative;
  height: 270px;
  padding: 18px 16px 0 48px;
}

.vchart-grid {
  position: absolute;
  top: 18px;
  right: 16px;
  bottom: 36px;
  left: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
}

.vchart-grid-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 8px;
  align-items: center;
}

.vchart-grid-row span {
  color: var(--text4);
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  text-align: right;
}

.vchart-grid-row i {
  display: block;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.vchart-plot {
  position: absolute;
  top: 18px;
  right: 16px;
  bottom: 0;
  left: 48px;
  display: grid;
  grid-template-columns: repeat(var(--chart-columns), minmax(24px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.chart-col {
  min-width: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 28px;
  gap: 8px;
}

.chart-bar-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  min-height: 0;
}

.chart-bar-v {
  width: min(34px, 68%);
  min-width: 14px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(180deg, var(--bar-color), var(--bar-color-soft));
  box-shadow: 0 8px 22px var(--bar-shadow);
  transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
}

.chart-bar-v:hover {
  filter: brightness(1.12);
}

.chart-value {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.chart-tooltip {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg2);
  color: var(--text);
  font-size: 11px;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  z-index: 2;
}

.chart-bar-wrap:hover .chart-tooltip {
  opacity: 1;
}

.chart-label {
  font-size: 10px;
  color: var(--text4);
  font-family: var(--mono);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* HORIZONTAL BAR CHART */
.bar-chart {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hbar-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hbar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.hbar-name {
  font-size: 12px;
  color: var(--text2);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.hbar-count {
  font-size: 11px;
  color: var(--accent2);
  font-family: var(--mono);
  font-weight: 600;
}

.hbar-track {
  background: var(--bg2);
  border-radius: 4px;
  height: 6px;
  overflow: hidden;
}

.hbar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* DONUT CHART */
.donut-chart-container {
  display: flex;
  align-items: center;
  gap: 24px;
}

.donut-chart {
  position: relative;
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.donut-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.donut-value {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--mono);
  color: var(--text);
}

.donut-label {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}

.legend-text {
  font-size: 12px;
  color: var(--text2);
}

.legend-val {
  margin-left: auto;
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 600;
  color: var(--text);
}

/* MINI TABLE (recent tickets) */
.mini-table {
  display: flex;
  flex-direction: column;
}

.mini-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.3);
  transition: background 0.15s;
  text-decoration: none;
}

.mini-row:last-child {
  border-bottom: none;
}

.mini-row:hover {
  background: rgba(59, 130, 246, 0.04);
}

.mini-sn {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text3);
  min-width: 40px;
}

.mini-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.mini-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-issue {
  font-size: 11px;
  color: var(--text3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-status {
  font-size: 14px;
}

.empty-mini {
  padding: 32px;
  text-align: center;
  color: var(--text3);
  font-size: 13px;
}

/* MINI PROGRESS (Reports) */
.mini-progress {
  background: var(--bg2);
  border-radius: 3px;
  height: 5px;
  overflow: hidden;
  width: 60px;
  display: inline-block;
  vertical-align: middle;
}

.mini-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--green);
}

.mini-pct {
  font-size: 11px;
  font-family: var(--mono);
  color: var(--text3);
  margin-left: 6px;
}

/* REPORT FILTER */
.report-filter {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.report-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* AI report block */
.ai-headline {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 14px;
}

.ai-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text3);
  margin-bottom: 8px;
}

.ai-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-list li {
  font-size: 13px;
  color: var(--text2);
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 8px 10px;
}

.ai-health-good {
  background: var(--green-glow);
  color: var(--green);
}

.ai-health-warning {
  background: var(--yellow-glow);
  color: var(--yellow);
}

.ai-health-critical {
  background: var(--red-glow);
  color: var(--red);
}

.ai-health-neutral {
  background: var(--accent-glow);
  color: var(--accent2);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════════ */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group.full {
  grid-column: 1 / -1;
}

.form-control,
.form-select {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  padding: 9px 14px !important;
  border-radius: var(--radius-sm) !important;
  font-size: 13px !important;
  font-family: var(--font) !important;
  outline: none !important;
  transition: var(--transition) !important;
  width: 100%;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

.form-control::placeholder {
  color: var(--text4) !important;
}

.form-select option {
  background: var(--surface);
  color: var(--text);
}

textarea.form-control {
  resize: vertical;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
  padding: 8px 0;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
  backdrop-filter: blur(6px);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 680px;
  max-width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s;
}

.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}

.modal.modal-sm {
  width: 420px;
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-close {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text2);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--red);
  color: white;
  border-color: var(--red);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.modal-del-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.modal-del-msg {
  color: var(--text2);
  font-size: 13px;
  margin-bottom: 24px;
}

.modal-del-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DETAILS
   ═══════════════════════════════════════════════════════════════════════════ */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.detail-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-item.full {
  grid-column: 1 / -1;
}

.detail-label {
  font-size: 10px;
  color: var(--text4);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.detail-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.detail-value.mono {
  font-family: var(--mono);
}

.detail-value.accent {
  color: var(--accent2);
}

.detail-value.subtle {
  font-size: 12px;
  color: var(--text3);
}

.remarks-box {
  background: var(--surface);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SETTINGS
   ═══════════════════════════════════════════════════════════════════════════ */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.settings-grid>.card {
  margin-bottom: 0;
}

.settings-grid>.full-span {
  grid-column: 1 / -1;
}

.settings-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.config-grid {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.config-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* USER CELL */
.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-cell-avatar {
  width: 30px;
  height: 30px;
  background: linear-gradient(135deg, var(--accent), var(--purple));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

/* EMPTY STATE */
.empty-state {
  text-align: center;
  padding: 60px 24px;
  color: var(--text3);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.4;
}

.empty-state p {
  font-size: 14px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .stats-row {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .main-content {
    margin-left: 0;
    padding-bottom: 42px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .highlight-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 14px 16px 14px 60px;
  }

  .topbar-center {
    display: none;
  }

  .page-content {
    padding: 16px;
  }

  .panel-footer {
    left: 0;
    padding: 10px 16px 12px;
  }
}

@media (max-width: 600px) {
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .donut-chart-container {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   REMARKS TIMELINE
   ═══════════════════════════════════════════════════════════════════════════ */
.remarks-timeline {
  position: relative;
  padding: 4px 0;
}

.remark-item {
  display: flex;
  gap: 16px;
  position: relative;
  padding-bottom: 20px;
}

.remark-item:last-child {
  padding-bottom: 0;
}

/* Vertical connecting line */
.remark-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 9px;
  top: 22px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.remark-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--border);
}

.status-dot-solved {
  background: var(--green);
  box-shadow: 0 0 0 2px var(--green);
}

.status-dot-pending {
  background: var(--yellow);
  box-shadow: 0 0 0 2px var(--yellow);
}

.status-dot-time-taken {
  background: var(--purple);
  box-shadow: 0 0 0 2px var(--purple);
}

.status-dot-no-response {
  background: var(--red);
  box-shadow: 0 0 0 2px var(--red);
}

.remark-content {
  flex: 1;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  transition: var(--transition);
}

.remark-content:hover {
  border-color: var(--border2);
  background: var(--surface2);
}

.remark-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.remark-meta {
  font-size: 11px;
  color: var(--text3);
  font-family: var(--mono);
}

.remark-text {
  font-size: 13px;
  color: var(--text2);
  line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM UI ENHANCEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* --- Ambient Background Mesh --- */
.main-content::before {
  content: '';
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 600px 400px at 20% 10%, rgba(59, 130, 246, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 500px 350px at 80% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 400px 300px at 50% 50%, rgba(6, 182, 212, 0.04) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: ambientShift 25s ease-in-out infinite alternate;
}

@keyframes ambientShift {
  0% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.7;
  }
}

.page-content {
  position: relative;
  z-index: 1;
}

/* --- Staggered Card Entry Animation --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card,
.stat-card,
.highlight-card {
  animation: fadeInUp 0.5s ease-out both;
}

.stats-row .stat-card:nth-child(1) {
  animation-delay: 0.04s;
}

.stats-row .stat-card:nth-child(2) {
  animation-delay: 0.08s;
}

.stats-row .stat-card:nth-child(3) {
  animation-delay: 0.12s;
}

.stats-row .stat-card:nth-child(4) {
  animation-delay: 0.16s;
}

.stats-row .stat-card:nth-child(5) {
  animation-delay: 0.20s;
}

.stats-row .stat-card:nth-child(6) {
  animation-delay: 0.24s;
}

.highlight-row .highlight-card:nth-child(1) {
  animation-delay: 0.10s;
}

.highlight-row .highlight-card:nth-child(2) {
  animation-delay: 0.16s;
}

.highlight-row .highlight-card:nth-child(3) {
  animation-delay: 0.22s;
}

/* --- Stat Card Glow Upgrade --- */
.stat-card {
  background: linear-gradient(135deg, var(--surface) 0%, rgba(30, 41, 59, 0.7) 100%);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(59, 130, 246, 0.08);
}

.stat-card:hover {
  border-color: var(--card-accent);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 20px color-mix(in srgb, var(--card-accent) 20%, transparent);
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 5%, transparent), transparent 60%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.stat-card:hover::before {
  opacity: 1;
}

/* --- Highlight Card Glow --- */
.highlight-card {
  background: linear-gradient(135deg, var(--surface), rgba(30, 41, 59, 0.6));
  backdrop-filter: blur(8px);
}

.highlight-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), var(--shadow-glow);
}

/* --- Button Shimmer --- */
.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: none;
}

.btn-primary:hover::after {
  animation: btnShimmer 0.6s ease;
}

@keyframes btnShimmer {
  from {
    left: -100%;
  }

  to {
    left: 150%;
  }
}

/* --- Table Row Hover Accent --- */
.data-table tbody tr {
  position: relative;
}

.data-table tbody tr::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.data-table tbody tr:hover::before {
  transform: scaleY(1);
}

.data-table tbody tr:hover {
  background: rgba(59, 130, 246, 0.06);
}

/* Even row subtle tint */
.data-table tbody tr:nth-child(even) {
  background: rgba(30, 58, 95, 0.08);
}

.data-table tbody tr:nth-child(even):hover {
  background: rgba(59, 130, 246, 0.06);
}

/* --- Card Hover Lift --- */
.card {
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.card:hover {
  border-color: var(--border2);
}

/* --- Card Header Shimmer Line --- */
.card-header {
  position: relative;
  overflow: hidden;
}

.card-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), var(--purple), transparent);
  opacity: 0.3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TAB SECTION SWITCHER (Tickets Page)
   ═══════════════════════════════════════════════════════════════════════════ */
.ticket-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 20px;
  width: fit-content;
}

.ticket-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text3);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  white-space: nowrap;
}

.ticket-tab:hover {
  color: var(--text2);
  background: rgba(59, 130, 246, 0.06);
}

.ticket-tab.active {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

.ticket-tab.active.tab-solved {
  background: linear-gradient(135deg, var(--green), #059669);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.tab-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 1px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-family: var(--mono);
  font-weight: 700;
}

.ticket-tab:not(.active) .tab-badge {
  background: var(--surface2);
  color: var(--text3);
}

/* Tab content panels */
.tab-panel {
  display: none;
  animation: fadeInUp 0.35s ease-out;
}

.tab-panel.active {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SOLVED TICKETS SECTION
   ═══════════════════════════════════════════════════════════════════════════ */
.solved-section .card {
  border-color: rgba(16, 185, 129, 0.2);
}

.solved-section .card-header {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(5, 150, 105, 0.04));
}

.solved-section .card-header::after {
  background: linear-gradient(90deg, transparent, var(--green), #34d399, transparent);
  opacity: 0.4;
}

.solved-section .card-title {
  color: var(--green);
}

.solved-section .data-table tbody tr::before {
  background: var(--green);
}

.solved-section .data-table tbody tr:hover {
  background: rgba(16, 185, 129, 0.05);
}

/* Solved row in active table (when no filter) */
tr.row-solved {
  opacity: 0.7;
}

tr.row-solved:hover {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TICKET STATS MINI BAR (above tabs)
   ═══════════════════════════════════════════════════════════════════════════ */
.ticket-stats-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.ticket-stat-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  transition: all 0.2s ease;
  animation: fadeInUp 0.4s ease-out both;
}

.ticket-stat-chip:nth-child(1) {
  animation-delay: 0.05s;
}

.ticket-stat-chip:nth-child(2) {
  animation-delay: 0.10s;
}

.ticket-stat-chip:nth-child(3) {
  animation-delay: 0.15s;
}

.ticket-stat-chip:nth-child(4) {
  animation-delay: 0.20s;
}

.ticket-stat-chip .chip-count {
  font-family: var(--mono);
  font-weight: 800;
  font-size: 14px;
}

.chip-active {
  border-color: rgba(59, 130, 246, 0.25);
}

.chip-active .chip-count {
  color: var(--accent2);
}

.chip-solved {
  border-color: rgba(16, 185, 129, 0.25);
}

.chip-solved .chip-count {
  color: var(--green);
}

.chip-pending {
  border-color: rgba(245, 158, 11, 0.25);
}

.chip-pending .chip-count {
  color: var(--yellow);
}

.chip-total {
  border-color: rgba(139, 92, 246, 0.25);
}

.chip-total .chip-count {
  color: var(--purple);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE ADDITIONS
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .main-content::before {
    left: 0;
  }

  .ticket-tabs {
    width: 100%;
  }

  .ticket-tab {
    flex: 1;
    justify-content: center;
    padding: 10px 14px;
  }

  .ticket-stats-bar {
    gap: 8px;
  }

  .ticket-stat-chip {
    padding: 6px 12px;
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .ticket-stats-bar {
    flex-direction: column;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   COLORFUL CHART BARS
   ═══════════════════════════════════════════════════════════════════════════ */
.chart-bar-v {
  background: linear-gradient(180deg, var(--bar-color), var(--bar-color-soft));
  box-shadow: 0 8px 22px var(--bar-shadow);
}

.chart-bar-v:hover {
  box-shadow: 0 10px 26px var(--bar-shadow);
}

/* Donut glow */
.donut-chart {
  filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.1));
}

.donut-center .donut-value {
  background: linear-gradient(135deg, var(--text), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Mini-row color bar on hover */
.mini-row {
  position: relative;
}

/* Finova-inspired professional dashboard refresh */
:root {
  --bg: #070716;
  --bg2: #0b0d1d;
  --bg3: #12152a;
  --surface: rgba(20, 24, 46, 0.82);
  --surface2: rgba(28, 33, 62, 0.86);
  --surface3: rgba(38, 45, 82, 0.9);
  --border: rgba(148, 163, 184, 0.12);
  --border2: rgba(179, 126, 255, 0.32);
  --accent: #7c3aed;
  --accent2: #a78bfa;
  --accent-glow: rgba(124, 58, 237, 0.24);
  --green: #31d69b;
  --yellow: #fbbf24;
  --red: #fb5474;
  --purple: #a855f7;
  --cyan: #38bdf8;
  --text: #f8fafc;
  --text2: #b8c0d8;
  --text3: #77819d;
  --text4: #525d77;
  --radius: 18px;
  --radius-sm: 14px;
  --radius-xs: 10px;
  --sidebar-w: 244px;
  --shadow: 0 18px 54px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 26px 80px rgba(0, 0, 0, 0.48);
}

body {
  background:
    linear-gradient(135deg, rgba(124, 58, 237, 0.12), transparent 32%),
    linear-gradient(215deg, rgba(251, 84, 116, 0.08), transparent 34%),
    linear-gradient(180deg, #080817 0%, #070716 46%, #050611 100%);
}

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, rgba(10, 12, 30, 0.96), rgba(8, 9, 24, 0.92));
  border-right: 1px solid rgba(167, 139, 250, 0.12);
  box-shadow: 20px 0 70px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(24px);
}

.sidebar-brand {
  padding: 26px 24px 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

.brand-icon,
.brand-image-wrap {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fb3f83 0%, #7c3aed 48%, #2563eb 100%);
  box-shadow: 0 14px 34px rgba(124, 58, 237, 0.35);
}

.brand-logo.has-custom-logo {
  overflow: visible;
}

.brand-logo.has-custom-logo .brand-image-wrap {
  width: 64px;
  height: 54px;
  min-width: 64px;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.brand-logo.has-custom-logo .brand-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.brand-logo.has-static-brand-logo {
  width: 100%;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
}

.brand-logo.has-static-brand-logo .brand-image-wrap {
  width: 232px;
  max-width: 100%;
  height: 84px;
  min-width: 232px;
  padding: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}

.brand-logo.has-static-brand-logo .brand-image {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

.brand-logo.has-static-brand-logo .brand-text {
  display: none;
}

.brand-name {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.brand-sub {
  color: var(--text3);
  letter-spacing: 0.11em;
}

.sidebar-nav {
  padding: 18px 14px;
}

.nav-section-label {
  color: rgba(184, 192, 216, 0.42);
  font-size: 9px;
}

.nav-link {
  min-height: 44px;
  padding: 11px 13px;
  border-radius: 14px;
  color: #909ab5;
  font-size: 13px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
}

.nav-link.active {
  background: linear-gradient(135deg, #8b5cf6 0%, #4f46e5 58%, #2563eb 100%);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.34);
}

.nav-link.active::before {
  display: none;
}

.nav-icon {
  width: 24px;
  opacity: 0.95;
}

.sidebar-footer {
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  padding: 16px 14px 18px;
}

.user-block,
.logout-btn {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.08);
}

.main-content {
  margin-left: var(--sidebar-w);
  padding-bottom: 96px;
}

.topbar {
  background: rgba(7, 7, 22, 0.72);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  box-shadow: none;
  padding: 18px 30px;
  backdrop-filter: blur(24px);
}

.topbar-left {
  min-width: 190px;
}

.page-title {
  font-size: 24px;
  font-weight: 850;
}

.page-subtitle {
  color: var(--text3);
  font-family: var(--font);
  font-size: 12px;
}

.topbar-search {
  flex: 1;
  max-width: 430px;
  height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar-search-icon {
  color: var(--text3);
  font-size: 18px;
  line-height: 1;
}

.topbar-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: 500 13px var(--font);
}

.topbar-search input::placeholder {
  color: var(--text3);
}

.topbar-right {
  gap: 12px;
}

.topbar-icon-btn,
.topbar-time {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.1);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text2);
  font: 700 12px var(--mono);
}

#liveTime {
  min-width: 104px;
}

.topbar-profile {
  height: 48px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 12px 6px 7px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(148, 163, 184, 0.1);
}

.topbar-avatar,
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #fb3f83 45%, #7c3aed);
  color: #fff;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 12px 24px rgba(251, 63, 131, 0.22);
}

.topbar-user {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar-user span {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.topbar-user small {
  color: var(--text3);
  font-size: 10px;
}

.col-sn {
  position: relative;
}

.sn-hover-card {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.sn-trigger {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(148, 163, 184, 0.08);
  color: #a9b4cf;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  transition: var(--transition);
}

.sn-hover-card:hover .sn-trigger {
  color: var(--text);
  border-color: rgba(167, 139, 250, 0.24);
  background: rgba(124, 58, 237, 0.08);
}

.sn-popover {
  display: none;
}

.sn-popover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.sn-popover-title {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.sn-popover-status {
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sn-popover-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
}

.sn-popover-grid label {
  display: block;
  margin-bottom: 4px;
  color: var(--text4);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.sn-popover-grid strong {
  display: block;
  color: var(--text2);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  word-break: break-word;
}

.sn-floating-popover {
  position: fixed;
  top: 0;
  left: 0;
  width: 310px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(18, 22, 44, 0.98), rgba(10, 13, 28, 0.98));
  border: 1px solid rgba(167, 139, 250, 0.16);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.38);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
  z-index: 9999;
}

.sn-floating-popover::before {
  content: '';
  position: absolute;
  top: var(--sn-arrow-top, -6px);
  bottom: var(--sn-arrow-bottom, auto);
  left: var(--sn-arrow-left, 18px);
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  background: rgba(18, 22, 44, 0.98);
  border-left: 1px solid rgba(167, 139, 250, 0.16);
  border-top: 1px solid rgba(167, 139, 250, 0.16);
}

.sn-floating-popover.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.page-content {
  padding: 22px 30px 34px;
}

.panel-footer {
  position: fixed;
  left: var(--sidebar-w);
  right: 0;
  bottom: 0;
  z-index: 70;
  margin-left: 0;
  padding: 10px 20px 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: 0;
  background: rgba(9, 12, 24, 0.9);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  color: rgba(226, 232, 240, 0.88);
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
  text-shadow: none;
}

.card,
.stat-card,
.highlight-card {
  background: linear-gradient(180deg, rgba(24, 28, 53, 0.88), rgba(17, 21, 42, 0.82));
  border: 1px solid rgba(148, 163, 184, 0.1);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card {
  overflow: hidden;
}

.card-header {
  min-height: 62px;
  background: rgba(255, 255, 255, 0.025);
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
  padding: 17px 20px;
}

.card-title {
  font-size: 15px;
  font-weight: 800;
}

.card-badge {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text2);
  padding: 5px 11px;
}

.card-body {
  padding: 20px;
}

.stats-row {
  grid-template-columns: repeat(6, minmax(142px, 1fr));
  gap: 16px;
}

.stat-card {
  padding: 18px;
}

.stat-card::after {
  height: 0;
}

.stat-card::before {
  background: linear-gradient(135deg, color-mix(in srgb, var(--card-accent) 18%, transparent), transparent 60%);
  opacity: 0.9;
}

.stat-label {
  color: #8790aa;
  font-size: 10px;
}

.stat-value {
  font-size: 26px;
  letter-spacing: -0.04em;
}

.stat-icon-circle,
.highlight-icon-box {
  border-radius: 14px;
  box-shadow: none;
  animation: none;
}

.stat-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.055);
}

.highlight-row {
  gap: 16px;
}

.highlight-card {
  min-height: 112px;
}

.hl-gradient-1 {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(17, 21, 42, 0.84));
}

.hl-gradient-2 {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(17, 21, 42, 0.84));
}

.hl-gradient-3 {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(17, 21, 42, 0.84));
}

.grid-2 {
  gap: 18px;
}

.grid-2:first-of-type {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.chart-area {
  min-height: 310px;
}

.vchart {
  height: 300px;
}

.chart-bar-v {
  width: min(42px, 72%);
  border-radius: 10px 10px 3px 3px;
  background: linear-gradient(180deg, #8b5cf6 0%, #4f46e5 52%, #1d4ed8 100%);
  box-shadow: 0 16px 34px rgba(79, 70, 229, 0.28);
}

.vchart-grid-row i {
  border-color: rgba(148, 163, 184, 0.09);
}

.donut-chart-container {
  min-height: 310px;
  align-items: center;
}

.hbar-track,
.mini-progress {
  background: rgba(255, 255, 255, 0.06);
}

.hbar-fill,
.mini-progress-fill {
  border-radius: 999px;
}

.data-table thead th {
  background: rgba(5, 8, 21, 0.5);
  color: #7f8aab;
  border-bottom-color: rgba(148, 163, 184, 0.1);
}

.data-table tbody tr {
  border-bottom-color: rgba(148, 163, 184, 0.08);
}

.data-table tbody tr:hover {
  background: rgba(124, 58, 237, 0.06);
}

.btn-primary {
  border-radius: 14px;
  background: linear-gradient(135deg, #fb3f83 0%, #8b5cf6 52%, #2563eb 100%);
  box-shadow: 0 14px 26px rgba(124, 58, 237, 0.24);
}

.btn-outline,
.btn-secondary {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(148, 163, 184, 0.12);
}

@media (max-width: 1200px) {
  .stats-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid-2:first-of-type {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {

  .main-content,
  .panel-footer {
    margin-left: 0;
  }

  .main-content {
    padding-bottom: 110px;
  }

  .topbar {
    flex-wrap: wrap;
    padding-left: 64px;
  }

  .topbar-search {
    order: 3;
    max-width: none;
    width: 100%;
    flex-basis: 100%;
  }

  .topbar-profile {
    display: none;
  }

  .panel-footer {
    left: 0;
    right: 0;
    bottom: 0;
    padding: 10px 14px 12px;
    font-size: 11px;
  }
}

@media (max-width: 600px) {
  .stats-row {
    grid-template-columns: 1fr 1fr;
  }

  .topbar-icon-btn#liveTime {
    display: none;
  }
}

.mini-row::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.2s ease;
}

.mini-row:hover::before {
  transform: scaleY(1);
}

.data-table tbody tr::before,
table tbody tr::before {
  display: none !important;
  content: none !important;
}

.new-user-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(16, 185, 129, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.08);
  color: var(--text);
}

.new-user-checkbox input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--green);
}

.new-user-id-wrap {
  animation: fadeInUp 0.22s ease-out both;
}

/* Branch Target & Achievement Tracking */
.tracking-hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  padding: 28px;
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 22px;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.12), transparent 45%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 42%),
    linear-gradient(135deg, rgba(10, 15, 26, 0.92), rgba(13, 22, 38, 0.96));
  box-shadow: 0 18px 42px rgba(2, 6, 23, 0.38);
}

.tracking-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(96, 165, 250, 0.18);
  color: #93c5fd;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
}

.tracking-heading {
  margin: 0 0 10px;
  max-width: 18ch;
  font-size: 30px;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.tracking-description {
  max-width: 62ch;
  color: var(--text2);
  line-height: 1.7;
  font-size: 14px;
}

.tracking-summary-grid,
.tracking-grid {
  display: grid;
  gap: 16px;
}

.tracking-period-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px 20px;
  border-radius: 18px;
  border: 1px solid rgba(51, 65, 85, 0.5);
  background: linear-gradient(180deg, rgba(10, 15, 26, 0.92), rgba(15, 23, 42, 0.92));
}

.tracking-period-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tracking-period-tab {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(71, 85, 105, 0.55);
  background: rgba(15, 23, 42, 0.72);
  color: var(--text2);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: var(--transition);
}

.tracking-period-tab:hover {
  color: var(--text);
  border-color: rgba(96, 165, 250, 0.4);
}

.tracking-period-tab.active {
  color: #e0f2fe;
  border-color: rgba(56, 189, 248, 0.55);
  background: linear-gradient(135deg, rgba(2, 132, 199, 0.5), rgba(14, 165, 233, 0.28));
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.12);
}

.tracking-period-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  color: var(--text2);
  font-size: 12px;
}

.tracking-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tracking-summary-card,
.tracking-branch-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(71, 85, 105, 0.35);
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.94), rgba(10, 15, 26, 0.94));
}

.tracking-summary-card {
  padding: 18px;
}

.tracking-summary-label,
.tracking-branch-label,
.tracking-metric-label,
.tracking-today-label {
  display: block;
  color: var(--text3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.tracking-summary-value {
  display: block;
  margin: 12px 0 6px;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.tracking-summary-meta {
  color: var(--text2);
  font-size: 12px;
  line-height: 1.5;
}

.tracking-command-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.tracking-form-card {
  border-color: rgba(51, 65, 85, 0.7);
}

.tracking-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tracking-form-grid-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tracking-form-actions {
  display: flex;
  align-items: flex-end;
}

.tracking-readonly-note {
  padding: 18px;
  border-radius: 14px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: var(--text2);
}

.tracking-readonly-note strong {
  display: block;
  margin-bottom: 8px;
  color: var(--yellow);
}

.tracking-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  margin-bottom: 24px;
}

.tracking-branch-card {
  padding: 20px;
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.3);
}

.tracking-branch-card::before,
.tracking-summary-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), transparent 55%);
  pointer-events: none;
}

.tracking-branch-header,
.tracking-progress-head,
.tracking-progress-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tracking-branch-header {
  margin-bottom: 20px;
}

.tracking-branch-name {
  margin: 6px 0 0;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.tracking-today-pill {
  min-width: 88px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(8, 145, 178, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.18);
  text-align: right;
}

.tracking-today-value,
.tracking-metric-value {
  display: block;
  margin-top: 6px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
}

.tracking-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.tracking-metric {
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.68);
  border: 1px solid rgba(51, 65, 85, 0.45);
}

.tracking-progress-block {
  margin-top: 16px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(2, 6, 23, 0.34);
  border: 1px solid rgba(51, 65, 85, 0.42);
}

.tracking-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(51, 65, 85, 0.42);
  color: var(--text3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tracking-progress-head,
.tracking-progress-foot {
  font-size: 12px;
  color: var(--text2);
}

.tracking-progress-rail {
  position: relative;
  height: 12px;
  margin: 12px 0 10px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  overflow: hidden;
}

.tracking-progress-fill {
  height: 100%;
  border-radius: inherit;
  box-shadow: 0 0 16px currentColor;
}

.tracking-progress-fill-good {
  color: #10b981;
  background: linear-gradient(90deg, #059669, #34d399);
}

.tracking-progress-fill-warning {
  color: #f59e0b;
  background: linear-gradient(90deg, #d97706, #fbbf24);
}

.tracking-progress-fill-critical {
  color: #ef4444;
  background: linear-gradient(90deg, #dc2626, #fb7185);
}

.tracking-table-card {
  overflow: hidden;
}

.tracking-data-table th,
.tracking-data-table td {
  white-space: nowrap;
}

.tracking-table-percentage {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 6px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}

.tracking-table-percentage-good {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
}

.tracking-table-percentage-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.tracking-table-percentage-critical {
  background: rgba(239, 68, 68, 0.14);
  color: #f87171;
}

.tracking-status-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tracking-delete-btn {
  width: 34px;
  height: 30px;
  justify-content: center;
  padding: 0;
}

.dashboard-live-pill {
  height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(49, 214, 155, 0.24);
  background: rgba(49, 214, 155, 0.1);
  color: #31d69b;
  font: 800 12px var(--mono);
  white-space: nowrap;
}

.dashboard-live-pill .live-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(49, 214, 155, 0.45);
  animation: dashboardLivePulse 1.8s infinite;
}

.dashboard-live-pill.is-refreshing {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.26);
  background: rgba(56, 189, 248, 0.1);
}

.dashboard-live-pill.is-error {
  color: #fb5474;
  border-color: rgba(251, 84, 116, 0.28);
  background: rgba(251, 84, 116, 0.1);
}

.dashboard-refresh-btn {
  height: 44px;
  padding: 0 14px;
  gap: 8px;
}

.dashboard-refresh-btn .refresh-icon {
  display: inline-flex;
  transition: transform 0.2s ease;
}

.dashboard-live-pill.is-refreshing+.dashboard-refresh-btn .refresh-icon {
  animation: dashboardRefreshSpin 0.9s linear infinite;
}

.is-updated {
  animation: dashboardValuePulse 0.75s ease;
}

@keyframes dashboardLivePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(49, 214, 155, 0.45);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(49, 214, 155, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(49, 214, 155, 0);
  }
}

@keyframes dashboardRefreshSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes dashboardValuePulse {
  0% {
    color: var(--text);
    text-shadow: none;
  }

  35% {
    color: #38bdf8;
    text-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
  }

  100% {
    color: var(--text);
    text-shadow: none;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ENHANCED ANIMATIONS & MICRO-INTERACTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Smooth page transitions */
.main-content {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Card hover animations */
.card,
.stat-card,
.highlight-card {
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border2);
}

.stat-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), 0 0 20px color-mix(in srgb, var(--card-accent) 20%, transparent);
}

.highlight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3), var(--shadow-glow);
}

/* Button micro-interactions */
.btn-primary,
.btn-secondary,
.btn-outline {
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: none;
}

.btn-primary:hover::after {
  animation: btnShimmer 0.6s ease;
}

@keyframes btnShimmer {
  from {
    left: -100%;
  }

  to {
    left: 150%;
  }
}

/* Table row animations */
.data-table tbody tr {
  transition: background-color var(--transition-fast), transform var(--transition-fast);
}

.data-table tbody tr:hover {
  background-color: rgba(79, 70, 229, 0.08);
  transform: translateX(2px);
}

/* Input focus animations */
.form-control:focus,
.form-select:focus,
.filter-input:focus,
.filter-select:focus {
  animation: inputFocusPulse 0.4s ease-out;
}

@keyframes inputFocusPulse {
  0% {
    box-shadow: 0 0 0 0 var(--accent-glow);
  }

  70% {
    box-shadow: 0 0 0 6px var(--accent-glow);
  }

  100% {
    box-shadow: 0 0 0 3px var(--accent-glow);
  }
}

/* Status badge animations */
.status-pill,
.status-badge {
  transition: all var(--transition-fast);
}

.status-pill:hover,
.status-badge:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Loading skeleton animation */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skeletonLoading 1.5s infinite;
}

@keyframes skeletonLoading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Notification/toast animations */
.toast {
  animation: slideInRight 0.3s ease-out, fadeOut 0.3s ease-out 2.7s forwards;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* Progress bar animations */
.stat-bar-fill,
.hbar-fill,
.mini-progress-fill {
  transition: width 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Icon subtle animations */
.nav-icon,
.stat-icon-circle,
.highlight-icon-box {
  transition: transform var(--transition);
}

.nav-link:hover .nav-icon {
  transform: scale(1.1);
}

.stat-card:hover .stat-icon-circle {
  transform: scale(1.1) rotate(5deg);
}

/* Ripple effect for buttons */
.btn-ripple {
  position: relative;
  overflow: hidden;
}

.btn-ripple::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%);
  transform-origin: 50% 50%;
}

.btn-ripple:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }

  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }

  100% {
    transform: scale(40, 40);
    opacity: 0;
  }
}

/* Page load stagger animation */
.stagger-item {
  opacity: 0;
  animation: fadeInUp 0.5s ease-out forwards;
}

.stagger-item:nth-child(1) {
  animation-delay: 0.05s;
}

.stagger-item:nth-child(2) {
  animation-delay: 0.1s;
}

.stagger-item:nth-child(3) {
  animation-delay: 0.15s;
}

.stagger-item:nth-child(4) {
  animation-delay: 0.2s;
}

.stagger-item:nth-child(5) {
  animation-delay: 0.25s;
}

.stagger-item:nth-child(6) {
  animation-delay: 0.3s;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Modern enhanced animations */
@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@keyframes pulse-glow {

  0%,
  100% {
    box-shadow: 0 0 20px var(--accent-glow);
  }

  50% {
    box-shadow: 0 0 40px var(--accent-glow), 0 0 60px rgba(99, 102, 241, 0.1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }

  100% {
    background-position: 200% center;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Enhanced hover effects */
.btn-primary.shimmer {
  background-size: 200% auto;
  background-image: linear-gradient(90deg,
      var(--accent) 0%,
      var(--accent2) 25%,
      var(--purple) 50%,
      var(--accent2) 75%,
      var(--accent) 100%);
  animation: shimmer 3s infinite linear;
}

/* Card entrance animations */
.card-entrance {
  animation: cardEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes cardEntrance {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Data visualization animations */
.progress-ring {
  transition: stroke-dashoffset 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Interactive element micro-interactions */
.interactive-scale {
  transition: transform var(--transition);
}

.interactive-scale:hover {
  transform: scale(1.05);
}

.interactive-scale:active {
  transform: scale(0.98);
}

/* Gradient border animation */
.gradient-border {
  position: relative;
  border: double 2px transparent;
  background-image: linear-gradient(var(--surface), var(--surface)),
    linear-gradient(90deg, var(--accent), var(--purple), var(--cyan));
  background-origin: border-box;
  background-clip: padding-box, border-box;
  animation: gradient-shift 3s ease infinite;
  background-size: 200% 200%;
}

/* Loading spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(99, 102, 241, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Page transition fade */
.page-transition {
  animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Responsive design adjustments */
@media (max-width: 1100px) {

  .tracking-hero,
  .tracking-command-grid {
    grid-template-columns: 1fr;
  }

  .tracking-heading {
    max-width: none;
  }

  .tracking-period-bar {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Modern responsive enhancements */
@media (max-width: 1200px) {
  .container {
    padding: 0 24px;
  }

  .stats-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .highlight-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: var(--z-modal);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
  }

  .topbar {
    padding: 12px 20px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .card {
    margin-bottom: 16px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-outline {
    padding: 12px 20px;
    font-size: 14px;
  }
}

@media (max-width: 600px) {
  .container {
    padding: 0 16px;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .highlight-row {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }

  .topbar-left,
  .topbar-right {
    width: 100%;
  }

  .topbar-right {
    justify-content: space-between;
  }

  .page-title {
    font-size: 20px;
  }

  .page-subtitle {
    font-size: 11px;
  }

  .card-header {
    padding: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .card-title {
    font-size: 15px;
  }

  .card-body {
    padding: 16px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-outline {
    width: 100%;
    justify-content: center;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
    border-radius: var(--radius) !important;
    margin: 4px 0 !important;
  }
}

@media (max-width: 400px) {
  :root {
    --content-padding: 12px;
  }

  .login-card {
    padding: 30px 20px;
  }

  .stat-card {
    padding: 16px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }
}

/* Dark mode preference */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #030712;
    --bg2: #0a0f1f;
    --bg3: #111827;
  }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  :root {
    --border: #475569;
    --border2: #64748b;
    --text: #ffffff;
    --text2: #f1f5f9;
  }

  .btn-primary {
    border: 2px solid white;
  }
}

@media (max-width: 800px) {

  .tracking-summary-grid,
  .tracking-form-grid,
  .tracking-form-grid-compact,
  .tracking-metric-grid {
    grid-template-columns: 1fr;
  }

  .tracking-grid {
    grid-template-columns: 1fr;
  }
}
