/* Hadoqmedia Monitor · Stylesheet · #f0f000 / #002b32 / Inter */

:root {
  --yellow: #f0f000;
  --yellow-dim: #d4d400;
  --yellow-soft: #f7f7c4;
  --green: #002b32;
  --green-deep: #001a1f;
  --green-tint: rgba(0, 43, 50, 0.04);
  --green-tint-2: rgba(0, 43, 50, 0.08);
  --paper: #ffffff;
  --paper-2: #f6f6f1;
  --line: rgba(0, 43, 50, 0.1);
  --line-strong: rgba(0, 43, 50, 0.18);
  --muted: rgba(0, 43, 50, 0.55);
  --muted-2: rgba(0, 43, 50, 0.35);
  --ok: #1a8754;
  --warn: #c07a00;
  --bad: #b42318;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', sans-serif;
  background: var(--paper);
  color: var(--green);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  font-feature-settings: "cv11", "ss01", "tnum";
}
::selection { background: var(--yellow); color: var(--green); }
button { font-family: inherit; }
a { color: var(--green); }

/* LOGIN */
.login-screen {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; grid-template-columns: 1.1fr 1fr; background: var(--paper);
}
.login-brand {
  background: var(--green); color: var(--yellow);
  padding: 48px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-brand::before {
  content: ''; position: absolute;
  width: 600px; height: 600px; bottom: -200px; right: -200px;
  background: radial-gradient(circle, rgba(240,240,0,0.08), transparent 60%);
}
.login-brand-top {
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(240,240,0,0.55); font-weight: 500;
}
.login-brand-top::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--yellow); }
.login-brand-logo {
  font-weight: 900; font-size: clamp(64px, 9vw, 132px);
  line-height: 0.82; letter-spacing: -0.05em; z-index: 1;
}
.login-brand-logo span { display: block; }
.login-brand-foot { font-size: 13px; color: rgba(240,240,0,0.6); max-width: 380px; line-height: 1.55; z-index: 1; }
.login-brand-foot strong { color: var(--yellow); font-weight: 600; }
.login-form-wrap { display: flex; align-items: center; justify-content: center; padding: 48px; }
.login-form { width: 100%; max-width: 380px; }
.login-form h1 { font-size: 34px; font-weight: 800; letter-spacing: -0.025em; line-height: 1.05; margin-bottom: 8px; }
.login-form .sub { color: var(--muted); font-size: 14px; margin-bottom: 36px; }
.login-form .field { margin-bottom: 18px; }
.login-form label {
  display: block; font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px; font-weight: 600;
}
.login-form input {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line-strong);
  background: var(--paper); border-radius: 6px; font: inherit; font-size: 14px;
  color: var(--green); transition: all 0.15s;
}
.login-form input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(240,240,0,0.3); }
.login-form .row-options { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 24px; font-size: 13px; }
.login-form .row-options label {
  display: flex; align-items: center; gap: 8px;
  text-transform: none; letter-spacing: 0; font-size: 13px;
  font-weight: 500; color: var(--green); cursor: pointer; margin: 0;
}
.login-form .row-options a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.login-form .btn-login {
  width: 100%; padding: 14px; background: var(--green); color: var(--yellow);
  border: none; border-radius: 6px; font: inherit; font-weight: 700;
  font-size: 14px; letter-spacing: 0.02em; cursor: pointer; transition: all 0.18s;
}
.login-form .btn-login:hover { background: var(--green-deep); transform: translateY(-1px); }
.login-error {
  background: rgba(180, 35, 24, 0.08); border: 1px solid rgba(180, 35, 24, 0.3);
  color: var(--bad); padding: 10px 14px; border-radius: 6px;
  font-size: 13px; margin-bottom: 18px;
}

