/* =====================================================
   bugX Design System
   Inspired by Linear.app and Supabase.com
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

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

:root {
  /* Primary Colors - Teal/Green */
  --primary: #10b981;
  --primary-hover: #34d399;
  --primary-muted: rgba(16, 185, 129, 0.15);
  --primary-glow: rgba(16, 185, 129, 0.4);

  /* Accent */
  --accent: #06b6d4;
  --accent-hover: #22d3ee;

  /* Backgrounds - Deep Dark */
  --bg-dark: #0a0a0b;
  --bg-primary: #0f0f10;
  --bg-card: rgba(17, 17, 19, 0.8);
  --bg-elevated: rgba(24, 24, 27, 0.9);
  --bg-input: rgba(24, 24, 27, 0.6);
  --bg-hover: rgba(39, 39, 42, 0.5);

  /* Glassmorphism */
  --glass-bg: rgba(17, 17, 19, 0.6);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);

  /* Text */
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-disabled: #52525b;

  /* Borders */
  --border: rgba(63, 63, 70, 0.5);
  --border-hover: rgba(82, 82, 91, 0.8);
  --border-focus: var(--primary);

  /* Status Colors */
  --success: #22c55e;
  --success-muted: rgba(34, 197, 94, 0.15);
  --warning: #f59e0b;
  --warning-muted: rgba(245, 158, 11, 0.15);
  --error: #ef4444;
  --error-muted: rgba(239, 68, 68, 0.15);
  --info: #3b82f6;
  --info-muted: rgba(59, 130, 246, 0.15);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--primary-glow);
}

/* =====================================================
   Base Styles
   ===================================================== */

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Gradient Background Mesh */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.15), transparent),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(6, 182, 212, 0.1), transparent),
    radial-gradient(ellipse 50% 30% at 0% 100%, rgba(16, 185, 129, 0.08), transparent);
  pointer-events: none;
  z-index: -1;
}

::selection {
  background: var(--primary);
  color: var(--bg-dark);
}

/* App Page Background Effects */
.app-body {
  background: var(--bg-dark);
}

.app-body::before {
  display: none;
}

.app-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(16, 185, 129, 0.08), transparent),
    radial-gradient(ellipse 50% 30% at 80% 80%, rgba(6, 182, 212, 0.05), transparent);
  pointer-events: none;
  z-index: -2;
}

.app-grid {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    linear-gradient(rgba(16, 185, 129, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 185, 129, 0.015) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  z-index: -1;
}

/* =====================================================
   Typography
   ===================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 3rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.125rem;
}

p {
  color: var(--text-secondary);
}

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

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

code, pre {
  font-family: var(--font-mono);
}

/* =====================================================
   Buttons
   ===================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
}

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

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: var(--radius-md);
  border: 1px solid var(--primary);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  background: var(--primary);
  color: var(--bg-dark);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-glow);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

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

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

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

.btn-ghost:hover:not(:disabled) {
  background: var(--bg-hover);
  color: var(--text);
}

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

.btn-outline:hover:not(:disabled) {
  background: var(--primary-muted);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

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

.btn-small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-secondary);
  background: rgba(39, 39, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.5);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-small:hover:not(:disabled) {
  background: rgba(63, 63, 70, 0.7);
  border-color: rgba(82, 82, 91, 0.6);
  color: var(--text);
  transform: translateY(-1px);
}

.btn-small:active:not(:disabled) {
  transform: translateY(0);
}

.btn-small:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Preset buttons (cron parser, etc.) */
.preset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.4);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.preset-btn:hover {
  background: rgba(39, 39, 42, 0.7);
  border-color: var(--primary-muted);
  color: var(--primary);
  transform: translateY(-1px);
}

.preset-btn:active {
  transform: translateY(0);
}

/* Cron presets container */
.cron-presets {
  margin-bottom: var(--space-md);
}

.cron-presets h4 {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.preset-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Pattern suggestions (URL extractor, etc.) */
.pattern-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--space-sm);
}

.pattern-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 10px;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.4);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.pattern-chip:hover {
  background: rgba(39, 39, 42, 0.7);
  border-color: var(--primary-muted);
  color: var(--primary);
  transform: translateY(-1px);
}

.pattern-chip:active {
  transform: translateY(0);
}

/* =====================================================
   Form Elements
   ===================================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="url"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  color: var(--text);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(63, 63, 70, 0.5);
  border-radius: var(--radius-md);
  outline: none;
  transition: all var(--transition-fast);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="url"]:hover,
input[type="search"]:hover,
textarea:hover,
select:hover {
  border-color: var(--border-hover);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-muted);
}

input::placeholder,
textarea::placeholder {
  color: var(--text-muted);
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-family: var(--font-mono);
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2371717a' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.help-text {
  display: block;
  margin-top: var(--space-xs);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* =====================================================
   Cards & Containers
   ===================================================== */

.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.card-elevated {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* =====================================================
   App Layout - Main Container
   ===================================================== */

.container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--glass-border);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sidebar-logo .logo-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  color: var(--bg-dark);
}

