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

:root {
  --bg-color: #0c0f16;
  --bg-gradient: radial-gradient(circle at top right, #1a1525 0%, #0c0f16 100%);
  --surface-card: rgba(23, 29, 40, 0.65);
  --surface-card-hover: rgba(28, 36, 48, 0.85);
  --border-color: rgba(255, 255, 255, 0.05);
  --border-color-focus: rgba(255, 107, 0, 0.5);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent-color: #ff6b00;
  --accent-hover: #e05e00;
  --accent-glow: rgba(255, 107, 0, 0.25);
  --success-color: #10b981;
  --error-color: #ef4444;
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  background-image: var(--bg-gradient);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
}

/* Glassmorphism styling helper */
.glass {
  background: var(--surface-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
  transition: var(--transition-smooth);
}

.glass:hover {
  border-color: rgba(255, 255, 255, 0.1);
}

/* Auth Container */
#auth-container {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  text-align: center;
}

.brand-header {
  margin-bottom: 30px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff8c3a 100%);
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-title);
  box-shadow: 0 0 20px var(--accent-glow);
  margin-bottom: 15px;
}

h1 {
  font-family: var(--font-title);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 6px;
}

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

label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.input-wrapper {
  position: relative;
}

input, textarea, select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(12, 15, 22, 0.6);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: var(--transition-smooth);
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 12px var(--accent-glow);
  background: rgba(12, 15, 22, 0.8);
}

select option {
  background-color: #171d28;
  color: #f1f5f9;
}

textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

/* Button UI */
.btn-primary {
  width: 100%;
  padding: 14px;
  background: var(--accent-color);
  border: none;
  border-radius: 10px;
  color: #ffffff;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 4px 15px var(--accent-glow);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
  transform: translateY(-1px);
}

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

.btn-primary:disabled {
  background: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}

.btn-secondary {
  padding: 10px 20px;
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.03);
}

/* Dashboard UI Layout */
#dashboard-view {
  width: 96vw;
  max-width: 1720px;
  height: 94vh;
  min-height: 750px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#dashboard-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

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

.header-left {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-color) 0%, #ff8c3a 100%);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px var(--accent-glow);
}

.header-title-text h2 {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-badge {
  font-size: 13px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid var(--border-color);
}

.dashboard-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* Sidebar Navigation */
.sidebar {
  width: 250px;
  border-right: 1px solid var(--border-color);
  padding: 20px 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.nav-item:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.02);
}

.nav-item.active {
  color: var(--text-primary);
  background: rgba(255, 107, 0, 0.1);
  border-left: 3px solid var(--accent-color);
  padding-left: 13px;
}

/* Main Content Area */
.content-area {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.section-title {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 5px;
}

.settings-card {
  padding: 24px;
  margin-bottom: 20px;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 768px) {
  .settings-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.settings-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.settings-info {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Alerts and Notifications */
.notification {
  position: fixed;
  bottom: 25px;
  right: 25px;
  padding: 15px 25px;
  border-radius: 8px;
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition-smooth);
  z-index: 1000;
}

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

.notification.success {
  background: var(--success-color);
  border-left: 4px solid #059669;
}

.notification.error {
  background: var(--error-color);
  border-left: 4px solid #dc2626;
}

/* Utility visibility helper */
.hidden {
  display: none !important;
}

/* Loaders */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.1);
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border-left-color: #fff;
  animation: spin 1s linear infinite;
  display: inline-block;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Scrollbar customizations */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-color);
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Modal Overlays & Cards */
/* Hide Vue templates before compilation */
[v-cloak] {
  display: none !important;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(12, 15, 22, 0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.2s ease-out;
}

.modal-card {
  max-width: 550px;
  width: 85%;
  padding: 30px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  animation: slideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Scraper Grid Elements */
.scraper-card {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: rgba(23, 29, 40, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: var(--transition-smooth);
}

.scraper-card:hover {
  background: rgba(23, 29, 40, 0.65);
  border-color: rgba(255, 107, 0, 0.2);
}

.scraper-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  padding-bottom: 10px;
}

.scraper-card-header h4 {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
}

.status-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.success {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.failed {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.pending {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.status-badge.running {
  background: rgba(255, 107, 0, 0.15);
  color: #ffa366;
  border: 1px solid rgba(255, 107, 0, 0.3);
  animation: pulse 1.5s infinite;
}

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

.scraper-card-body {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.scraper-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

/* PrimeVue Overrides for Premium Dark Mode */
.p-multiselect {
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
  border-radius: 6px !important;
  padding: 2px 8px !important;
  align-items: center !important;
}
.p-multiselect:hover {
  border-color: var(--accent-color) !important;
}
.p-multiselect-panel {
  background: #171d28 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5) !important;
  color: #f1f5f9 !important;
}
.p-multiselect-option {
  color: #cbd5e1 !important;
  padding: 8px 12px !important;
  cursor: pointer !important;
}
.p-multiselect-option:hover, .p-multiselect-option.p-highlight {
  background: rgba(255, 107, 0, 0.15) !important;
  color: #fff !important;
}
.p-multiselect-filter-input {
  background: rgba(0, 0, 0, 0.3) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}
.p-chip {
  background: rgba(255, 107, 0, 0.15) !important;
  color: var(--accent-color) !important;
  border: 1px solid rgba(255, 107, 0, 0.3) !important;
  font-size: 11px !important;
  padding: 2px 6px !important;
  border-radius: 4px !important;
}
.p-toast {
  z-index: 9999 !important;
}
.p-confirmdialog .p-dialog-content {
  background: #171d28 !important;
  color: #f1f5f9 !important;
}

@keyframes borderPulse {
  0% { border-color: rgba(255, 107, 0, 0.4); box-shadow: 0 0 5px rgba(255, 107, 0, 0.1); }
  50% { border-color: rgba(255, 107, 0, 1); box-shadow: 0 0 15px rgba(255, 107, 0, 0.3); }
  100% { border-color: rgba(255, 107, 0, 0.4); box-shadow: 0 0 5px rgba(255, 107, 0, 0.1); }
}

@keyframes pulseGlow {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; box-shadow: 0 0 8px var(--accent-color); }
  100% { transform: scale(0.9); opacity: 0.6; }
}


