/* ─────────────────────────────────────────────────────────────────────
   GigaIndexer auth screen — "Operations Console" design.
   Asymmetric split: left = operational hero (brand mark + headline +
   instrument-grid stats + scrolling activity ticker), right = console-
   form panel (Continue with Google primary, email + Continue secondary).
   Loaded site-wide on the WC lost-password endpoint + on /account/ when
   logged out (see class-styles.php gate).
   ─────────────────────────────────────────────────────────────────── */
:root {
    --bg:          #06100D;
    --bg-2:        #0B1B16;
    --surface:     #0F2620;
    --surface-2:   #143028;
    --line:        #1C3830;
    --line-soft:   #15281F;
    --ink:         #E9F4EE;
    --ink-dim:     #7E9690;
    --ink-mute:    #506661;
    --accent:      #33CCAA;
    --accent-soft: #6FE0C5;
    --accent-deep: #1B7560;
    --amber:       #F5C75C;

    --r-sm: 6px;
    --r-md: 10px;
    --r-lg: 14px;

    --display: 'Geist', system-ui, -apple-system, sans-serif;
    --body:    'Geist', system-ui, -apple-system, sans-serif;
    --mono:    'JetBrains Mono', ui-monospace, monospace;
  }

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

  body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--body);
    font-feature-settings: 'ss01', 'cv11';
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    overflow: hidden;
  }

  /* ─── Hairline blueprint grid ─────────────────────────────────── */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
      linear-gradient(to right, rgba(51, 204, 170, 0.04) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(51, 204, 170, 0.04) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 1;
  }
  body::after {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 600px;
    background: radial-gradient(ellipse 1100px 500px at 22% 30%, rgba(51, 204, 170, 0.12), transparent 70%);
    pointer-events: none;
    z-index: 1;
  }

  /* ─── Shell ───────────────────────────────────────────────────── */
  .gi-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(0, 1fr);
    min-height: 100vh;
    z-index: 2;
  }
  .gi-shell::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: calc(100% / 2.22 * 1.22);
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(51, 204, 170, 0.18) 14%, rgba(51, 204, 170, 0.18) 86%, transparent);
    z-index: 1;
  }

  /* ─── LEFT: operations hero ───────────────────────────────────── */
  .gi-hero {
    padding: 56px 64px 40px;
    display: flex;
    flex-direction: column;
    gap: 56px;
    position: relative;
    z-index: 2;
  }

  .gi-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    animation: gi-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .gi-emblem {
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
  }
  .gi-emblem img { width: 100%; height: 100%; display: block; }
  .gi-emblem::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    box-shadow: 0 0 28px rgba(51, 204, 170, 0.45);
    animation: gi-pulse 3.6s ease-in-out infinite;
  }
  @keyframes gi-pulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.08); }
  }
  .gi-wordmark {
    font-family: var(--display);
    font-weight: 700;
    font-size: 18px;
    letter-spacing: -0.02em;
    line-height: 1;
    color: var(--ink);
  }
  .gi-wordmark .light { color: var(--ink-dim); font-weight: 500; }

  .gi-hero-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    color: var(--ink-mute);
    text-transform: uppercase;
    animation: gi-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) 100ms both;
  }
  .gi-hero-meta .dot {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    margin-right: 8px;
    vertical-align: 1px;
    box-shadow: 0 0 8px var(--accent);
    animation: gi-blink 1.4s ease-in-out infinite;
  }
  @keyframes gi-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.35; }
  }

  .gi-headline {
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(40px, 4.6vw, 64px);
    letter-spacing: -0.038em;
    line-height: 0.96;
    color: var(--ink);
    max-width: 9.5ch;
    margin: 0;
    animation: gi-rise 800ms cubic-bezier(0.16, 1, 0.3, 1) 180ms both;
  }
  .gi-headline em {
    font-style: normal;
    color: var(--accent);
    position: relative;
    display: inline-block;
  }
  .gi-headline em::after {
    content: '';
    position: absolute;
    left: 0; right: 0;
    bottom: 0.06em;
    height: 0.42em;
    background: rgba(51, 204, 170, 0.16);
    z-index: -1;
    transform: skewX(-6deg);
  }

  .gi-subline {
    font-family: var(--body);
    font-size: 15.5px;
    line-height: 1.55;
    color: var(--ink-dim);
    max-width: 42ch;
    margin: 0;
    animation: gi-rise 800ms cubic-bezier(0.16, 1, 0.3, 1) 260ms both;
  }

  /* ─── Instrument stats grid ───────────────────────────────────── */
  .gi-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--line-soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1px 0;
    margin-top: auto;
    animation: gi-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) 340ms both;
  }
  .gi-stat {
    background: var(--bg);
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .gi-stat-label {
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    text-transform: uppercase;
  }
  .gi-stat-value {
    font-family: var(--mono);
    font-size: 26px;
    font-weight: 600;
    color: var(--ink);
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1;
  }
  .gi-stat-value .unit {
    font-size: 13px;
    color: var(--ink-dim);
    margin-left: 4px;
    font-weight: 500;
  }
  .gi-stat-trend {
    font-family: var(--mono);
    font-size: 11px;
    font-weight: 500;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }
  .gi-stat-trend.down { color: var(--amber); }

  /* ─── Activity ticker ─────────────────────────────────────────── */
  .gi-ticker {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: rgba(15, 38, 32, 0.5);
    padding: 9px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
    animation: gi-rise 900ms cubic-bezier(0.16, 1, 0.3, 1) 420ms both;
  }
  .gi-ticker-label {
    flex-shrink: 0;
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--accent);
    text-transform: uppercase;
    padding-right: 14px;
    border-right: 1px solid var(--line);
  }
  .gi-ticker-track {
    overflow: hidden;
    flex: 1;
    mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
  }
  .gi-ticker-stream {
    display: inline-flex;
    gap: 28px;
    font-family: var(--mono);
    font-size: 11.5px;
    color: var(--ink-dim);
    white-space: nowrap;
    animation: gi-tick 38s linear infinite;
  }
  @keyframes gi-tick {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
  }
  .gi-ticker-event {
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .gi-ticker-time {
    color: var(--ink-mute);
  }
  .gi-ticker-event .ok { color: var(--accent); }
  .gi-ticker-event .alert { color: var(--amber); }

  /* ─── RIGHT: console form ─────────────────────────────────────── */
  .gi-console {
    background: var(--surface);
    background-image:
      radial-gradient(ellipse 700px 500px at 100% 0%, rgba(51, 204, 170, 0.08), transparent 60%),
      radial-gradient(circle at 80% 100%, rgba(245, 199, 92, 0.04), transparent 50%);
    padding: 56px 72px 56px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    position: relative;
    z-index: 2;
  }

  .gi-console-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    text-transform: uppercase;
    margin-bottom: 80px;
    animation: gi-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) 360ms both;
  }
  .gi-console-meta .sep {
    width: 14px;
    height: 1px;
    background: var(--ink-mute);
  }
  .gi-console-meta .active {
    color: var(--accent);
  }
  .gi-console-meta .live {
    margin-left: auto;
    color: var(--ink-dim);
    display: inline-flex;
    align-items: center;
    gap: 6px;
  }
  .gi-console-meta .live::before {
    content: '';
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: gi-blink 1.4s ease-in-out infinite;
  }

  .gi-console-title {
    font-family: var(--display);
    font-weight: 600;
    font-size: 34px;
    letter-spacing: -0.028em;
    line-height: 1.05;
    color: var(--ink);
    margin: 0 0 8px;
    animation: gi-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) 440ms both;
  }
  .gi-console-sub {
    font-family: var(--body);
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--ink-dim);
    margin: 0 0 40px;
    animation: gi-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) 520ms both;
  }

  /* ─── Google button (primary entry, lifted) ───────────────────── */
  .gi-google {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #F7FAF9;
    color: #061712;
    font-family: var(--display);
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: -0.005em;
    padding: 15px 18px;
    border: 0;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.18s,
                background 0.18s;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset,
                0 12px 32px -10px rgba(0, 0, 0, 0.5);
    animation: gi-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) 600ms both;
  }
  .gi-google:hover {
    transform: translateY(-1px);
    background: #FFFFFF;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset,
                0 18px 36px -10px rgba(0, 0, 0, 0.55);
  }
  .gi-google svg { width: 17px; height: 17px; }

  /* ─── Divider ─────────────────────────────────────────────────── */
  .gi-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 24px 0;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.18em;
    color: var(--ink-mute);
    text-transform: uppercase;
    animation: gi-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) 680ms both;
  }
  .gi-divider::before,
  .gi-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--line);
  }

  /* ─── Email field — bottom-line terminal style ────────────────── */
  .gi-field {
    position: relative;
    margin-bottom: 18px;
    animation: gi-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) 760ms both;
  }
  .gi-field-label {
    display: block;
    font-family: var(--mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    color: var(--ink-mute);
    text-transform: uppercase;
    margin-bottom: 8px;
  }
  .gi-input {
    width: 100%;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    padding: 8px 0 10px;
    outline: none;
    transition: border-color 0.22s;
    caret-color: var(--accent);
  }
  .gi-input::placeholder {
    color: var(--ink-mute);
  }
  .gi-input:focus {
    border-bottom-color: var(--accent);
    box-shadow: 0 1px 0 var(--accent);
  }

  /* ─── Continue button ─────────────────────────────────────────── */
  .gi-continue {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--accent);
    color: #052017;
    font-family: var(--display);
    font-weight: 600;
    font-size: 14.5px;
    letter-spacing: -0.005em;
    padding: 14px 18px;
    border: 0;
    border-radius: var(--r-md);
    cursor: pointer;
    transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.18s,
                background 0.18s;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.18) inset,
                0 14px 38px -14px rgba(51, 204, 170, 0.6);
    animation: gi-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) 840ms both;
  }
  .gi-continue:hover {
    transform: translateY(-1px);
    background: var(--accent-soft);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset,
                0 20px 44px -16px rgba(51, 204, 170, 0.75);
  }
  .gi-continue:active { transform: translateY(0); }
  .gi-continue svg { width: 14px; height: 14px; transition: transform 0.18s; }
  .gi-continue:hover svg { transform: translateX(2px); }

  /* ─── Legal + footer ──────────────────────────────────────────── */
  .gi-legal {
    margin-top: 28px;
    font-family: var(--body);
    font-size: 12.5px;
    line-height: 1.55;
    color: var(--ink-mute);
    animation: gi-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) 920ms both;
  }
  .gi-legal a {
    color: var(--ink-dim);
    text-decoration: underline;
    text-decoration-color: var(--line);
    text-underline-offset: 3px;
    transition: color 0.15s, text-decoration-color 0.15s;
  }
  .gi-legal a:hover {
    color: var(--ink);
    text-decoration-color: var(--accent);
  }

  .gi-back-home {
    margin-top: 40px;
    font-family: var(--mono);
    font-size: 11.5px;
    letter-spacing: 0.06em;
    color: var(--ink-mute);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color 0.15s, gap 0.15s;
    animation: gi-rise 700ms cubic-bezier(0.16, 1, 0.3, 1) 1000ms both;
    width: fit-content;
  }
  .gi-back-home:hover {
    color: var(--accent);
    gap: 10px;
  }

  /* ─── Page-load reveal ────────────────────────────────────────── */
  @keyframes gi-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  /* ─── Responsive: stack at narrow widths ──────────────────────── */
  @media (max-width: 980px) {
    body { overflow: auto; }
    .gi-shell { grid-template-columns: 1fr; }
    .gi-shell::before { display: none; }
    .gi-hero { padding: 40px 28px 32px; gap: 36px; }
    .gi-console { padding: 48px 28px 64px; }
    .gi-headline { font-size: 40px; max-width: none; }
    .gi-stats { grid-template-columns: repeat(2, 1fr); }
  }

/* ─── Forgot-password link inside the password field ────────────── */
.gi-field .gi-forgot {
	display: block;
	margin-top: 8px;
	font-family: var(--mono);
	font-size: 10.5px;
	letter-spacing: 0.06em;
	color: var(--ink-mute);
	text-decoration: none;
	width: fit-content;
	transition: color 0.15s;
}
.gi-field .gi-forgot:hover { color: var(--accent); }

/* ─── Notices (oauth-failed / verification-pending banners) ──────── */
.gi-notice {
	margin: 0 0 20px;
	padding: 12px 14px;
	border-radius: var(--r-md);
	font-size: 13px;
	line-height: 1.5;
	color: var(--ink);
	border: 1px solid var(--line);
	background: rgba(15, 38, 32, 0.6);
}
.gi-notice.is-info { border-left: 3px solid var(--accent); }
.gi-notice.is-warn { border-left: 3px solid var(--amber); }
.gi-notice.is-error {
	border-color: rgba(245, 199, 92, 0.5);
	background: rgba(245, 199, 92, 0.08);
	color: var(--amber);
}
.gi-notice strong { color: var(--ink); font-weight: 600; }
