@import "tailwindcss";
@import "tw-animate-css";
@import "shadcn/tailwind.css";

@custom-variant dark (&:is(.dark *));

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN SYSTEM — MingJian (明鉴)
   Decision Intelligence · Dark-first · Warm Amber Accent
   Linear surface ladder · No shadows · Hairline borders · Tight tracking
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── LIGHT THEME (default) ───────────────────────────────────────────────── */
:root {
  /* Canvas — clean white */
  --background: #fafbfc;
  --foreground: #1a1a2e;
  --card: #ffffff;
  --card-hover: #f5f6f8;
  --card-border: #e2e4e8;
  --card-foreground: #1a1a2e;
  --card-border-hover: #d0d3d8;
  --popover: #ffffff;
  --popover-foreground: #1a1a2e;

  /* Surface ladder (secondary background for nested panels) */
  --bg-secondary: #f1f3f5;
  --surface-elevated: #ffffff;

  /* Brand accent — warm amber (明鉴 identity) */
  --accent: #d4940a;
  --accent-hover: #b8800a;
  --accent-foreground: #ffffff;

  /* Accent secondary — purple */
  --accent-purple: #7c3aed;
  --accent-purple-bg: rgba(124, 58, 237, 0.06);

  /* Status colors */
  --accent-green: #16a34a;
  --accent-green-bg: rgba(22, 163, 74, 0.08);
  --accent-red: #dc2626;
  --accent-red-bg: rgba(220, 38, 38, 0.06);
  --accent-amber: #ca8a04;
  --accent-amber-bg: rgba(202, 138, 4, 0.08);

  /* Semantic blue — used for process stages and agent activity */
  --accent-blue: #2563eb;
  --accent-blue-bg: rgba(37, 99, 235, 0.08);

  /* Backward compat aliases */
  --accent-yellow: var(--accent-amber);
  --accent-yellow-bg: var(--accent-amber-bg);

  /* Text hierarchy — like Linear's ink system */
  --muted: #6b7280;
  --muted-foreground: #6b7280;
  --primary: #1a1a2e;
  --primary-foreground: #fafbfc;
  --secondary: #f1f3f5;
  --secondary-foreground: #1a1a2e;
  --destructive: #dc2626;
  --border: #e2e4e8;
  --input: #e2e4e8;
  --ring: #d4940a;

  /* Gradient */
  --gradient-start: #d4940a;
  --gradient-end: #b8800a;

  /* Layout */
  --sidebar-width: 240px;
  --header-height: 52px;
  --radius: 8px;

  /* Spacing system — 4px base unit */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 24px;
  --spacing-2xl: 32px;
  --spacing-3xl: 48px;

  /* Charts */
  --chart-1: #d4940a;
  --chart-2: #16a34a;
  --chart-3: #ca8a04;
  --chart-4: #dc2626;
  --chart-5: #7c3aed;

  /* Code / terminal areas */
  --code-bg: #f4f5f7;
  --code-border: #e2e4e8;
  --overlay: rgba(0, 0, 0, 0.5);

  /* Sidebar */
  --sidebar: #f8f9fa;
  --sidebar-foreground: #1a1a2e;
  --sidebar-primary: #d4940a;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #fef9ee;
  --sidebar-accent-foreground: #1a1a2e;
  --sidebar-border: #e2e4e8;
  --sidebar-ring: #d4940a;
}

