/* ===================================================================
   VLM OCR — Business Minimalist (from authsvc)
   =================================================================== */

/* -- Reset -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* -- Tokens ------------------------------------------------------- */
:root {
  --bg:          #f8f8f8;
  --bg-elevated: #f1f1f1;
  --panel:       #ffffff;
  --panel-raised:#ffffff;
  --fill:        #f1f1f1;
  --fill-strong: #e5e5e5;

  --border:      #e5e5e5;
  --border-strong:#d4d4d4;

  --text:        #1a1a1a;
  --text-secondary:#6b6b6b;
  --text-faint:  #a3a3a3;

  --accent:      #0a6366;
  --accent-hover:#085457;
  --accent-soft: #e0efee;

  --danger:      #a93226;
  --danger-hover:#922b21;
  --danger-soft: #f6eceb;
  --success:     #276749;
  --success-soft:#ecfdf5;
  --warning:     #b45309;
  --warning-soft:#fffbeb;

  --font-display:'Golos Text', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body:   'Golos Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono:   'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --space-xs:  4px;
  --space-sm:  6px;
  --space-md:  10px;
  --space-base: 14px;
  --space-lg:  18px;
  --space-xl:  22px;
  --space-2xl: 30px;

  --transition-fast: 0.1s ease;
  --transition-base: 0.15s ease;
  --transition-slow: 0.2s ease;
}

html { color-scheme: light; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::selection { background: var(--accent-soft); color: var(--accent); }

:focus-visible {
  outline: 1.5px solid var(--accent);
  outline-offset: 1px;
}

/* ===================================================================
   Auth pages — split layout: brand panel + form card
   =================================================================== */
.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  min-height: 100vh;
  background: var(--bg);
}

/* -- Left: brand panel ------------------------------------------- */
.auth-brand {
  position: relative;
  display: flex;
  background: var(--accent);
  color: #fff;
  overflow: hidden;
}
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 36px 36px;
  -webkit-mask-image: linear-gradient(to bottom, black, transparent 85%);
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(100% 60% at 8% -10%, rgba(255, 255, 255, 0.12), transparent 50%);
  pointer-events: none;
}

.auth-brand-grid {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 36px;
  padding: clamp(28px, 5vw, 56px);
}

.auth-brand-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.auth-glyph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
}
.auth-glyph:hover {
  background: rgba(255, 255, 255, 0.1);
}
.auth-word {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.01em;
}
.auth-word em {
  font-style: normal;
  color: #8ec8c4;
}

.auth-brand-body { max-width: 32ch; }
.auth-claim {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.8vw, 40px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.auth-sub {
  font-size: 13.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.78);
}

/* -- Right: form card -------------------------------------------- */
.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(22px, 4.5vw, 56px);
  border-left: 1px solid var(--border);
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--border);
  padding: clamp(22px, 4vw, 34px);
}

.auth-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  margin-bottom: 10px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 6px;
}

.auth-intro {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.auth-error {
  border: 1px solid var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.4;
  margin-bottom: 14px;
}

/* -- Forms ------------------------------------------------------- */
.form-group { margin-bottom: var(--space-md); }

.form-group label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-faint);
  margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 11px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.4;
  outline: none;
  transition: border-color var(--transition-base), background var(--transition-base);
}

.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-faint); }
.form-group input:hover,
.form-group select:hover { border-color: var(--border-strong); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  background: var(--panel);
  outline: none;
}

/* -- Buttons ----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition-base), border-color var(--transition-base), color var(--transition-base);
  text-decoration: none;
}
.btn:hover { background: var(--bg); text-decoration: none; }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn-auth {
  width: 100%;
  height: 42px;
  font-size: 13.5px;
  margin-top: 4px;
}
.btn-auth:disabled {
  opacity: 0.7;
  cursor: progress;
}

.auth-link {
  text-align: center;
  margin-top: 16px;
  font-size: 12.5px;
  color: var(--text-secondary);
}

/* -- Auth responsive --------------------------------------------- */
@media (max-width: 880px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-brand { min-height: auto; }
  .auth-brand-grid {
    padding: 22px 24px 18px;
    gap: 12px;
  }
  .auth-claim { font-size: 24px; }
  .auth-sub { display: none; }

  .auth-panel { padding: 22px 16px 36px; align-items: flex-start; }
}
