:root {
  --bg:     #020508;
  --bg2:    #060d12;
  --bg3:    #0b1820;
  --cyan:   #00f5ff;
  --green:  #00ff88;
  --red:    #ff2d55;
  --yellow: #ffcc00;
  --text:   #c8e8f0;
  --muted:  #3a5a68;
  --border: #0f2535;
  --dim:    #0f2535;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Rajdhani', sans-serif;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(0,245,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,245,255,0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none; z-index: 0;
}

.scanbar {
  position: fixed; top: -2px; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  animation: scanline 5s linear infinite;
  z-index: 999; pointer-events: none;
}
@keyframes scanline { 0% { top: 0; opacity: 1; } 90% { opacity: .4; } 100% { top: 100vh; opacity: 0; } }

.wrap { max-width: 920px; margin: 0 auto; padding: 0 20px 80px; position: relative; z-index: 1; }

/* HEADER */
header {
  padding: 52px 0 32px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 40px;
}
.logo-tag {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px; letter-spacing: 7px;
  color: var(--cyan); opacity: .6;
  text-transform: uppercase; margin-bottom: 14px;
}
header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 38px; font-weight: 900;
  letter-spacing: 6px; text-transform: uppercase;
  background: linear-gradient(135deg, #fff 0%, var(--cyan) 55%, var(--green) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.header-sub {
  margin-top: 14px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 11px; color: var(--muted); letter-spacing: 2px;
}

/* OVERALL */
.overall {
  border: 1px solid var(--border);
  background: var(--bg2);
  border-radius: 2px;
  padding: 22px 26px;
  margin-bottom: 28px;
  display: flex; align-items: center; gap: 14px;
  position: relative; overflow: hidden;
}
.overall::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--green);
}
.overall.degraded::before { background: var(--yellow); }
.overall.outage::before   { background: var(--red); }

.odot {
  width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0;
  background: var(--green); box-shadow: 0 0 12px var(--green);
  animation: blink 2.2s ease-in-out infinite;
}
.overall.degraded .odot { background: var(--yellow); box-shadow: 0 0 12px var(--yellow); }
.overall.outage   .odot { background: var(--red);    box-shadow: 0 0 12px var(--red); animation: blink-fast 1s ease-in-out infinite; }
@keyframes blink      { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.5; transform:scale(.8); } }
@keyframes blink-fast { 0%,100% { opacity:1; } 50% { opacity:.2; } }

.overall-text strong { font-size: 19px; font-weight: 700; letter-spacing: 1px; display: block; }
.overall-text span   { font-family: 'Share Tech Mono', monospace; font-size: 11px; color: var(--muted); }

/* SECTION TITLE */
.section-title {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px; letter-spacing: 5px; color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 12px; margin-top: 36px;
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}

