* { box-sizing: border-box; }

body { 
  margin: 0; 
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Arial, sans-serif;
  background: #0a0e27;
  min-height: 100vh;
  padding: 20px;
}

/* PIN overlay */
.pin-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 39, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.pin-box {
  background: linear-gradient(135deg, #1e293b 0%, #1a1f3a 100%);
  border-radius: 16px;
  padding: 40px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  text-align: center;
  min-width: 280px;
}

.pin-box h2 {
  margin: 0 0 24px;
  color: #e0e7ff;
  font-size: 20px;
}

.pin-box input[type="password"] {
  width: 100%;
  padding: 14px 18px;
  font-size: 18px;
  text-align: center;
  letter-spacing: 6px;
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  background: #0f1629;
  color: #e0e7ff;
  margin-bottom: 12px;
}

.pin-box input:focus {
  outline: none;
  border-color: #6366f1;
}

.pin-box .pin-error {
  color: #f87171;
  margin: 0 0 12px;
  font-size: 14px;
}

.pin-box button {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

.pin-box button:hover {
  opacity: 0.95;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  background: #1a1f3a;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 100px rgba(99, 102, 241, 0.1);
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.header {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  color: white;
  padding: 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="40" height="40" patternUnits="userSpaceOnUse"><path d="M 40 0 L 0 0 0 40" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)" /></svg>');
  opacity: 0.3;
}

.header h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header p {
  margin: 10px 0 0;
  opacity: 0.95;
  font-size: 15px;
  position: relative;
  z-index: 1;
}

#map { 
  height: 60vh; 
  min-height: 400px;
  position: relative;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.panel { 
  padding: 24px;
  background: #0f1629;
}

/* ============================================ */
/* Section Cards */
/* ============================================ */
.section-card {
  background: linear-gradient(135deg, #1e293b 0%, #1a1f3a 100%);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(99, 102, 241, 0.2);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.section-header h2 {
  margin: 0;
  color: #e0e7ff;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-header {
  padding: 6px 12px;
  font-size: 12px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-header:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.section-hint {
  font-size: 12px;
  color: #9ca3af;
  margin: -8px 0 12px 0;
  font-style: italic;
}

.current-zone-display {
  background: rgba(99, 102, 241, 0.1);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  padding: 14px 16px;
  color: #e0e7ff;
  font-size: 14px;
  min-height: 50px;
  display: flex;
  align-items: center;
}

.points-list-container {
  margin-top: 16px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 8px;
  padding: 12px;
}

.points-header {
  font-weight: 600;
  color: #e0e7ff;
  margin-bottom: 8px;
  font-size: 13px;
}

/* ============================================ */
/* Badges */
/* ============================================ */
.badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: #10b981;
  color: white;
}

.badge-info {
  background: #06b6d4;
  color: white;
}

/* ============================================ */
/* Auto-load Button */
/* ============================================ */
.btn-autoload {
  background: #374151;
  color: #9ca3af;
  font-size: 16px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-autoload:hover {
  background: #4b5563;
  color: #d1d5db;
}

.btn-autoload-active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  font-size: 18px;
  width: 32px;
  height: 32px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.btn-autoload-active:hover {
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.7);
  transform: scale(1.05);
}

.btn-select.selected {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.5);
}

/* ============================================ */
/* Enhanced Group Actions */
/* ============================================ */
.btn-show {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.btn-show:hover {
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-hide {
  background: #6b7280;
  color: white;
}

.btn-hide:hover {
  background: #4b5563;
}

.btn-edit {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
}

.btn-edit:hover {
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

/* ============================================ */

.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  color: #e0e7ff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

input, select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  font-size: 14px;
  transition: all 0.3s;
  background: #1a1f3a;
  color: #e0e7ff;
  font-family: inherit;
}

select {
  cursor: pointer;
}

input:focus, select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  background: #1f2542;
}

input::placeholder {
  color: #6b7280;
}

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

.button-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

button {
  padding: 14px 28px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

button:hover::before {
  width: 300px;
  height: 300px;
}

#btnLocate {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
}

#btnLocate:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

#btnUndo {
  background: #374151;
  color: #e0e7ff;
}

#btnUndo:hover {
  background: #4b5563;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(75, 85, 99, 0.3);
}

#btnClear {
  background: #991b1b;
  color: #fecaca;
}

#btnClear:hover {
  background: #dc2626;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

#btnSend {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  font-weight: 700;
}

#btnSend:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

#btnSend:disabled {
  background: #374151;
  color: #6b7280;
  cursor: not-allowed;
  opacity: 0.6;
}

#btnSend:disabled:hover {
  transform: none;
  box-shadow: none;
}

button:active {
  transform: translateY(0);
}