@media (max-width: 880px) {
  .login-screen { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .login-brand { padding: 28px; min-height: 200px; }
  .login-brand-logo { font-size: 60px; }
  .login-brand-foot { display: none; }
  .login-form-wrap { padding: 28px; }
}

/* APP LAYOUT */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--green); color: rgba(255,255,255,0.85);
  padding: 24px 18px; display: flex; flex-direction: column; gap: 28px;
  position: sticky; top: 0; height: 100vh;
}
.logo {
  line-height: 0.82; font-weight: 900; font-size: 32px;
  color: var(--yellow); letter-spacing: -0.04em;
  padding-bottom: 18px; border-bottom: 1px solid rgba(240,240,0,0.12);
}
.logo span { display: block; }
.logo-tag {
  font-size: 9px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(240,240,0,0.5); margin-top: 12px; font-weight: 600;
}
.nav-label {
  font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.4); padding: 0 8px 8px; font-weight: 600;
}
nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
nav a {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 10px 12px; background: transparent;
  color: rgba(255,255,255,0.72); text-decoration: none;
  font-size: 13.5px; font-weight: 500; border-radius: 6px;
  transition: all 0.18s ease;
}
nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
nav a.active { background: var(--yellow); color: var(--green); font-weight: 700; }
nav a.active svg { color: var(--green); }
nav a svg { width: 16px; height: 16px; color: rgba(255,255,255,0.5); }

.sidebar-footer {
  border-top: 1px solid rgba(240,240,0,0.12); padding-top: 18px;
  display: flex; flex-direction: column; gap: 14px;
}
.system-status {
  display: flex; align-items: center; gap: 10px;
  font-size: 11px; color: rgba(255,255,255,0.55); font-weight: 500;
}
.ping { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.ping::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--ok); animation: pulse 1.8s infinite; }
@keyframes pulse { 0% { transform: scale(1); opacity: 0.7; } 100% { transform: scale(3); opacity: 0; } }