/* SERVICE CARD */
.service-list { display: flex; flex-direction: column; gap: 2px; }
.service-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 2px; padding: 16px 20px;
  display: flex; align-items: center; gap: 14px;
  transition: border-color .2s, background .2s;
}
.service-card:hover { border-color: #1a3545; background: var(--bg3); }

.svc-info { flex: 1; }
.svc-name { font-size: 16px; font-weight: 600; letter-spacing: .5px; }
.svc-desc { font-family: 'Share Tech Mono', monospace; font-size: 10px; color: var(--muted); margin-top: 2px; }

.uptime-bars { display: flex; gap: 2px; margin-top: 7px; }
.ubar { flex: 1; height: 4px; border-radius: 1px; background: var(--dim); }
.ubar.op  { background: var(--green);  opacity: .75; }
.ubar.dg  { background: var(--yellow); opacity: .75; }
.ubar.out { background: var(--red);    opacity: .75; }

.svc-uptime {
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px; color: var(--muted);
  text-align: right; margin-right: 14px; white-space: nowrap;
}
.svc-uptime strong { display: block; font-size: 14px; color: var(--text); }

.svc-badge {
  padding: 5px 12px; border-radius: 2px;
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px; letter-spacing: 1px; white-space: nowrap; flex-shrink: 0;
}
.badge-op  { background: rgba(0,255,136,.1);  color: var(--green);  border: 1px solid rgba(0,255,136,.25); }
.badge-dg  { background: rgba(255,204,0,.1);  color: var(--yellow); border: 1px solid rgba(255,204,0,.25); }
.badge-out { background: rgba(255,45,85,.1);  color: var(--red);    border: 1px solid rgba(255,45,85,.25); }
.badge-mt  { background: rgba(0,245,255,.08); color: var(--cyan);   border: 1px solid rgba(0,245,255,.2);  }

/* INCIDENTS */
.incident-list { display: flex; flex-direction: column; gap: 8px; }
.incident-card {
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: 2px; padding: 18px 20px;
  border-left: 3px solid var(--red);
}
.incident-card.inc-resolved    { border-left-color: var(--green); }
.incident-card.inc-monitoring  { border-left-color: var(--yellow); }

.incident-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.incident-title { font-size: 15px; font-weight: 600; }
.incident-ts    { font-family: 'Share Tech Mono', monospace; font-size: 10px; color: var(--muted); white-space: nowrap; }
.incident-body  { font-family: 'Share Tech Mono', monospace; font-size: 11px; color: var(--muted); margin-top: 8px; line-height: 1.7; }

.inc-badge {
  display: inline-block; margin-top: 10px;
  padding: 3px 9px; font-family: 'Share Tech Mono', monospace; font-size: 10px; border-radius: 2px;
}
.inc-badge.inc-investigating { background: rgba(255,45,85,.1);  color: var(--red);    border: 1px solid rgba(255,45,85,.2); }
.inc-badge.inc-monitoring    { background: rgba(255,204,0,.1);  color: var(--yellow); border: 1px solid rgba(255,204,0,.2); }
.inc-badge.inc-resolved      { background: rgba(0,255,136,.1);  color: var(--green);  border: 1px solid rgba(0,255,136,.2); }

.empty-state {
  text-align: center; padding: 40px;
  font-family: 'Share Tech Mono', monospace; font-size: 12px; color: var(--muted);
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  margin-top: 60px; padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Share Tech Mono', monospace; font-size: 10px; color: var(--muted);
  flex-wrap: wrap; gap: 8px;
}
footer a { color: var(--cyan); text-decoration: none; opacity: .7; }

/* FORMS (admin/login) */
.form-group { margin-bottom: 18px; }
label {
  display: block; font-family: 'Share Tech Mono', monospace;
  font-size: 10px; letter-spacing: 3px; color: var(--muted);
  margin-bottom: 7px; text-transform: uppercase;
}
input[type=text], input[type=password], select, textarea {
  width: 100%;
  background: var(--bg3); border: 1px solid var(--border);
  border-radius: 2px; color: var(--text);
  font-family: 'Share Tech Mono', monospace; font-size: 13px;
  padding: 10px 13px; outline: none; transition: border-color .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--cyan); }
textarea { resize: vertical; min-height: 80px; }
select option { background: var(--bg3); }

.btn {
  padding: 11px 22px; border-radius: 2px;
  font-family: 'Share Tech Mono', monospace; font-size: 11px;
  letter-spacing: 2px; text-transform: uppercase;
  cursor: pointer; border: none; transition: all .2s;
}
.btn-primary {
  background: rgba(0,245,255,.1); color: var(--cyan);
  border: 1px solid rgba(0,245,255,.3);
}
.btn-primary:hover { background: rgba(0,245,255,.2); box-shadow: 0 0 16px rgba(0,245,255,.12); }
.btn-danger {
  background: rgba(255,45,85,.1); color: var(--red);
  border: 1px solid rgba(255,45,85,.3);
}
.btn-danger:hover { background: rgba(255,45,85,.2); }
.btn-sm { padding: 7px 14px; font-size: 10px; }

.alert {
  padding: 12px 16px; border-radius: 2px; margin-bottom: 20px;
  font-family: 'Share Tech Mono', monospace; font-size: 12px;
}
.alert-error   { background: rgba(255,45,85,.1);  color: var(--red);   border: 1px solid rgba(255,45,85,.3); }
.alert-success { background: rgba(0,255,136,.08); color: var(--green); border: 1px solid rgba(0,255,136,.2); }

@media (max-width: 600px) {
  header h1 { font-size: 26px; letter-spacing: 3px; }
  .svc-uptime { display: none; }
  footer { flex-direction: column; gap: 4px; }
}
