:root {
  color-scheme: dark;
  --bg: #070a0f;
  --panel: #111823;
  --border: #28374a;
  --text: #f7fbff;
  --muted: #aeb9c7;
  --accent: #39a9ff;
  --danger: #cb4357;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.shell {
  width: min(900px, 100%);
  margin: auto;
  padding: 18px 14px 70px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 14px;
}

.top {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: flex-start;
}

h1 {
  margin: 0.15rem 0;
}

h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

.eyebrow {
  color: var(--accent);
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.muted {
  color: var(--muted);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  margin-bottom: 12px;
}

input,
select,
textarea {
  width: 100%;
  background: #09111b;
  color: #fff;
  border: 1px solid #33455d;
  border-radius: 12px;
  padding: 13px;
  font: inherit;
}

button {
  background: var(--accent);
  color: #00111d;
  border: 0;
  border-radius: 12px;
  padding: 13px 16px;
  font-weight: 800;
  min-height: 46px;
  cursor: pointer;
}

.secondary {
  background: #192638;
  color: #fff;
}

.danger {
  background: var(--danger);
  color: #fff;
}

button:disabled {
  opacity: 0.45;
}

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ==============================
   DAR ENTRIES
   ============================== */

.entry {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.entry > strong {
  color: var(--accent);
  font-size: 18px;
  line-height: 1.5;
}

.entry > span {
  min-width: 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* ==============================
   ENTRY BUTTONS
   ============================== */

.entry-actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}

.entry-actions button {
  width: auto;
  min-width: 0;
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.1;
  white-space: nowrap;
  border-radius: 7px;
}

/* ==============================
   PHOTO ATTACHMENTS
   ============================== */

.entry-photos {
  grid-column: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-top: 2px;
}

.photo-item {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.photo-link {
  display: inline-block;
}

.dar-photo-thumb {
  display: block;
  width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #34495e;
}

.photo-confirmation {
  flex-basis: 100%;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.photo-actions {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.photo-actions button {
  width: auto;
  min-width: 0;
  min-height: 28px;
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1.1;
  border-radius: 7px;
  white-space: nowrap;
}

/* ==============================
   DAR PREVIEW
   ============================== */

pre {
  white-space: pre-wrap;
  background: #080d14;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  min-height: 100px;
}

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

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}

.login-card {
  position: relative;
  overflow: hidden;
  width: min(520px, 92vw);
  padding: 28px 30px 26px;
  border: 1px solid #24486f;
  border-radius: 24px;
  background:
    radial-gradient(circle at top, rgba(19, 63, 109, 0.14), transparent 40%),
    #0a1220;
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.48),
    inset 0 0 38px rgba(30, 110, 190, 0.045);
}

.login-eyebrow {
  text-align: center;
  font-size: 13px;
  letter-spacing: 0.14em;
  margin-bottom: 12px;
}

.login-title {
  text-align: center;
  font-size: clamp(34px, 5vw, 48px);
  margin: 0 0 10px;
  line-height: 1.05;
}


@keyframes redSecurityFlash {
  0%, 20% {
    opacity: 1;
    box-shadow:
      0 0 10px #ff2438,
      0 0 24px rgba(255, 36, 56, 0.75),
      0 0 46px rgba(255, 36, 56, 0.35);
  }

  35%, 100% {
    opacity: 0.18;
    box-shadow: none;
  }
}

@keyframes blueSecurityFlash {
  0%, 45% {
    opacity: 0.18;
    box-shadow: none;
  }

  55%, 75% {
    opacity: 1;
    box-shadow:
      0 0 10px #168cff,
      0 0 24px rgba(22, 140, 255, 0.75),
      0 0 46px rgba(22, 140, 255, 0.35);
  }

  90%, 100% {
    opacity: 0.18;
    box-shadow: none;
  }
}

.login-card input[type="email"],
.login-card input[type="password"] {
  min-height: 52px;
  font-size: 16px;
  border-radius: 12px;
}

.remember-row {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 4px 0 18px;
  color: #d7e1ed;
}

.remember-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.login-button {
  width: 100%;
  min-height: 52px;
  font-size: 17px;
  border-radius: 12px;
}

.login-status {
  min-height: 18px;
}

.login-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  margin: 24px 0;
  color: #92a0b0;
}

.login-divider span {
  height: 1px;
  background: #334459;
}

.github-login {
  width: 100%;
  min-height: 52px;
  background: transparent;
  color: #dfe8f3;
  border: 1px solid #36506f;
  border-radius: 12px;
  font-size: 16px;
}

.github-login:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.powered-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  color: #8d9aac;
  font-size: 13px;
}

.powered-brand strong {
  color: #168cff;
}

.powered-globe {
  width: 34px;
  height: 34px;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(22, 140, 255, 0.35));
}

/* ==============================
   MOBILE
   ============================== */

@media (max-width: 620px) {
  .shell {
    padding: 12px 10px 60px;
  }

  .card {
    padding: 14px;
    border-radius: 14px;
  }

  .grid2 {
    grid-template-columns: 1fr;
  }

  .top {
    align-items: center;
  }

  .entry {
    grid-template-columns: 52px minmax(0, 1fr);
    column-gap: 8px;
    row-gap: 8px;
    padding: 14px 0;
  }

  .entry > strong {
    font-size: 16px;
  }

  .entry > span {
    font-size: 15px;
  }

  .entry-actions {
    grid-column: 2;
    gap: 5px;
  }

  .entry-actions button {
    min-height: 30px;
    padding: 5px 8px;
    font-size: 11px;
  }

  .entry-photos {
    grid-column: 2;
    margin-top: 2px;
  }

  .dar-photo-thumb {
    width: 100px;
    height: 75px;
  }

  .photo-actions button {
    min-height: 28px;
    padding: 5px 7px;
    font-size: 10px;
  }

  .login-wrap {
    padding: 12px;
  }

  .login-card {
    width: min(100%, 430px);
    padding: 26px 20px 24px;
    border-radius: 20px;
  }

  .login-title {
    font-size: 40px;
  }

   .powered-globe {
    width: 32px;
    height: 32px;
  }
}

.police-lights-wrap {
  display: flex;
  justify-content: center;
  margin: 22px auto 28px;
}

.police-lights-image {
  display: block;
  width: min(420px, 100%);
  height: auto;
  transform-origin: center;
  opacity: .96;
  filter:
    brightness(.92)
    drop-shadow(0 0 6px rgba(255, 35, 55, .24))
    drop-shadow(0 0 7px rgba(22, 140, 255, .24));
  animation: policeLightGlow 2.8s ease-in-out infinite;
  will-change: filter, transform, opacity;
}

@keyframes policeLightGlow {
  0%, 100% {
    opacity: .94;
    filter:
      brightness(.92)
      drop-shadow(0 0 6px rgba(255, 35, 55, .24))
      drop-shadow(0 0 7px rgba(22, 140, 255, .24));
    transform: scale(1);
  }

  50% {
    opacity: 1;
    filter:
      brightness(1.16)
      drop-shadow(0 0 18px rgba(255, 35, 55, .50))
      drop-shadow(0 0 20px rgba(22, 140, 255, .50));
    transform: scale(1.006);
  }
}

