/* ===================================================
   uptm.live — light theme (hostline.cloud style)
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

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

:root {
  --bg:       #fff;
  --surface:  #f9f9f9;
  --surface2: #f5f5f5;
  --border:   #eaeaea;
  --text:     #000;
  --muted:    rgba(0,0,0,0.55);
  --charcoal: #3a3a3a;
  --accent:   #4361ee;
  --green:    #16a34a;
  --red:      #dc2626;
  --yellow:   #ca8a04;
  --shadow:   0 10px 30px rgba(0,0,0,0.06);
  --shadow-hover: 0 20px 40px rgba(0,0,0,0.1);
  --radius:   16px;
  --radius-sm: 8px;
  --container: 1200px;
  --transition: all .3s ease;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-top: 90px;
}

a { color: var(--charcoal); text-decoration: none; }
a:hover { color: #555; }

/* ── CONTAINER ────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

/* ── FLOATING NAV ─────────────────────────────────── */
.nav {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 40px);
  max-width: var(--container);
  z-index: 1000;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(58,58,58,0.15);
  transition: box-shadow .3s ease;
}
.nav.scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.12); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--charcoal);
  text-decoration: none;
  letter-spacing: -0.03em;
}
.nav-logo .dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  flex-shrink: 0;
}

.nav-links { display: flex; align-items: center; gap: 24px; }
.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--charcoal);
  transition: color .2s;
}
.nav-links a:hover { color: #555; }

.nav-right { display: flex; align-items: center; gap: 10px; }

/* ── BUTTONS ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 9px 18px;
  text-decoration: none;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--charcoal);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.btn-primary:hover {
  background: #444;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.16);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: #ccc;
  color: var(--charcoal);
}
.btn-danger {
  background: #fff0f0;
  color: var(--red);
  border: 1.5px solid #fecaca;
}
.btn-danger:hover { background: #fee2e2; }
.btn-sm { font-size: 0.82rem; padding: 6px 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── ALERTS ───────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 20px;
}
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-warn  { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert-ok    { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }

/* ── HERO ─────────────────────────────────────────── */
.hero {
  max-width: 860px;
  margin: 0 auto;
  text-align: center;
  padding: 80px 20px 60px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 28px;
}
.hero-badge .live { color: var(--green); font-size: 10px; }
.hero h1 {
  font-size: 3.4rem;
  font-weight: 800;
  line-height: 1.15;
  color: #000;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero h1 span {
  background: linear-gradient(45deg, var(--charcoal), #666);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero > p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 56px; }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  box-shadow: var(--shadow);
}
.hero-stat {
  flex: 1;
  padding: 20px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}
.hero-stat:last-child { border-right: none; }
.hero-stat .val { font-size: 1.6rem; font-weight: 800; color: #000; line-height: 1; }
.hero-stat .lbl { font-size: 0.78rem; color: var(--muted); margin-top: 4px; }

/* ── SECTIONS ─────────────────────────────────────── */
.section {
  max-width: var(--container);
  margin: 0 auto;
  padding: 80px 20px;
}
.section-title { text-align: center; margin-bottom: 56px; }
.section-title h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #000;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}
.section-title p { font-size: 1.05rem; color: var(--muted); max-width: 600px; margin: 0 auto; }

/* ── FEATURES GRID ───────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 900px) { .features-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-hover); }
.feature-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
  transition: .3s;
}
.feature-card:hover .feature-icon { background: var(--surface2); }
.feature-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; color: #000; }
.feature-card p  { font-size: 0.93rem; color: var(--muted); line-height: 1.6; }

/* ── PRICING GRID ────────────────────────────────── */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 820px) { .pricing-grid { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; } }

.pricing-card {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  position: relative;
  transition: var(--transition);
}
.pricing-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.pricing-card.popular {
  border-color: var(--charcoal);
  box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}
.pricing-card h3 { font-size: 1.3rem; font-weight: 700; color: #000; margin-bottom: 4px; }
.pricing-desc { font-size: 0.87rem; color: var(--muted); margin-bottom: 20px; }
.pricing-badge {
  position: absolute;
  top: -14px; left: 50%;
  transform: translateX(-50%);
  background: var(--charcoal);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 100px;
  white-space: nowrap;
}
.pricing-price { margin-bottom: 24px; }
.pricing-price .amount { font-size: 2.4rem; font-weight: 800; color: #000; letter-spacing: -0.02em; }
.pricing-price .period { font-size: 0.9rem; color: var(--muted); }
.pricing-features { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.pricing-features li { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; color: var(--charcoal); }
.pricing-features .check { color: var(--green); font-weight: 700; flex-shrink: 0; }

/* ── PAGE WRAPPER (app) ──────────────────────────── */
.page-wrapper {
  max-width: var(--container);
  margin: 0 auto;
  padding: 36px 20px 80px;
}
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}
.page-header h1 { font-size: 1.7rem; font-weight: 700; color: #000; letter-spacing: -0.02em; }
.page-header a { font-size: 0.87rem; color: var(--muted); }
.page-header a:hover { color: var(--charcoal); }

/* ── STATS BAR ────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
@media (max-width: 640px) { .stats-bar { grid-template-columns: repeat(2, 1fr); } }

.stat-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.stat-card .label { font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.stat-card .value { font-size: 2rem; font-weight: 800; color: #000; line-height: 1; }
.stat-card .value.up   { color: var(--green); }
.stat-card .value.down { color: var(--red); }

/* ── MONITOR LIST ─────────────────────────────────── */
.monitors-list { display: flex; flex-direction: column; gap: 10px; }

.monitor-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  transition: var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.monitor-card:hover {
  border-color: #ccc;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}
.monitor-info { flex: 1; min-width: 0; }
.monitor-name { font-weight: 600; font-size: 0.95rem; color: #000; }
.monitor-url  { font-size: 0.8rem; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-meta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.resp-time    { font-size: 0.82rem; color: var(--muted); }

/* ── STATUS INDICATORS ──────────────────────────── */
.status-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.status-dot.up      { background: var(--green); box-shadow: 0 0 6px rgba(22,163,74,0.4); }
.status-dot.down    { background: var(--red);   box-shadow: 0 0 6px rgba(220,38,38,0.4); }
.status-dot.paused  { background: #9ca3af; }
.status-dot.pending { background: var(--yellow); }

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}
.status-pill.up     { background: #dcfce7; color: #166534; }
.status-pill.down   { background: #fee2e2; color: #991b1b; }
.status-pill.paused { background: #f3f4f6; color: #4b5563; }

.uptime-badge {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
}
.uptime-badge.high { background: #dcfce7; color: #166534; }
.uptime-badge.mid  { background: #fef9c3; color: #713f12; }
.uptime-badge.low  { background: #fee2e2; color: #991b1b; }

/* ── EMPTY STATE ──────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.empty-state p  { font-size: 0.93rem; color: var(--muted); max-width: 360px; margin: 0 auto 24px; }

/* ── AUTH ─────────────────────────────────────────── */
.auth-wrapper {
  min-height: calc(100vh - 90px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--surface);
}
.auth-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.auth-card h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; color: #000; }
.auth-card .subtitle { font-size: 0.9rem; color: var(--muted); margin-bottom: 28px; }
.auth-card .subtitle a { color: var(--charcoal); font-weight: 600; text-decoration: underline; }
@media (max-width: 480px) { .auth-card { padding: 32px 24px; } }

/* ── FORMS ────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 0.87rem; font-weight: 600; color: #000; margin-bottom: 6px; }
.form-input, .form-select {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.93rem;
  color: #000;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .2s;
  outline: none;
  -webkit-appearance: none;
}
.form-input:focus, .form-select:focus { border-color: var(--charcoal); }
.form-hint { font-size: 0.8rem; color: var(--muted); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }

.form-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
}

/* ── DETAIL PAGE ──────────────────────────────────── */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 640px) { .detail-grid { grid-template-columns: repeat(2, 1fr); } }

.detail-stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.detail-stat .label { font-size: 0.8rem; color: var(--muted); margin-bottom: 6px; }
.detail-stat .value { font-size: 1.3rem; font-weight: 700; }

.chart-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.chart-box h3 { font-size: 1rem; font-weight: 700; }
.chart-container { height: 240px; }

.history-table {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  overflow-x: auto;
}
.history-table h3 { font-size: 1rem; font-weight: 700; margin-bottom: 18px; }
.history-table table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.history-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.history-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--surface);
  vertical-align: middle;
}
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: var(--surface); }

/* ── STATUS PAGE (public) ─────────────────────────── */
.status-hero {
  text-align: center;
  padding: 60px 20px 40px;
  max-width: 700px;
  margin: 0 auto;
}
.status-hero h1 { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.overall-badge {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 20px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
}
.overall-badge.ok     { background: #dcfce7; color: #166534; }
.overall-badge.issues { background: #fee2e2; color: #991b1b; }

/* ── FOOTER ───────────────────────────────────────── */
.footer {
  background: var(--charcoal);
  color: rgba(255,255,255,0.7);
  border-radius: 20px;
  max-width: 1400px;
  margin: 20px auto;
  padding: 36px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.footer strong { color: #fff; }
.footer a { color: rgba(255,255,255,0.65); font-size: 0.87rem; transition: color .2s; }
.footer a:hover { color: #fff; }
.footer p { font-size: 0.87rem; }
@media (max-width: 640px) { .footer { margin: 12px; padding: 28px 20px; flex-direction: column; align-items: flex-start; } }

/* ── 404 ──────────────────────────────────────────── */
.page-404 {
  text-align: center;
  padding: 120px 20px;
}
.page-404 h1 { font-size: 5rem; font-weight: 800; color: var(--charcoal); line-height: 1; margin-bottom: 12px; }
.page-404 p  { font-size: 1.1rem; color: var(--muted); margin-bottom: 28px; }

/* ── RESPONSIVE NAV ───────────────────────────────── */
@media (max-width: 640px) {
  .nav { top: 0; width: 100%; border-radius: 0; }
  body { padding-top: 70px; }
  .hero h1 { font-size: 2.2rem; }
  .hero-stats { flex-wrap: wrap; }
  .hero-stat { min-width: 45%; }
  .nav-links { display: none; }
}

/* ── SCROLLBAR ────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }
