/* UKTax Joint Filing Dashboard Stylesheet */

:root {
  --bg-color: #080911;
  --card-bg: rgba(18, 20, 38, 0.6);
  --card-border: rgba(255, 255, 255, 0.07);
  --text-primary: #f3f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  
  --primary: #3b82f6;
  --primary-glow: rgba(59, 130, 246, 0.35);
  --purple: #8b5cf6;
  --purple-glow: rgba(139, 92, 246, 0.35);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-glow: rgba(239, 68, 68, 0.2);
  
  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Glowing Background Effects */
.glow-bg {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  opacity: 0.15;
  pointer-events: none;
}
.glow-blue {
  background-color: var(--primary);
  top: -100px;
  right: -50px;
  animation: pulseGlow 12s infinite alternate;
}
.glow-purple {
  background-color: var(--purple);
  bottom: 10%;
  left: -150px;
  animation: pulseGlow 15s infinite alternate-reverse;
}

@keyframes pulseGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.12; }
  100% { transform: scale(1.2) translate(50px, 30px); opacity: 0.22; }
}

.container {
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header styling */
header {
  border-bottom: 1px solid var(--card-border);
  background-color: rgba(8, 9, 17, 0.85);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}
.logo {
  display: flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.logo-icon {
  color: var(--primary);
  margin-right: 10px;
  font-size: 22px;
}
.logo span span {
  color: var(--primary);
}
.user-profile {
  display: flex;
  align-items: center;
  gap: 16px;
}
.user-status {
  font-size: 14px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--card-border);
}

/* Cards & Layout */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
}
.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 12px;
}
.card-header h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Active Case Panel */
.active-case-card {
  margin-top: 32px;
  border-left: 4px solid var(--purple);
}
.case-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.case-header h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 6px 0;
  letter-spacing: -0.3px;
}
.case-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

/* Form Styles */
.form-section-title {
  font-family: var(--font-display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--purple);
  font-weight: 700;
  margin: 28px 0 16px 0;
  display: flex;
  align-items: center;
}
.form-section-title::after {
  content: '';
  flex-grow: 1;
  height: 1px;
  background: var(--card-border);
  margin-left: 12px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.form-control {
  width: 100%;
  background: rgba(8, 9, 17, 0.6);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  transition: var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
  background: rgba(8, 9, 17, 0.8);
}
textarea.form-control {
  resize: vertical;
}

.autosave-indicator {
  font-size: 12px;
  color: var(--success);
  background: rgba(16, 185, 129, 0.08);
  padding: 4px 10px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(16, 185, 129, 0.2);
  opacity: 0;
  transition: var(--transition);
}
.autosave-indicator.saving {
  opacity: 1;
  color: var(--warning);
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.2);
}
.autosave-indicator.saved {
  opacity: 1;
}

/* Dashboard Grid Layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
  align-items: start;
}
.submission-panel {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Button UI */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: 8px;
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  font-size: 14px;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--purple));
  color: white;
  box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}
.btn-primary:disabled {
  background: #27273a;
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.2);
}
.btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}
.btn-xs {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 6px;
}
.btn-lg {
  padding: 16px 32px;
  font-size: 16px;
  border-radius: 10px;
}
.btn-link {
  background: transparent;
  color: var(--primary);
  border: none;
  padding: 0;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}
.btn-link:hover {
  color: var(--purple);
}

.w-100 { width: 100%; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

/* Badges */
.badge {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border: 1px solid transparent;
}
.badge-indigo {
  background: rgba(99, 102, 241, 0.12);
  color: #818cf8;
  border-color: rgba(99, 102, 241, 0.25);
}
.badge-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
  border-color: var(--card-border);
}
.badge-success {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.25);
}
.badge-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.25);
}
.badge-danger {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.25);
}

