/**
 * OLYMPUS Pro2 - Full-Page Navigation Stylesheet
 * High-fidelity dark mode styles for Army, Miracles, Logs, Settings, Scheduler, Calc, and Radar pages.
 */

/* Page Container & Animations */
.page {
  animation: pageFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.page-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.page-title {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f1f5f9;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  font-size: 0.88rem;
  color: #94a3b8;
  max-width: 800px;
  line-height: 1.45;
}

.page-actions-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* =========================================================
   ARMY & RECRUITMENT PAGE
   ========================================================= */
.army-meta-bar {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 1rem;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  font-size: 0.82rem;
  color: #94a3b8;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.army-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.1rem;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.stat-card:hover {
  border-color: rgba(96, 165, 250, 0.3);
  transform: translateY(-2px);
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.35rem;
}

.stat-val {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--mono, monospace);
  margin-bottom: 0.25rem;
}

.stat-sub {
  font-size: 0.75rem;
  color: #64748b;
}

.army-cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.army-city-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.army-city-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.75rem;
}

.city-name {
  font-weight: 700;
  color: #f1f5f9;
  font-size: 1.05rem;
  margin-right: 0.4rem;
}

.city-coords {
  color: #94a3b8;
  font-family: var(--mono, monospace);
  font-size: 0.85rem;
}

.bldg-badge {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
  color: #cbd5e1;
}

.army-city-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.army-roster-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.roster-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
}

.roster-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.unit-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-family: var(--mono, monospace);
}

.unit-land {
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.25);
  color: #93c5fd;
}

.unit-sea {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
}

.unit-training {
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.3);
  color: #6ee7b7;
}

.empty-tag {
  font-size: 0.75rem;
  color: #64748b;
  font-style: italic;
}

.training-box {
  background: rgba(16, 185, 129, 0.04);
  border: 1px dashed rgba(16, 185, 129, 0.25);
  border-radius: 6px;
  padding: 0.6rem;
}

/* =========================================================
   MIRACLES PAGE
   ========================================================= */
.miracles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1rem;
}

.miracle-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
  transition: transform 0.15s ease;
}

.miracle-card:hover {
  transform: translateY(-2px);
}

.miracle-card-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.miracle-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.miracle-header-info {
  flex: 1;
}

.miracle-name {
  font-weight: 700;
  color: #f1f5f9;
  font-size: 1.05rem;
}

.miracle-lvl {
  font-size: 0.78rem;
  color: #facc15;
  font-family: var(--mono, monospace);
  margin-left: 4px;
}

.miracle-loc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
}

.miracle-desc {
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.4;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.miracle-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 0.75rem;
}

.miracle-cost {
  font-size: 0.78rem;
  color: #94a3b8;
}

/* =========================================================
   LOGS & TERMINAL PAGE
   ========================================================= */
.logs-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.logs-levels-group {
  display: flex;
  gap: 0.4rem;
}

.btn-pill-filter {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pill-filter:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #f1f5f9;
}

.btn-pill-filter.active {
  background: #facc15;
  color: #0f172a;
  border-color: #facc15;
  font-weight: 600;
}

.logs-search-box input {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 12px;
  color: #f1f5f9;
  font-size: 0.82rem;
  width: 240px;
}

.logs-terminal-card {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.logs-terminal-header {
  background: #111827;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.terminal-dots {
  display: flex;
  gap: 5px;
}

.terminal-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
}

