/* ========== SAMS Fueler Design System ========== */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: #1e293b;
  --bg-input: #0f172a;
  --bg-hover: #334155;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-glow: rgba(59, 130, 246, 0.3);
  --success: #22c55e;
  --success-bg: rgba(34, 197, 94, 0.15);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.15);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.15);
  --border: #334155;
  --border-focus: #3b82f6;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.25);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.4);
  --transition: 0.2s cubic-bezier(.4,0,.2,1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html, body, #root {
  height: 100%; width: 100%;
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body { 
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ========== Layout ========== */
.app-container {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.screen {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  animation: fadeIn 0.3s ease;
}

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

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== Header ========== */
.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 100;
}

.app-header h1 {
  font-size: 18px; font-weight: 700;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.header-subtitle { font-size: 11px; color: var(--text-muted); font-weight: 500; letter-spacing: 0.5px; }

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

.header-btn {
  background: var(--bg-hover); border: none; color: var(--text-secondary);
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; cursor: pointer; transition: var(--transition);
}
.header-btn:active { transform: scale(0.92); background: var(--accent); color: #fff; }

/* ========== Status Bar ========== */
.status-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}

.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.online { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot.offline { background: var(--danger); animation: pulse 2s infinite; }

.status-text { color: var(--text-secondary); }
.status-bar .sync-count { margin-left: auto; color: var(--warning); font-weight: 600; }

/* ========== Cards ========== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.card + .card { margin-top: 16px; }

.card-header {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 16px; padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.card-icon { font-size: 22px; }
.card-title { font-size: 16px; font-weight: 700; }
.card-subtitle { font-size: 12px; color: var(--text-muted); }

/* ========== Form Elements ========== */
.form-group { margin-bottom: 16px; }

.form-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-label .icon { font-size: 16px; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 16px;
  font-family: var(--font);
  transition: var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder { color: var(--text-muted); }
.form-input.error { border-color: var(--danger); }

.form-input.large {
  font-size: 28px; font-weight: 700; text-align: center;
  padding: 18px; letter-spacing: 4px;
}

.form-textarea { min-height: 80px; resize: vertical; }

.form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; font-weight: 500; }

.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ========== Autofill Chips ========== */
.autofill-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 6px;
}

.autofill-chip {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 5px 12px;
  font-size: 12px; font-weight: 500;
  color: var(--accent);
  font-family: var(--font);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.autofill-chip:active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: scale(0.95);
}

/* ========== Toggle Switch ========== */
.toggle-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.toggle-label {
  font-size: 14px; font-weight: 600; color: var(--text-secondary); flex: 1;
}

.toggle-switch {
  position: relative;
  width: 52px; height: 28px;
  background: var(--bg-hover);
  border: 2px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
  flex-shrink: 0;
}

.toggle-switch.active {
  background: var(--success);
  border-color: var(--success);
}

.toggle-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.toggle-switch.active .toggle-knob {
  left: calc(100% - 22px);
}

.toggle-value {
  font-size: 13px; font-weight: 700;
  min-width: 28px; text-align: center;
}

/* ========== Buttons ========== */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 16px 24px;
  border: none; border-radius: var(--radius-sm);
  font-family: var(--font); font-size: 16px; font-weight: 700;
  cursor: pointer; transition: var(--transition);
  text-transform: uppercase; letter-spacing: 0.5px;
}

.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  box-shadow: 0 4px 16px rgba(59,130,246,0.35);
}
.btn-primary:hover:not(:disabled) { box-shadow: 0 6px 24px rgba(59,130,246,0.5); }

.btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  box-shadow: 0 4px 16px rgba(34,197,94,0.35);
}

.btn-warning {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text-secondary);
}
.btn-outline:active { background: var(--bg-hover); }

.btn-ghost {
  background: transparent; color: var(--accent);
  padding: 10px; text-transform: none; font-weight: 600;
}

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

.btn-group { display: flex; gap: 12px; margin-top: 16px; }
.btn-group .btn { flex: 1; }

.btn-sm { padding: 10px 16px; font-size: 13px; }

/* ========== Splash ========== */
.splash-screen {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100vh; gap: 16px; text-align: center;
}

.splash-icon { font-size: 72px; margin-bottom: 8px; }

.splash-title {
  font-size: 32px; font-weight: 900;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.splash-subtitle { font-size: 14px; color: var(--text-secondary); font-weight: 500; letter-spacing: 1px; }
.splash-version { font-size: 12px; color: var(--text-muted); margin-top: 24px; }

.splash-loader {
  width: 48px; height: 48px; margin-top: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ========== Sync Dashboard ========== */
.sync-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  margin-bottom: 16px;
}

.sync-stat {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px; text-align: center;
}

.sync-stat-value { font-size: 28px; font-weight: 800; }
.sync-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.5px; }

.sync-stat.synced .sync-stat-value { color: var(--success); }
.sync-stat.pending .sync-stat-value { color: var(--warning); }
.sync-stat.failed .sync-stat-value { color: var(--danger); }