.sidebar-logo .logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.icon-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--primary);
  border-color: var(--primary);
}

/* Sidebar User Section */
.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--bg-dark);
  flex-shrink: 0;
}

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

.user-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-plan {
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.user-plan.starter {
  color: #8b5cf6;
}

.user-plan.pro {
  color: var(--primary);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-menu-item {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
}

.user-menu-item:hover {
  background: var(--bg-hover);
  color: var(--primary);
}

.sidebar h1 {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.history-icon-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.history-icon-btn:hover {
  background: var(--bg-hover);
  color: var(--primary);
  border-color: var(--primary);
}

/* Navigation Categories */
.sidebar h3 {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  margin-top: var(--space-lg);
  padding-left: var(--space-sm);
}

.operations {
  margin-bottom: var(--space-lg);
}

.op-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 2px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: left;
  font-size: 0.875rem;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
  text-decoration: none;
}

.op-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.op-btn.active {
  background: var(--primary-muted);
  color: var(--primary);
  font-weight: 500;
}

.op-btn .op-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.op-btn .op-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: opacity 0.2s ease;
}

/* Sidebar Collapse Toggle */
#sidebar-collapse-toggle {
  transition: all 0.2s ease;
}

#sidebar-collapse-toggle .collapse-icon {
  transition: transform 0.3s ease;
}

/* Collapsed Sidebar State */
.sidebar {
  transition: width 0.3s ease;
}

.sidebar.collapsed {
  width: 68px;
  padding: var(--space-md);
  overflow: visible;
}

.sidebar.collapsed .operations {
  overflow-y: auto;
  overflow-x: visible;
  max-height: calc(100vh - 200px);
  scrollbar-width: none;
}

.sidebar.collapsed .operations::-webkit-scrollbar {
  display: none;
}

.sidebar.collapsed .sidebar-logo .logo-text,
.sidebar.collapsed .sidebar-user .user-info,
.sidebar.collapsed .operations h3,
.sidebar.collapsed .op-btn .op-text {
  display: none;
}

.sidebar.collapsed .sidebar-header {
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
}

.sidebar.collapsed .sidebar-logo {
  justify-content: center;
}

.sidebar.collapsed .sidebar-header-actions {
  flex-direction: column;
  gap: var(--space-xs);
}

.sidebar.collapsed #sidebar-collapse-toggle .collapse-icon {
  transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-user {
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: transparent;
  border: none;
}

.sidebar.collapsed .sidebar-user .user-menu {
  flex-direction: column;
  gap: 6px;
}

.sidebar.collapsed .sidebar-user .user-menu-item {
  width: 36px;
  height: 36px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.sidebar.collapsed .user-avatar {
  width: 36px;
  height: 36px;
  font-size: 0.875rem;
}

.sidebar.collapsed .op-btn {
  justify-content: center;
  padding: 10px;
  position: relative;
}

.sidebar.collapsed .op-btn .op-icon {
  width: 20px;
  height: 20px;
  margin: 0 auto;
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .op-btn::after {
  content: attr(data-tooltip);
  position: fixed;
  left: 76px;
  background: var(--bg-card);
  color: var(--text);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.15s ease;
  z-index: 9999;
  border: 1px solid var(--border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.sidebar.collapsed .op-btn:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Main content adjustment for collapsed sidebar */
.container {
  transition: padding-left 0.3s ease;
}

.sidebar.collapsed ~ .history-drawer,
.sidebar.collapsed ~ .main-content {
  margin-left: 68px;
}

/* History Right Drawer */
.history-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 360px;
  height: 100vh;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--glass-border);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform var(--transition-slow);
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.5);
}

.history-drawer.hidden {
  transform: translateX(100%);
}

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

.drawer-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
}

.drawer-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.drawer-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color var(--transition-fast);
}

.drawer-close-btn:hover {
  color: var(--error);
}

.history-list {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md);
}

.history-item {
  padding: var(--space-md);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.history-item:hover {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.history-item .type {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: var(--space-xs);
  font-weight: 600;
}

.history-item .summary {
  font-size: 0.875rem;
  margin-bottom: var(--space-xs);
}

.history-item .meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  gap: var(--space-md);
}

.history-item .meta .success {
  color: var(--success);
}

.history-item .meta .failed {
  color: var(--error);
}

.history-item .delete-btn {
  float: right;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0 4px;
  transition: color var(--transition-fast);
}

.history-item .delete-btn:hover {
  color: var(--error);
}

/* Main Content */
.main-content {
  flex: 1;
  padding: var(--space-xl);
  overflow-y: auto;
  margin-left: 260px;
  min-height: 100vh;
  transition: margin-left 0.3s ease;
}

body.sidebar-collapsed .main-content {
  margin-left: 68px;
}

/* Tool Page Breadcrumb */
.main-content .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-lg);
  font-size: 0.875rem;
  padding: var(--space-sm) 0;
}

.main-content .breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.main-content .breadcrumb a:hover {
  color: var(--primary);
}

.main-content .breadcrumb .separator {
  color: var(--text-muted);
  opacity: 0.5;
}

