/* ==========================================================================
   HUNTER X-CORE CONTROLLER CONFIGURATOR - STYLESHEET
   Pure CSS3 - Modern, Responsive, High Contrast, Offline-Ready
   ========================================================================== */

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

  /* Color Palette - Forest & Water theme */
  --primary-50: #ecfdf5;
  --primary-100: #d1fae5;
  --primary-200: #a7f3d0;
  --primary-500: #10b981;
  --primary-600: #059669;
  --primary-700: #047857;
  --primary-800: #065f46;

  --water-500: #0ea5e9;
  --water-600: #0284c7;
  --water-700: #0369a1;

  --prog-a: #10b981; /* Emerald */
  --prog-a-bg: #ecfdf5;
  --prog-a-border: #a7f3d0;

  --prog-b: #0284c7; /* Cyan/Blue */
  --prog-b-bg: #f0f9ff;
  --prog-b-border: #bae6fd;

  --prog-c: #d97706; /* Amber/Orange */
  --prog-c-bg: #fffbeb;
  --prog-c-border: #fde68a;

  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  --danger-50: #fef2f2;
  --danger-100: #fee2e2;
  --danger-500: #ef4444;
  --danger-600: #dc2626;
  --danger-700: #b91c1c;

  --warning-50: #fffbeb;
  --warning-100: #fef3c7;
  --warning-500: #f59e0b;
  --warning-700: #b45309;

  --info-50: #eff6ff;
  --info-100: #dbeafe;
  --info-500: #3b82f6;
  --info-700: #1d4ed8;

  /* UI Tokens */
  --bg-app: #f4f6f8;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --text-main: var(--gray-900);
  --text-muted: var(--gray-600);
  --text-light: var(--gray-400);
  --border-color: var(--gray-200);
  --border-focus: var(--primary-500);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --transition: all 0.2s ease-in-out;
}

/* Dark mode */
[data-theme="dark"] {
  --bg-app: #0f172a;
  --bg-card: #1e293b;
  --bg-input: #0f172a;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-light: #64748b;
  --border-color: #334155;
  --prog-a-bg: rgba(16, 185, 129, 0.15);
  --prog-a-border: rgba(16, 185, 129, 0.4);
  --prog-b-bg: rgba(2, 132, 199, 0.15);
  --prog-b-border: rgba(2, 132, 199, 0.4);
  --prog-c-bg: rgba(217, 119, 6, 0.15);
  --prog-c-border: rgba(217, 119, 6, 0.4);
  --danger-50: rgba(239, 68, 68, 0.15);
  --warning-50: rgba(245, 158, 11, 0.15);
  --info-50: rgba(59, 130, 246, 0.15);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg-app: #f4f6f8;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-light: #94a3b8;
  --border-color: #e2e8f0;
  --prog-a-bg: #ecfdf5;
  --prog-a-border: #a7f3d0;
  --prog-b-bg: #f0f9ff;
  --prog-b-border: #bae6fd;
  --prog-c-bg: #fffbeb;
  --prog-c-border: #fde68a;
  --danger-50: #fef2f2;
  --warning-50: #fffbeb;
  --info-50: #eff6ff;
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App Header */
.header {
  background: linear-gradient(135deg, #064e3b 0%, #065f46 50%, #047857 100%);
  color: #ffffff;
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  z-index: 50;
}

.header-container {
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.header-logo {
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.header-logo svg {
  width: 24px;
  height: 24px;
  color: #ffffff;
  flex-shrink: 0;
}

.header-title-group h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
}

.header-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: #f59e0b;
  color: #78350f;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.header-subtitle {
  font-size: 0.84rem;
  opacity: 0.9;
  margin-top: 0.1rem;
  color: #e2e8f0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
  line-height: 1;
}

.header-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
  color: #ffffff;
}

.header-btn-donate {
  background: rgba(245, 158, 11, 0.25);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fef3c7;
}

.header-btn-donate:hover {
  background: rgba(245, 158, 11, 0.4);
  border-color: rgba(245, 158, 11, 0.7);
  color: #ffffff;
}

.header-btn .email-short {
  display: none;
}

@media (max-width: 860px) {
  .header-btn .email-full {
    display: none;
  }
  .header-btn .email-short {
    display: inline;
  }
}

@media (max-width: 480px) {
  .header-btn {
    padding: 0.45rem 0.6rem;
    font-size: 0.76rem;
  }
}

.btn-icon {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

/* Form Section Inline Field Hint */
.hunter-field-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: var(--primary-50);
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  margin-bottom: 0.65rem;
  font-size: 0.81rem;
  line-height: 1.42;
  color: var(--text-main);
}

.hunter-field-hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-600);
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.hunter-field-hint-icon svg {
  width: 16px;
  height: 16px;
  color: currentColor;
}