.terminal-dots span:nth-child(1) { background: #ef4444; }
.terminal-dots span:nth-child(2) { background: #f59e0b; }
.terminal-dots span:nth-child(3) { background: #10b981; }

.terminal-title {
  font-family: var(--mono, monospace);
  font-size: 0.75rem;
  color: #94a3b8;
  flex: 1;
}

.terminal-counts {
  font-size: 0.72rem;
  color: #64748b;
  font-family: var(--mono, monospace);
}

.logs-terminal-body {
  padding: 1rem;
  max-height: 62vh;
  overflow-y: auto;
  font-family: var(--mono, monospace);
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.log-entry-row {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  line-height: 1.5;
  color: #cbd5e1;
}

.log-time {
  color: #64748b;
  flex-shrink: 0;
  font-size: 0.75rem;
}

.log-badge {
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

.lvl-info { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.lvl-success { background: rgba(52, 211, 153, 0.15); color: #34d399; }
.lvl-warn { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.lvl-error { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.log-account {
  color: #facc15;
  font-weight: 600;
  flex-shrink: 0;
}

.log-type {
  color: #a78bfa;
  flex-shrink: 0;
}

.log-msg {
  word-break: break-all;
}

/* =========================================================
   SETTINGS PAGE
   ========================================================= */
.settings-layout-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 820px;
}

.settings-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.4rem;
}

.settings-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.settings-icon-pill {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-card-title {
  font-weight: 700;
  color: #f1f5f9;
  font-size: 1.05rem;
}

.settings-card-sub {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 2px;
}

.connected-banner {
  background: rgba(16, 185, 129, 0.06);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.banner-check {
  font-size: 1.3rem;
  color: #10b981;
}

.banner-title {
  font-weight: 600;
  color: #34d399;
  font-size: 0.92rem;
}

.banner-sub {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 2px;
}

.input-with-btn {
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.input-with-btn input {
  flex: 1;
}

.verify-step-box {
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed rgba(250, 204, 21, 0.3);
  border-radius: 8px;
  padding: 1rem;
}

.verify-code-pill {
  background: #090d16;
  border: 1px solid rgba(250, 204, 21, 0.4);
  padding: 8px 16px;
  border-radius: 6px;
  font-family: var(--mono, monospace);
  font-size: 1.1rem;
  color: #facc15;
  font-weight: 700;
  text-align: center;
  margin: 10px 0;
}

.theme-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.theme-tile {
  background: #090d16;
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.theme-tile:hover {
  border-color: rgba(96, 165, 250, 0.4);
}

.theme-tile.active {
  border-color: #facc15;
  background: rgba(250, 204, 21, 0.04);
}

.theme-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 4px;
}

.theme-name {
  font-weight: 600;
  color: #f1f5f9;
  font-size: 0.88rem;
  display: block;
}

.theme-desc {
  font-size: 0.72rem;
  color: #64748b;
  display: block;
}

/* =========================================================
   CALCULATOR PAGE
   ========================================================= */
.calc-results-banner {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.res-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

.res-pill .pill-val {
  font-weight: 700;
  color: #f1f5f9;
  font-family: var(--mono, monospace);
}

.gold-pill .pill-val {
  color: #facc15;
}

.calc-columns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 1.25rem;
}

.calc-column-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.25rem;
}

.column-card-title {
  font-weight: 700;
  color: #f1f5f9;
  font-size: 1.05rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 0.5rem;
}

.calc-units-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.calc-unit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
}

.calc-unit-info {
  display: flex;
  flex-direction: column;
}

.unit-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: #f1f5f9;
}

.unit-specs {
  font-size: 0.72rem;
  color: #64748b;
  font-family: var(--mono, monospace);
}

/* =========================================================
   SCHEDULER & RADAR TABLES
   ========================================================= */
.scheduler-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.scheduler-table-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
}

.stratmap-toolbar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #94a3b8;
}

.toggle-option-row {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: rgba(0, 0, 0, 0.2);
  padding: 0.9rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.toggle-title {
  font-weight: 600;
  color: #f1f5f9;
  font-size: 0.9rem;
}

.toggle-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 3px;
  line-height: 1.4;
}

.btn-emerald {
  background: #10b981;
  color: #fff;
  border: none;
}

.btn-emerald:hover {
  background: #059669;
}

/* Common Styled Table for Scheduler, Radar, Islands, Monitor, Movements */
.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.table-styled {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.table-styled th {
  padding: 11px 16px;
  text-align: left;
  color: #94a3b8;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.table-styled td {
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  white-space: nowrap;
  vertical-align: middle;
}

.table-styled tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.badge-cyan { background: rgba(56, 189, 248, 0.12); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.25); }
.badge-gold { background: rgba(250, 204, 21, 0.12); color: #facc15; border: 1px solid rgba(250, 204, 21, 0.25); }
.badge-green { background: rgba(52, 211, 153, 0.12); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.25); }
.badge-red { background: rgba(239, 68, 68, 0.12); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }
.badge-purple { background: rgba(168, 85, 247, 0.12); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.25); }


/* Operator settings (PlatformSettings.js) */
.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.8rem 1rem;
}

.ops-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.78rem;
  color: #94a3b8;
}

.ops-actions {
  margin-top: 0.9rem;
  display: flex;
  justify-content: flex-end;
}

/* Generic page buttons (Settings, Proxies, Groups, IP Sharing, Custom Chain) */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.btn-sm { padding: 5px 12px; font-size: 0.76rem; }
.btn-gold {
  background: linear-gradient(135deg, #00d2ff 0%, #3a7bd5 100%);
  color: #0b0f17;
  font-weight: 700;
}
.btn-gold:hover:not(:disabled) { box-shadow: 0 4px 14px rgba(0, 210, 255, 0.3); }
.btn-outline {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}
.btn-outline:hover:not(:disabled) { color: var(--text-primary); border-color: var(--text-muted); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.table-scroll { overflow-x: auto; }