.info-box {
  background: linear-gradient(135deg, #1e293b 0%, #1a1f3a 100%);
  padding: 20px 24px;
  border-radius: 12px;
  margin-bottom: 28px;
  border-left: 4px solid #6366f1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.info-box p {
  margin: 0;
  color: #e0e7ff;
  line-height: 1.7;
  font-size: 14px;
}

.count {
  display: inline-block;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
  padding: 4px 14px;
  border-radius: 14px;
  font-weight: 700;
  margin: 0 4px;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.small {
  display: block;
  margin-top: 10px;
  font-size: 12px;
  color: #9ca3af;
  font-style: italic;
}

.data-section {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: linear-gradient(135deg, #1e293b 0%, #1a1f3a 100%);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.card h3 {
  margin: 0 0 18px;
  font-size: 17px;
  font-weight: 700;
  color: #e0e7ff;
  display: flex;
  align-items: center;
  gap: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card h3::before {
  content: '';
  width: 4px;
  height: 20px;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  border-radius: 2px;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px;
  margin-bottom: 10px;
  background: rgba(99, 102, 241, 0.05);
  border-radius: 8px;
  transition: all 0.3s;
  border: 1px solid rgba(99, 102, 241, 0.1);
}

li:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
  /* transform: translateX(4px); */
}

li span {
  color: #d1d5db;
  font-size: 13px;
  font-family: 'Courier New', monospace;
}

li button {
  padding: 8px 14px;
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid rgba(220, 38, 38, 0.3);
}

li button:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

/* ============================================ */
/* Enhanced Group List */
/* ============================================ */
#groupsList {
  max-height: 400px;
  overflow-y: auto;
}

#groupsList::-webkit-scrollbar {
  width: 8px;
}

#groupsList::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

#groupsList::-webkit-scrollbar-thumb {
  background: rgba(99, 102, 241, 0.3);
  border-radius: 4px;
}

#groupsList::-webkit-scrollbar-thumb:hover {
  background: rgba(99, 102, 241, 0.5);
}

#pointsList {
  max-height: 300px;
  overflow-y: auto;
}

pre {
  background: #0a0e27;
  color: #34d399;
  padding: 20px;
  border-radius: 10px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.6;
  max-height: 350px;
  margin: 0;
  font-family: 'Courier New', monospace;
  border: 1px solid rgba(52, 211, 153, 0.2);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  body {
    padding: 0;
  }

  .container {
    border-radius: 0;
  }

  .panel {
    padding: 20px;
  }

  .header {
    padding: 24px;
  }

  .header h1 {
    font-size: 24px;
  }

  .button-group {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
  
  .modal-content {
    min-width: auto;
    width: 90vw;
    padding: 20px;
  }
  
  .modal-title {
    font-size: 18px;
  }
  
  .color-picker-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
  }
  
  .color-picker-item {
    width: 40px;
    height: 40px;
  }
}

/* Custom select option separator styling */
option[disabled] {
  font-style: italic;
  color: #6b7280;
  background: #0f1629;
}