.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px;
  border-radius: 6px; background: rgba(255,255,255,0.04);
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--yellow); color: var(--green);
  display: grid; place-items: center; font-weight: 800; font-size: 11.5px;
}
.user-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.user-name { font-weight: 600; font-size: 12.5px; color: #fff; }
.user-role { font-size: 10.5px; color: rgba(240,240,0,0.7); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-top: 2px; }
.logout-form { margin-left: auto; }
.logout-btn {
  width: 26px; height: 26px; background: transparent;
  border: 1px solid rgba(255,255,255,0.15); border-radius: 4px;
  color: rgba(255,255,255,0.6); cursor: pointer;
  display: grid; place-items: center; transition: all 0.15s;
}
.logout-btn:hover { color: var(--yellow); border-color: var(--yellow); }
.logout-btn svg { width: 12px; height: 12px; }

main { background: var(--paper); min-height: 100vh; overflow-x: hidden; }
.topbar {
  height: 64px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 32px;
  gap: 20px; background: var(--paper);
  position: sticky; top: 0; z-index: 10; backdrop-filter: blur(8px);
}
.breadcrumb { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.breadcrumb b { color: var(--green); font-weight: 700; }
.topbar-tools { margin-left: auto; display: flex; gap: 14px; align-items: center; }
.refresh-info { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 8px; font-weight: 500; }

.view { padding: 38px 32px 80px; animation: fadeIn 0.35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; margin-bottom: 32px; padding-bottom: 20px;
  border-bottom: 2px solid var(--green);
}
.page-head h1 { font-weight: 900; font-size: clamp(38px, 5.5vw, 64px); line-height: 0.9; letter-spacing: -0.04em; }
.page-head .meta {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--muted); text-align: right; font-weight: 600; line-height: 1.6;
}
.page-head .meta b { color: var(--green); font-weight: 700; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line-strong); border: 1px solid var(--line-strong);
  margin-bottom: 36px; border-radius: 4px; overflow: hidden;
}
.stat { background: var(--paper); padding: 22px 24px; display: flex; flex-direction: column; gap: 6px; position: relative; }
.stat:hover { background: var(--paper-2); }
.stat-label { font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.stat-value { font-weight: 900; font-size: 38px; line-height: 1; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-delta { font-size: 11.5px; color: var(--ok); margin-top: 2px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-delta.neg { color: var(--bad); }
.stat-delta.neutral { color: var(--muted); }

.toolbar { display: flex; gap: 10px; margin-bottom: 22px; flex-wrap: wrap; }
.search { flex: 1; min-width: 240px; position: relative; }
.search input {
  width: 100%; padding: 10px 14px 10px 38px;
  border: 1px solid var(--line); background: var(--paper);
  border-radius: 6px; font: inherit; font-size: 13.5px; color: var(--green);
}
.search input:focus { outline: none; border-color: var(--green); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.chip-filter {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border: 1px solid var(--line);
  background: var(--paper); border-radius: 6px;
  font: inherit; font-size: 13px; color: var(--green);
  cursor: pointer; font-weight: 500;
}
.chip-filter:hover { border-color: var(--green); }
.chip-filter select { border: none; background: transparent; font: inherit; color: var(--green); cursor: pointer; outline: none; font-weight: 500; }
.btn-primary {
  padding: 10px 18px; background: var(--green); color: var(--yellow);
  border: 1px solid var(--green); border-radius: 6px;
  font: inherit; font-weight: 700; font-size: 13.5px;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  text-decoration: none;
}
.btn-primary:hover { background: var(--green-deep); }
.btn-primary svg { width: 14px; height: 14px; }

.alerts {
  display: flex; flex-direction: column; gap: 0;
  border: 1px solid var(--line-strong); background: var(--paper);
  border-radius: 4px; overflow: hidden;
}
.alert {
  padding: 22px 26px; border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 88px 1fr auto;
  gap: 24px; align-items: start;
  text-decoration: none; color: inherit;
  transition: background 0.15s;
}
.alert:last-child { border-bottom: none; }
.alert:hover { background: var(--paper-2); }
.alert-time { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; padding-top: 4px; font-weight: 600; font-variant-numeric: tabular-nums; }
.alert-time b { display: block; color: var(--green); font-weight: 700; font-size: 12.5px; }
.alert-body { min-width: 0; }
.alert-meta { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.source {
  font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase;
  font-weight: 700; color: var(--green);
  padding: 3px 7px; border: 1px solid var(--line-strong); border-radius: 3px;
}
.keyword-tag {
  background: var(--yellow); color: var(--green);
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 700; padding: 3px 8px; border-radius: 3px;
  display: inline-flex; align-items: center; gap: 5px;
}
.keyword-tag::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.alert-headline { font-size: 19px; line-height: 1.3; font-weight: 700; letter-spacing: -0.018em; margin-bottom: 6px; color: var(--green); }
.alert-headline mark { background: var(--yellow); color: var(--green); padding: 0 3px; border-radius: 2px; font-weight: 800; }
.alert-snippet {
  color: var(--muted); font-size: 13.5px; line-height: 1.55;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.alert-snippet mark { background: var(--yellow-soft); color: var(--green); padding: 0 2px; font-weight: 600; }
.alert-action { color: var(--muted); padding-top: 6px; }
.alert:hover .alert-action { color: var(--green); }
.alert-action svg { width: 18px; height: 18px; }

.table-wrap { border: 1px solid var(--line-strong); background: var(--paper); overflow: hidden; border-radius: 4px; }
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left; padding: 14px 20px;
  font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); font-weight: 700;
  border-bottom: 1px solid var(--line-strong); background: var(--green-tint);
}
tbody td { padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
tbody tr:hover { background: var(--paper-2); }
tbody tr:last-child td { border-bottom: none; }

.status-dot { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.status-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }
.status-ok::before { background: var(--ok); }
.status-warn::before { background: var(--warn); }
.status-bad::before { background: var(--bad); }
.status-paused::before { background: var(--muted-2); }

.url-cell {
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 12px; color: var(--muted); max-width: 280px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block;
}
.pill {
  display: inline-block; padding: 3px 8px;
  border: 1px solid var(--line-strong); border-radius: 3px;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--green); font-weight: 600;
}
.pill-yellow { background: var(--yellow); border-color: var(--green); font-weight: 700; }
.pill-ink { background: var(--green); color: var(--yellow); border-color: var(--green); font-weight: 700; }
.row-actions { display: flex; gap: 4px; }
.row-actions button {
  width: 28px; height: 28px; background: transparent;
  border: 1px solid transparent; border-radius: 4px;
  cursor: pointer; color: var(--muted);
  display: grid; place-items: center;
}
.row-actions button:hover { color: var(--green); border-color: var(--line-strong); }
.row-actions button svg { width: 14px; height: 14px; }
.hits-cell { font-weight: 900; font-size: 16px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.hits-cell.zero { color: var(--muted-2); }

.role-info {
  background: var(--green); color: rgba(255,255,255,0.85);
  padding: 22px 26px; border-radius: 6px; margin-bottom: 28px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.role-card-title { color: var(--yellow); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.role-card-title::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); }
.role-card-list { list-style: none; font-size: 12.5px; color: rgba(255,255,255,0.7); line-height: 1.7; }
.role-card-list li::before { content: '·'; color: var(--yellow); margin-right: 8px; font-weight: 800; }

.role-gate {
  background: var(--yellow); color: var(--green);
  padding: 12px 20px; border-radius: 4px; margin-bottom: 22px;
  font-size: 13px; display: flex; align-items: center; gap: 12px; font-weight: 600;
}
.role-gate svg { flex-shrink: 0; width: 16px; height: 16px; }

.footer-note { margin-top: 16px; text-align: center; font-size: 11.5px; color: var(--muted); letter-spacing: 0.06em; font-weight: 500; }
.footer-note a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; font-weight: 600; }

.flash { padding: 12px 18px; border-radius: 6px; margin-bottom: 22px; font-size: 13.5px; font-weight: 500; }
.flash-ok    { background: rgba(26, 135, 84, 0.08); color: var(--ok); border: 1px solid rgba(26, 135, 84, 0.25); }
.flash-error { background: rgba(180, 35, 24, 0.08); color: var(--bad); border: 1px solid rgba(180, 35, 24, 0.3); }

/* MODAL */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,43,50,0.6);
  backdrop-filter: blur(4px); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.show { display: flex; animation: fadeIn 0.2s ease; }
.modal { background: var(--paper); border: 2px solid var(--green); max-width: 480px; width: 100%; border-radius: 6px; overflow: hidden; }
.modal-head { padding: 24px 26px 18px; border-bottom: 2px solid var(--green); display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-weight: 900; font-size: 22px; letter-spacing: -0.03em; }
.modal-close { width: 30px; height: 30px; background: transparent; border: 1px solid var(--line-strong); cursor: pointer; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: var(--green); border-radius: 4px; }
.modal-close:hover { background: var(--green); color: var(--yellow); }
.modal-body { padding: 22px 26px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.field input, .field select { padding: 10px 12px; border: 1px solid var(--line-strong); background: var(--paper); font: inherit; font-size: 13.5px; color: var(--green); border-radius: 4px; font-family: 'Inter', sans-serif; }
.field input:focus, .field select:focus { outline: none; border-color: var(--green); }
.field-help { font-size: 11.5px; color: var(--muted); }
.modal-foot { padding: 18px 26px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; background: var(--green-tint); }
.btn-ghost { padding: 10px 18px; background: transparent; color: var(--green); border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; font-weight: 600; cursor: pointer; }
.btn-ghost:hover { border-color: var(--green); }

/* MOBILE */
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; flex-direction: row; padding: 8px; z-index: 50; gap: 0; border-top: 1px solid rgba(240,240,0,0.15); }
  .logo, .nav-label, .sidebar-footer { display: none; }
  nav { flex-direction: row; justify-content: space-around; width: 100%; }
  nav a { flex-direction: column; gap: 3px; padding: 6px 4px; font-size: 9.5px; border-radius: 4px; letter-spacing: 0; }
  nav a svg { width: 18px; height: 18px; }
  main { padding-bottom: 80px; }
  .topbar { padding: 0 18px; height: 56px; }
  .view { padding: 24px 18px 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .alert { grid-template-columns: 1fr; gap: 10px; padding: 18px; }
  .alert-action { display: none; }
  .alert-headline { font-size: 17px; }
  .page-head h1 { font-size: 38px; }
  .role-info { grid-template-columns: 1fr; gap: 16px; }
  thead { display: none; }
  tbody, tr, td { display: block; width: 100%; }
  tbody tr { padding: 14px 16px; border-bottom: 1px solid var(--line); }
  tbody td { padding: 4px 0; border: none; }
  .url-cell { max-width: 100%; }
  .topbar-tools .refresh-info { display: none; }
}
