/* Multistream TM Limited — Auth pages */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand-navy:   #0c1222;
  --brand-accent: #2563eb;
  --brand-accent-2: #3b82f6;
  --blue:         #2563eb;
  --blue-dk:      #1d4ed8;
  --green:        #059669;
  --red:          #dc2626;
  --amber:        #d97706;
  --gray-50:      #f8fafc;
  --gray-100:     #f1f5f9;
  --gray-200:     #e2e8f0;
  --gray-400:     #94a3b8;
  --gray-600:     #475569;
  --gray-800:     #1e293b;
  --gray-900:     #0f172a;
  --radius:       10px;
  --shadow:       0 20px 50px rgba(15, 23, 42, 0.15);
}

html { -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  margin: 0;
}

.auth-page {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

.auth-panel--brand {
  background: linear-gradient(145deg, var(--brand-navy) 0%, #1a2744 50%, #1e3a5f 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 56px;
  position: relative;
  overflow: hidden;
}
.auth-panel--brand::before {
  content: '';
  position: absolute;
  top: -20%; right: -20%;
  width: 60%; height: 60%;
  background: radial-gradient(circle, rgba(37,99,235,.25) 0%, transparent 70%);
  pointer-events: none;
}
.auth-panel--brand::after {
  content: '';
  position: absolute;
  bottom: -10%; left: -10%;
  width: 50%; height: 50%;
  background: radial-gradient(circle, rgba(99,102,241,.15) 0%, transparent 70%);
  pointer-events: none;
}
.auth-panel-inner { position: relative; z-index: 1; }
.auth-logo { max-height: 56px; width: auto; max-width: 220px; object-fit: contain; margin-bottom: 28px; filter: brightness(1.05); }
.auth-company { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; margin-bottom: 8px; }
.auth-company-tag { font-size: 15px; color: rgba(255,255,255,.65); font-weight: 500; margin-bottom: 36px; }
.auth-features { list-style: none; padding: 0; }
.auth-features li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 14px;
  font-size: 14px;
  color: rgba(255,255,255,.8);
  line-height: 1.5;
}
.auth-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px; height: 20px;
  background: rgba(37,99,235,.35);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #93c5fd;
}
.auth-panel-copy { position: relative; z-index: 1; font-size: 12px; color: rgba(255,255,255,.55); line-height: 1.6; }
.auth-panel-copy a { color: rgba(255,255,255,.8); }

.auth-panel--form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: var(--gray-50);
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
}
.auth-mobile-brand {
  display: none;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  font-weight: 700;
  color: var(--gray-900);
}
.auth-logo-sm { height: 32px; width: auto; }

.auth-title { font-size: 1.5rem; font-weight: 800; color: var(--gray-900); margin-bottom: 6px; letter-spacing: -0.02em; }
.auth-subtitle { font-size: 14px; color: var(--gray-600); margin-bottom: 28px; line-height: 1.55; }
.auth-form { display: flex; flex-direction: column; gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--gray-800); display: flex; justify-content: space-between; align-items: center; }
.label-link { font-weight: 500; color: var(--blue); text-decoration: none; font-size: 12px; }
.label-link:hover { text-decoration: underline; }
.form-control {
  padding: 12px 14px; border: 1.5px solid var(--gray-200); border-radius: var(--radius);
  font-size: 14px; font-family: inherit; outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-control:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.password-wrap { position: relative; display: flex; }
.password-wrap .form-control { flex: 1; padding-right: 56px; }
.toggle-pass {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--gray-400); cursor: pointer; font-size: 12px; font-weight: 600;
}
.toggle-pass:hover { color: var(--blue); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand-accent), var(--brand-accent-2));
  color: #fff; border: none; padding: 13px 20px; border-radius: var(--radius);
  font-size: 15px; font-weight: 700; cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 14px rgba(37,99,235,.35);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,99,235,.4); }
.btn-full { width: 100%; }
.auth-links { margin-top: 22px; text-align: center; font-size: 13px; color: var(--gray-600); }
.auth-links a { color: var(--blue); font-weight: 600; text-decoration: none; }
.auth-links a:hover { text-decoration: underline; }
.auth-reset-btn {
  display: inline-block; margin: 0 0 14px; background: none; border: none; padding: 0;
  color: var(--blue); font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit;
}
.auth-reset-btn:hover { text-decoration: underline; }
.auth-dialog {
  border: none; border-radius: 12px; padding: 22px 22px 18px; max-width: 420px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .2);
}
.auth-dialog::backdrop { background: rgba(15, 23, 42, .45); }
.auth-dialog h3 { margin: 0 0 8px; font-size: 18px; }
.auth-dialog p { margin: 0 0 16px; color: var(--gray-600); line-height: 1.5; }

.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; margin-bottom: 18px; font-weight: 500; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.alert-error   { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }

.strength-bar { height: 4px; background: var(--gray-100); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.strength-bar div { height: 100%; width: 0; transition: width .3s, background .3s; border-radius: 2px; }
.strength-label { font-size: 11px; font-weight: 500; }
.password-rules { background: var(--gray-50); border-radius: var(--radius); padding: 14px 16px; font-size: 13px; margin-bottom: 16px; color: var(--gray-600); border: 1px solid var(--gray-200); }
.password-rules ul { padding-left: 18px; margin-top: 6px; }
.password-rules li { margin: 3px 0; }

@media (max-width: 900px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-page--centered { grid-template-columns: 1fr; }
  .auth-panel--brand { display: none; }
  .auth-mobile-brand { display: flex; }
  .auth-panel--form { padding: 24px 16px; min-height: 100vh; background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%); }
  .auth-panel--form-only { padding: 24px 16px; min-height: 100vh; background: linear-gradient(180deg, var(--gray-50) 0%, #fff 100%); }
  .auth-card { padding: 32px 24px; box-shadow: 0 8px 30px rgba(15,23,42,.1); }
}

.auth-page--centered { grid-template-columns: 1fr; }
.auth-panel--form-only { min-height: 100vh; width: 100%; display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--gray-50); }
.auth-card--centered { text-align: center; }
