/* ── Reset & Variables ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:         #185FA5;
  --blue-light:   #E6F1FB;
  --blue-mid:     #378ADD;
  --blue-dark:    #0C447C;
  --text-primary: #1a1a1a;
  --text-sec:     #555;
  --text-ter:     #999;
  --bg:           #ffffff;
  --bg-sec:       #f7f7f5;
  --border:       rgba(0,0,0,0.10);
  --border-light: rgba(0,0,0,0.06);
  --radius-md:    8px;
  --radius-lg:    12px;
  --green:        #1D6A3A;
  --green-light:  #EAFAF1;
  --green-mid:    #27AE60;
  --red:          #C0392B;
  --red-light:    #FDEDEC;
  --amber:        #D68910;
  --amber-light:  #FEF9E7;
}

html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; color: var(--text-primary); background: var(--bg); line-height: 1.6; }
a { color: var(--blue); }
h1, h2, h3 { letter-spacing: -0.02em; }
em { font-style: normal; color: var(--blue); }

/* ── Navigation ─────────────────────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 100; background: var(--bg); border-bottom: 0.5px solid var(--border-light); }
.nav-inner { max-width: 1080px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 2rem; gap: 1rem; }
.logo { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; color: var(--text-primary); }
.logo span { color: var(--blue); }
.logo small { font-size: 11px; font-weight: 400; color: var(--text-ter); margin-left: 4px; }
.nav-links { display: flex; gap: 1.75rem; }
.nav-links a { font-size: 14px; text-decoration: none; color: var(--text-sec); position: relative; }
.nav-links a::after { content:''; position:absolute; bottom:-3px; left:0; width:0; height:1.5px; background:var(--blue); transition:width .2s; }
.nav-links a:hover { color: var(--text-primary); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--blue); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }
.nav-user { font-size: 13px; color: var(--text-sec); }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary { display: inline-block; background: var(--text-primary); color: #fff !important; padding: 10px 20px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500; border: none; cursor: pointer; text-decoration: none; font-family: inherit; transition: opacity .15s; }
.btn-primary:hover { opacity: .85; }
.btn-primary.btn-full { width: 100%; text-align: center; padding: 13px; font-size: 15px; }
.btn-ghost { display: inline-block; background: transparent; color: var(--text-primary) !important; padding: 8px 14px; border-radius: var(--radius-md); font-size: 14px; border: 1px solid var(--border); cursor: pointer; text-decoration: none; font-family: inherit; transition: background .15s; }
.btn-ghost:hover { background: var(--bg-sec); }
.btn-ghost.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-ghost.btn-danger { color: var(--red) !important; border-color: rgba(192,57,43,.25); }
.btn-ghost.btn-danger:hover { background: var(--red-light); }
.btn-secondary { display: inline-block; background: transparent; color: var(--text-primary) !important; padding: 10px 20px; border-radius: var(--radius-md); font-size: 14px; border: 1px solid rgba(0,0,0,.2); cursor: pointer; text-decoration: none; font-family: inherit; }
.btn-secondary:hover { background: var(--bg-sec); }

/* ── Alerts ──────────────────────────────────────────────────── */
.alert { border-radius: var(--radius-md); padding: 0.85rem 1rem; font-size: 14px; margin-bottom: 1.25rem; }
.alert-error { background: var(--red-light); color: var(--red); border: 1px solid rgba(192,57,43,.2); }
.alert-success { background: var(--green-light); color: var(--green); border: 1px solid rgba(29,106,58,.2); }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 1rem; }
.form-group label { font-size: 13px; font-weight: 500; color: var(--text-sec); }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 10px 12px; border: 1px solid rgba(0,0,0,.15);
  border-radius: var(--radius-md); font-size: 14px; font-family: inherit;
  color: var(--text-primary); background: var(--bg); transition: border-color .15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(24,95,165,.1);
}
.form-group textarea { resize: vertical; line-height: 1.6; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 1rem; font-size: 14px; }
.form-check input { width: auto; }
.form-actions { display: flex; gap: 0.75rem; align-items: center; margin-top: 0.5rem; }
.field-error { font-size: 12px; color: var(--red); }
.field-hint { font-size: 12px; color: var(--text-ter); }
.form-note { font-size: 12px; color: var(--text-ter); text-align: center; margin-top: 0.75rem; }

