/* FYERS SAAS 3.0 — Enhanced Clean Modular Stylesheet */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: 'Inter', sans-serif; background-color: #f1f5f9; color: #0f172a; margin: 0; padding: 0; }
.mono { font-family: 'JetBrains Mono', monospace; font-variant-numeric: tabular-nums; }

table { border-collapse: collapse; width: 100%; }
th, td { border: 1px solid #e2e8f0; padding: 8px 10px; text-align: left; vertical-align: middle; background: #fff; color: #0f172a; }
th { background-color: #0f172a; color: #ffffff; font-weight: 600; text-transform: uppercase; font-size: 11px; }
tr.atm-row td { background-color: #0f172a !important; color: #ffffff !important; }

input[type="text"], input[type="number"], input[type="time"], select, textarea {
  border: 1px solid #cbd5e1;
  background-color: #ffffff;
  color: #0f172a;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 8px;
  outline: none;
  transition: all 0.15s ease;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}
input:disabled, select:disabled {
  background-color: #f1f5f9;
  color: #94a3b8;
  border-color: #e2e8f0;
  cursor: not-allowed;
}

.select-box { border: 1px solid #cbd5e1; background-color: #ffffff; color: #0f172a; padding: 6px 10px; font-size: 12px; border-radius: 8px; cursor: pointer; width: auto; }
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pulse-live { background-color: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.25); animation: pulse 1s infinite; }
.pulse-off { background-color: #94a3b8; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.seg-group { display: inline-flex; background: #f1f5f9; padding: 3px; border-radius: 9px; border: 1px solid #e2e8f0; width: 100%; }
.seg-btn {
  flex: 1;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-align: center;
}
.seg-btn.active {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.toggle-checkbox {
  appearance: none;
  width: 36px !important;
  height: 20px !important;
  background: #cbd5e1;
  border-radius: 999px;
  position: relative;
  cursor: pointer;
  outline: none;
  transition: background 0.2s;
  vertical-align: middle;
  flex-shrink: 0;
}
.toggle-checkbox::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.toggle-checkbox:checked { background: #0f172a; }
.toggle-checkbox:checked::after { transform: translateX(16px); }

.card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.lbl {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  display: block;
  margin-bottom: 5px;
}
.strat-item {
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s;
}
.strat-item.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.15);
}
.strat-item:hover:not(.active) { background: #f1f5f9; border-color: #cbd5e1; }
.lazy-box {
  background: #f8fafc;
  border: 1.5px dashed #64748b;
  border-radius: 10px;
  padding: 12px;
  margin-top: 10px;
}

/* === ALGOTEST EXACT TYPOGRAPHY & TABULAR NUMBERS OVERRIDE === */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --algotest-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body, button, input, select, textarea, table, th, td, span, div, p, a, strong, h1, h2, h3, h4 {
  font-family: var(--algotest-font) !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  letter-spacing: -0.011em;
}

/* Numbers & Formerly Monospace Elements -> Clean AlgoTest Tabular Sans-Serif */
.mono, [style*="monospace"], table td, table th, input[type="number"], input[type="time"], select {
  font-family: var(--algotest-font) !important;
  font-variant-numeric: tabular-nums !important;
  font-feature-settings: "tnum" 1, "zero" 0 !important;
  letter-spacing: -0.01em !important;
}

/* Keep server terminal logs readable */
pre#logsBox, pre#portsBox, pre#sshBox {
  font-variant-numeric: tabular-nums !important;
}

/* AlgoTest Standard Font Sizes & Weights */
body {
  font-size: 14px !important;
  line-height: 1.45 !important;
  font-weight: 400;
}

h1, .text-lg {
  font-size: 18px !important;
  font-weight: 600 !important;
  letter-spacing: -0.018em !important;
}

h2, .section-title {
  font-size: 15.5px !important;
  font-weight: 600 !important;
  letter-spacing: -0.015em !important;
}

/* Buttons & Pills (Switch to manual / Square Off / Open style) */
button, .btn, .seg-btn, .pill, .pill-btn {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  letter-spacing: -0.008em !important;
}

/* Inputs & Dropdowns */
input[type="text"], input[type="number"], input[type="time"], input[type="password"], input[type="date"], select, .select-box {
  font-size: 13.5px !important;
  font-weight: 500 !important;
}

/* Table Cells & Headers (Option Chain / Positions / Orders) */
th {
  font-size: 11.5px !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em !important;
}

td {
  font-size: 13.5px !important;
  font-weight: 500 !important;
  font-variant-numeric: tabular-nums !important;
}

/* Status Badges & Labels (RUNNING 1/1 / SQD OFF 1/1 style) */
.badge-b, .badge-s, .lbl {
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
}