[data-theme="dark"] .hunter-field-hint {
  background: rgba(0, 194, 136, 0.08);
  border-color: rgba(0, 194, 136, 0.25);
  color: var(--gray-300);
}

/* Main Layout Grid (3 Columns) */
.main-wrapper {
  max-width: 1920px;
  margin: 1.5rem auto;
  padding: 0 1.25rem 3rem;
  display: grid;
  grid-template-columns: 490px 1fr 530px;
  gap: 1.35rem;
  align-items: start;
}

.left-column,
.center-column,
.right-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

@media (max-width: 1720px) {
  .main-wrapper {
    grid-template-columns: 470px 1fr 510px;
    gap: 1.15rem;
  }
}

@media (max-width: 1480px) {
  .main-wrapper {
    grid-template-columns: 470px 1fr;
  }
  .right-column {
    grid-column: 1 / -1;
  }
  .right-column .guide-step-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

@media (max-width: 980px) {
  .main-wrapper {
    grid-template-columns: 1fr;
  }
  .right-column {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 1rem 1rem;
  }
  .header-container {
    gap: 0.75rem;
  }
  .header-brand {
    gap: 0.65rem;
  }
  .header-logo {
    width: 36px;
    height: 36px;
  }
  .header-logo svg {
    width: 20px;
    height: 20px;
  }
  .header-title-group h1 {
    font-size: 1.15rem;
  }
  .header-subtitle {
    font-size: 0.78rem;
  }
  .main-wrapper {
    margin: 1rem auto;
    padding: 0 0.85rem 2rem;
    gap: 1rem;
  }
  .card-header {
    padding: 0.85rem 1rem;
  }
  .card-body {
    padding: 1rem;
  }
  .hunter-card-header {
    padding: 0.9rem 1rem;
  }
  .hunter-card-body {
    padding: 1rem;
  }
}

@media (max-width: 540px) {
  .main-wrapper {
    padding: 0 0.5rem 1.5rem;
  }
  .card {
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
  }
  .card-header {
    padding: 0.75rem 0.85rem;
    gap: 0.5rem;
  }
  .card-title {
    font-size: 0.94rem;
  }
  .card-title-icon {
    width: 26px;
    height: 26px;
  }
  .card-title-icon svg {
    width: 15px;
    height: 15px;
  }
  .card-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
  }
  .hunter-card-header {
    padding: 0.85rem 0.85rem;
  }
  .hunter-header-text h2 {
    font-size: 1rem;
  }
  .hunter-header-text p {
    font-size: 0.76rem;
  }
  .hunter-card-body {
    padding: 0.85rem 0.85rem;
  }
  .hunter-section-header {
    gap: 0.35rem;
  }
  .hunter-label {
    font-size: 0.70rem;
  }
  .hunter-status {
    font-size: 0.76rem;
  }
  .hunter-field-hint {
    padding: 0.5rem 0.65rem;
    font-size: 0.78rem;
  }
  .hunter-duration-row {
    gap: 0.5rem;
  }
  .rule-item {
    padding: 0.6rem 0.75rem;
    gap: 0.4rem;
  }
  .rule-details {
    font-size: 0.82rem;
    gap: 0.4rem;
  }
  .copy-toolbar-actions .btn {
    flex: 1 1 100%;
  }
  .controller-guide-section {
    padding: 0.85rem;
  }
  .guide-step-card {
    padding: 0.75rem 0.85rem;
  }
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.25rem;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(0, 0, 0, 0.015);
  flex-wrap: wrap;
}

