/* Clean Minimal Trading Dashboard */
:root {
  --bg: #0a0a0a;
  --surface: #1a1a1a;
  --surface-light: #2a2a2a;
  --border: #333;
  --text: #fff;
  --text-muted: #888;
  --accent: #00ff88;
  --danger: #ff4444;
  --warning: #ffaa00;
  --primary: #0066ff;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.4;
}

/* Dashboard Layout */
.dashboard {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Top Bar */
.top-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-icon {
  font-size: 20px;
}

.brand-name {
  font-size: 18px;
  font-weight: 600;
}

.controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.interval-tabs {
  display: flex;
  background: var(--surface-light);
  border-radius: 6px;
  padding: 2px;
}

.tab {
  padding: 6px 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.tab.active {
  background: var(--accent);
  color: var(--bg);
}

.tab:hover:not(.active) {
  color: var(--text);
}

.status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

/* Main Content */
.main-content {
  flex: 1;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  padding: 20px;
  overflow: hidden;
}

/* Left Panel */
.left-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;  /* ✅ FIXED: Enable vertical scrolling */
  overflow-x: hidden;
  height: calc(100vh - 120px);
  min-height: 500px;
  scroll-behavior: smooth;
}

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

.panel-header h3 {
  font-size: 16px;
  font-weight: 600;
}

.panel-actions {
  display: flex;
  gap: 8px;
}

.action-btn {
  width: 24px;
  height: 24px;
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: all 0.2s;
}

.action-btn:hover {
  background: var(--danger);
  color: var(--text);
  border-color: var(--danger);
}

.scroll-to-bottom-btn {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  color: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.scroll-to-bottom-btn:hover {
  background: #00cc6a;
  border-color: #00cc6a;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.scroll-to-bottom-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.market-feed {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 200px);
  min-height: 400px;
  scroll-behavior: smooth;
}

/* Market Message */
.market-message {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  transition: all 0.2s;
}

.market-message:hover {
  border-color: var(--accent);
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.instrument-name {
  font-weight: 600;
  font-size: 16px;
}

.timestamp {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
}

.trend-indicator {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 12px;
}

.trend-up {
  background: var(--accent);
  color: var(--bg);
}

.trend-down {
  background: var(--danger);
  color: var(--text);
}

.trend-neutral {
  background: var(--surface-light);
  color: var(--text-muted);
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.price-item {
  text-align: center;
  padding: 8px;
  background: var(--bg);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.price-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
}

.price-value {
  font-size: 14px;
  font-weight: 600;
  font-family: monospace;
}

.price-value.close {
  color: var(--accent);
}

.stats-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 4px;
}

.stat-label {
  color: var(--text-muted);
}

.stat-value {
  font-weight: 600;
  font-family: monospace;
}

.recommendation {
  margin-top: 12px;
  padding: 8px 12px;
  background: var(--accent);
  color: var(--bg);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* Right Panel */
.right-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 8px;
  scroll-behavior: smooth;
  position: relative;
}

/* Scroll indicator for right panel */
.right-panel::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, 
    transparent 0%, 
    var(--accent) 20%, 
    var(--accent) 80%, 
    transparent 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

.right-panel:hover::before {
  opacity: 0.3;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.card-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.card-content {
  padding: 20px;
}

/* Trend Display */
.trend-display {
  text-align: center;
}

.trend-value {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.trend-time {
  font-size: 12px;
  color: var(--text-muted);
  font-family: monospace;
}

/* Signal Display */
.signal-display {
  text-align: center;
}

.signal-text {
  font-size: 14px;
  color: var(--text-muted);
}

.signal-text.active {
  color: var(--accent);
  font-weight: 600;
}

/* P&L Grid */
.pnl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.pnl-item {
  text-align: center;
  padding: 12px;
  background: var(--surface-light);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.pnl-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pnl-value {
  font-size: 16px;
  font-weight: 700;
  font-family: monospace;
}

.pnl-value.profit {
  color: var(--accent);
}

.pnl-value.loss {
  color: var(--danger);
}

.pnl-value.net {
  color: var(--text);
}

/* Scrollbar */
.market-feed::-webkit-scrollbar {
  width: 8px;
}

.market-feed::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 4px;
}

.market-feed::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
  border: 1px solid var(--surface);
}

.market-feed::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.market-feed::-webkit-scrollbar-thumb:active {
  background: var(--text-muted);
}

/* Firefox scrollbar */
.market-feed {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg);
}

/* Left Panel Scrollbar */
.left-panel::-webkit-scrollbar {
  width: 8px;
}

.left-panel::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 4px;
}

.left-panel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
  border: 1px solid var(--surface);
}

.left-panel::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* Right Panel Scrollbar */
.right-panel::-webkit-scrollbar {
  width: 6px;
}

.right-panel::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 3px;
}