/* ── DARK THEME — Linear surface ladder + amber accent ─────────────────── */
.dark {
  /* Canvas — near-pure black (Linear #010102 / VoltAgent #050507) */
  --background: #050507;
  --foreground: #f5f5f5;
  --card: #0c0c0e;
  --card-hover: #141416;
  --card-border: #1e1e22;
  --card-border-hover: #2a2a30;
  --card-foreground: #f5f5f5;
  --popover: #0c0c0e;
  --popover-foreground: #f5f5f5;

  /* Surface ladder */
  --bg-secondary: #0f1011;
  --surface-elevated: #18181a;

  /* Brand accent — warm amber (明鉴 strategic identity) */
  --accent: #e5a00c;
  --accent-hover: #f0b73a;
  --accent-foreground: #000000;

  /* Accent secondary — purple */
  --accent-purple: #a78bfa;
  --accent-purple-bg: rgba(167, 139, 250, 0.08);

  /* Status */
  --accent-green: #3dd68c;
  --accent-green-bg: rgba(61, 214, 140, 0.08);
  --accent-red: #ff6b6b;
  --accent-red-bg: rgba(255, 107, 107, 0.08);
  --accent-amber: #ffc93c;
  --accent-amber-bg: rgba(255, 201, 60, 0.08);

  /* Semantic blue */
  --accent-blue: #60a5fa;
  --accent-blue-bg: rgba(96, 165, 250, 0.08);

  /* Backward compat aliases */
  --accent-yellow: var(--accent-amber);
  --accent-yellow-bg: var(--accent-amber-bg);

  /* Text hierarchy — Linear ink system */
  --muted: #787878;
  --muted-foreground: #b8b8b8;
  --primary: #f5f5f5;
  --primary-foreground: #050507;
  --secondary: #0f1011;
  --secondary-foreground: #f5f5f5;
  --destructive: #ff6b6b;
  --border: #1e1e22;
  --input: #1e1e22;
  --ring: #e5a00c;

  /* Gradient */
  --gradient-start: #e5a00c;
  --gradient-end: #c78b0a;

  /* Charts */
  --chart-1: #e5a00c;
  --chart-2: #34d399;
  --chart-3: #fbbf24;
  --chart-4: #f87171;
  --chart-5: #a78bfa;

  /* Code */
  --code-bg: #0a0a0c;
  --code-border: #1a1a1e;
  --overlay: rgba(0, 0, 0, 0.7);

  /* Sidebar — slightly darker than canvas */
  --sidebar: #070709;
  --sidebar-foreground: #f0f0f0;
  --sidebar-primary: #e5a00c;
  --sidebar-primary-foreground: #000000;
  --sidebar-accent: #0f1011;
  --sidebar-accent-foreground: #f0f0f0;
  --sidebar-border: #1a1a1e;
  --sidebar-ring: #e5a00c;
}

/* ── Accent Progression (warm amber) ────────────────────────────────────── */
:root {
  --accent-50:  #fef9ee;
  --accent-100: #fdf0d0;
  --accent-200: #fbe0a0;
  --accent-300: #f8cb66;
  --accent-400: #f0b73a;
  --accent-500: #e5a00c;
  --accent-600: #c78b0a;
  --accent-700: #a06d08;
  --accent-800: #7a5206;
  --accent-900: #543904;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY
   ═══════════════════════════════════════════════════════════════════════════ */

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

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

/* ── Chinese Text Readability ────────────────────────────────────────────── */
.text-zh {
  line-height: 1.75;
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BASE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Smooth theme transitions — background, text, and border colors */
  transition: background-color 0.3s ease, color 0.15s ease, border-color 0.2s ease;
}

body {
  font-family: "Geist", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1;
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.01em;
  background: var(--background);
  color: var(--foreground);
}

a {
  color: inherit;
  text-decoration: none;
}

/* ── No atmospheric gradients — Linear principle: dark canvas IS the whitespace */

/* ── Custom Scrollbar — Linear-style thin ────────────────────────────────── */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TYPOGRAPHY — Geist, Linear-inspired tight tracking
   ═══════════════════════════════════════════════════════════════════════════ */

/* Display heading — Linear-style aggressive negative tracking */
.heading-display {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--foreground);
  text-wrap: balance;
}

/* Section heading — tight negative tracking */
.heading-section {
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--foreground);
}

/* Section label — uppercase overline like VoltAgent */
.section-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES — Shadows, Interactions, Effects
   ═══════════════════════════════════════════════════════════════════════════ */

/* Card elevation system — subtle shadows for depth */
.card-elevated {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 0 0 1px var(--card-border);
}

.card-hover {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 0 0 1px var(--card-border-hover);
  transform: translateY(-1px);
}

.dark .card-hover:hover {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 0 1px var(--card-border-hover);
}

/* Accent glow effect */
.accent-glow {
  box-shadow: 0 0 20px rgba(229, 160, 12, 0.15);
}

