/* Auto-Gox Modern Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
  /* Colors */
  --bg-primary: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  
  /* Gradients */
  --grad-primary: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  --grad-secondary: linear-gradient(135deg, #0ea5e9 0%, #0369a1 100%);
  --grad-success: linear-gradient(135deg, #10b981 0%, #047857 100%);
  --grad-warning: linear-gradient(135deg, #f59e0b 0%, #b45309 100%);
  --grad-danger: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  --grad-purple: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  --grad-neutral: linear-gradient(135deg, #64748b 0%, #475569 100%);
  
  /* Priority Colors */
  --color-low: #10b981;
  --color-medium: #3b82f6;
  --color-high: #f59e0b;
  --color-urgent: #ef4444;

  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.04), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --shadow-premium: 0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.15);

  /* Borders & Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
  padding-bottom: 80px;
}

h1, h2, h3, h4 {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header Styles */
header {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo svg {
  width: 32px;
  height: 32px;
  stroke: url(#blue-grad);
}

.btn-header-support {
  background-color: transparent;
  border: 1px solid #3b82f6;
  color: #2563eb;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-header-support:hover {
  background-color: #eff6ff;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
}

/* Computer Info section */
.sys-info-section {
  margin-top: 40px;
}

.section-title {
  font-size: 22px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-main);
}

.section-title span.badge {
  font-size: 12px;
  padding: 4px 10px;
  background-color: #dbeafe;
  color: #1e40af;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.sys-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.info-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--grad-primary);
}

.info-card.lan::before {
  background: var(--grad-secondary);
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-premium);
  border-color: #cbd5e1;
}

.info-card-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-card-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-card-value {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  font-family: monospace;
}

.info-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #16a34a;
  background-color: #f0fdf4;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.status-dot {
  width: 8px;
  height: 8px;
  background-color: #22c55e;
  border-radius: 50%;
  position: relative;
}

.status-dot::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background-color: #22c55e;
  border-radius: 50%;
  opacity: 0.4;
  animation: pulse 1.8s infinite;
}

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

.btn-copy:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
  border-color: #cbd5e1;
}

/* Big Action Buttons */
.installer-section {
  margin-top: 48px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.action-btn-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: relative;
}

.action-btn-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-premium), var(--shadow-glow);
  border-color: #93c5fd;
}

.action-btn-card.active {
  border-color: #3b82f6;
  background-color: #f8fafc;
  box-shadow: var(--shadow-premium), var(--shadow-glow);
}

.action-btn-card.active::after {
  content: '✓ Selected';
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  background: var(--grad-primary);
  color: white;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 500;
}

.action-icon-wrapper {
  width: 68px;
  height: 68px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: var(--transition-smooth);
}

.action-btn-card:nth-child(1) .action-icon-wrapper {
  background: var(--grad-primary);
}

.action-btn-card:nth-child(2) .action-icon-wrapper {
  background: var(--grad-secondary);
}

.action-btn-card:nth-child(3) .action-icon-wrapper {
  background: var(--grad-purple);
}

.action-btn-card:hover .action-icon-wrapper {
  transform: scale(1.1) rotate(3deg);
}

.action-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.action-desc {
  font-size: 14px;
  color: var(--text-muted);
}

/* Form Container and Cards */
.forms-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 48px;
}

/* For Side by side view when multiple is active */
.forms-layout-double {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 30px;
}

.form-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  display: none;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: var(--transition-smooth);
}

.form-card.show {
  display: block;
}

.form-card-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-card-header svg {
  width: 24px;
  height: 24px;
  color: #3b82f6;
}

.form-card-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