.card-title {
  font-size: 1.02rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-main);
  min-width: 0;
  line-height: 1.35;
}

.card-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--primary-100);
  color: var(--primary-700);
  flex-shrink: 0;
}

.card-title-icon svg {
  width: 17px;
  height: 17px;
  color: currentColor;
  flex-shrink: 0;
}

[data-theme="dark"] .card-title-icon {
  background: rgba(16, 185, 129, 0.2);
  color: var(--primary-200);
}

.card-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-700);
  white-space: nowrap;
  flex-shrink: 0;
}

[data-theme="dark"] .card-badge {
  background: var(--gray-800);
  color: var(--gray-300);
}

.card-body {
  padding: 1.25rem;
}

/* Model Selector */
.model-selector-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.segmented-control {
  display: flex;
  background: var(--bg-app);
  padding: 0.3rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  gap: 0.3rem;
}

.segment-btn {
  flex: 1;
  border: none;
  background: transparent;
  padding: 0.6rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
}

.segment-btn:hover {
  color: var(--text-main);
  background: rgba(0, 0, 0, 0.04);
}

.segment-btn.active {
  background: var(--bg-card);
  color: var(--primary-600);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--primary-200);
  font-weight: 700;
}

[data-theme="dark"] .segment-btn.active {
  color: var(--primary-500);
  border-color: var(--primary-600);
  background: var(--gray-800);
}

/* Preset Buttons Bar */
.presets-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.5rem;
}

.preset-chip {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: var(--transition);
}

.preset-chip:hover {
  background: var(--primary-50);
  border-color: var(--primary-200);
  color: var(--primary-700);
  transform: translateY(-1px);
}

[data-theme="dark"] .preset-chip:hover {
  background: var(--primary-800);
  color: #ffffff;
}

/* ==========================================================================
   HUNTER FORM CARD (Custom Design from User Mockup)
   ========================================================================== */
/* ==========================================================================
   HUNTER FORM CARD (Adaptive Light & Dark Themes)
   ========================================================================== */
.form-card-hunter {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 1.25rem;
  transition: var(--transition);
}

.form-card-hunter:hover {
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .form-card-hunter {
  background: #141c28;
  border-color: #222e40;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.hunter-card-header {
  padding: 1.2rem 1.35rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.015);
}

[data-theme="dark"] .hunter-card-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

.hunter-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.hunter-icon-box {
  width: 38px;
  height: 38px;
  background: var(--primary-50);
  border: 1.5px solid var(--primary-200);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-600);
  flex-shrink: 0;
  padding: 0;
  line-height: 0;
}

.hunter-icon-box svg {
  display: block;
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .hunter-icon-box {
  background: rgba(0, 194, 136, 0.12);
  border-color: rgba(0, 194, 136, 0.35);
  color: #00c288;
}

.hunter-header-text h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.hunter-header-text p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.3;
}

.btn-cancel-pill {
  background: var(--gray-200);
  color: var(--gray-700);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
}

[data-theme="dark"] .btn-cancel-pill {
  background: #233145;
  color: #e2e8f0;
  border: none;
}

.btn-cancel-pill:hover {
  background: var(--gray-300);
  color: var(--text-main);
}

.hunter-card-body {
  padding: 1.25rem 1.35rem 1.35rem;
}

.hunter-section {
  margin-bottom: 1.2rem;
}

.hunter-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.45rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.hunter-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.35;
}

.hunter-label-icon {
  color: var(--primary-600);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hunter-label-icon svg {
  width: 14px;
  height: 14px;
  color: currentColor;
}

[data-theme="dark"] .hunter-label-icon {
  color: #00c288;
}

.hunter-status {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--primary-600);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

[data-theme="dark"] .hunter-status {
  color: #00c288;
}

/* Zone Pills Selector */
.hunter-zone-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.65rem;
}

