/* DHOS/Studio brand tokens (dark mode primary) — see uneeq-brand-guidelines
   skill. This is a Digital Human OS / DHOP-adjacent admin tool, so it uses
   the dark + orange + Manrope/Inter system, not ITP's purple/Inter. */
:root {
  --grad-start: #0e0b33;
  --grad-end: #0d0b5d;
  --liquorice: #232236;
  --elevated: #2d2c3e;
  --orange: #f47c6a;
  --orange-dark-mode-text: #ff8c7a;
  --pink: #ff1888;
  --text-primary: #f8f9fa;
  --text-secondary: #e5e7eb;
  --text-tertiary: #d1d5db;
  --link: #7b73e1;
  --success: #34d399;
  --warning: #fbbf24;
  --error: #f87171;
  --border: rgba(248, 249, 250, 0.12);
  --font-heading: 'Manrope', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Inter', ui-sans-serif, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(160deg, var(--grad-start), var(--grad-end));
  color: var(--text-secondary);
  font-family: var(--font-body);
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1.25rem 4rem;
}

header.app-header {
  width: 100%;
  max-width: 760px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

header.app-header img.logo { height: 28px; display: block; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

h1 { font-size: 1.35rem; }
h2 { font-size: 1.05rem; }

p.subtitle {
  color: var(--text-tertiary);
  margin: 0;
  font-size: 0.9rem;
}

.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem 0.5rem;
}

.lang-switch button {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  font-family: var(--font-body);
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
}

.lang-switch button.active {
  background: var(--orange);
  color: var(--liquorice);
  font-weight: 600;
}

.lang-switch .globe { opacity: 0.8; font-size: 0.95rem; }

main {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.card {
  background: var(--elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}

.card + .card { margin-top: 0; }

label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-tertiary);
  margin-bottom: 0.35rem;
}

input[type="password"],
input[type="text"] {
  width: 100%;
  background: var(--liquorice);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  padding: 0.6rem 0.75rem;
}

input:focus { outline: 2px solid var(--orange); outline-offset: 1px; }

.field { margin-bottom: 1rem; }
.field:last-child { margin-bottom: 0; }

.field-row {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
}
.field-row .field { flex: 1; margin-bottom: 0; }

button.primary {
  background: var(--orange);
  color: var(--liquorice);
  border: none;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.65rem 1.3rem;
  border-radius: 8px;
  cursor: pointer;
}
button.primary:hover { filter: brightness(1.08); }
button.primary:disabled { opacity: 0.5; cursor: not-allowed; }

button.secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  font-family: var(--font-body);
  font-size: 0.85rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  cursor: pointer;
}

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge.env { background: rgba(52, 211, 153, 0.15); color: var(--success); }
.badge.store { background: rgba(123, 115, 225, 0.18); color: var(--link); }
.badge.unset { background: rgba(209, 213, 219, 0.12); color: var(--text-tertiary); }

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

.error-banner {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--error);
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-top: 0.75rem;
}

.hint {
  color: var(--text-tertiary);
  font-size: 0.78rem;
  margin-top: 0.35rem;
}

.hidden { display: none !important; }

#login-view {
  max-width: 380px;
  margin: 3rem auto 0;
  width: 100%;
}

footer {
  margin-top: 3rem;
  color: var(--text-tertiary);
  font-size: 0.75rem;
  text-align: center;
}

a { color: var(--link); }
