@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
  --scan-blue: #0066b3;
  --scan-blue-dark: #004d87;
  --scan-blue-light: #e8f4fc;
  --text: #1a2332;
  --text-muted: #5a6578;
  --bg: #f0f4f8;
  --white: #ffffff;
  --warning: #e67e22;
  --warning-bg: #fef9f0;
  --error: #c0392b;
  --error-bg: #fdf0ee;
  --border: #d8e0ea;
  --radius: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Login page ── */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(145deg, #e8f4fc 0%, #f0f4f8 50%, #dce8f4 100%);
}

.login-wrapper {
  width: 100%;
  max-width: 420px;
  padding: 1.5rem;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 24px rgba(0, 50, 100, 0.08);
}

.logo {
  display: block;
  max-width: 200px;
  height: auto;
  margin: 0 auto 1.5rem;
}

.login-card h1 {
  font-size: 1.35rem;
  font-weight: 600;
  text-align: center;
  color: var(--scan-blue-dark);
  margin-bottom: 0.35rem;
}

.subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.login-form .form-group {
  margin-bottom: 1.1rem;
}

.login-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.login-form input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

.login-form input:focus {
  outline: none;
  border-color: var(--scan-blue);
  box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.12);
}

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: var(--scan-blue);
  color: var(--white);
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 0.5rem;
  transition: background 0.15s;
}

.btn-primary:hover {
  background: var(--scan-blue-dark);
}

.footer-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

.alert {
  padding: 0.65rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid #f5c6c0;
}

/* ── Awareness page ── */

.awareness-page {
  background: linear-gradient(160deg, #fef9f0 0%, #f0f4f8 100%);
}

.awareness-wrapper {
  max-width: 680px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

.awareness-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  box-shadow: 0 4px 24px rgba(0, 50, 100, 0.08);
}

.warning-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

.logo-small {
  display: block;
  max-width: 140px;
  height: auto;
  margin: 0 auto 1.25rem;
}

.awareness-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  color: var(--scan-blue-dark);
  margin-bottom: 1rem;
  line-height: 1.35;
}

.lead {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.discretion-box {
  background: var(--warning-bg);
  border-left: 4px solid var(--warning);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1.75rem;
}

.discretion-box h2 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: #b35c00;
}

.discretion-box p {
  font-size: 0.92rem;
  color: var(--text);
}

.tips {
  margin-bottom: 1.75rem;
}

.tips h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--scan-blue-dark);
}

.tips ul {
  list-style: none;
  padding: 0;
}

.tips li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
  color: var(--text);
}

.tips li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--scan-blue);
  font-weight: 600;
}

.closing {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.signature {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text-muted);
}

/* ── Admin ── */

.admin-page {
  background: var(--bg);
}

.admin-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.admin-wrapper h1 {
  font-size: 1.4rem;
  margin-bottom: 1.5rem;
  color: var(--scan-blue-dark);
}

.admin-login-form {
  max-width: 360px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.btn-secondary {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  font-family: inherit;
}

.btn-secondary:hover {
  background: var(--white);
}

.stats {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.table-wrapper {
  overflow-x: auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 2px 12px rgba(0, 50, 100, 0.06);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

th, td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--scan-blue-light);
  font-weight: 600;
  color: var(--scan-blue-dark);
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: #fafbfc;
}

.ua-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

code {
  font-size: 0.8rem;
  background: #f4f6f8;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

.empty {
  color: var(--text-muted);
  font-style: italic;
}

@media (max-width: 600px) {
  .login-card,
  .awareness-card {
    padding: 1.75rem 1.25rem;
  }

  .awareness-card h1 {
    font-size: 1.25rem;
  }

  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
}