/* ── Auth Pages ──────────────────────────────────────────────── */
.auth-page { min-height: calc(100vh - 68px); display: flex; align-items: center; justify-content: center; padding: 2rem; background: var(--bg-sec); }
.auth-card { background: var(--bg); border: 0.5px solid var(--border-light); border-radius: var(--radius-lg); padding: 2.5rem; width: 100%; max-width: 420px; }
.auth-card-wide { max-width: 560px; }
.auth-logo { margin-bottom: 1.5rem; }
.auth-logo a { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; color: var(--text-primary); }
.auth-logo a span { color: var(--blue); }
.auth-card h1 { font-size: 1.5rem; font-weight: 600; margin-bottom: 0.4rem; }
.auth-sub { font-size: 14px; color: var(--text-sec); margin-bottom: 1.75rem; line-height: 1.6; }
.auth-switch { font-size: 13px; color: var(--text-sec); text-align: center; margin-top: 1.25rem; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero { padding: 5rem 2rem 4rem; text-align: center; }
.hero-inner { max-width: 760px; margin: 0 auto; }
.badge { display: inline-block; background: var(--blue-light); color: var(--blue); font-size: 12px; padding: 4px 14px; border-radius: 20px; margin-bottom: 1.5rem; font-weight: 500; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 600; line-height: 1.15; margin-bottom: 1.25rem; }
.hero p { font-size: 1.05rem; color: var(--text-sec); line-height: 1.7; margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.stats-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border-light); border: 0.5px solid var(--border-light); border-radius: var(--radius-lg); overflow: hidden; max-width: 720px; margin: 3rem auto 0; }
.stat { background: var(--bg); padding: 1.4rem; text-align: center; }
.stat-num { display: block; font-size: 1.7rem; font-weight: 600; color: var(--blue); }
.stat-label { display: block; font-size: 12px; color: var(--text-sec); margin-top: 3px; }

/* ── Platform bar ────────────────────────────────────────────── */
.platform-bar { border-top: 0.5px solid var(--border-light); border-bottom: 0.5px solid var(--border-light); padding: 1.1rem 2rem; display: flex; align-items: center; justify-content: center; gap: 0.6rem; flex-wrap: wrap; }
.platform-bar-label { font-size: 13px; color: var(--text-ter); margin-right: 0.25rem; }
.platform-pill { display: flex; align-items: center; gap: 6px; background: var(--bg-sec); border: 0.5px solid var(--border-light); border-radius: var(--radius-md); padding: 5px 12px; font-size: 13px; font-weight: 500; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* ── Sections ────────────────────────────────────────────────── */
.section { padding: 4rem 2rem; }
.section-inner { max-width: 960px; margin: 0 auto; }
.section-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-ter); margin-bottom: 0.75rem; }
.section h2, .stall-section h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; margin-bottom: 0.75rem; }
.section-intro { color: var(--text-sec); line-height: 1.7; max-width: 560px; margin-bottom: 2rem; }
.divider { border: none; border-top: 0.5px solid var(--border-light); max-width: 960px; margin: 0 auto; }

/* ── Stall section ───────────────────────────────────────────── */
.stall-section { padding: 4rem 2rem; background: var(--bg-sec); border-top: 0.5px solid var(--border-light); border-bottom: 0.5px solid var(--border-light); }
.stall-section .section-inner { max-width: 960px; margin: 0 auto; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.stall-card { background: var(--bg); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; border-left: 3px solid var(--blue-mid); }
.stall-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 10px; }
.num { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--blue-light); color: var(--blue); font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; }
.stall-card p { font-size: 13px; color: var(--text-sec); line-height: 1.6; }

/* ── CMS grid ────────────────────────────────────────────────── */
.cms-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; }
.cms-card { border: 0.5px solid var(--border-light); border-radius: var(--radius-lg); padding: 1.25rem; background: var(--bg-sec); text-align: center; }
.cms-icon { width: 44px; height: 44px; border-radius: var(--radius-md); margin: 0 auto 0.75rem; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }
.cms-card h3 { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.cms-card p { font-size: 12px; color: var(--text-sec); line-height: 1.5; }

/* ── Features ────────────────────────────────────────────────── */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.feature-card { background: var(--bg-sec); border-radius: var(--radius-lg); padding: 1.25rem; border: 0.5px solid var(--border-light); }
.feature-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--text-sec); line-height: 1.6; }