/* Interactive elements — micro-interactions */
.interactive {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive:hover {
  transform: translateY(-1px);
}

.interactive:active {
  transform: translateY(0);
  transition-duration: 0.05s;
}

/* Button press effect */
.btn-press:active {
  transform: scale(0.98);
}

/* Gradient accent background */
.gradient-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes cardExpand {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

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

@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideRight {
  0% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

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

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

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

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

@keyframes iridescent-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

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

@keyframes liquid-slide {
  0% {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
    filter: blur(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes blurIn {
  0% {
    opacity: 0;
    filter: blur(10px);
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    filter: blur(0px);
    transform: translateY(0);
  }
}

@keyframes marquee-left {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

@keyframes marquee-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0%); }
}

/* ── Animation Utilities ─────────────────────────────────────────────────── */
.animate-fadeIn {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-slideIn {
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.animate-scaleIn {
  animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.animate-spin {
  animation: spin 0.8s linear infinite;
}

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

.liquid-entrance {
  animation: liquid-slide 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Stagger children — 60ms delay per child per DESIGN.md */
.stagger-children > * {
  animation: stagger-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stagger-children > *:nth-child(1) { animation-delay: 0ms; }
.stagger-children > *:nth-child(2) { animation-delay: 60ms; }
.stagger-children > *:nth-child(3) { animation-delay: 120ms; }
.stagger-children > *:nth-child(4) { animation-delay: 180ms; }
.stagger-children > *:nth-child(5) { animation-delay: 240ms; }
.stagger-children > *:nth-child(6) { animation-delay: 300ms; }
.stagger-children > *:nth-child(7) { animation-delay: 360ms; }
.stagger-children > *:nth-child(8) { animation-delay: 420ms; }

/* ═══════════════════════════════════════════════════════════════════════════
   CARD SYSTEM — Linear-style charcoal panels
   Three tiers: liquid-glass > glass > card
   ═══════════════════════════════════════════════════════════════════════════ */

/* Tier 3: Standard Card — charcoal panel with hairline border */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s ease;
}

.card:hover {
  border-color: var(--card-border-hover);
}

/* Tier 2: Glass — sidebar and header only */
.glass {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 32px -4px rgba(0, 0, 0, 0.06);
}

.dark .glass {
  background: rgba(7, 7, 9, 0.8);
  backdrop-filter: blur(12px) saturate(1.5);
  -webkit-backdrop-filter: blur(12px) saturate(1.5);
  border: 1px solid var(--card-border);
  box-shadow: none;
}

/* Tier 1: Liquid Glass — hero/featured sections ONLY */
.liquid-glass {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.02) 50%,
    rgba(255, 255, 255, 0.05) 100%
  );
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05),
    0 4px 24px -2px rgba(0, 0, 0, 0.12),
    0 12px 48px -8px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.liquid-glass:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.12) 0%,
    rgba(255, 255, 255, 0.04) 50%,
    rgba(255, 255, 255, 0.08) 100%
  );
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow:
    0 0 0 0.5px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    inset 0 -1px 0 rgba(0, 0, 0, 0.05),
    0 8px 32px -4px rgba(0, 0, 0, 0.15),
    0 16px 64px -12px rgba(0, 0, 0, 0.1);
}

.dark .liquid-glass {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 4%, transparent) 0%,
    rgba(255, 255, 255, 0.01) 50%,
    color-mix(in srgb, var(--accent) 2%, transparent) 100%
  );
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid color-mix(in srgb, var(--accent) 8%, transparent);
  border-radius: var(--radius);
}

.dark .liquid-glass:hover {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 10%, transparent) 0%,
    rgba(255, 255, 255, 0.03) 50%,
    color-mix(in srgb, var(--accent) 6%, transparent) 100%
  );
  border-color: color-mix(in srgb, var(--accent) 15%, transparent);
}

/* Iridescent shimmer overlay — hover accent sweep */
.iridescent::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--accent) 10%, transparent) 0%,
    color-mix(in srgb, var(--accent) 5%, transparent) 25%,
    color-mix(in srgb, var(--accent) 8%, transparent) 50%,
    color-mix(in srgb, var(--accent) 5%, transparent) 75%,
    color-mix(in srgb, var(--accent) 10%, transparent) 100%
  );
  background-size: 200% 200%;
  animation: iridescent-shift 8s ease-in-out infinite;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s;
}

.iridescent:hover::after {
  opacity: 1;
}

/* Noise texture overlay — organic feel on glass surfaces */
.noise-texture::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ═══════════════════════════════════════════════════════════════════════════
   COMPONENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Status Dot ──────────────────────────────────────────────────────────── */
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
}

.status-dot.online {
  background: var(--accent-green);
  box-shadow: 0 0 6px var(--accent-green);
}

/* ── Badge ───────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--card-border);
  border-radius: 4px;
  color: var(--muted-foreground);
}

.badge-success {
  border-color: var(--accent-green);
  color: var(--accent-green);
}

.badge-error {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.badge-warning {
  border-color: var(--accent-amber);
  color: var(--accent-amber);
}

/* Premium badge — frosted pill with accent background */
.badge-premium {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: 9999px;
  background: var(--accent-amber-bg);
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
  backdrop-filter: blur(8px);
}