.hunter-zone-btn {
  background: var(--bg-app);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  padding: 0.45rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

[data-theme="dark"] .hunter-zone-btn {
  background: #0f1622;
  border-color: #233145;
  color: #ffffff;
}

.hunter-zone-btn:hover {
  border-color: var(--primary-500);
  color: var(--text-main);
  transform: translateY(-1px);
}

.hunter-zone-btn.active {
  background: var(--primary-500);
  color: #ffffff;
  border-color: var(--primary-500);
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.35);
}

[data-theme="dark"] .hunter-zone-btn.active {
  background: #00c288;
  color: #061710;
  border-color: #00c288;
  box-shadow: 0 0 12px rgba(0, 194, 136, 0.35);
}

/* Text Input for Zone Name */
.hunter-input-wrapper {
  position: relative;
  width: 100%;
}

.hunter-text-input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  padding: 0.65rem 0.95rem;
  color: var(--text-main);
  font-size: 0.86rem;
  outline: none;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

[data-theme="dark"] .hunter-text-input {
  background: #0f1622;
  border-color: #233145;
  color: #ffffff;
}

.hunter-text-input::placeholder {
  color: var(--text-light);
}

[data-theme="dark"] .hunter-text-input::placeholder {
  color: #55667e;
}

.hunter-text-input:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Custom Select Dropdowns */
.hunter-select-wrapper {
  position: relative;
  width: 100%;
}

.hunter-select {
  width: 100%;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  padding: 0.7rem 2.4rem 0.7rem 1rem;
  color: var(--text-main);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

[data-theme="dark"] .hunter-select {
  background: #0f1622;
  border-color: #233145;
  color: #ffffff;
}

.hunter-select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.hunter-select:disabled,
.hunter-select.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--bg-app);
  border-color: var(--border-color);
  color: var(--text-muted);
}

[data-theme="dark"] .hunter-select:disabled,
[data-theme="dark"] .hunter-select.disabled {
  background: #090e15;
  border-color: #1e293b;
  color: #64748b;
}

.hunter-select-wrapper.is-disabled .hunter-select-arrow {
  opacity: 0.35;
}

.hunter-select-highlight {
  color: var(--primary-700);
  font-family: var(--font-mono);
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

[data-theme="dark"] .hunter-select-highlight {
  color: #00c288;
}

.hunter-select option {
  background: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.4rem;
}

[data-theme="dark"] .hunter-select option {
  background: #0f1622;
  color: #ffffff;
}

.hunter-select-arrow {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--primary-600);
  pointer-events: none;
  font-size: 1.1rem;
  font-weight: 900;
}

[data-theme="dark"] .hunter-select-arrow {
  color: #00c288;
}

/* Duration Row */
.hunter-duration-row {
  display: flex;
  gap: 0.85rem;
}

.hunter-duration-col {
  flex: 1;
}

.hunter-sublabel {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

/* Submit Button */
.btn-hunter-submit {
  width: 100%;
  background: var(--primary-600);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
  font-size: 0.98rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 1.35rem;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.25);
  user-select: none;
}

[data-theme="dark"] .btn-hunter-submit {
  background: #00c288;
  color: #051610;
  box-shadow: 0 4px 14px rgba(0, 194, 136, 0.25);
}

.btn-hunter-submit:hover {
  background: var(--primary-700);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.35);
}

[data-theme="dark"] .btn-hunter-submit:hover {
  background: #00d998;
  box-shadow: 0 6px 18px rgba(0, 194, 136, 0.4);
}

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

.btn-icon-plus {
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--primary-600);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-700);
  box-shadow: 0 4px 8px rgba(5, 150, 105, 0.25);
  transform: translateY(-1px);
}

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

.btn-secondary {
  background: var(--bg-app);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

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

[data-theme="dark"] .btn-secondary:hover {
  background: var(--gray-700);
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-danger {
  background: var(--danger-50);
  color: var(--danger-600);
  border: 1px solid var(--danger-100);
}

.btn-danger:hover {
  background: var(--danger-500);
  color: #ffffff;
}

[data-theme="dark"] .btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
}

/* Schedule Rules List */
.rules-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 380px;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.rule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.85rem;
  transition: var(--transition);
  gap: 0.6rem;
}