/* Custom form elements */
.form-group {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-select, .form-input, .form-textarea {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: #f8fafc;
  color: var(--text-main);
  outline: none;
  transition: var(--transition-smooth);
  width: 100%;
}

.form-select:focus, .form-input:focus, .form-textarea:focus {
  border-color: #3b82f6;
  background-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* Custom dropdown printer suggestion cards */
.printer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  margin-top: 8px;
  background-color: #ffffff;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.printer-item:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.printer-item.selected {
  background-color: #eff6ff;
  border-color: #3b82f6;
}

.printer-details {
  display: flex;
  align-items: center;
  gap: 12px;
}

.printer-icon {
  background-color: #dbeafe;
  color: #1e40af;
  padding: 8px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
}

.printer-info {
  display: flex;
  flex-direction: column;
}

.printer-model {
  font-weight: 600;
  font-size: 14px;
}

.printer-meta {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
}

/* Submit Action Button */
.btn-submit-install {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: var(--grad-primary);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
}

.btn-submit-install:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-submit-install.install-scan {
  background: var(--grad-secondary);
}

.btn-submit-install.install-both {
  background: var(--grad-purple);
}

/* Config Scan Section (Toggles) */
.config-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  margin-bottom: 48px;
}

.toggle-group {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.toggle-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.toggle-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toggle-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
}

.toggle-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* iOS Toggle Switch Switch style */
.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 30px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .4s;
  border-radius: var(--radius-full);
}

.slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

input:checked + .slider {
  background-color: #22c55e;
}

input:focus + .slider {
  box-shadow: 0 0 1px #22c55e;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* Support Form Section */
.support-section {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

/* Custom Priority Buttons */
.priority-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.priority-option {
  position: relative;
  display: flex;
}

.priority-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.priority-label {
  width: 100%;
  text-align: center;
  padding: 12px 6px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.priority-label:hover {
  background-color: #f1f5f9;
}

/* Select states for priority */
.priority-option input:checked + .priority-label[for="prio-low"] {
  background-color: #ecfdf5;
  border-color: var(--color-low);
  color: #047857;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.priority-option input:checked + .priority-label[for="prio-medium"] {
  background-color: #eff6ff;
  border-color: var(--color-medium);
  color: #1d4ed8;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.priority-option input:checked + .priority-label[for="prio-high"] {
  background-color: #fffbeb;
  border-color: var(--color-high);
  color: #b45309;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

.priority-option input:checked + .priority-label[for="prio-urgent"] {
  background-color: #fef2f2;
  border-color: var(--color-urgent);
  color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1000;
}

.toast {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-left: 5px solid #3b82f6;
  box-shadow: var(--shadow-lg), 0 10px 30px rgba(0,0,0,0.08);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  min-width: 320px;
  max-width: 420px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: var(--transition-smooth);
}

.toast.success {
  border-left-color: #10b981;
}

.toast.warning {
  border-left-color: #f59e0b;
}

.toast.danger {
  border-left-color: #ef4444;
}

.toast-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast-message {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
}

.toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.toast-close:hover {
  color: var(--text-main);
}

/* Animations */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.6);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 0.4;
  }
}

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

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

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

.toast.fade-out {
  animation: fadeOut 0.3s forwards;
}

/* Loading animations */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* Grid helper for forms layout when they are side by side */
.forms-row {
  margin-top: 32px;
}

/* Device Selection custom view styling */
.device-select-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}

/* Footer style */
footer {
  margin-top: 60px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .header-wrapper {
    flex-direction: column;
    gap: 16px;
  }
  
  .sys-info-grid {
    grid-template-columns: 1fr;
  }
  
  .action-grid {
    grid-template-columns: 1fr;
  }
  
  .priority-selector {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-card {
    padding: 20px;
  }
}

/* Modal Styling */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 80vw;
  max-width: 80vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-premium), 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

.modal-title {
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition-smooth);
}

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

.modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
}

/* Checkbox selection grid style */
.modal-printers-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.printer-checkbox-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-smooth);
  background-color: var(--bg-card);
  user-select: none;
}

.printer-checkbox-item:hover {
  background-color: #f8fafc;
  border-color: #cbd5e1;
}

.printer-checkbox-item.selected {
  background-color: #eff6ff;
  border-color: #3b82f6;
}

.printer-checkbox-input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #3b82f6;
}

/* Progress logs box */
.progress-status-box {
  background-color: #0f172a;
  color: #38bdf8;
  font-family: monospace;
  padding: 14px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
  max-height: 150px;
  overflow-y: auto;
  border: 1px solid #1e293b;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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