/* ==========================================================================
   NewDayPing — supplemental styles layered on the Modernize theme (styles.css).
   Only defines the app-specific classes the base theme doesn't ship.
   Everything is expressed through the theme's own --bs-* variables so it
   matches the active Blue_Theme (dark) palette exactly.
   ========================================================================== */

/* ---------- Topbar extras --------------------------------------------- */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--bs-primary), #49beff);
  color: #fff; font-weight: 700; font-size: .85rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.who { color: var(--bs-secondary-color); font-size: .85rem; }
.muted { color: var(--bs-secondary-color) !important; }

/* ---------- Page header ----------------------------------------------- */
.page-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap;
}
.page-head h1 { margin: 0; font-size: 1.4rem; }
.head-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ---------- Panels / cards -------------------------------------------- */
.panel {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  padding: 1.5rem; margin-bottom: 1.5rem;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.panel h2 { font-size: 1.1rem; margin-top: 0; }
.danger-zone { border-color: rgba(250,137,107,.5); }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px,1fr)); gap: 1.25rem; }
.card.link-card { padding: 1.25rem; display: block; transition: transform .12s, border-color .12s; }
.card.link-card:hover { transform: translateY(-3px); border-color: var(--bs-primary); text-decoration: none; }
.card h3 { margin: 0 0 .35rem; font-size: 1.05rem; }
.card-meta { display: flex; gap: 1rem; color: var(--bs-secondary-color); font-size: .8rem; margin-top: .9rem; }

/* ---------- Stat tiles ------------------------------------------------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }
.stat {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 12px; padding: 1.1rem 1.25rem;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.stat-label { display:block; color: var(--bs-secondary-color); font-size:.75rem; text-transform:uppercase; letter-spacing:.04em; margin-bottom:.35rem; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--bs-emphasis-color); }
.text-up { color: var(--bs-success) !important; }
.text-down { color: var(--bs-danger) !important; }

/* ---------- Status badges --------------------------------------------- */
.badge { display:inline-block; padding:.3rem .6rem; border-radius:999px; font-size:.72rem; font-weight:600; line-height:1; }
.badge-up    { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); }
.badge-down  { background: var(--bs-danger-bg-subtle);  color: var(--bs-danger-text-emphasis); }
.badge-muted { background: var(--bs-secondary-bg);      color: var(--bs-secondary-color); }

/* ---------- Buttons the theme lacks ----------------------------------- */
.btn-ghost { background: transparent; border-color: transparent; color: var(--bs-secondary-color); }
.btn-ghost:hover { background: rgba(255,255,255,.06); color: var(--bs-emphasis-color); }
.btn-provider {
  width: 100%; margin: .4rem 0; padding: .75rem;
  border: 1px solid var(--bs-border-color); border-radius: 8px;
  background: var(--bs-body-bg); color: var(--bs-body-color); font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
}
.btn-provider:hover { border-color: var(--bs-primary); color: var(--bs-emphasis-color); }
.inline { display: inline; }

/* ---------- Flash messages -------------------------------------------- */
.flash { padding:.8rem 1.1rem; border-radius:8px; margin-bottom:1.25rem; border:1px solid transparent; }
.flash-ok  { background: var(--bs-success-bg-subtle); color: var(--bs-success-text-emphasis); border-color: rgba(19,222,185,.4); }
.flash-err { background: var(--bs-danger-bg-subtle);  color: var(--bs-danger-text-emphasis);  border-color: rgba(250,137,107,.4); }

/* ---------- Forms ------------------------------------------------------ */
.form { max-width: 680px; }
.field { margin-bottom: 1.15rem; }
.field label { display:block; font-weight:600; margin-bottom:.4rem; color: var(--bs-emphasis-color); }
.input {
  width: 100%; padding: .6rem .75rem;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 8px; color: var(--bs-body-color); font-size: .9rem;
}
.input:focus { outline:none; border-color: var(--bs-primary); box-shadow: 0 0 0 3px rgba(93,135,255,.25); color: var(--bs-emphasis-color); }
.input-sm { width:auto; padding:.35rem .6rem; }
.grid-2 { display:grid; grid-template-columns:repeat(2,1fr); gap:1rem; }
.field-check .check { display:flex; align-items:center; gap:.5rem; font-weight:600; }
.actions { display:flex; gap:.6rem; margin-top:1.25rem; }
.inline-form { display:flex; gap:.6rem; align-items:center; margin-top:1.25rem; flex-wrap:wrap; }
select.input option { color:#fff; background:#2a3447; }

/* ---------- Auth / hero (unauthenticated pages) ----------------------- */
.auth-shell { min-height:100vh; display:flex; align-items:center; justify-content:center; padding:2rem; }
.auth-card {
  max-width:420px; width:100%;
  background: var(--bs-body-bg); border:1px solid var(--bs-border-color);
  border-radius:12px; padding:2.5rem; text-align:center;
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.auth-card .brand-mark { font-size:2rem; color: var(--bs-primary); }
.provider-form { margin-top:1.25rem; }

/* ---------- Brand lockup (logo as used in-app) ------------------------ */
.brand-name {
  color: #fff !important;
  font-family: "Bungee", system-ui, sans-serif;
  letter-spacing: .01em;
}
.brand-lockup { display: inline-flex; align-items: center; gap: .5rem; }

.hero { text-align:center; padding:3rem 1rem; }
.hero h1 { font-size:2.6rem; }
.lead { font-size:1.15rem; color: var(--bs-secondary-color); max-width:640px; margin:.75rem auto 1.75rem; }
.feature-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(210px,1fr)); gap:1.25rem; margin-top:2.5rem; text-align:left; }
.feature { background: var(--bs-body-bg); border:1px solid var(--bs-border-color); border-radius:12px; padding:1.25rem; }
.feature h3 { margin:0 0 .5rem; font-size:1rem; }
.feature p { margin:0; color: var(--bs-secondary-color); font-size:.88rem; }

/* ---------- Status dots ----------------------------------------------- */
.dot { display:inline-block; width:10px; height:10px; border-radius:50%; flex:0 0 auto; }
.dot-up      { background: var(--bs-success); box-shadow: 0 0 0 4px rgba(19,222,185,.15); }
.dot-down    { background: var(--bs-danger);  box-shadow: 0 0 0 4px rgba(250,137,107,.15); }
.dot-paused,
.dot-pending,
.dot-muted   { background: var(--bs-secondary-color); }

/* ---------- Web apps list (subtle, UptimeRobot-style) ----------------- */
.monitor-list { padding: .25rem 0; }
.monitor-row {
  display:flex; align-items:center; gap:1rem;
  padding: .85rem 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.monitor-row:last-child { border-bottom: none; }
.monitor-main { flex:1 1 auto; min-width:0; }
.monitor-name { font-weight:600; color: var(--bs-emphasis-color); text-decoration:none; }
.monitor-name:hover { color: var(--bs-primary); }
.monitor-sub { display:flex; align-items:center; gap:.5rem; margin-top:.2rem; font-size:.8rem; flex-wrap:wrap; }
.monitor-uptime { display:flex; align-items:center; gap:.6rem; flex:0 0 auto; width:180px; }
.uptime-bar { flex:1 1 auto; height:6px; border-radius:999px; background: rgba(255,255,255,.07); overflow:hidden; }
.uptime-fill { display:block; height:100%; border-radius:999px; }
.uptime-fill.bar-up   { background: var(--bs-success); }
.uptime-fill.bar-ok   { background: #539bff; }
.uptime-fill.bar-warn { background: #ffae1f; }
.uptime-fill.bar-down { background: var(--bs-danger); }
.uptime-pct { font-size:.8rem; color: var(--bs-secondary-color); min-width:44px; text-align:right; }

@media (max-width: 640px) {
  .monitor-uptime { width:110px; }
}

/* ---------- Uptime segment cards (dashboard, UptimeRobot-style) ------- */
.uptime-card {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 10px;
  padding: .9rem 1rem;
  height: 100%;
}
.uptime-card-name {
  display: block; font-weight: 600; color: var(--bs-emphasis-color);
  text-decoration: none; margin-bottom: .6rem;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.uptime-card-name:hover { color: var(--bs-primary); }
.uptime-ticks { display: flex; align-items: flex-end; gap: 2px; height: 24px; }
.tick { flex: 1 1 auto; min-width: 3px; max-width: 8px; height: 100%; border-radius: 2px; }
.tick-up   { background: var(--bs-success); }
.tick-down { background: #ffae1f; }
.uptime-card-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: .55rem; font-size: .8rem;
}
.uptime-pct-lg { font-weight: 700; color: var(--bs-emphasis-color); }

/* ---------- Misc ------------------------------------------------------- */
.truncate { max-width:320px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pager { display:flex; gap:1rem; align-items:center; justify-content:center; margin-top:1.5rem; }
canvas { max-width:100%; }