/* ── Plans ───────────────────────────────────────────────────── */
.plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.plan { background: var(--bg); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; }
.plan-featured { border: 2px solid var(--blue); }
.plan-badge { display: inline-block; background: var(--blue-light); color: var(--blue); font-size: 11px; padding: 3px 10px; border-radius: 12px; margin-bottom: 0.75rem; font-weight: 500; }
.plan h3 { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.price { font-size: 1.8rem; font-weight: 600; margin: 0.75rem 0 0.25rem; letter-spacing: -0.03em; }
.price span { font-size: 14px; font-weight: 400; color: var(--text-sec); }
.plan-desc { font-size: 13px; color: var(--text-sec); margin-bottom: 1.25rem; line-height: 1.5; }
.plan ul { list-style: none; margin-bottom: 1.5rem; }
.plan ul li { font-size: 13px; color: var(--text-sec); padding: 5px 0; border-bottom: 0.5px solid var(--border-light); }
.plan ul li::before { content: '✓ '; color: var(--blue); font-weight: 600; }
.plan-btn { display: block; width: 100%; padding: 10px; border-radius: var(--radius-md); font-size: 14px; cursor: pointer; border: 1px solid var(--border); background: transparent; color: var(--text-primary); text-align: center; text-decoration: none; font-family: inherit; }
.plan-btn-blue { background: var(--blue); color: #fff !important; border-color: var(--blue); }

/* ── Contact section ─────────────────────────────────────────── */
.contact-section { background: var(--bg-sec); border-top: 0.5px solid var(--border-light); padding: 4rem 2rem; }
.contact-inner { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: 1fr 2fr; gap: 2.5rem; align-items: start; }
.contact-sidebar h2 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); font-weight: 600; margin-bottom: 0.75rem; }
.contact-sidebar p { font-size: 14px; color: var(--text-sec); line-height: 1.7; margin-bottom: 1.5rem; }
.contact-details { display: flex; flex-direction: column; gap: 0.75rem; }
.contact-details > div { font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.detail-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-ter); }
.contact-form-card { background: var(--bg); border: 0.5px solid var(--border-light); border-radius: var(--radius-lg); padding: 2rem; }

/* ── Dashboard ───────────────────────────────────────────────── */
.dashboard { max-width: 960px; margin: 0 auto; padding: 2.5rem 2rem; }
.dashboard-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.dashboard-header h1 { font-size: 1.6rem; font-weight: 600; }
.dashboard-sub { font-size: 14px; color: var(--text-sec); margin-top: 3px; }