.rule-item:hover {
  border-color: var(--gray-300);
  background: var(--bg-card);
}

.rule-item-overflow {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.05) !important;
}

[data-theme="dark"] .rule-item-overflow {
  border-color: rgba(239, 68, 68, 0.6) !important;
  background: rgba(239, 68, 68, 0.12) !important;
}

.rule-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.rule-status-badge.badge-danger {
  background: var(--danger-100);
  color: var(--danger-700);
  border: 1px solid var(--danger-300);
}

[data-theme="dark"] .rule-status-badge.badge-danger {
  background: rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.4);
}

.zone-tag-danger {
  background: var(--danger-100) !important;
  color: var(--danger-700) !important;
}

[data-theme="dark"] .zone-tag-danger {
  background: rgba(239, 68, 68, 0.2) !important;
  color: #fca5a5 !important;
}

.rule-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.zone-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  background: var(--primary-100);
  color: var(--primary-800);
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
}

.zone-tag svg {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

[data-theme="dark"] .zone-tag {
  background: rgba(16, 185, 129, 0.2);
  color: var(--primary-200);
}

.rule-details {
  font-size: 0.88rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.rule-time {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--water-600);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.rule-time svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

[data-theme="dark"] .rule-time {
  color: var(--water-500);
}

.rule-duration {
  color: var(--text-muted);
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.rule-duration svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.rule-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.btn-action {
  background: transparent;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.35rem 0.45rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.btn-action svg {
  width: 15px;
  height: 15px;
  color: currentColor;
}

.btn-action:hover {
  color: var(--primary-600);
  background: var(--primary-50);
}

.btn-action.btn-delete:hover {
  color: var(--danger-600);
  background: var(--danger-50);
}

.empty-state {
  text-align: center;
  padding: 2.2rem 1rem;
  color: var(--text-light);
}

.empty-icon {
  margin-bottom: 0.5rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-icon svg {
  width: 44px;
  height: 44px;
  color: var(--primary-600);
}

[data-theme="dark"] .empty-icon svg {
  color: #00c288;
}

/* Warnings and Alerts */
.alerts-container {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.25rem;
}

.alert {
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  line-height: 1.45;
}

.alert-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.alert-icon svg {
  width: 20px;
  height: 20px;
  color: currentColor;
}
}

.alert-warning {
  background: var(--warning-50);
  border: 1px solid var(--warning-100);
  color: var(--warning-700);
}

.alert-danger {
  background: var(--danger-50);
  border: 1px solid var(--danger-100);
  color: var(--danger-700);
}

.alert-info {
  background: var(--info-50);
  border: 1px solid var(--info-100);
  color: var(--info-700);
}

.alert-action-btn {
  margin-top: 0.4rem;
  display: inline-block;
  background: #ffffff;
  border: 1px solid currentColor;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.alert-action-btn:hover {
  background: var(--gray-100);
}

/* ==========================================================================
   HUNTER 24H ZONE SCHEDULE CHART (Custom Design from Mockup)
   ========================================================================== */
.hunter-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.35rem 1.15rem;
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.hunter-chart-card:hover {
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .hunter-chart-card {
  background: #141c28;
  border-color: #222e40;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.hunter-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.hunter-chart-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.hunter-chart-icon-box {
  width: 38px;
  height: 38px;
  background: #e0f2fe;
  border: 1.5px solid #bae6fd;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0284c7;
  flex-shrink: 0;
}

[data-theme="dark"] .hunter-chart-icon-box {
  background: rgba(0, 180, 216, 0.12);
  border-color: rgba(0, 180, 216, 0.35);
  color: #00b4d8;
}

.hunter-chart-header-text h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.hunter-chart-header-text p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
  line-height: 1.3;
}

/* Inspector Badge Row (Under Title) */
.hunter-chart-inspector-row {
  display: flex;
  align-items: center;
  margin-bottom: 1.15rem;
}

.hunter-chart-inspector {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  padding: 0.45rem 1rem;
  border-radius: 9999px;
  font-size: 0.84rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.2s ease;
  min-height: 34px;
}

[data-theme="dark"] .hunter-chart-inspector {
  background: #0f1622;
  border-color: #233145;
  color: #ffffff;
}

.inspector-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #00b4d8;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.inspector-duration {
  color: #d97706;
  font-weight: 800;
}

[data-theme="dark"] .inspector-duration {
  color: #fbbf24;
}

/* Chart Body */
.hunter-chart-body {
  position: relative;
  overflow: visible;
  padding-bottom: 0.4rem;
}

@media (max-width: 768px) {
  .hunter-chart-body {
    overflow-x: auto;
  }
}

.hunter-chart-axis-wrap {
  display: flex;
  align-items: flex-end;
  margin-bottom: 0.55rem;
  min-width: 540px;
}

.hunter-chart-zone-placeholder {
  width: 75px;
  flex-shrink: 0;
}

.hunter-chart-ruler {
  flex: 1;
  position: relative;
  height: 24px;
}

.ruler-tick {
  position: absolute;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
  transform: translateX(-50%);
}

.tick-mark {
  width: 1.5px;
  height: 5px;
  background: var(--border-color);
  margin-top: 2px;
}

[data-theme="dark"] .tick-mark {
  background: #334155;
}

/* Zone Rows */
.hunter-chart-rows {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 540px;
  position: relative;
}

.hunter-chart-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.hunter-chart-zone-label {
  width: 75px;
  flex-shrink: 0;
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
}

.hunter-chart-track {
  flex: 1;
  height: 30px;
  background: var(--bg-app);
  border: 1.5px solid var(--border-color);
  border-radius: 9999px;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

[data-theme="dark"] .hunter-chart-track {
  background: #0f1622;
  border-color: #1c2637;
}

.track-grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(0, 0, 0, 0.05);
  pointer-events: none;
}

[data-theme="dark"] .track-grid-line {
  background: rgba(255, 255, 255, 0.04);
}

/* Event Bars on the Track */
.hunter-chart-bar {
  position: absolute;
  height: 20px;
  border-radius: 9999px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border 0.15s ease;
  z-index: 2;
  box-sizing: border-box;
}

.hunter-chart-bar.prog-a {
  background: #10b981;
}

[data-theme="dark"] .hunter-chart-bar.prog-a {
  background: #00c288;
}

.hunter-chart-bar.prog-b {
  background: #0284c7;
}

[data-theme="dark"] .hunter-chart-bar.prog-b {
  background: #00b4d8;
}

.hunter-chart-bar.prog-c {
  background: #8b5cf6;
}

[data-theme="dark"] .hunter-chart-bar.prog-c {
  background: #a855f7;
}

.hunter-chart-bar.prog-overflow {
  background: repeating-linear-gradient(
    -45deg,
    #ef4444,
    #ef4444 6px,
    #b91c1c 6px,
    #b91c1c 12px
  ) !important;
  border: 1.5px dashed #fca5a5 !important;
}

.hunter-chart-bar:hover,
.hunter-chart-bar.hovered {
  border: 2.5px solid #0f172a;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  transform: scaleY(1.15);
  z-index: 15;
}

[data-theme="dark"] .hunter-chart-bar:hover,
[data-theme="dark"] .hunter-chart-bar.hovered {
  border: 2px solid #ffffff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.85);
}

/* Split segments continuity (overnight wrap) */
.hunter-chart-bar.split-start {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.hunter-chart-bar.split-end {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.hunter-chart-bar.split-end:hover,
.hunter-chart-bar.split-end.hovered {
  border-right: none !important;
}

.hunter-chart-bar.split-start:hover,
.hunter-chart-bar.split-start.hovered {
  border-left: none !important;
}

/* Floating Tooltip (Clamped & Non-Clipping) */
.hunter-chart-tooltip {
  position: absolute;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  white-space: nowrap;
  z-index: 60;
  transition: opacity 0.15s ease;
  max-width: calc(100% - 20px);
}

[data-theme="dark"] .hunter-chart-tooltip {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.55);
}

.hunter-chart-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: calc(50% + var(--arrow-offset, 0px));
  transform: translateX(-50%);
  border-width: 5px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

[data-theme="dark"] .hunter-chart-tooltip::after {
  border-color: #ffffff transparent transparent transparent;
}

.hunter-chart-tooltip.tooltip-bottom::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent #0f172a transparent;
}

[data-theme="dark"] .hunter-chart-tooltip.tooltip-bottom::after {
  border-color: transparent transparent #ffffff transparent;
}

/* Chart Footer & Legend */
.hunter-chart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-color);
  flex-wrap: wrap;
}

[data-theme="dark"] .hunter-chart-footer {
  border-top-color: rgba(255, 255, 255, 0.06);
}

.hunter-chart-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hunter-chart-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  flex-wrap: wrap;
}

.chart-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chart-legend-pill {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
}

.prog-a-pill {
  background: #10b981;
}

[data-theme="dark"] .prog-a-pill {
  background: #00c288;
}

.prog-b-pill {
  background: #0284c7;
}

[data-theme="dark"] .prog-b-pill {
  background: #00b4d8;
}

.prog-c-pill {
  background: #8b5cf6;
}

[data-theme="dark"] .prog-c-pill {
  background: #a855f7;
}

.prog-overflow-pill {
  background: repeating-linear-gradient(
    -45deg,
    #ef4444,
    #ef4444 3px,
    #b91c1c 3px,
    #b91c1c 6px
  );
  border: 1px dashed #fca5a5;
}

/* Program Breakdown Panel (Panel 1) */
.program-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.program-card {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  overflow: hidden;
}

.program-card.prog-a { border-color: var(--prog-a-border); }
.program-card.prog-b { border-color: var(--prog-b-border); }
.program-card.prog-c { border-color: var(--prog-c-border); }

.program-card-header {
  padding: 0.75rem 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.prog-a .program-card-header { background: var(--prog-a-bg); color: var(--primary-800); }
.prog-b .program-card-header { background: var(--prog-b-bg); color: var(--water-700); }
.prog-c .program-card-header { background: var(--prog-c-bg); color: var(--warning-700); }

[data-theme="dark"] .prog-a .program-card-header { color: var(--primary-200); }
[data-theme="dark"] .prog-b .program-card-header { color: #7dd3fc; }
[data-theme="dark"] .prog-c .program-card-header { color: #fde68a; }

.program-starts-list {
  padding: 0.75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.start-entry {
  font-size: 0.86rem;
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  line-height: 1.45;
}

.start-slot-badge {
  font-family: var(--font-mono);
  font-weight: 700;
  background: var(--gray-100);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.8rem;
  flex-shrink: 0;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

[data-theme="dark"] .start-slot-badge {
  background: var(--gray-800);
}

.start-time-text {
  font-weight: 700;
  color: var(--text-main);
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.start-time-text svg {
  width: 14px;
  height: 14px;
  color: var(--primary-600);
  flex-shrink: 0;
}

[data-theme="dark"] .start-time-text svg {
  color: #00c288;
}

.start-zones-desc {
  color: var(--text-main);
}

/* Sequential sequence chain */
.seq-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.seq-node {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.15rem 0.45rem;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.seq-arrow {
  color: var(--text-light);
  font-size: 0.75rem;
}

.program-zones-summary {
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.02);
  font-size: 0.8rem;
}

.summary-title {
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

.zone-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.zone-chip-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.76rem;
}

/* Controller Output Panel (Panel 2) */
.controller-section-heading {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.45rem;
}

.controller-output-box {
  background: #0f172a;
  color: #f8fafc;
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.80rem;
  line-height: 1.45;
  white-space: pre;
  user-select: text;
  max-height: none;
  overflow-y: visible;
  overflow-x: auto;
  border: 1px solid #334155;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .controller-output-box {
  background: #090d16;
  border-color: #1e293b;
}

.copy-toolbar {
  margin-top: 1rem;
}

.copy-toolbar-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.copy-toolbar-actions .btn {
  flex: 1 1 140px;
  justify-content: center;
  font-size: 0.84rem;
  padding: 0.6rem 0.75rem;
}

/* Visual Controller LCD / Rotary Simulator */
.controller-guide-section {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-top: 0;
  box-shadow: var(--shadow-sm);
}

.guide-step-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.guide-step-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
}

.guide-step-header {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.4rem;
}

.guide-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--primary-600);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-bottom: 0;
}

.guide-step-header h4 {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0;
  line-height: 1.2;
}

.guide-step-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--gray-900);
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.88rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  pointer-events: auto;
  animation: slideUp 0.25s ease-out forwards;
}

.toast.toast-success {
  background: #065f46;
  border-left: 4px solid #10b981;
}

.toast.toast-error {
  background: #7f1d1d;
  border-left: 4px solid #ef4444;
}

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

/* Modal Backdrop & Dialog */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.94);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.is-open .modal-dialog {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card-header);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
}