/* ========== Record List ========== */
.record-list { display: flex; flex-direction: column; gap: 10px; }

.record-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
}
.record-item:active { background: var(--bg-hover); }

.record-bus { font-size: 18px; font-weight: 700; min-width: 70px; }
.record-info { flex: 1; }
.record-info-text { font-size: 12px; color: var(--text-muted); }

.record-status { font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 20px; }
.record-status.synced { background: var(--success-bg); color: var(--success); }
.record-status.pending { background: var(--warning-bg); color: var(--warning); }
.record-status.failed { background: var(--danger-bg); color: var(--danger); }
.record-status.syncing { background: rgba(59,130,246,0.15); color: var(--accent); }

/* ========== Summary Stats ========== */
.summary-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px;
}

.summary-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 10px; text-align: center;
}

.summary-icon { font-size: 24px; margin-bottom: 4px; }
.summary-value { font-size: 22px; font-weight: 800; }
.summary-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; margin-top: 2px; }

/* ========== Modal ========== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 20px 40px;
  width: 100%; max-width: 480px;
  max-height: 85vh; overflow-y: auto;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.modal-handle {
  width: 40px; height: 4px; border-radius: 4px;
  background: var(--text-muted);
  margin: 0 auto 16px;
}

.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }

/* ========== Toast ========== */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 300; width: calc(100% - 40px); max-width: 440px; }

