/* MSP Automation Portal — Shared Design System */
/* Cloud Magic Software Group */

body {
  background: #0F172A;
  color-scheme: dark;
}

/* ===== Glass Panels ===== */
.glass-panel {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.glass-panel:hover { border-color: rgba(99, 102, 241, 0.3); }

.gradient-border {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(6, 182, 212, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.2);
}

/* ===== Text ===== */
.text-gradient {
  background: linear-gradient(135deg, #6366F1, #7C3AED, #EC4899);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ===== Buttons ===== */
.btn-primary {
  background: linear-gradient(135deg, #6366F1, #4F46E5);
  transition: all 0.2s;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}
.btn-primary:disabled { opacity: 0.5; transform: none; box-shadow: none; cursor: not-allowed; }

.btn-danger {
  background: linear-gradient(135deg, #EF4444, #DC2626);
  transition: all 0.2s;
}
.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(239, 68, 68, 0.35);
}

.btn-social {
  background: linear-gradient(135deg, #8B5CF6, #6366F1);
  transition: all 0.2s;
}
.btn-social:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.35);
}
.btn-social:disabled { opacity: 0.5; transform: none; box-shadow: none; cursor: not-allowed; }

.btn-ai {
  background: linear-gradient(135deg, #06B6D4, #0891B2);
  transition: all 0.2s;
}
.btn-ai:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.35);
}
.btn-ai:disabled { opacity: 0.5; transform: none; box-shadow: none; cursor: not-allowed; }

.btn-amber {
  background: linear-gradient(135deg, #F59E0B, #D97706);
  transition: all 0.2s;
}
.btn-amber:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
}
.btn-amber:disabled { opacity: 0.5; transform: none; box-shadow: none; cursor: not-allowed; }

.btn-emerald {
  background: linear-gradient(135deg, #10B981, #059669);
  transition: all 0.2s;
}
.btn-emerald:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(16, 185, 129, 0.35);
}
.btn-emerald:disabled { opacity: 0.5; transform: none; box-shadow: none; cursor: not-allowed; }

/* ===== Form Inputs ===== */
input, select, textarea {
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #F8FAFC !important;
  color-scheme: dark;
  transition: border-color 0.2s;
}
input:focus, select:focus, textarea:focus {
  border-color: #6366F1 !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}
input::placeholder, textarea::placeholder { color: #64748B; }

/* Fix select dropdown options in dark mode */
select option {
  background: #1E293B;
  color: #F8FAFC;
}

/* File inputs */
input[type="file"] {
  padding: 0.5rem !important;
}
input[type="file"]::file-selector-button {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  color: #F8FAFC;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.75rem;
  margin-right: 0.5rem;
  transition: all 0.15s;
}
input[type="file"]::file-selector-button:hover {
  background: rgba(99, 102, 241, 0.25);
}

/* ===== Tabs ===== */
.tab-active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.1));
  border-color: #6366F1;
  color: #F8FAFC;
}
.tab-inactive { border-color: transparent; color: #94A3B8; }
.tab-inactive:hover { color: #CBD5E1; border-color: rgba(255, 255, 255, 0.1); }

/* ===== Platform Chips ===== */
.platform-chip {
  transition: all 0.15s;
  cursor: pointer;
  user-select: none;
}
.platform-chip.selected {
  border-color: #6366F1;
  background: rgba(99, 102, 241, 0.15);
  color: #F8FAFC;
}
.platform-chip:not(.selected) {
  border-color: rgba(255, 255, 255, 0.08);
  color: #64748B;
}
.platform-chip:hover:not(.selected) {
  border-color: rgba(255, 255, 255, 0.2);
  color: #94A3B8;
}

/* ===== Animations ===== */
.status-dot { animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { animation: spin 1s linear infinite; }

/* ===== Response Panel ===== */
.response-panel { max-height: 0; overflow: hidden; transition: max-height 0.5s ease-out, opacity 0.3s; opacity: 0; }
.response-panel.show { max-height: 2000px; opacity: 1; }
pre { white-space: pre-wrap; word-break: break-word; }

/* ===== AI Output ===== */
.ai-output {
  background: rgba(6, 182, 212, 0.05);
  border: 1px solid rgba(6, 182, 212, 0.15);
}

/* ===== Character Count ===== */
.char-count { transition: color 0.2s; }
.char-count.warn { color: #F59E0B; }
.char-count.over { color: #EF4444; }

/* ===== Form Section Headers ===== */
.form-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 1rem;
}
.form-section-header .step-num {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.2);
  border: 1px solid rgba(99, 102, 241, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #6366F1;
}

/* ===== Save Status Banner ===== */
.save-banner {
  transition: all 0.3s ease;
  overflow: hidden;
}
.save-banner.show {
  max-height: 3rem;
  opacity: 1;
}
.save-banner:not(.show) {
  max-height: 0;
  opacity: 0;
}
