:root {
  --bg-dark: #0f172a;
  --bg-card: rgba(30, 41, 59, 0.7);
  --border-glass: rgba(255, 255, 255, 0.1);
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --accent-emerald: #10b981;
  --accent-ruby: #ef4444;
  --accent-azure: #3b82f6;
  --accent-amber: #f59e0b;
  --shadow-glass: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--bg-dark);
  background-image: 
    radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%);
  color: var(--text-primary);
  min-height: 100vh;
  padding: 2rem;
  line-height: 1.5;
}

/* Glassmorphism Card Base */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: 1rem;
  box-shadow: var(--shadow-glass);
  padding: 1.5rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

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

/* Header */
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
}

.header-left h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.header-subtitle {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Typography */
h2.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Layout Utilities */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Breadcrumbs / Navigation */
.nav-tabs {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  justify-content: center;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 1rem;
}

.nav-tabs a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  font-weight: 500;
  border: 1px solid transparent;
}

.nav-tabs a:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.05);
}

.nav-tabs a.active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-weight: 600;
}

.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  transition: color 0.2s;
}

.nav-back:hover {
  color: var(--text-primary);
}

/* Workflow Visualization */
.workflow-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0;
  position: relative;
}

.workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  z-index: 1;
  flex: 1;
}

.step-circle {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: #1e293b;
  border: 2px solid var(--border-glass);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.3s ease;
}

.step-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
}

.workflow-line {
  position: absolute;
  top: 1.5rem;
  left: 5%;
  right: 5%;
  height: 2px;
  background: var(--border-glass);
  z-index: 0;
}

.step-active .step-circle {
  border-color: var(--accent-azure);
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.5);
  background: var(--accent-azure);
}

.step-complete .step-circle {
  border-color: var(--accent-emerald);
  background: var(--accent-emerald);
}

.step-complete .step-label {
  color: var(--accent-emerald);
}

/* Badges */
.badge {
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-active { background: rgba(16, 185, 129, 0.1); color: var(--accent-emerald); }
.badge-pending { background: rgba(245, 158, 11, 0.1); color: var(--accent-amber); }
.badge-error { background: rgba(239, 68, 68, 0.1); color: var(--accent-ruby); }

/* Animation */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.pulse { animation: pulse 2s infinite; }
.text-success { color: var(--accent-emerald); }
.text-danger { color: var(--accent-ruby); }

/* Finance Hub Styles */
.finance-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
  margin-top: 1rem;
}

.finance-table th {
  text-align: left;
  padding: 1rem;
  color: var(--text-secondary);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-glass);
}

.finance-table td {
  padding: 1.25rem 1rem;
  background: rgba(255, 255, 255, 0.03);
  border-top: 1px solid var(--border-glass);
  border-bottom: 1px solid var(--border-glass);
}

.finance-table tr td:first-child { border-left: 1px solid var(--border-glass); border-radius: 0.5rem 0 0 0.5rem; }
.finance-table tr td:last-child { border-right: 1px solid var(--border-glass); border-radius: 0 0.5rem 0.5rem 0; }

.status-cleared {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  padding: 0.2rem 0.6rem;
  border-radius: 0.25rem;
  font-size: 0.7rem;
  font-weight: 700;
}

.badge-programmatic-seo { background: rgba(59, 130, 246, 0.1); color: var(--accent-azure); }
.badge-trading { background: rgba(245, 158, 11, 0.1); color: var(--accent-amber); }
.badge-system { background: rgba(148, 163, 184, 0.1); color: var(--text-secondary); }

/* Button Tiny */
.btn-tiny {
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-glass);
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-primary);
  transition: all 0.2s ease;
}

.btn-tiny:hover {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-azure);
}

/* Task Table Row Hover */
#taskBody tr:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* Pagination Component */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.pagination-controls .page-info {
  font-variant-numeric: tabular-nums;
}

.pagination-controls .page-buttons {
  display: flex;
  gap: 0.35rem;
}

.pagination-controls button {
  padding: 0.3rem 0.7rem;
  border-radius: 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-glass);
  background: rgba(30, 41, 59, 0.6);
  color: var(--text-primary);
  transition: all 0.15s ease;
}

.pagination-controls button:hover:not(:disabled) {
  background: rgba(59, 130, 246, 0.15);
  border-color: var(--accent-azure);
}

.pagination-controls button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination-controls button.active {
  background: var(--accent-azure);
  border-color: var(--accent-azure);
  color: #fff;
}