.toast {
  padding: 14px 18px; border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600;
  margin-bottom: 8px;
  animation: slideDown 0.3s ease;
  box-shadow: var(--shadow-lg);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast.success { background: #166534; color: #bbf7d0; }
.toast.error { background: #991b1b; color: #fecaca; }
.toast.warning { background: #92400e; color: #fef3c7; }
.toast.info { background: #1e40af; color: #dbeafe; }

/* ========== Tab Nav ========== */
.tab-nav {
  display: flex;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  position: sticky; bottom: 0; z-index: 100;
  padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 4px;
  background: none; border: none;
  color: var(--text-muted); font-size: 10px; font-weight: 600;
  cursor: pointer; transition: var(--transition);
  position: relative;
}

.tab-item.active { color: var(--accent); }
.tab-icon { font-size: 22px; }

.tab-badge {
  position: absolute; top: 4px; right: 50%; transform: translateX(16px);
  background: var(--danger); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 10px; padding: 0 4px;
  display: flex; align-items: center; justify-content: center;
}

/* ========== OCR ========== */
.ocr-preview { width: 100%; border-radius: var(--radius-sm); margin: 12px 0; border: 2px solid var(--border); }
.ocr-result { text-align: center; padding: 16px; }
.ocr-number { font-size: 36px; font-weight: 800; letter-spacing: 4px; color: var(--accent); }
.ocr-confidence { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ========== Empty State ========== */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.5; }
.empty-text { color: var(--text-muted); font-size: 14px; }

/* ========== Scrollable ========== */
.scrollable { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

/* ========== Shift Info Banner ========== */
.shift-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 20px; background: rgba(59,130,246,0.1);
  border-bottom: 1px solid rgba(59,130,246,0.2);
  font-size: 12px; color: var(--accent);
}
.shift-banner strong { font-weight: 700; }

/* ========== Settings ========== */
.settings-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; border-bottom: 1px solid var(--border);
}
.settings-label { font-size: 14px; font-weight: 600; }
.settings-value { font-size: 13px; color: var(--text-muted); }

/* ========== List Management ========== */
.list-manage-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.list-item-text { flex: 1; font-size: 14px; color: var(--text-primary); }

.list-action-btn {
  background: none; border: none; cursor: pointer;
  padding: 6px; border-radius: 6px;
  font-size: 14px; transition: var(--transition);
  display: flex; align-items: center; justify-content: center;
}

.list-action-btn:active { transform: scale(0.9); }
.list-action-btn.edit { color: var(--accent); }
.list-action-btn.delete { color: var(--danger); }
.list-action-btn.save { color: var(--success); background: var(--success-bg); }
.list-action-btn.cancel { color: var(--text-muted); background: var(--bg-hover); }

.list-action-btn:hover { background: var(--bg-hover); }


/* ========== Slot Bar ========== */
.slot-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.slot-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 10px 4px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}
.slot-btn.active {
  border-color: var(--accent);
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
}
.slot-btn.filled {
  border-color: var(--success);
}
.slot-num { font-size: 10px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; }
.slot-btn.active .slot-num { color: var(--accent); }
.slot-val { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ========== Bus Log (Summary) ========== */
.bus-log-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 12px;
}
.bus-log-row {
  display: grid;
  grid-template-columns: 1.05fr 1.45fr 1.2fr;
  padding: 10px 12px;
  background: var(--bg-card);
  align-items: center;
  font-size: 13px;
}
.bus-log-row.duplicate {
  background: #451a1a; /* Dark red for duplicates */
  border-left: 3px solid var(--danger);
}
.bus-id-col { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.bus-badge { background: var(--bg-app); padding: 2px 6px; border-radius: 4px; font-family: monospace; }
.dup-warning { color: var(--danger); font-size: 10px; font-weight: 800; }
.bus-time-col { color: var(--text-muted); text-align: right; }
.bus-fuel-col { font-weight: 600; color: var(--success); text-align: right; }
.bus-driver-col { font-weight: 600; color: var(--text-primary); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bus-log-header { font-size: 10px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; background: var(--bg-input); }
.bus-log-header > div:nth-child(2), .bus-log-header > div:nth-child(3) { text-align: right; }

.version-pill {
  background: rgba(255,255,255,0.1);
  padding: 4px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
}

/* ========== Install Banner ========== */
.install-banner {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 40px); max-width: 440px;
  background: var(--bg-card); border: 1px solid var(--accent);
  border-radius: var(--radius); padding: 16px;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
  z-index: 9999; animation: slideUp 0.3s ease;
}
.install-content { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* ========== Misc Utilities ========== */


.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.gap-12 { gap: 12px; }
.text-center { text-align: center; }
.flex-col { display: flex; flex-direction: column; }
.w-full { width: 100%; }


/* ========== 10-Minute Inactivity Reminder ========== */
.reminder-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

.reminder-modal {
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--bg-secondary);
  border: 2px solid var(--warning);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px 20px 22px;
}

.reminder-icon {
  font-size: 46px;
  line-height: 1;
  text-align: center;
  margin-bottom: 10px;
}

.reminder-title {
  font-size: 23px;
  line-height: 1.2;
  text-align: center;
  font-weight: 800;
  margin-bottom: 6px;
}

.reminder-subtitle {
  color: var(--text-secondary);
  text-align: center;
  font-size: 13px;
  margin-bottom: 18px;
}

.reminder-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.reminder-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.reminder-number {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--warning);
  color: #111827;
  font-weight: 900;
}

.reminder-ack-btn {
  margin-top: 4px;
  min-height: 54px;
}


/* ========== In-App User Manual ========== */
.manual-screen {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  background: var(--bg-app);
  color: var(--text-primary);
}
.manual-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.manual-header h1 { margin: 2px 0 0; font-size: 22px; line-height: 1.2; }
.manual-kicker { font-size: 10px; font-weight: 900; letter-spacing: 1.5px; color: var(--accent); }
.manual-close { width: auto; min-width: 82px; }
.manual-content { padding: 16px 16px 32px; }
.manual-alert, .manual-rule-card, .manual-reminders, .manual-footer-note {
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.manual-alert { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.45); }
.manual-rule-card { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.4); }
.manual-rule-card p { margin: 8px 0 0; }
.manual-reminders { background: rgba(59,130,246,0.08); border: 1px solid rgba(59,130,246,0.28); }
.manual-reminders h3 { margin: 0 0 8px; font-size: 15px; }
.manual-section { margin: 0 0 24px; }
.manual-section h2 { font-size: 19px; margin: 0 0 12px; line-height: 1.25; }
.manual-list, .manual-steps { margin: 0; padding-left: 22px; line-height: 1.55; }
.manual-list li, .manual-steps li { margin: 8px 0; }
.manual-note { color: var(--text-muted); font-size: 13px; line-height: 1.5; }
.manual-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 10px 0; }
.manual-table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 13px; }
.manual-table th, .manual-table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.manual-table th { background: var(--bg-secondary); font-weight: 800; }
.manual-table tr:last-child td { border-bottom: none; }
.manual-checklist { display: flex; flex-direction: column; gap: 9px; line-height: 1.45; }
.manual-footer-note { background: var(--bg-secondary); border: 1px solid var(--border); color: var(--text-muted); font-size: 13px; }
.manual-bottom-back { margin-top: 8px; min-height: 52px; }

@media (min-width: 700px) {
  .manual-content { width: min(760px, 100%); margin: 0 auto; padding: 24px 24px 40px; }
  .manual-header { padding-left: max(16px, calc((100vw - 760px) / 2)); padding-right: max(16px, calc((100vw - 760px) / 2)); }
}

/* ===== Graphical User Manual mock-up panels ===== */
.manual-visual-section {
  margin: 0 0 24px;
  padding: 14px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(59,130,246,0.08), rgba(255,255,255,0.02));
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}
.manual-visual-section-secondary { margin-top: 28px; }
.manual-visual-heading { margin-bottom: 12px; }
.manual-visual-heading h2 { margin: 6px 0 4px; font-size: 20px; }
.manual-visual-heading p { margin: 0; color: var(--text-secondary); font-size: 13px; line-height: 1.45; }
.manual-visual-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(59,130,246,0.15);
  color: #2563eb;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}
.manual-visual-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(148,163,184,0.25);
}
