/* TrustOps Login — shared prototype styles */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --ink: #0c1a16;
  --ink-soft: #243530;
  --muted: #5a6b64;
  --line: rgba(12, 26, 22, 0.1);
  --accent: #1f8f78;
  --accent-deep: #146b5a;
  --accent-soft: rgba(31, 143, 120, 0.14);
  --panel: #ffffff;
  --danger: #b33a32;
  --font: 'IBM Plex Sans', sans-serif;
  --display: 'Fraunces', Georgia, serif;
}

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

html { font-size: 15px; }

body {
  font-family: var(--font);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  line-height: 1.45;
}

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

button, input { font-family: inherit; }

.proto-banner {
  background: linear-gradient(90deg, #146b5a, #1f8f78);
  color: #fff;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  letter-spacing: 0.02em;
}

.login-shell {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: calc(100vh - 28px);
}

@media (max-width: 920px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { min-height: 220px; }
}

/* ——— Visual panel ——— */
.login-visual {
  position: relative;
  overflow: hidden;
  padding: 2.5rem 2.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
}

.login-visual.admin {
  background:
    radial-gradient(800px 500px at 10% 20%, rgba(45, 168, 138, 0.35), transparent 55%),
    radial-gradient(600px 400px at 90% 80%, rgba(42, 95, 158, 0.28), transparent 50%),
    linear-gradient(155deg, #071410 0%, #0c1a16 45%, #12352c 100%);
}

.login-visual.client {
  background:
    radial-gradient(700px 420px at 0% 0%, rgba(255, 255, 255, 0.2), transparent 50%),
    radial-gradient(600px 400px at 100% 100%, rgba(20, 80, 120, 0.25), transparent 55%),
    linear-gradient(145deg, #146b5a 0%, #1f8f78 48%, #1a6f8f 100%);
}

.login-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 30% 40%, black 20%, transparent 70%);
  pointer-events: none;
}

.visual-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(145deg, #2da88a, #146b5a);
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.visual-brand strong {
  display: block;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.visual-brand span {
  font-size: 0.75rem;
  opacity: 0.7;
}

.visual-copy {
  position: relative;
  z-index: 1;
  max-width: 26rem;
}

.visual-copy .eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.85rem;
}

.visual-copy h1 {
  font-family: var(--display);
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 0.85rem;
}

.visual-copy p {
  font-size: 0.95rem;
  opacity: 0.78;
  max-width: 22rem;
}

.visual-points {
  position: relative;
  z-index: 1;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 2rem;
}

.visual-points li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.84rem;
  opacity: 0.88;
}

.visual-points li::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7ddec4;
  flex-shrink: 0;
  box-shadow: 0 0 0 3px rgba(125, 222, 196, 0.25);
}

.visual-foot {
  position: relative;
  z-index: 1;
  font-size: 0.75rem;
  opacity: 0.55;
}

/* ——— Form panel ——— */
.login-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(31, 143, 120, 0.08), transparent 55%),
    linear-gradient(180deg, #f5f9f7 0%, #eaf1ee 100%);
}

.login-card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem 1.85rem 1.75rem;
  box-shadow:
    0 1px 2px rgba(12, 26, 22, 0.04),
    0 16px 40px rgba(12, 26, 22, 0.07);
  animation: rise 0.45s ease;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.login-card h2 {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.3rem;
}

.login-card .lead {
  color: var(--muted);
  font-size: 0.88rem;
  margin-bottom: 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
}

.field input {
  border: 1px solid rgba(12, 26, 22, 0.14);
  border-radius: 12px;
  padding: 0.72rem 0.9rem;
  font-size: 0.92rem;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.password-wrap {
  position: relative;
}

.password-wrap input { width: 100%; padding-right: 3rem; }

.toggle-pass {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
}

.toggle-pass:hover { background: rgba(12, 26, 22, 0.05); color: var(--ink); }

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.25rem 0 1.25rem;
  font-size: 0.82rem;
}

.remember {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--ink-soft);
  cursor: pointer;
}

.remember input { accent-color: var(--accent); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 6px 16px rgba(31, 143, 120, 0.3);
}

.btn-primary:hover { background: var(--accent-deep); }

.btn-primary.loading {
  pointer-events: none;
  opacity: 0.85;
}

.btn-sso {
  background: #fff;
  color: var(--ink-soft);
  border: 1px solid rgba(12, 26, 22, 0.14);
  margin-top: 0.65rem;
}

.btn-sso:hover { background: #f7faf8; }

.divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.15rem 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.demo-hint {
  margin-top: 1.15rem;
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  background: rgba(31, 143, 120, 0.08);
  border: 1px solid rgba(31, 143, 120, 0.15);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.demo-hint strong { color: var(--accent-deep); }

.switch-portal {
  margin-top: 1.35rem;
  text-align: center;
  font-size: 0.82rem;
  color: var(--muted);
}

.error-msg {
  display: none;
  margin-bottom: 1rem;
  padding: 0.65rem 0.8rem;
  border-radius: 10px;
  background: #fceceb;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 500;
}

.error-msg.show { display: block; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.btn-primary.loading .spinner { display: block; }
.btn-primary.loading .btn-label { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }
