:root {
  --hl-red: #E1251B;
  --hl-red-dark: #B31E16;
  --hl-yellow: #FEDF21;
  --hl-black: #1C1C1B;
  --hl-white: #FFFFFF;
  --hl-bg: #FFF8EC;
  --hl-ocean: #05A6B3;
  --hl-border: #1C1C1B;
  --radius: 14px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--hl-black);
  background: var(--hl-bg);
}

h1, h2 { font-family: 'Baloo 2', system-ui, sans-serif; margin: 0; }

button { font-family: inherit; cursor: pointer; }

/* ===================== LOGIN ===================== */

.login-screen {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hl-red);
  overflow: hidden;
  padding: 24px;
}

.login-pattern {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, rgba(255,255,255,0.07) 0 18px, transparent 19px);
  background-size: 64px 64px;
}

.login-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--hl-white);
  border: 3px solid var(--hl-black);
  border-radius: 20px;
  padding: 40px 36px;
  text-align: left;
}

.wordmark { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 26px; letter-spacing: 0.5px; margin-bottom: 28px; }
.wordmark-white { color: var(--hl-black); }
.wordmark-yellow { color: var(--hl-red); }

.login-kicker {
  font-size: 13px;
  font-weight: 600;
  color: var(--hl-ocean);
  margin: 0 0 6px;
}

.login-title { font-size: 26px; line-height: 1.2; margin-bottom: 12px; }

.login-sub { font-size: 14.5px; line-height: 1.55; color: #4a4a48; margin-bottom: 28px; }

.btn-primary {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--hl-red);
  color: var(--hl-white);
  border: 3px solid var(--hl-black);
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.1s ease;
}
.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-compact { width: auto; padding: 11px 20px; }

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 14px;
}
.field-full input {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 14.5px;
  padding: 11px 12px;
  border: 2px solid #d8d6d0;
  border-radius: 10px;
}
.field-full input:focus { outline: none; border-color: var(--hl-ocean); }

.link-btn {
  display: block;
  background: none;
  border: none;
  color: var(--hl-ocean);
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  text-decoration: underline;
}
.link-btn:hover { color: var(--hl-red); }

.login-error {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--hl-red-dark);
  font-weight: 600;
}
.login-notice {
  margin-top: 16px;
  font-size: 13.5px;
  color: var(--hl-ocean);
  font-weight: 600;
}

/* ===================== DENIED ===================== */

.denied-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--hl-black);
  padding: 24px;
}

.denied-card {
  max-width: 440px;
  background: var(--hl-white);
  border: 3px solid var(--hl-black);
  border-radius: 20px;
  padding: 40px 36px;
}

.denied-kicker { font-size: 13px; font-weight: 700; color: var(--hl-red); margin-bottom: 8px; }
.denied-title { font-size: 24px; margin-bottom: 12px; }
.denied-sub { font-size: 14.5px; line-height: 1.55; color: #4a4a48; margin-bottom: 24px; }

.btn-secondary {
  background: var(--hl-white);
  color: var(--hl-black);
  border: 2px solid var(--hl-black);
  border-radius: 10px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 14px;
}

/* ===================== APP SHELL ===================== */

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.rail {
  background: var(--hl-black);
  color: var(--hl-white);
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
}

.rail-brand {
  font-family: 'Baloo 2', sans-serif;
  font-weight: 800;
  font-size: 19px;
  margin-bottom: 40px;
}
.rail-brand-white { color: var(--hl-white); }
.rail-brand-yellow { color: var(--hl-yellow); }
.rail-brand-sub {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: #999894;
  margin-top: 4px;
}

.rail-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }

.rail-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  color: #d9d8d4;
  text-align: left;
  font-size: 14.5px;
  font-weight: 600;
  padding: 12px 14px;
  border-radius: 10px;
}
.rail-tab-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #55534d;
  flex-shrink: 0;
}
.rail-tab:hover { background: rgba(255,255,255,0.06); }
.rail-tab.is-active {
  background: var(--hl-red);
  color: var(--hl-white);
}
.rail-tab.is-active .rail-tab-dot { background: var(--hl-yellow); }

.rail-user {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
  margin-top: 18px;
}
.rail-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 2px solid var(--hl-yellow);
  object-fit: cover;
  background: #444;
}
.rail-user-meta { display: flex; flex-direction: column; overflow: hidden; flex: 1; }
.rail-user-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-user-email { font-size: 11px; color: #9c9b97; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-signout {
  background: none;
  border: none;
  color: #9c9b97;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  padding: 0;
}
.rail-signout:hover { color: var(--hl-white); }

.content { padding: 40px 48px; max-width: 980px; }

.panel { display: none; }
.panel.is-active { display: block; }

.panel-header { margin-bottom: 28px; }
.panel-header h1 { font-size: 28px; margin-bottom: 6px; }
.panel-header p { font-size: 14.5px; color: #5c5b57; margin: 0; }

/* ---- Communicator placeholder ---- */

.placeholder-block {
  background: var(--hl-white);
  border: 3px dashed var(--hl-red);
  border-radius: var(--radius);
  padding: 40px;
  max-width: 560px;
}
.placeholder-badge {
  display: inline-block;
  background: var(--hl-yellow);
  color: var(--hl-black);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.placeholder-block h2 { font-size: 19px; margin-bottom: 10px; }
.placeholder-block p { font-size: 14px; line-height: 1.6; color: #5c5b57; margin: 0; }

/* ---- Reporting ---- */

.report-controls {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--hl-white);
  border: 2px solid var(--hl-black);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: #4a4a48; }
.field input {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  padding: 9px 10px;
  border: 2px solid #d8d6d0;
  border-radius: 8px;
  min-width: 140px;
}
.field input:focus { outline: none; border-color: var(--hl-ocean); }

.report-status {
  font-size: 13px;
  font-weight: 600;
  color: var(--hl-ocean);
  min-height: 18px;
  margin-bottom: 12px;
}
.report-status.is-error { color: var(--hl-red-dark); }

.table-wrap {
  background: var(--hl-white);
  border: 2px solid var(--hl-black);
  border-radius: var(--radius);
  overflow: auto;
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left;
  background: var(--hl-black);
  color: var(--hl-white);
  padding: 11px 16px;
  font-weight: 600;
  white-space: nowrap;
  position: sticky;
  top: 0;
}
tbody td { padding: 10px 16px; border-bottom: 1px solid #efeee9; white-space: nowrap; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fffbf0; }

@media (max-width: 720px) {
  .app-shell { grid-template-columns: 1fr; }
  .rail { flex-direction: row; align-items: center; padding: 16px; flex-wrap: wrap; }
  .rail-brand { margin-bottom: 0; margin-right: auto; }
  .rail-user { margin-top: 12px; width: 100%; }
  .content { padding: 24px; }
}