.right-panel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
  border: 1px solid var(--surface);
}

.right-panel::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.right-panel::-webkit-scrollbar-thumb:active {
  background: var(--text-muted);
}

/* Firefox scrollbar for right panel */
.right-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--border) var(--bg);
}

/* Responsive */
@media (max-width: 768px) {
  .main-content {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  
  .top-bar {
    padding: 12px 16px;
  }
  
  .brand-name {
    font-size: 16px;
  }
  
  .controls {
    gap: 12px;
  }
  
  .pnl-grid {
    grid-template-columns: 1fr;
  }
  
  .left-panel {
    height: calc(100vh - 100px);
    min-height: 400px;
  }
  
  .market-feed {
    max-height: calc(100vh - 150px);
    min-height: 300px;
  }
  
  .right-panel {
    max-height: calc(100vh - 100px);
    min-height: 300px;
  }
}

/* ===== ENHANCED ADMIN PANEL STYLES ===== */
.admin-panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

.admin-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.9) 0%, rgba(18, 18, 18, 0.95) 100%);
  border-radius: 16px;
  z-index: -1;
  margin: -20px;
  pointer-events: none;
}

.admin-actions {
  margin-top: 30px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.action-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.action-section h4 {
  margin-bottom: 15px;
  color: var(--accent);
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.memory-info {
  margin-top: 15px;
  padding: 15px;
  background: var(--surface-light);
  border-radius: 6px;
}

.memory-bar {
  width: 100%;
  height: 20px;
  background: var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 10px;
}

.memory-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
  border-radius: 10px;
}

.memory-text {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.admin-header {
  text-align: center;
  margin-bottom: 30px;
}

.admin-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.admin-header p {
  color: var(--text-muted);
  font-size: 16px;
}

.config-form {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 20px;
}

.form-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.form-section h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: var(--text);
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 12px;
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  padding: 12px 24px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-light);
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}

.btn:hover {
  background: var(--border);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.btn-primary:hover {
  background: #00cc6a;
}

.btn-secondary {
  background: var(--surface-light);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.config-status {
  margin-bottom: 20px;
}

.status-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.status-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text);
}

.status-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.status-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-item .label {
  font-weight: 500;
  color: var(--text-muted);
}

.status-item .value {
  font-weight: 600;
  color: var(--text);
  font-family: monospace;
}

.help-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}

.help-section h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--text);
}

.help-content p {
  margin-bottom: 8px;
  color: var(--text-muted);
  font-size: 14px;
}

.help-content strong {
  color: var(--text);
}

.message {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 20px;
  font-weight: 500;
}

.message.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.message.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Modern Sign-In Page Design */
.auth-container {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  position: relative;
  overflow: hidden;
}

.auth-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
  animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.auth-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px;
  color: white;
  position: relative;
  z-index: 2;
}

.auth-left-content {
  max-width: 500px;
  text-align: center;
}

.auth-left h1 {
  font-size: 48px;
  font-weight: 900;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #ffffff 0%, #e0e7ff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.auth-left p {
  font-size: 20px;
  font-weight: 400;
  opacity: 0.9;
  margin-bottom: 40px;
  line-height: 1.6;
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 40px;
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.auth-feature:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateX(10px);
}

.auth-feature-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
}

.auth-feature-text {
  flex: 1;
}

.auth-feature-text h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.auth-feature-text p {
  font-size: 14px;
  opacity: 0.8;
  margin: 0;
}

.auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  position: relative;
  z-index: 2;
}

.auth-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  padding: 50px;
  width: 100%;
  max-width: 450px;
  box-shadow: 
    0 25px 50px rgba(0, 0, 0, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  position: relative;
  animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: 24px;
  pointer-events: none;
}

.auth-header {
  text-align: center;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

.auth-header h1 {
  font-size: 36px;
  font-weight: 800;
  margin-bottom: 12px;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-header p {
  color: #64748b;
  font-size: 16px;
  font-weight: 500;
  margin: 0;
}

.auth-form {
  margin-bottom: 30px;
  position: relative;
  z-index: 1;
}

.auth-form .form-group {
  margin-bottom: 28px;
  position: relative;
}

.auth-form .form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: #374151;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.auth-form .form-group input {
  width: 100%;
  padding: 18px 24px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  color: #1e293b;
  font-size: 16px;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.auth-form .form-group input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
  transform: translateY(-2px);
}

.auth-form .form-group input:invalid {
  border-color: #ef4444;
}

.auth-form .form-group input:valid {
  border-color: #10b981;
}

.auth-form .form-group input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.auth-buttons {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 32px;
}

.auth-buttons .btn {
  padding: 18px 32px;
  border: none;
  border-radius: 16px;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
}

.auth-buttons .btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s;
}

.auth-buttons .btn:hover::before {
  left: 100%;
}

.auth-buttons .btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.auth-buttons .btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 35px rgba(59, 130, 246, 0.6);
}

.auth-buttons .btn-secondary {
  background: #ffffff;
  color: #374151;
  border: 2px solid #e2e8f0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.auth-buttons .btn-secondary:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.auth-footer {
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
  position: relative;
  z-index: 1;
}

.auth-footer a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
}

.auth-footer a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
  font-size: 14px;
}

.auth-links a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
}

.auth-links a:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.auth-debug-links {
  margin-top: 20px;
  text-align: center;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.auth-debug-links a {
  color: #64748b;
  text-decoration: none;
  font-size: 12px;
  margin: 0 8px;
  transition: all 0.3s ease;
}

.auth-debug-links a:hover {
  color: #3b82f6;
}

/* Profile Page Styles */
.profile-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.profile-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 30px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 20px;
  color: white;
}

.profile-header h1 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 8px;
}

.profile-header p {
  font-size: 16px;
  opacity: 0.9;
}

.profile-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.profile-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.profile-card h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #374151;
  border-bottom: 2px solid #667eea;
  padding-bottom: 10px;
}

.profile-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #f3f4f6;
}

.info-item:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 600;
  color: #6b7280;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-value {
  font-weight: 700;
  color: #111827;
  font-size: 16px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .auth-left {
    padding: 40px;
  }
  
  .auth-left h1 {
    font-size: 36px;
  }
  
  .auth-left p {
    font-size: 18px;
  }
  
  .auth-right {
    padding: 40px;
  }
}

@media (max-width: 768px) {
  .auth-container {
    flex-direction: column;
  }
  
  .auth-left {
    padding: 40px 20px;
    min-height: 40vh;
  }
  
  .auth-left h1 {
    font-size: 32px;
  }
  
  .auth-left p {
    font-size: 16px;
  }
  
  .auth-features {
    gap: 15px;
  }
  
  .auth-feature {
    padding: 12px 16px;
  }
  
  .auth-feature-icon {
    width: 35px;
    height: 35px;
    font-size: 16px;
  }
  
  .auth-right {
    padding: 20px;
    min-height: 60vh;
  }
  
  .auth-card {
    padding: 30px 20px;
    max-width: 100%;
  }
  
  .auth-header h1 {
    font-size: 28px;
  }
  
  .auth-form .form-group input {
    padding: 16px 20px;
  }
  
  .auth-buttons .btn {
    padding: 16px 24px;
  }
  
  .auth-links {
    flex-direction: column;
    gap: 10px;
  }
  
  .profile-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .auth-left {
    padding: 20px 15px;
  }
  
  .auth-left h1 {
    font-size: 28px;
  }
  
  .auth-left p {
    font-size: 14px;
  }
  
  .auth-features {
    gap: 12px;
  }
  
  .auth-feature {
    padding: 10px 12px;
  }
  
  .auth-feature-icon {
    width: 30px;
    height: 30px;
    font-size: 14px;
  }
  
  .auth-feature-text h3 {
    font-size: 14px;
  }
  
  .auth-feature-text p {
    font-size: 12px;
  }
  
  .auth-right {
    padding: 15px;
  }
  
  .auth-card {
    padding: 25px 15px;
  }
  
  .auth-header h1 {
    font-size: 24px;
  }
  
  .auth-form .form-group input {
    padding: 14px 16px;
    font-size: 14px;
  }
  
  .auth-buttons .btn {
    padding: 14px 20px;
    font-size: 14px;
  }
}