/* ── Empty state ─────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 4rem 2rem; background: var(--bg-sec); border-radius: var(--radius-lg); border: 0.5px solid var(--border-light); }
.empty-icon { margin-bottom: 1rem; }
.empty-state h2 { font-size: 1.3rem; font-weight: 600; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-sec); margin-bottom: 1.5rem; }

/* ── Monitor cards ───────────────────────────────────────────── */
.monitor-list { display: flex; flex-direction: column; gap: 1rem; }
.monitor-card { background: var(--bg); border: 0.5px solid var(--border-light); border-radius: var(--radius-lg); overflow: hidden; }
.monitor-card-header { display: flex; align-items: center; gap: 12px; padding: 1rem 1.25rem; }
.monitor-info { flex: 1; min-width: 0; }
.monitor-name { font-size: 14px; font-weight: 600; }
.monitor-url { font-size: 12px; color: var(--text-ter); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.monitor-url-link { font-size: 13px; color: var(--blue); text-decoration: none; }
.monitor-meta-right { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }
.meta-item { display: flex; flex-direction: column; text-align: right; }
.meta-label { font-size: 11px; color: var(--text-ter); }
.meta-value { font-size: 13px; font-weight: 500; }

/* ── Status indicators ───────────────────────────────────────── */
.status-indicator { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.status-up      { background: var(--green-mid); box-shadow: 0 0 0 3px rgba(39,174,96,.15); }
.status-down    { background: var(--red);       box-shadow: 0 0 0 3px rgba(192,57,43,.15); }
.status-slow    { background: var(--amber);     box-shadow: 0 0 0 3px rgba(214,137,16,.15); }
.status-unknown { background: #ccc; }
.status-badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.status-badge-up      { background: var(--green-light); color: var(--green); }
.status-badge-down    { background: var(--red-light);   color: var(--red); }
.status-badge-slow    { background: var(--amber-light); color: var(--amber); }
.status-badge-unknown { background: #f0f0f0; color: #888; }
.status-badge-pending { background: #f0f0f0; color: #888; }

/* ── Uptime bars ─────────────────────────────────────────────── */
.uptime-history { display: flex; gap: 2px; padding: 0 1.25rem 0.5rem; }
.uptime-history-lg { padding: 0 0 0.5rem; }
.uptime-bar { flex: 1; height: 28px; border-radius: 3px; cursor: default; transition: opacity .1s; }
.uptime-bar:hover { opacity: .75; }
.bar-up      { background: var(--green-mid); }
.bar-down    { background: var(--red); }
.bar-slow    { background: var(--amber); }
.bar-unknown { background: #ddd; }
.history-label { display: flex; justify-content: space-between; align-items: center; padding: 0 1.25rem 1rem; font-size: 11px; color: var(--text-ter); }
.legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.pending-message { padding: 0.75rem 1.25rem 1rem; font-size: 13px; color: var(--text-ter); font-style: italic; }
.monitor-error { background: var(--red-light); color: var(--red); font-size: 12px; padding: 6px 1.25rem; border-top: 0.5px solid rgba(192,57,43,.15); }

/* ── Detail page ─────────────────────────────────────────────── */
.detail-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.detail-stat { background: var(--bg-sec); border-radius: var(--radius-md); padding: 1rem; }
.detail-stat-label { display: block; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-ter); margin-bottom: 4px; }
.detail-stat-value { font-size: 1rem; font-weight: 600; }
.section-card { background: var(--bg); border: 0.5px solid var(--border-light); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.25rem; }
.section-card-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.table-wrap { overflow-x: auto; }
.checks-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.checks-table th { text-align: left; padding: 8px 10px; background: var(--bg-sec); font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
.checks-table td { padding: 8px 10px; border-bottom: 0.5px solid var(--border-light); color: var(--text-sec); }
.checks-table tr:last-child td { border-bottom: none; }
.row-down td { background: rgba(192,57,43,.03); }
.row-slow td { background: rgba(214,137,16,.03); }
.error-cell { font-size: 12px; color: var(--red); max-width: 300px; }
.table-note { font-size: 12px; color: var(--text-ter); margin-top: 0.75rem; text-align: center; }
.text-success { color: var(--green) !important; }
.text-warn    { color: var(--amber) !important; }

/* ── Footer ──────────────────────────────────────────────────── */
.footer { border-top: 0.5px solid var(--border-light); padding: 2rem; }
.footer-inner { max-width: 1080px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; }
.footer p { font-size: 13px; color: var(--text-ter); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: 13px; color: var(--text-ter); text-decoration: none; }
.footer-links a:hover { color: var(--text-primary); }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 700px) {
  .nav-links { display: none; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .form-row { grid-template-columns: 1fr; }
  .contact-inner { grid-template-columns: 1fr; }
  .monitor-meta-right { flex-wrap: wrap; gap: .5rem; }
  .meta-item { display: none; }
  .dashboard { padding: 1.5rem 1rem; }
  .auth-card { padding: 1.75rem; }
}

/* ── Uptime page ─────────────────────────────────────────────── */
.badge-green { display: inline-flex; align-items: center; gap: 6px; background: var(--green-light); color: var(--green); font-size: 12px; padding: 4px 14px; border-radius: 20px; margin-bottom: 1.5rem; font-weight: 500; }
.badge-pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--green-mid); animation: badge-pulse 2s infinite; flex-shrink: 0; }
@keyframes badge-pulse { 0%,100%{ opacity:1; transform:scale(1); } 50%{ opacity:0.5; transform:scale(1.3); } }

.demo-monitor-card { background: var(--bg); border: 0.5px solid var(--border-light); border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 0.75rem; }
.demo-monitor-header { display: flex; align-items: center; gap: 12px; padding: 1rem 1.25rem; flex-wrap: wrap; }
.demo-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.demo-dot-up   { background: var(--green-mid); box-shadow: 0 0 0 3px rgba(39,174,96,.15); }
.demo-dot-down { background: var(--red);       box-shadow: 0 0 0 3px rgba(192,57,43,.15); }
.demo-dot-slow { background: var(--amber);     box-shadow: 0 0 0 3px rgba(214,137,16,.15); }
.demo-monitor-name { font-size: 14px; font-weight: 600; }
.demo-monitor-url  { font-size: 12px; color: var(--text-ter); }
.demo-status-label { font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 20px; white-space: nowrap; }
.demo-label-up   { background: var(--green-light); color: var(--green); }
.demo-label-down { background: var(--red-light);   color: var(--red); }
.demo-label-slow { background: var(--amber-light); color: var(--amber); }
.demo-uptime-bars { display: flex; gap: 2px; padding: 0 1.25rem 0.5rem; }
.demo-monitor-meta { display: flex; gap: 1.5rem; font-size: 12px; color: var(--text-ter); padding: 0 1.25rem 0.75rem; flex-wrap: wrap; }
.demo-monitor-meta span strong { color: var(--text-sec); font-weight: 500; }

.channel-pill { display: flex; align-items: center; gap: 8px; background: var(--bg-sec); border: 0.5px solid var(--border-light); border-radius: var(--radius-md); padding: 8px 14px; font-size: 13px; font-weight: 500; }
.channel-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.plan-btn-blue { background: var(--blue); color: #fff !important; border-color: var(--blue); }