/* ── Button — Linear-style compact ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius);
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: all 0.15s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: var(--accent-foreground);
  padding: 6px 14px;
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  box-shadow: 0 4px 12px rgba(229, 160, 12, 0.2);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--card-border);
  padding: 6px 14px;
  font-size: 13px;
}

.btn-ghost:hover {
  border-color: color-mix(in srgb, var(--accent) 50%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-icon {
  padding: 8px;
  width: 36px;
  height: 36px;
}

/* ── Input ───────────────────────────────────────────────────────────────── */
.input {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 13px;
  color: var(--foreground);
  transition: border-color 0.15s ease;
  outline: none;
  width: 100%;
}

.input:focus {
  border-color: var(--ring);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 10%, transparent);
}

/* ── Spinner ─────────────────────────────────────────────────────────────── */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--card-border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

/* ── Skeleton ────────────────────────────────────────────────────────────── */
.skeleton {
  background: var(--card-border);
  border-radius: 4px;
  animation: pulse 1.5s ease-in-out infinite;
}

/* ── Empty State ─────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 8px;
}

.empty-state-description {
  font-size: 13px;
  color: var(--muted);
  max-width: 320px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PREMIUM UTILITIES
   ═══════════════════════════════════════════════════════════════════════════ */

/* Gradient text — accent energy */
.gradient-text {
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gradient accent line — horizontal divider with glow */
.gradient-line {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--accent) 20%,
    var(--accent-300) 50%,
    var(--accent) 80%,
    transparent 100%
  );
  opacity: 0.3;
}

/* Subtle bottom-border divider — decorates content containers */
.divider-subtle {
  border-bottom: 1px solid color-mix(in srgb, var(--card-border) 50%, transparent);
}

/* Standalone 1px divider line (use on empty <div> only) */
.divider-line {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--card-border) 30%,
    var(--card-border) 70%,
    transparent 100%
  );
  opacity: 0.5;
}

/* Accent underline — animated on hover */
.accent-underline {
  position: relative;
  display: inline-block;
}

.accent-underline::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-300));
  border-radius: 1px;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.accent-underline:hover::after {
  opacity: 1;
  transform: scaleX(1);
}

/* Frosted edge — top light refraction line */
.frosted-edge::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 30%,
    rgba(255, 255, 255, 0.25) 50%,
    rgba(255, 255, 255, 0.15) 70%,
    transparent 100%
  );
  pointer-events: none;
}

/* Premium metric value — gradient text at display scale */
.metric-value {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  background: linear-gradient(
    180deg,
    var(--foreground) 0%,
    var(--muted-foreground) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Gradient progress bar */
.gradient-progress {
  height: 3px;
  border-radius: 2px;
  background: var(--card-border);
  overflow: hidden;
}

.gradient-progress-fill {
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    var(--accent-600) 0%,
    var(--accent) 40%,
    var(--accent-300) 100%
  );
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Ambient glow — soft accent shadow */
.ambient-glow {
  box-shadow:
    0 0 40px -8px color-mix(in srgb, var(--accent) 15%, transparent),
    0 0 80px -16px color-mix(in srgb, var(--accent) 8%, transparent);
}

/* Magnetic hover — subtle lift */
.magnetic-hover {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.magnetic-hover:hover {
  transform: translateY(-1px);
}

/* Glow accent — gradient ring on hover */
.glow-accent {
  position: relative;
}

.glow-accent::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.glow-accent:hover::after {
  opacity: 1;
}

/* Smooth transition utility */
.transition-smooth {
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
  :root {
    --sidebar-width: 0px;
    --header-height: 52px;
  }

  body {
    font-size: 15px;
    -webkit-tap-highlight-color: transparent;
  }

  button, a, [role="button"] {
    min-height: 44px;
  }

  .heading-display {
    font-size: 1.875rem;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE UTILITIES — Added for mobile/tablet/desktop adaptation
   ═══════════════════════════════════════════════════════════════════════════ */

/* Table improvements */
.table-container {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
}

.table-container table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table-container th {
  padding: 10px 16px;
  text-align: left;
  font-weight: 500;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-foreground);
  background: var(--secondary);
  border-bottom: 1px solid var(--card-border);
  white-space: nowrap;
}

.table-container td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--card-border);
  color: var(--foreground);
  vertical-align: middle;
}

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

.table-container tr:hover td {
  background: var(--card-hover);
}

/* URL cell — truncate long URLs */
.cell-url {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .cell-url {
    max-width: 180px;
  }
}


/* Responsive typography */
@media (max-width: 640px) {
  .heading-display {
    font-size: 1.5rem;
  }

  .heading-section {
    font-size: 0.875rem;
  }
}