/* ============================================ */
/* Section Headers */
/* ============================================ */
.section-header {
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.section-header h2 {
  margin: 0;
  color: #e0e7ff;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================ */
/* Zone Info Display */
/* ============================================ */
.zone-info {
  background: rgba(99, 102, 241, 0.1);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  padding: 14px 16px;
  color: #e0e7ff;
  font-size: 14px;
  min-height: 50px;
  display: flex;
  align-items: center;
}

/* ============================================ */
/* Group List Styling */
/* ============================================ */
.selected-group {
  border: 2px solid #10b981 !important;
  background: rgba(16, 185, 129, 0.1) !important;
}

.group-info {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.group-color {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.group-details {
  flex: 1;
}

.group-name {
  font-weight: 600;
  color: #e0e7ff;
  font-size: 14px;
  margin-bottom: 4px;
}

.group-meta {
  font-size: 12px;
  color: #9ca3af;
  font-family: 'Courier New', monospace;
}

.group-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-small {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-select {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.btn-select:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-load {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
}

.btn-load:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-delete {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 6px 10px;
}

.btn-delete:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

.card-subtitle {
  margin: -10px 0 15px 0;
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.6;
}

.small-hint {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: #6b7280;
  font-style: italic;
}

/* ============================================ */
/* Notification System */
/* ============================================ */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 16px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 10000;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.notification.show {
  opacity: 1;
  transform: translateY(0);
}

.notification-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.notification-error {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.notification-info {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
}

/* ============================================ */
/* Custom Marker Styling */
/* ============================================ */
.numbered-marker {
  background: transparent !important;
  border: none !important;
}

.moving-zone-marker {
  background: transparent !important;
  border: none !important;
  cursor: move !important;
}

.moving-zone-container {
  display: flex;
  align-items: center;
  gap: 8px;
  animation: pulse 2s infinite;
}

.moving-zone-label {
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  border: 2px solid white;
  white-space: nowrap;
  flex-shrink: 0;
}

.moving-zone-buttons {
  display: flex;
  gap: 4px;
}

.move-confirm-btn,
.move-cancel-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  pointer-events: auto;
  z-index: 1000;
}

.move-confirm-btn {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.move-confirm-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.5);
}

.move-cancel-btn {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.move-cancel-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.5);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

.delete-point-btn {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(220, 38, 38, 0.3);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.delete-point-btn:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
}

.delete-btn {
  padding: 6px 12px !important;
  font-size: 12px !important;
}

/* ============================================ */
/* Enhanced List Items for Groups */
/* ============================================ */
#groupsList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  gap: 12px;
}

#groupsList li:hover {
  transform: translateX(0);
}

/* ============================================ */
/* Zone Tooltips */
/* ============================================ */
.zone-tooltip {
  background: rgba(26, 31, 58, 0.95) !important;
  border: 2px solid rgba(99, 102, 241, 0.4) !important;
  border-radius: 8px !important;
  padding: 8px 12px !important;
  color: #e0e7ff !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}

.zone-tooltip:before {
  border-top-color: rgba(99, 102, 241, 0.4) !important;
}

/* ============================================ */
/* Modal Dialog System */
/* ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.show {
  opacity: 1;
}

.modal-overlay.modal-closing {
  opacity: 0;
}

.modal-content {
  background: linear-gradient(135deg, #1a1f3a 0%, #0f1629 100%);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 16px;
  padding: 28px;
  min-width: 400px;
  max-width: 90vw;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.show .modal-content {
  transform: scale(1);
}

/* ============================================ */
/* Zone Actions Modal */
/* ============================================ */
.zone-actions-content {
  min-width: 500px;
  padding: 0;
  overflow: hidden;
}

.zone-actions-header {
  background: linear-gradient(135deg, #1e293b 0%, #1a1f3a 100%);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.zone-color-badge {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  flex-shrink: 0;
}

.zone-name-section {
  flex: 1;
}

.zone-name-input {
  width: 100%;
  background: rgba(99, 102, 241, 0.1);
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  padding: 10px 12px;
  color: #e0e7ff;
  font-size: 18px;
  font-weight: 700;
  font-family: inherit;
  transition: all 0.3s;
  margin-bottom: 6px;
}

.zone-name-input:focus {
  outline: none;
  border-color: #6366f1;
  background: rgba(99, 102, 241, 0.15);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.zone-meta {
  font-size: 12px;
  color: #9ca3af;
  font-family: 'Courier New', monospace;
}

.zone-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 24px;
}

.zone-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  background: linear-gradient(135deg, #1e293b 0%, #1a1f3a 100%);
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: inherit;
}

.zone-action-btn:hover {
  background: linear-gradient(135deg, #2d3b52 0%, #242949 100%);
  border-color: rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.zone-action-btn .action-icon {
  font-size: 32px;
  line-height: 1;
}

.zone-action-btn .action-label {
  font-size: 13px;
  font-weight: 600;
  color: #d1d5db;
}

.zone-action-primary {
  border-color: rgba(99, 102, 241, 0.5);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
}

.zone-action-primary:hover {
  border-color: #6366f1;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.3);
}

.zone-action-primary .action-label {
  color: #e0e7ff;
}

.zone-action-danger {
  border-color: rgba(239, 68, 68, 0.3);
}

.zone-action-danger:hover {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.2);
}

.zone-action-cancel {
  border-color: rgba(107, 114, 128, 0.3);
}

.zone-action-cancel:hover {
  border-color: rgba(107, 114, 128, 0.5);
}

.zone-action-cancel .action-label {
  color: #9ca3af;
}

/* ============================================ */

.modal-title {
  margin: 0 0 16px 0;
  color: #e0e7ff;
  font-size: 20px;
  font-weight: 700;
  border-bottom: 2px solid rgba(99, 102, 241, 0.2);
  padding-bottom: 12px;
}

.modal-message {
  color: #d1d5db;
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 20px;
  white-space: pre-line;
}

.modal-input {
  width: 100%;
  padding: 12px 16px;
  background: #0a0e27;
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 8px;
  color: #e0e7ff;
  font-size: 14px;
  font-family: inherit;
  margin-bottom: 20px;
  transition: all 0.3s;
}

.modal-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.modal-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  background: #374151;
  color: #e0e7ff;
}

.modal-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.modal-btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
}

.modal-btn-primary:hover {
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.modal-btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
}

.modal-btn-danger:hover {
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

/* ============================================ */
/* Color Picker */
/* ============================================ */
.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.color-picker-item {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.color-picker-item:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
}

.color-picker-item.selected {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5), 0 4px 16px rgba(0, 0, 0, 0.5);
  transform: scale(1.1);
}

/* ============================================ */
/* Tom Select Dark Theme Customization */
/* ============================================ */

/* Main control wrapper */
.ts-wrapper {
  width: 100%;
}
.form-select .item {
  position: absolute;
  top: 15px;
  right: 20px;
  color: #fff;
  font-weight: bold;
}
.ts-wrapper.form-select .ts-control {
  background: #1a1f3a;
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  padding: 14px 16px;
  color: #e0e7ff;
  font-size: 14px;
  min-height: 50px;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
}

/* When item is selected, control should show it properly */
.ts-wrapper.form-select.single.input-hidden .ts-control {
  display: flex;
  align-items: center;
}

/* Focused state */
.ts-wrapper.form-select.focus .ts-control,
.ts-wrapper.form-select.dropdown-active .ts-control {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  background: #1f2542;
}

/* Single select - selected item styling */
.ts-wrapper.form-select .ts-control .item,
.ts-wrapper.single .ts-control .item {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #e0e7ff !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  box-shadow: none !important;
  display: inline-block !important;
  position: relative !important;
  z-index: 10 !important;
}

.ts-wrapper.form-select .ts-control .item div,
.ts-wrapper.form-select .ts-control .item span,
.ts-wrapper.single .ts-control .item div,
.ts-wrapper.single .ts-control .item span,
.ts-wrapper.form-select .ts-control .item .ts-control-item,
.ts-wrapper.single .ts-control .item .ts-control-item {
  display: inline !important;
  color: #e0e7ff !important;
  background: transparent !important;
}

/* Force color on the item text */
.ts-wrapper.form-select .ts-control .item,
.ts-wrapper.form-select .item {
  color: #e0e7ff !important;
  background: transparent !important;
}

/* Override any default Tom Select item styles */
.ts-wrapper .ts-control .item {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #e0e7ff !important;
}

/* Hide the input when item is selected */
.ts-wrapper.single.input-hidden .ts-control input {
  opacity: 0 !important;
  position: absolute !important;
  left: -10000px !important;
  width: 0 !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  pointer-events: none !important;
}

/* Show selected item properly when input is hidden */
.ts-wrapper.single.input-hidden .ts-control .item {
  position: relative !important;
  opacity: 1 !important;
  display: inline-block !important;
  visibility: visible !important;
  z-index: 10 !important;
}

/* Position the selected item properly */
span.ts-control-item.item {
  position: absolute;
  bottom: -23px;
  left: 5px;
}

/* Input field when typing */
.ts-wrapper.single .ts-control input {
  color: #e0e7ff !important;
  background: transparent !important;
  border: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 14px;
  line-height: 1.5;
  width: 100%;
}

.ts-wrapper.single.input-active .ts-control input {
  opacity: 1 !important;
  position: static !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
}

/* Hide placeholder when item is selected */
.ts-wrapper.single.input-hidden .ts-control input::placeholder {
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Hide item when typing */
.ts-wrapper.single.input-active .ts-control .item {
  display: none !important;
}

/* Input placeholder */
.ts-wrapper .ts-control input::placeholder {
  color: #6b7280;
}

/* Dropdown arrow */
.ts-wrapper.single .ts-control::after {
  border-color: #9ca3af transparent transparent transparent;
  right: 16px;
  margin-top: 0;
  position: absolute;
}

.ts-wrapper.single.dropdown-active .ts-control::after {
  border-color: transparent transparent #9ca3af transparent;
  margin-top: -4px;
}

/* Dropdown menu */
.ts-wrapper .ts-dropdown {
  background: #1a1f3a;
  border: 2px solid rgba(99, 102, 241, 0.3);
  border-radius: 10px;
  margin-top: 4px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.ts-dropdown .ts-dropdown-content {
  max-height: 300px;
  background: #1a1f3a;
}

/* Dropdown options */
.ts-dropdown .option {
  color: #e0e7ff;
  padding: 10px 16px;
  transition: all 0.2s;
  cursor: pointer;
}

.ts-dropdown .option:hover,
.ts-dropdown .option.active {
  background: rgba(99, 102, 241, 0.2);
  color: #ffffff;
}

.ts-dropdown .option.selected {
  background: rgba(99, 102, 241, 0.3);
  color: #ffffff;
}

/* Disabled separator options */
.ts-dropdown .option[data-selectable].disabled {
  color: #6b7280;
  font-style: italic;
  background: transparent;
  cursor: default;
  pointer-events: none;
}

/* No results message */
.ts-dropdown .no-results {
  color: #9ca3af;
  padding: 16px;
  text-align: center;
}

/* Optgroup headers (if used) */
.ts-dropdown .optgroup-header {
  background: #0f1629;
  color: #9ca3af;
  padding: 8px 16px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}