/* Preflight Checklist */
.section-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: 20px;
}
.preflight-status-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.preflight-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: var(--transition);
}
.preflight-item.passed {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.03);
}
.preflight-item.failed {
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.03);
}
.preflight-item.warning {
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.03);
}
.status-icon {
  font-size: 18px;
  color: var(--text-muted);
}
.passed .status-icon { color: var(--success); }
.failed .status-icon { color: var(--danger); }
.warning .status-icon { color: var(--warning); }

.preflight-details h4 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 2px;
}
.preflight-details p {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Delay Selector (Timing Options) */
.delay-selector {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.delay-option {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: var(--transition);
}
.delay-option i {
  font-size: 20px;
  color: var(--text-secondary);
}
.delay-option div strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
}
.delay-option div span {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
  display: block;
}
.delay-option:hover {
  background: rgba(255, 255, 255, 0.05);
}
.delay-option.active {
  border-color: var(--primary);
  background: rgba(59, 130, 246, 0.06);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.15);
}
.delay-option.active i {
  color: var(--primary);
}

/* Timeline & Live Status Dashboard */
.overall-status-banner {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 13px;
  display: flex;
  justify-content: center;
}
.timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  padding-left: 20px;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 6px;
  width: 2px;
  height: calc(100% - 24px);
  background: var(--card-border);
}
.timeline-node {
  position: relative;
  display: flex;
  gap: 16px;
}
.node-icon {
  position: absolute;
  left: -27px;
  top: 0;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 3px solid var(--text-muted);
  z-index: 2;
  box-shadow: 0 0 0 4px var(--bg-color);
  transition: var(--transition);
}
.node-content {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  width: 100%;
  transition: var(--transition);
}
.node-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.node-header h4 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
}
.node-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}
.node-error {
  margin-top: 12px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 6px;
  padding: 10px;
  font-size: 12px;
  color: #f87171;
}
.node-receipt {
  margin-top: 12px;
  border-top: 1px solid var(--card-border);
  padding-top: 12px;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Timeline colors based on status */
.timeline-node.accepted .node-icon {
  border-color: var(--success);
  box-shadow: 0 0 10px var(--success), 0 0 0 4px var(--bg-color);
}
.timeline-node.rejected .node-icon,
.timeline-node.failed .node-icon {
  border-color: var(--danger);
  box-shadow: 0 0 10px var(--danger), 0 0 0 4px var(--bg-color);
}
.timeline-node.processing .node-icon,
.timeline-node.queued .node-icon {
  border-color: var(--warning);
  box-shadow: 0 0 10px var(--warning), 0 0 0 4px var(--bg-color);
  animation: pulseWarning 1.5s infinite alternate;
}

@keyframes pulseWarning {
  0% { transform: scale(1); }
  100% { transform: scale(1.15); }
}

/* Auth Mock Overlay Screen */
.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(8, 9, 17, 0.85);
  backdrop-filter: blur(15px);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}
.auth-card {
  background: rgba(18, 20, 38, 0.9);
  border: 1px solid var(--card-border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  border-radius: 20px;
  padding: 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
}
.auth-logo {
  font-size: 44px;
  color: var(--primary);
  margin-bottom: 20px;
}
.auth-card h2 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 6px;
}
.auth-card p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 30px;
}
.auth-card .form-group {
  text-align: left;
}

.hidden {
  display: none !important;
  opacity: 0;
  pointer-events: none;
}

/* Footer Styling */
footer {
  margin-top: auto;
  border-top: 1px solid var(--card-border);
  padding: 30px 0;
  background-color: rgba(8, 9, 17, 0.5);
}
.privacy-note {
  font-size: 12px;
  color: var(--text-secondary);
  max-width: 800px;
  margin: 0 auto 16px auto;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.02);
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--card-border);
}
.privacy-note i {
  color: var(--primary);
}
.copyright {
  font-size: 11px;
  color: var(--text-muted);
}

/* Responsive adjustments */
@media (max-width: 960px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}