/* Enhanced Market Data Styles */
.market-message.enhanced {
  background: linear-gradient(135deg, var(--surface-light) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Smooth value updates */
.price-value, .stat-value, .trade-value, .summary-value, .metric-value {
  transition: all 0.3s ease;
}

/* Highlight changes */
.price-value.updated, .stat-value.updated, .trade-value.updated {
  background: rgba(0, 255, 136, 0.1);
  border-radius: 3px;
  padding: 2px 4px;
  animation: highlightUpdate 1s ease-out;
}

@keyframes highlightUpdate {
  0% { background: rgba(0, 255, 136, 0.3); }
  100% { background: rgba(0, 255, 136, 0.1); }
}

.market-message.enhanced:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(0, 255, 136, 0.1);
  transform: translateY(-2px);
}

.enhanced-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.enhanced-stats .stats-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px;
  background: var(--surface);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.enhanced-stats .stat-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.enhanced-stats .stat-value {
  font-size: 12px;
  font-weight: 700;
  font-family: monospace;
}

.enhanced-stats .stat-value.positive {
  color: var(--accent);
}

.enhanced-stats .stat-value.negative {
  color: var(--danger);
}

.enhanced-stats .stat-value.neutral {
  color: var(--text-muted);
}

.trade-details {
  margin-top: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.trade-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}

.trade-row:last-child {
  border-bottom: none;
}

.trade-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.trade-value {
  font-size: 14px;
  font-weight: 700;
  font-family: monospace;
}

.trade-value.profit {
  color: var(--accent);
}

.trade-value.loss {
  color: var(--danger);
}

/* Market Summary Card */
.market-summary-card {
  margin-bottom: 16px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 12px;
}

.summary-item {
  text-align: center;
  padding: 12px;
  background: var(--surface-light);
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.summary-item:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.summary-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.summary-value {
  font-size: 16px;
  font-weight: 700;
  font-family: monospace;
}

.summary-value.positive {
  color: var(--accent);
}

.summary-value.negative {
  color: var(--danger);
}

.summary-value.neutral {
  color: var(--text);
}

/* Performance Metrics Card */
.performance-metrics-card {
  margin-bottom: 16px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}

.metric-item {
  text-align: center;
  padding: 12px;
  background: var(--surface-light);
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.metric-item:hover {
  background: var(--surface);
  border-color: var(--accent);
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.metric-value {
  font-size: 14px;
  font-weight: 700;
  font-family: monospace;
  color: var(--text);
}

/* Enhanced Price Grid */
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.price-item {
  text-align: center;
  padding: 10px;
  background: var(--bg);
  border-radius: 6px;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.price-item:hover {
  background: var(--surface-light);
  border-color: var(--accent);
}

.price-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.price-value {
  font-size: 14px;
  font-weight: 700;
  font-family: monospace;
}

.price-value.close {
  color: var(--accent);
  font-size: 16px;
}

/* Enhanced Trend Indicator */
.trend-indicator {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.trend-up {
  background: linear-gradient(135deg, var(--accent) 0%, #00cc6a 100%);
  color: var(--bg);
}

.trend-down {
  background: linear-gradient(135deg, var(--danger) 0%, #cc0000 100%);
  color: var(--text);
}

.trend-neutral {
  background: linear-gradient(135deg, var(--surface-light) 0%, var(--border) 100%);
  color: var(--text-muted);
}

/* Enhanced Recommendation */
.recommendation {
  margin-top: 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent) 0%, #00cc6a 100%);
  color: var(--bg);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 8px rgba(0, 255, 136, 0.3);
  animation: pulse 2s infinite;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  .enhanced-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .summary-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .price-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .enhanced-stats {
    grid-template-columns: 1fr;
  }
  
  .summary-grid {
    grid-template-columns: 1fr;
  }
  
  .metrics-grid {
    grid-template-columns: 1fr;
  }
  
  .price-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== CASH FLOW TRADING SYSTEM STYLES ===== */

/* Cash Flow Section */
.cash-flow-section {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.section-header h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.cash-flow-tabs {
  display: flex;
  margin-bottom: 15px;
  border-radius: 6px;
  overflow: hidden;
}

.tab-btn {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: var(--surface-light);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.9em;
}

.tab-btn.active {
  background: var(--accent);
  color: white;
}

.tab-btn:hover {
  background: var(--accent-light);
}

.cash-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.cash-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px;
  background: var(--surface);
  border-radius: 6px;
  border-left: 4px solid var(--border);
}

.cash-item.current {
  border-left-color: var(--accent);
}

.cash-item.min {
  border-left-color: var(--danger);
}

.cash-item.max {
  border-left-color: var(--success);
}

.cash-label {
  font-size: 0.9em;
  color: var(--text-muted);
}

.cash-value {
  font-weight: bold;
  font-size: 1.1em;
  color: var(--text);
}

/* ITM Options Section */
.itm-options-section {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

/* Buy Signals Section */
.buy-signals-section {
  background: var(--surface-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}

.signals-list {
  max-height: 400px;
  overflow-y: auto;
}

/* ITM Options Styles */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.option-item {
  padding: 12px;
  background: var(--surface);
  border-radius: 6px;
  text-align: center;
  border: 2px solid var(--border);
}

.option-item.ce {
  border-color: var(--success);
}

.option-item.pe {
  border-color: var(--danger);
}

.option-type {
  font-weight: bold;
  font-size: 0.9em;
  margin-bottom: 4px;
}

.option-strike {
  font-size: 1.1em;
  font-weight: bold;
  margin-bottom: 4px;
}

.option-price {
  font-size: 0.9em;
  color: var(--text-muted);
}

/* Signal Styles */
.signal-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
  gap: 8px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  font-size: 0.85em;
  align-items: center;
}

.signal-type.buy_ce {
  color: var(--success);
  font-weight: bold;
}

.signal-type.buy_pe {
  color: var(--danger);
  font-weight: bold;
}

.signal-cash {
  text-align: right;
  font-weight: bold;
}

/* Market Overview Styles */
.market-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
  max-height: 400px;
  overflow-y: auto;
  overflow-x: hidden;
}

.market-item {
  padding: 12px;
  background: var(--surface);
  border-radius: 6px;
  text-align: center;
}

.market-symbol {
  font-size: 0.9em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.market-price {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 4px;
}

.market-change {
  font-size: 0.9em;
}

.market-change.positive {
  color: var(--success);
}

.market-change.negative {
  color: var(--danger);
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--accent);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Legacy styles for backward compatibility */
.topnav{display:flex;justify-content:space-between;align-items:center;padding:14px 22px;background:#0b1220;border-bottom:1px solid #1f2937}
.brand{font-weight:700}.nav-actions a{color:var(--text);text-decoration:none;margin-left:16px}.nav-actions a.danger{color:var(--danger)}
.container{max-width:1100px;margin:24px auto;padding:0 16px}
.auth-card,.card{background:var(--card);border:1px solid #1f2937;border-radius:10px;padding:20px;margin-bottom:18px}
label{display:block;color:var(--muted);margin:8px 0 6px}input{width:100%;padding:10px;border-radius:8px;border:1px solid #283548;background:#0b1220;color:var(--text)}
.btn{padding:10px 14px;border-radius:8px;border:1px solid #334155;background:#0b1220;color:var(--text);cursor:pointer}
.btn.primary{background:var(--primary);border-color:var(--primary);color:white}
.auth-links{display:flex;justify-content:space-between;margin-top:10px}
.flash-container{margin:10px 0}.flash{padding:10px;border-radius:8px;margin-bottom:8px}.flash.success{background:#052e1a;color:#9ae6b4}.flash.error{background:#3b0a0a;color:#fecaca}

/* Admin control center */
body.admin-body {
  background: radial-gradient(circle at 0% 0%, rgba(0, 102, 255, 0.15), transparent 60%), var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding: 32px 24px 48px;
}

.admin-layout {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 24px;
  background: rgba(20, 25, 35, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  box-shadow: 0 24px 40px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
}

.admin-header .brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.admin-header .brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(124, 58, 237, 0.2);
  border: 1px solid rgba(124, 58, 237, 0.4);
  font-size: 28px;
}

.admin-header .brand-copy h1 {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 4px;
}

.admin-header .brand-copy p {
  color: var(--text-muted);
  font-size: 14px;
}

.user-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.user-actions .user-name {
  font-size: 14px;
  color: var(--text-muted);
}

.logout-link {
  color: #f87171;
  border: 1px solid #f87171;
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease;
}

.logout-link:hover {
  background: #f87171;
  color: var(--bg);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.summary-card {
  background: rgba(20, 25, 35, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-label {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

.summary-value {
  font-size: 26px;
  font-weight: 600;
}

.summary-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.18);
  color: #d1d5db;
}

.status-pill.info {
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

.status-pill.success {
  background: rgba(34, 197, 94, 0.18);
  color: #6ee7b7;
}

.status-pill.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
}

.status-pill.danger {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

.status-pill.neutral {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5f5;
}

.admin-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.section-header h2 {
  font-size: 20px;
  font-weight: 600;
}

.section-header p {
  font-size: 14px;
  color: var(--text-muted);
}

.section-grid {
  display: grid;
  gap: 20px;
}

.section-grid.two {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.section-grid.three {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.section-panel {
  background: rgba(17, 17, 24, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-note {
  font-size: 13px;
  color: var(--text-muted);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
}

.form-field {
  flex: 1 1 260px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-section label {
  font-size: 14px;
  font-weight: 600;
}

.admin-section textarea,
.admin-section input,
.admin-section select {
  background: rgba(10, 14, 22, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 14px;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

.admin-section textarea:focus,
.admin-section input:focus,
.admin-section select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.18);
}

.primary-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-btn {
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  box-shadow: 0 18px 26px rgba(37, 99, 235, 0.3);
}

.primary-btn.outline {
  background: transparent;
  border: 1px solid rgba(124, 58, 237, 0.4);
  color: #a855f7;
  box-shadow: none;
}

.primary-btn.block {
  width: 100%;
}

.danger-btn {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.5);
  color: #fca5a5;
}

.primary-btn:hover:not(:disabled),
.danger-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 28px rgba(124, 58, 237, 0.35);
}

.primary-btn.outline:hover {
  background: rgba(124, 58, 237, 0.15);
  box-shadow: none;
}

.primary-btn.is-busy,
.danger-btn.is-busy {
  opacity: 0.65;
  cursor: wait;
  box-shadow: none;
}

.status-area {
  min-height: 28px;
}

.info-box {
  background: rgba(10, 15, 22, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 500;
}

.status-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.4);
  box-shadow: 0 0 12px rgba(148, 163, 184, 0.4);
}

.memory-meter {
  width: 100%;
  height: 18px;
  border-radius: 12px;
  background: rgba(148, 163, 184, 0.15);
  overflow: hidden;
}

.memory-fill {
  height: 100%;
  background: #34d399;
  width: 0;
  transition: width 0.3s ease;
}

.memory-text {
  font-size: 13px;
  color: var(--text-muted);
}

.service-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.section-footnote {
  font-size: 13px;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .user-actions {
    align-items: flex-start;
  }

  .form-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .primary-btn.block {
    width: 100%;
  }
}

@media (max-width: 640px) {
  body.admin-body {
    padding: 20px 16px 36px;
  }

  .admin-layout {
    gap: 24px;
  }

  .summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .section-grid.three {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}