.main-content .breadcrumb .current {
  color: var(--text);
  font-weight: 500;
}

.operation-form {
  display: none;
  max-width: 900px;
  animation: fadeIn var(--transition-slow);
}

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

.operation-form.active {
  display: block;
}

.operation-form h2 {
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.description {
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
  font-size: 0.9375rem;
}

/* =====================================================
   Results Panel
   ===================================================== */

.results-panel {
  margin-top: var(--space-xl);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 900px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.results-panel.hidden {
  display: none;
}

.results-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.results-actions {
  display: flex;
  gap: var(--space-sm);
}

/* Progress */
.progress-container {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  width: 0%;
  transition: width var(--transition-slow);
  border-radius: var(--radius-full);
}

#progress-text {
  font-size: 0.8125rem;
  color: var(--text-muted);
  min-width: 80px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Stats */
.stats {
  display: flex;
  gap: var(--space-xl);
  margin-bottom: var(--space-md);
}

.stat {
  text-align: center;
}

.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.6875rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat.success .stat-value {
  color: var(--success);
}

.stat.error .stat-value {
  color: var(--error);
}

/* Log Filters */
.log-filters {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.filter-btn {
  padding: 6px 14px;
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.4);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  background: rgba(39, 39, 42, 0.7);
  border-color: var(--primary-muted);
  color: var(--text);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-dark);
  font-weight: 500;
}

/* Log Console */
.log-console {
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  height: 320px;
  overflow-y: auto;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.7;
}

.log-entry {
  padding: 3px 0;
  border-bottom: 1px solid rgba(63, 63, 70, 0.3);
  display: flex;
  gap: var(--space-sm);
}

.log-entry:last-child {
  border-bottom: none;
}

.log-entry .timestamp {
  color: var(--text-disabled);
  flex-shrink: 0;
}

.log-entry.success {
  color: var(--success);
}

.log-entry.error {
  color: var(--error);
}

.log-entry.warning {
  color: var(--warning);
}

.log-entry.info {
  color: var(--text-muted);
}

/* =====================================================
   Database Tools Styles
   ===================================================== */

.db-config-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.db-config {
  background: var(--glass-bg);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.db-config h4 {
  margin-bottom: var(--space-md);
  color: var(--primary);
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.db-config .form-group {
  margin-bottom: var(--space-md);
}

@media (max-width: 900px) {
  .db-config-container {
    grid-template-columns: 1fr;
  }
}

/* DB Environment Info */
.db-env-info {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  flex-wrap: wrap;
}

.env-badge {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  font-weight: 500;
}

.env-badge.prod {
  background: var(--success-muted);
  border: 1px solid var(--success);
  color: var(--success);
}

.env-badge.stage {
  background: var(--warning-muted);
  border: 1px solid var(--warning);
  color: var(--warning);
}

/* Radio Group */
.radio-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.radio-label {
  display: flex;
  flex-direction: column;
  padding: var(--space-md);
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.radio-label:hover {
  border-color: var(--primary);
}

.radio-label input[type="radio"] {
  display: none;
}

.radio-label input[type="radio"]:checked + .radio-text {
  color: var(--primary);
  font-weight: 600;
}

.radio-label:has(input[type="radio"]:checked) {
  border-color: var(--primary);
  background: var(--primary-muted);
}

.radio-text {
  font-size: 0.9375rem;
  margin-bottom: var(--space-xs);
}

.radio-label small {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* Section Divider */
.section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

/* =====================================================
   Single SP Result Panel
   ===================================================== */

.single-sp-result {
  margin-top: var(--space-lg);
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.single-sp-result.hidden {
  display: none;
}

.sp-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.sp-header h4 {
  margin: 0;
  font-size: 1.125rem;
  font-family: var(--font-mono);
}

.status-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.status-badge.identical {
  background: var(--success-muted);
  color: var(--success);
}

.status-badge.different {
  background: var(--error-muted);
  color: var(--error);
}

.status-badge.only-primary,
.status-badge.only-secondary {
  background: var(--warning-muted);
  color: var(--warning);
}

.status-badge.not-found {
  background: rgba(113, 113, 122, 0.2);
  color: var(--text-muted);
}

.sp-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

@media (max-width: 768px) {
  .sp-meta-grid {
    grid-template-columns: 1fr;
  }
}

.sp-meta-box {
  padding: var(--space-md);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.sp-meta-box h5 {
  margin: 0 0 var(--space-sm) 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.sp-meta-box.primary-meta h5 {
  color: var(--success);
}

.sp-meta-box.secondary-meta h5 {
  color: var(--warning);
}

.sp-meta-box p {
  margin: 4px 0;
  font-size: 0.8125rem;
}

.sp-meta-box .not-exists {
  color: var(--error);
  font-style: italic;
}

.sp-diff-summary {
  padding: var(--space-md);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  font-size: 0.875rem;
}

.sp-diff-summary .added {
  color: var(--success);
}

.sp-diff-summary .removed {
  color: var(--error);
}

/* Code Panels */
.sp-code-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 900px) {
  .sp-code-compare {
    grid-template-columns: 1fr;
  }
}

.code-panel {
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.code-panel h5 {
  margin: 0;
  padding: 10px 14px;
  background: var(--bg-input);
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.code-panel h5 .line-count {
  font-size: 0.6875rem;
  opacity: 0.7;
}

.code-panel-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.btn-copy {
  padding: 4px 10px;
  background: var(--bg-dark);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.6875rem;
  font-family: var(--font-sans);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-copy:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-dark);
}

.btn-copy.copied {
  background: var(--success);
  border-color: var(--success);
  color: var(--bg-dark);
}

.code-panel .code-content {
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
  overflow-x: auto;
  max-height: 500px;
  overflow-y: auto;
}

.code-line {
  display: flex;
  min-height: 1.6em;
}

.code-line:hover {
  background: rgba(255, 255, 255, 0.02);
}

.code-line .line-num {
  min-width: 48px;
  padding: 0 10px;
  text-align: right;
  color: var(--text-disabled);
  background: rgba(0, 0, 0, 0.3);
  border-right: 1px solid var(--border);
  user-select: none;
  flex-shrink: 0;
  font-size: 0.6875rem;
}

.code-line .line-content {
  flex: 1;
  padding: 0 14px;
  white-space: pre;
  overflow-x: auto;
}

/* Diff highlighting */
.code-line.added {
  background: rgba(34, 197, 94, 0.1);
}

.code-line.added .line-num {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.code-line.added .line-content {
  color: var(--success);
}

.code-line.removed {
  background: rgba(239, 68, 68, 0.1);
}

.code-line.removed .line-num {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}

.code-line.removed .line-content {
  color: var(--error);
}

.code-line.modified {
  background: rgba(245, 158, 11, 0.08);
}

.code-line.modified .line-num {
  background: rgba(245, 158, 11, 0.12);
  color: var(--warning);
}

/* Diff legend */
.diff-legend {
  display: flex;
  gap: var(--space-md);
  padding: 10px 14px;
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 0.75rem;
}

.diff-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.diff-legend-item .color-box {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

.diff-legend-item .color-box.added {
  background: rgba(34, 197, 94, 0.4);
  border: 1px solid var(--success);
}

.diff-legend-item .color-box.removed {
  background: rgba(239, 68, 68, 0.4);
  border: 1px solid var(--error);
}

.diff-legend-item .color-box.unchanged {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--text-disabled);
}

/* =====================================================
   Procedure List Table
   ===================================================== */

.proc-list-container {
  margin-top: var(--space-lg);
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.proc-list-container.hidden {
  display: none;
}

.proc-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.proc-list-header h3 {
  margin: 0;
}

.proc-list-stats {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.stat-chip {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.4);
  color: var(--text-secondary);
}

.stat-chip.identical {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.stat-chip.different {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--error);
}

.stat-chip.only-primary {
  background: rgba(59, 130, 246, 0.15);
  border-color: rgba(59, 130, 246, 0.3);
  color: var(--info);
}

.stat-chip.only-secondary {
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--warning);
}

/* Category chips (URL extractor results) */
.cat-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  font-size: 0.6875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.4);
  border-radius: var(--radius-full);
}

.proc-list-filters {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.proc-list-filters input {
  flex: 1;
  min-width: 300px;
}

.proc-list-filters select {
  padding: 10px 14px;
  min-width: 150px;
}

.proc-table-wrapper {
  max-height: 500px;
  overflow-y: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

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

.proc-table th,
.proc-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.proc-table th {
  background: var(--bg-input);
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.proc-table tbody tr:hover {
  background: var(--bg-hover);
}

.proc-table .proc-name {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.proc-table .status-cell {
  white-space: nowrap;
}

.proc-table .status-badge {
  font-size: 0.625rem;
  padding: 3px 8px;
}

.proc-table .btn-view {
  padding: 6px 12px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-sm);
  color: var(--bg-dark);
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.proc-table .btn-view:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

/* =====================================================
   Full-screen Modal
   ===================================================== */

.comparison-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  overflow-y: auto;
  padding: var(--space-lg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.comparison-modal.hidden {
  display: none;
}

.modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  max-width: 1400px;
  margin: 0 auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-lg) var(--space-xl);
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  position: sticky;
  top: 0;
  z-index: 10;
}

.modal-title {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.modal-title h2 {
  margin: 0;
  font-size: 1.125rem;
  font-family: var(--font-mono);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--error);
}

.modal-body {
  padding: var(--space-xl);
}

.modal-meta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

@media (max-width: 768px) {
  .modal-meta-row {
    grid-template-columns: 1fr;
  }
}

.modal-meta-box {
  padding: var(--space-md);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.modal-meta-box h4 {
  margin: 0 0 var(--space-sm) 0;
  font-size: 0.8125rem;
}

.modal-meta-box.primary h4 {
  color: var(--success);
}

.modal-meta-box.secondary h4 {
  color: var(--warning);
}

.modal-meta-box p {
  margin: 4px 0;
  font-size: 0.8125rem;
}

.modal-diff-summary {
  padding: 12px var(--space-md);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
}

.modal-legend {
  display: flex;
  gap: var(--space-md);
  padding: 10px 14px;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 0.75rem;
}

.modal-code-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 900px) {
  .modal-code-compare {
    grid-template-columns: 1fr;
  }
}

.modal-code-compare .code-content {
  max-height: calc(100vh - 400px);
  min-height: 300px;
}

/* Sync Actions */
.modal-sync-actions {
  padding: var(--space-md);
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  border: 1px solid var(--border);
}

.modal-sync-actions.hidden {
  display: none;
}

.sync-warning {
  font-size: 0.8125rem;
  color: var(--warning);
  margin-bottom: var(--space-md);
}

.sync-buttons {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

.btn-sync {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-sync .sync-icon {
  font-size: 1rem;
}

.btn-sync.to-secondary {
  background: var(--warning);
  color: var(--bg-dark);
}

.btn-sync.to-secondary:hover {
  background: #e6ac00;
}

.btn-sync.to-primary {
  background: var(--success);
  color: var(--bg-dark);
}

.btn-sync.to-primary:hover {
  background: #1db954;
}

.btn-sync:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.sync-status {
  margin-top: var(--space-md);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
}

.sync-status.hidden {
  display: none;
}

.sync-status.success {
  background: var(--success-muted);
  color: var(--success);
  border: 1px solid var(--success);
}

.sync-status.error {
  background: var(--error-muted);
  color: var(--error);
  border: 1px solid var(--error);
}

.sync-status.loading {
  background: var(--warning-muted);
  color: var(--warning);
  border: 1px solid var(--warning);
}

/* =====================================================
   Autocomplete / Search Dropdown
   ===================================================== */

.autocomplete-container {
  position: relative;
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
}

.autocomplete-container input {
  flex: 1;
}

.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 60px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  max-height: 300px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: var(--shadow-lg);
}

.suggestions-dropdown.hidden {
  display: none;
}

.suggestion-item {
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition-fast);
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
  background: var(--bg-hover);
}

.suggestion-item .sp-name {
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

.suggestion-item .sp-name mark {
  background: var(--primary);
  color: var(--bg-dark);
  padding: 0 3px;
  border-radius: 2px;
}

.suggestion-item .sp-badges,
.sp-badges {
  display: flex;
  gap: 6px;
}

.suggestion-item .sp-badge,
.sp-badge {
  font-size: 0.5625rem;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.suggestion-item .sp-badge.prod,
.sp-badge.prod {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: var(--success);
}

.suggestion-item .sp-badge.stage,
.sp-badge.stage {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: var(--warning);
}

.suggestion-item .sp-badge.both,
.sp-badge.both {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: var(--info);
}

.suggestions-loading,
.suggestions-empty {
  padding: var(--space-md);
  text-align: center;
  color: var(--text-muted);
}

.suggestions-empty {
  font-style: italic;
}

.suggestions-stats {
  padding: 10px 14px;
  background: var(--bg-input);
  font-size: 0.6875rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

/* =====================================================
   API Tester Styles
   ===================================================== */

.api-test-mode {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.api-test-mode .radio-label {
  flex-direction: row;
  align-items: center;
  padding: 12px var(--space-md);
}

.api-test-mode .radio-label input[type="radio"] {
  display: block;
  margin-right: var(--space-sm);
}

.form-row {
  display: flex;
  gap: var(--space-md);
}

.form-row .form-group {
  flex: 1;
}

.form-row .form-group.method-select {
  flex: 0 0 130px;
}

.form-row .form-group.url-input {
  flex: 1;
}

/* API Result */
.api-result {
  margin-top: var(--space-lg);
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.api-result.hidden {
  display: none;
}

.api-result-header {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-input);
  flex-wrap: wrap;
  align-items: center;
}

.method-badge {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.method-badge.get {
  background: var(--success-muted);
  color: var(--success);
}

.method-badge.post {
  background: var(--info-muted);
  color: var(--info);
}

.method-badge.put {
  background: var(--warning-muted);
  color: var(--warning);
}

.method-badge.patch {
  background: rgba(255, 165, 0, 0.15);
  color: orange;
}

.method-badge.delete {
  background: var(--error-muted);
  color: var(--error);
}

.method-badge.head,
.method-badge.options {
  background: rgba(113, 113, 122, 0.2);
  color: var(--text-muted);
}

.api-result-header .status-badge.success {
  background: var(--success-muted);
  color: var(--success);
}

.api-result-header .status-badge.error {
  background: var(--error-muted);
  color: var(--error);
}

.time-badge,
.size-badge {
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  background: rgba(113, 113, 122, 0.15);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.api-result-url {
  padding: 10px var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.3);
  word-break: break-all;
}

.api-result-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(63, 63, 70, 0.4);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.api-result-tabs .tab-btn {
  padding: 12px var(--space-lg);
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
  border-bottom: 2px solid transparent;
}

.api-result-tabs .tab-btn:hover {
  color: var(--text);
}

.api-result-tabs .tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.api-result-content {
  padding: var(--space-md);
}

.api-result-content pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--bg-dark);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border);
}

/* =====================================================
   New Tools Styles
   ===================================================== */

/* Tool Tabs */
.tool-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: var(--space-lg);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.4);
  padding: 4px;
  border-radius: var(--radius-md);
}

.tool-tab {
  flex: 1;
  padding: 10px var(--space-md);
  background: transparent;
  border: none;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.8125rem;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
}

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

.tool-tab.active {
  background: var(--primary);
  color: var(--bg-dark);
  font-weight: 500;
}

.tool-tab-content {
  display: none;
}

.tool-tab-content.active {
  display: block;
}

.tool-tab-content.hidden {
  display: none;
}

/* Button Row */
.btn-row {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin: var(--space-md) 0;
}

/* Compare Grid */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .compare-grid {
    grid-template-columns: 1fr;
  }
}

/* Validation Result */
.validation-result {
  margin-top: var(--space-md);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.validation-result.valid {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.validation-result.invalid {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Compare Result */
.compare-result {
  margin-top: var(--space-md);
  padding: var(--space-md);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.4);
  border-radius: var(--radius-md);
  max-height: 400px;
  overflow-y: auto;
}

.compare-result .diff-line {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  padding: 2px 8px;
  margin: 2px 0;
  border-radius: var(--radius-sm);
}

.compare-result .diff-added {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.compare-result .diff-removed {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}

.compare-result .diff-same {
  color: var(--text-muted);
}

/* Tool Info Box */
.tool-info {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 63, 70, 0.4);
}

.tool-info h4 {
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* JWT Decoder */
.jwt-result {
  margin-top: var(--space-lg);
}

.jwt-section {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 63, 70, 0.4);
}

.jwt-section h4 {
  margin-bottom: var(--space-sm);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.jwt-color {
  font-size: 0.6875rem;
  font-weight: normal;
}

.jwt-color.header { color: #ef4444; }
.jwt-color.payload { color: #a855f7; }
.jwt-color.signature { color: #3b82f6; }

.jwt-section pre {
  background: var(--bg-dark);
  padding: var(--space-md);
  border-radius: var(--radius-md);
  overflow-x: auto;
  font-size: 0.8125rem;
  border: 1px solid var(--border);
}

.jwt-section code {
  word-break: break-all;
  font-size: 0.75rem;
}

.jwt-meta {
  padding: var(--space-md);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.4);
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
}

.jwt-meta div {
  margin-bottom: 4px;
}

.jwt-meta .expired {
  color: var(--error);
}

.jwt-meta .valid {
  color: var(--success);
}

/* Hash Generator */
.hash-results {
  margin-top: var(--space-lg);
}

.hash-row {
  margin-bottom: var(--space-md);
}

.hash-row label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.hash-value-row {
  display: flex;
  gap: var(--space-sm);
}

.hash-value-row input {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.btn-copy-small {
  padding: 8px 12px;
  background: rgba(39, 39, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.5);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 0.75rem;
  font-family: var(--font-sans);
  transition: all var(--transition-fast);
}

.btn-copy-small:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--bg-dark);
  transform: translateY(-1px);
}

/* Diff Checker */
.diff-result {
  margin-top: var(--space-lg);
}

.diff-stats {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
}

.diff-stats .added {
  color: var(--success);
}

.diff-stats .removed {
  color: var(--error);
}

.diff-output {
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid rgba(63, 63, 70, 0.4);
}

.diff-line {
  padding: 2px 8px;
  margin: 1px 0;
  border-radius: var(--radius-sm);
}

.diff-line.added {
  background: rgba(34, 197, 94, 0.12);
  color: var(--success);
}

.diff-line.removed {
  background: rgba(239, 68, 68, 0.12);
  color: var(--error);
}

/* Regex Tester */
.regex-result {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 63, 70, 0.4);
}

.regex-info {
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
}

.regex-highlighted {
  padding: var(--space-md);
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-break: break-all;
  margin-bottom: var(--space-md);
  border: 1px solid var(--border);
}

.regex-highlighted .match {
  background: var(--primary);
  color: var(--bg-dark);
  padding: 1px 4px;
  border-radius: 3px;
  font-weight: 500;
}

.regex-matches {
  font-size: 0.8125rem;
}

.regex-matches .match-item {
  padding: 4px 10px;
  background: var(--bg-dark);
  border-radius: var(--radius-sm);
  margin: 4px 0;
  font-family: var(--font-mono);
  border: 1px solid var(--border);
}

.regex-cheatsheet {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 63, 70, 0.4);
}

.regex-cheatsheet h4 {
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.cheatsheet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: var(--space-sm);
  font-size: 0.75rem;
}

.cheatsheet-grid code {
  background: var(--bg-dark);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: var(--primary);
}

.cheatsheet-grid span {
  color: var(--text-muted);
}

/* DNS Results */
.dns-results {
  margin-top: var(--space-lg);
}

.dns-record-section {
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 63, 70, 0.4);
}

.dns-record-section h4 {
  margin-bottom: var(--space-md);
  font-size: 0.875rem;
  color: var(--primary);
}

.dns-record {
  padding: 8px 12px;
  background: var(--bg-dark);
  border-radius: var(--radius-md);
  margin: 4px 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  border: 1px solid var(--border);
}

/* CORS Result */
.cors-result {
  margin-top: var(--space-lg);
  padding: var(--space-md);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: var(--radius-md);
  border: 1px solid rgba(63, 63, 70, 0.4);
}

.cors-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
}

.cors-status {
  font-size: 0.875rem;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
}

.cors-status.allowed {
  background: var(--success-muted);
  color: var(--success);
}

.cors-status.blocked {
  background: var(--error-muted);
  color: var(--error);
}

.cors-headers {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
}

.cors-header-row {
  display: flex;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.cors-header-name {
  width: 300px;
  color: var(--text-muted);
}

.cors-header-value {
  flex: 1;
  word-break: break-all;
}

/* Connection Status */
.connection-status {
  display: inline-block;
  margin-left: var(--space-md);
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 0.8125rem;
  vertical-align: middle;
}

.connection-status.hidden {
  display: none;
}

.connection-status.testing {
  background: var(--warning-muted);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.connection-status.success {
  background: var(--success-muted);
  color: var(--success);
  border: 1px solid var(--success);
}

.connection-status.error {
  background: var(--error-muted);
  color: var(--error);
  border: 1px solid var(--error);
}

/* Cached info indicator */
.cached-info {
  display: inline-block;
  margin-left: var(--space-md);
  font-size: 0.8125rem;
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  background: var(--success-muted);
  color: var(--success);
  vertical-align: middle;
}

.cached-info.hidden {
  display: none;
}

/* SQL textarea */
.sql-textarea {
  font-family: var(--font-mono);
  font-size: 0.875rem;
  line-height: 1.5;
  resize: vertical;
}

.sql-preview-section {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sql-preview-section .form-group label {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.editable-hint {
  font-size: 0.6875rem;
  color: var(--text-muted);
  font-weight: normal;
}

.sql-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.sql-results-section {
  margin-top: var(--space-lg);
  padding: var(--space-lg);
  background: var(--glass-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.sql-results-section .results-header {
  margin-bottom: var(--space-md);
}

.sql-results-section .results-header h3 {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.row-count-badge {
  font-size: 0.75rem;
  font-weight: normal;
  padding: 4px 10px;
  background: var(--info-muted);
  color: var(--info);
  border-radius: var(--radius-full);
}

.exec-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-right: var(--space-md);
}

.sql-results-table-wrapper {
  overflow-x: auto;
  max-height: 500px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

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

.sql-results-table th {
  background: var(--bg-input);
  padding: 12px 14px;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 2px solid var(--primary);
}

.sql-results-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sql-results-table tr:hover td {
  background: var(--bg-hover);
}

.sql-results-table .null-value {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.75rem;
}

.sql-results-message {
  padding: var(--space-lg);
  text-align: center;
  color: var(--text-muted);
  font-style: italic;
}

.limit-message {
  padding: var(--space-md);
  text-align: center;
  color: var(--warning);
  font-size: 0.8125rem;
  background: var(--warning-muted);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.sql-error-section {
  margin-top: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--error-muted);
  border: 1px solid var(--error);
  border-radius: var(--radius-lg);
}

.sql-error-section .error-content {
  color: var(--error);
  font-size: 0.875rem;
}

.sql-error-section .error-content strong {
  margin-right: var(--space-sm);
}

.radio-group.horizontal {
  display: flex;
  gap: var(--space-md);
}

.radio-group.horizontal .radio-label {
  flex-direction: row;
  align-items: center;
  padding: 12px var(--space-md);
}

.radio-group.horizontal .radio-label input[type="radio"] {
  display: block;
  margin-right: var(--space-sm);
}

/* =====================================================
   Checkbox Group
   ===================================================== */

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  cursor: pointer;
}

.checkbox-group.data-fields {
  padding: var(--space-md);
  background: var(--bg-input);
  border-radius: var(--radius-md);
}

/* =====================================================
   Misc Styles
   ===================================================== */

/* Table Comparison Styles */
.table-compare-summary {
  padding: var(--space-md);
  background: var(--bg-input);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
  border: 1px solid var(--border);
}

.summary-row {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.summary-row:last-child {
  margin-bottom: 0;
}

.summary-row .stat {
  font-size: 0.8125rem;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.summary-row .stat.identical {
  background: var(--success-muted);
  color: var(--success);
}

.summary-row .stat.different {
  background: var(--error-muted);
  color: var(--error);
}

.summary-row .stat.only-primary {
  background: var(--info-muted);
  color: var(--info);
}

.summary-row .stat.only-secondary {
  background: var(--warning-muted);
  color: var(--warning);
}

/* Hidden class */
.hidden {
  display: none !important;
}

/* =====================================================
   Scrollbar
   ===================================================== */

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

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

/* =====================================================
   Responsive
   ===================================================== */

/* Mobile Menu Toggle */
.mobile-header {
  display: none;
}

.sidebar-close {
  display: none;
}

.mobile-menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text);
  transition: all var(--transition-fast);
}

.mobile-menu-toggle:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  color: var(--primary);
}

.mobile-menu-toggle svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 900px) {
  .container {
    flex-direction: column;
  }

  .mobile-header {
    display: flex;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .sidebar {
    width: 280px;
    max-width: 85vw;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform var(--transition-slow);
    z-index: 200;
    overflow-y: auto;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-header {
    position: sticky;
    top: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    z-index: 10;
    margin: calc(var(--space-lg) * -1);
    margin-bottom: var(--space-lg);
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border);
  }

  .sidebar-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-muted);
    transition: all var(--transition-fast);
  }

  .sidebar-close:hover {
    color: var(--error);
    border-color: var(--error);
  }

  .sidebar h3 {
    margin-top: var(--space-md);
  }

  .sidebar h3:first-of-type {
    margin-top: 0;
  }

  .main-content {
    margin-left: 0;
    padding: var(--space-md);
    padding-top: 70px;
  }

  .mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
  }

  .mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
  }

  .mobile-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--bg-dark);
  }

  .mobile-logo .logo-text {
    font-size: 1.125rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 150;
    opacity: 0;
    transition: opacity var(--transition-slow);
  }

  .mobile-overlay.show {
    display: block;
    opacity: 1;
  }

  .history-drawer {
    width: 100%;
  }

  .form-row {
    flex-direction: column;
  }

  .sidebar-user {
    flex-wrap: wrap;
  }

  .user-info {
    min-width: 100px;
  }
}

@media (max-width: 480px) {
  .main-content {
    padding: var(--space-sm);
    padding-top: 70px;
  }

  .operation-form {
    padding: var(--space-md);
  }

  .operation-form h2 {
    font-size: 1.25rem;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .results-header {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: flex-start;
  }

  .results-actions {
    width: 100%;
    display: flex;
    gap: var(--space-sm);
  }

  .results-actions button {
    flex: 1;
  }
}

/* =====================================================
   Cron Parser Styles
   ===================================================== */

.cron-breakdown {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

@media (max-width: 640px) {
  .cron-breakdown {
    grid-template-columns: repeat(3, 1fr);
  }
}

.cron-field {
  padding: var(--space-md);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.4);
  border-radius: var(--radius-md);
  text-align: center;
}

.cron-field .field-name {
  display: block;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.cron-field .field-value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
}

.cron-next-runs {
  padding: var(--space-md);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.4);
  border-radius: var(--radius-md);
}

.cron-next-runs h4 {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-sm);
}

.cron-next-runs ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cron-next-runs li {
  padding: 6px 0;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(63, 63, 70, 0.3);
}

.cron-next-runs li:last-child {
  border-bottom: none;
}

/* =====================================================
   Timestamp Converter Styles
   ===================================================== */

.timestamp-current {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.4);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-lg);
}

.timestamp-current span {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.timestamp-current code {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--primary);
  font-weight: 600;
}

.ts-result {
  margin-top: var(--space-lg);
}

.ts-formats {
  display: grid;
  gap: var(--space-sm);
}

.ts-format {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(63, 63, 70, 0.4);
  border-radius: var(--radius-md);
}

.ts-format span {
  font-size: 0.8125rem;
  color: var(--text-muted);
  min-width: 80px;
}

.ts-format code {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text);
}

/* =====================================================
   Custom Modal / Alert System
   ===================================================== */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

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

.modal-dialog {
  background: rgba(24, 24, 27, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(63, 63, 70, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  width: 90%;
  max-width: 420px;
  transform: scale(0.9) translateY(-20px);
  transition: transform 0.2s ease;
}

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

.modal-header {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-lg);
  border-bottom: 1px solid rgba(63, 63, 70, 0.4);
}

.modal-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.modal-icon svg {
  width: 20px;
  height: 20px;
}

.modal-icon.info {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

.modal-icon.success {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.modal-icon.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

.modal-icon.error {
  background: rgba(239, 68, 68, 0.15);
  color: var(--error);
}

.modal-icon.confirm {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.modal-body {
  padding: var(--space-lg);
}

.modal-message {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.modal-input {
  margin-top: var(--space-md);
}

.modal-input input {
  width: 100%;
}

.modal-footer {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid rgba(63, 63, 70, 0.4);
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.modal-btn {
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: var(--font-sans);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.modal-btn-secondary {
  background: rgba(39, 39, 42, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(63, 63, 70, 0.5);
  color: var(--text-secondary);
}

.modal-btn-secondary:hover {
  background: rgba(63, 63, 70, 0.7);
  color: var(--text);
}

.modal-btn-primary {
  background: var(--primary);
  color: var(--bg-dark);
}

.modal-btn-primary:hover {
  background: var(--primary-hover);
  box-shadow: var(--shadow-glow);
}

.modal-btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--error);
}

.modal-btn-danger:hover {
  background: var(--error);
  border-color: var(--error);
  color: white;
}

/* =====================================================
   Animation Utilities
   ===================================================== */

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

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

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

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

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

.animate-slideIn {
  animation: slideIn var(--transition-slow) ease;
}