.modal-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ef4444;
}

.btn-close-modal {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-close-modal:hover {
  background: var(--gray-100);
  color: var(--text-main);
}

.modal-body {
  padding: 1.25rem;
}

.donate-intro {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.donate-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.donate-item {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.9rem;
  transition: var(--transition);
}

.donate-item:hover {
  border-color: var(--primary-300);
}

.donate-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.donate-method {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--text-main);
}

.badge-crypto {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--primary-100);
  color: var(--primary-800);
  text-transform: uppercase;
}

.donate-item-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-qr-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.btn-qr-toggle:hover {
  background: var(--primary-50);
  border-color: var(--primary-400);
  color: var(--primary-700);
}

.btn-qr-toggle.is-active {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: #ffffff;
}

.btn-copy-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition);
}

.btn-copy-mini:hover {
  background: var(--primary-50);
  border-color: var(--primary-400);
  color: var(--primary-700);
}

.btn-copy-mini.copied {
  background: #065f46;
  border-color: #10b981;
  color: #ffffff;
}

.donate-value {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  word-break: break-all;
  user-select: all;
}

.donate-value.mono {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
}

.donate-qr-box {
  margin-top: 0.75rem;
  padding: 0.85rem;
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  animation: slideUp 0.2s ease-out;
}

.donate-qr-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.donate-qr-wrapper .qr-svg-code {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.donate-qr-hint {
  margin-top: 0.5rem;
  font-size: 0.74rem;
  color: #64748b;
  text-align: center;
  font-weight: 500;
}

/* SEO FAQ & Models Reference Section */
.seo-info-section {
  margin-top: 1.5rem;
}

.seo-faq-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
}

.faq-item {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--primary-300);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  list-style: none;
  user-select: none;
  transition: var(--transition);
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-question:hover {
  color: var(--primary-600);
}

.faq-icon {
  color: var(--text-muted);
  transition: transform 0.2s ease;
  flex-shrink: 0;
  margin-left: 0.5rem;
}

.faq-item[open] .faq-icon {
  transform: rotate(180deg);
  color: var(--primary-600);
}

.faq-answer {
  padding: 0 1.1rem 1rem 1.1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.faq-item[open] .faq-answer {
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
}

.seo-models-list {
  margin: 0.5rem 0 0 1.25rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.seo-models-list li {
  font-size: 0.86rem;
}

/* Print stylesheet */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
  }

  .header,
  .form-card,
  .presets-bar,
  .header-actions,
  .copy-toolbar button,
  .btn-action,
  .toast-container {
    display: none !important;
  }

  .main-wrapper {
    display: block !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .card {
    border: 1px solid #cccccc !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin-bottom: 1.5rem !important;
  }

  .controller-output-box {
    background: #ffffff !important;
    color: #000000 !important;
    border: 1px solid #000000 !important;
    max-height: none !important;
  }
}
