/* src/validation_backend/static-gated/styles.css */

/* ==========================================================
   Light Theme (default)
   ========================================================== */

:root {
  /* Header */
  --header-bg: #E3EBF2;
  --header-border: #CDD9E3;

  /* Base */
  --bg: #F3F1EA;
  --fg: #1C1E21;
  --muted: #6B6F75;

  /* Brand */
  --logo-fg: #2F3439;

  /* Surfaces */
  --card-bg: #F3F1EA;
  --card-bg-soft: #F6F2E8;

  /* Borders */
  --border: rgba(216, 212, 200, 1);
  --border-soft: rgba(230, 226, 216, 1);

  /* Accent */
  --accent: #4A7BA7;

  /* Inputs / feedback */
  --input-bg: #ffffff;
  --error-fg: #7A2E2E;

  /* Layout */
  --site-max-width: 1400px;
  --site-pad-x: 32px;
  --site-pad-y: 28px;
}

/* ==========================================================
   OS Dark Mode
   ========================================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --header-bg: #1C2632;
    --header-border: #334252;

    --bg: #1C232B;
    --fg: #E7EAEE;
    --muted: #9EA8B3;

    --logo-fg: #E7EAEE;

    --card-bg: #1C232B;
    --card-bg-soft: #27313B;

    --border: rgba(56, 69, 83, 1);
    --border-soft: rgba(49, 61, 74, 1);

    --accent: #7AA6CF;

    --input-bg: #222B35;
    --error-fg: #F0A0A0;
  }
}

/* ==========================================================
   Base
   ========================================================== */

* {
  box-sizing: border-box;
}

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

.page {
  min-height: 100vh;
}

/* ==========================================================
   Header
   ========================================================== */

.page-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-border);
}

.page-header-inner {
  max-width: var(--site-max-width);
  margin: 0 auto;
  min-height: 72px;
  padding: 0 var(--site-pad-x);
  padding-left: calc(var(--site-pad-x) + 53px);
  display: flex;
  align-items: center;
}

.app-logo-text {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--logo-fg);
}

/* ==========================================================
   Content
   ========================================================== */

.page-content {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: var(--site-pad-y) var(--site-pad-x) 0;
  min-height: calc(100vh - 72px);
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==========================================================
   Card
   ========================================================== */

.gate-card {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px;
  transform: translateY(-30px);
}

.gate-card h1 {
  margin: 0 0 10px 0;
  font-size: 1.5rem;
  line-height: 1.2;
}

.gate-card p {
  margin: 0 0 8px 0;
  color: var(--muted);
  line-height: 1.5;
}

/* ==========================================================
   Form
   ========================================================== */

.gate-field {
  margin-bottom: 14px;
}

.gate-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

.gate-field input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: var(--input-bg);
  color: var(--fg);
}

.gate-field input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ==========================================================
   Button
   ========================================================== */

.gate-button {
  margin-top: 8px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.gate-button:hover {
  filter: brightness(0.95);
}

/* ==========================================================
   Error
   ========================================================== */

.gate-error {
  margin: 2px 0 6px 0;
  padding: 6px 0;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.4;
  min-height: 3.8em;
}

.gate-error.is-hidden {
  visibility: hidden;
}

.gate-error.is-visible {
  color: var(--error-fg);
}

/* ==========================================================
   Responsive
   ========================================================== */

@media (max-width: 720px) {
  .page-content {
    padding: 20px 20px 0;
  }

  .page-header-inner {
    padding-left: calc(20px + 53px);
    padding-right: 20px;
  }

  .app-logo-text {
    font-size: 1.1rem;
  }
}