/* KulaCRM — login page */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #05080d;
  --surface: rgba(12, 18, 28, 0.85);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f7ff;
  --text-2: rgba(255, 255, 255, 0.72);
  --text-3: rgba(255, 255, 255, 0.48);
  --text-4: rgba(255, 255, 255, 0.28);
  --accent: #00e5ff;
  --accent-2: #586bff;
  --accent-gradient: linear-gradient(135deg, #00e5ff 0%, #00bfff 45%, #586bff 100%);
  --accent-soft: rgba(0, 229, 255, 0.1);
  --danger: #f87171;
  --success: #4ade80;
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --font: 'Inter', -apple-system, sans-serif;
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(0, 229, 255, 0.08), transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(88, 107, 255, 0.06), transparent 50%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.login-container {
  width: 100%;
  max-width: 440px;
  animation: fadeInUp 0.5s ease both;
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.login-card {
  background: var(--surface);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px 30px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  position: relative;
  overflow: hidden;
}
.login-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.logo {
  width: 112px;
  height: 112px;
  display: grid;
  place-items: center;
  margin: 0 auto 9px;
  overflow: hidden;
  border: 1px solid rgba(120, 174, 255, .25);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 25%, #243b61 0, #15223a 58%, #101827 100%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .28), inset 0 0 22px rgba(61, 160, 255, .1);
}
.logo-project-image {
  display: block;
  width: 104px;
  max-width: 88%;
  height: auto;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: drop-shadow(0 8px 22px rgba(0, 180, 255, 0.16));
}

.subtitle {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-3);
  margin-bottom: 26px;
}

.form { display: flex; flex-direction: column; gap: 14px; }

.field { display: flex; flex-direction: column; }
.field__label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.field input {
  width: 100%;
  padding: 13px 16px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: var(--transition);
}
.field input:focus {
  border-color: var(--accent);
  background: rgba(0, 0, 0, 0.5);
  box-shadow: 0 0 0 3px var(--accent-soft), 0 0 20px rgba(0, 229, 255, 0.15);
}
.field input::placeholder { color: var(--text-4); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 6px;
  position: relative;
}
.btn--primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 6px 24px rgba(0, 229, 255, 0.25);
}
.btn--primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 36px rgba(0, 229, 255, 0.35);
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn__spinner { display: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3); border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn.loading .btn__text { display: none; }
.btn.loading .btn__spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.message {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.79rem;
  display: none;
  font-weight: 500;
  border: 1px solid transparent;
}
.message.show { display: block; animation: msgIn 0.3s ease; }
@keyframes msgIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.message--success { background: rgba(74, 222, 128, 0.1); border-color: rgba(74, 222, 128, 0.25); color: var(--success); }
.message--error { background: rgba(248, 113, 113, 0.1); border-color: rgba(248, 113, 113, 0.25); color: var(--danger); }

.tenant-picker { margin-top: 18px; }
.tenant-picker__title { font-size: 0.8rem; color: var(--text-2); margin-bottom: 10px; }
.tenant-picker__list { display: flex; flex-direction: column; gap: 8px; }
.tenant-btn {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
  text-align: left;
}
.tenant-btn:hover { border-color: var(--accent); background: rgba(0, 229, 255, 0.06); }
.tenant-btn__role { font-size: 0.7rem; color: var(--text-3); }

.login-footer {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
  gap: 14px;
  font-size: 0.74rem;
}
.login-footer a { color: var(--text-3); text-decoration: none; transition: var(--transition); }
.login-footer a:hover { color: var(--accent); }
.login-footer .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-4); align-self: center; }

@media (max-width: 480px) {
  .login-card { padding: 32px 22px 24px; }
}

/* The author .form display rule otherwise overrides the browser [hidden] style. */
.form[hidden] { display: none !important; }

/* Keep reset form labels and password fields clear on the light public theme. */
.login-card .field__label { display: block; color: #46536c !important; font-size: .82rem; font-weight: 700; }
.login-card .field input { min-height: 48px; color: #202a3d; background: #fff; border-color: #dfe4ef; }
.login-card .field input::placeholder { color: #7d879b; opacity: 1; }
.login-card .field input:-webkit-autofill,
.login-card .field input:-webkit-autofill:hover,
.login-card .field input:-webkit-autofill:focus { -webkit-text-fill-color: #202a3d; box-shadow: 0 0 0 1000px #fff inset; transition: background-color 999999s ease-out; }

/* Interactive phone and password controls on password recovery. */
.reset-field { gap: 2px; }
.reset-input-wrap { position: relative; display: flex; align-items: center; }
.reset-input-wrap input { padding-left: 44px !important; }
.password-input-wrap input { padding-right: 82px !important; }
.reset-field-icon { position: absolute; left: 15px; z-index: 1; color: #7582a0; font-size: 1rem; pointer-events: none; }
.reset-input-wrap:focus-within .reset-field-icon { color: #536df5; }
.reset-input-wrap input.is-valid { border-color: #30b981 !important; box-shadow: 0 0 0 3px rgba(48,185,129,.1) !important; }
.reset-input-wrap input.is-invalid { border-color: #e48c8c !important; }
.password-toggle { position: absolute; right: 8px; z-index: 1; padding: 7px 9px; border: 0; border-radius: 8px; color: #5266cf; background: #eef1ff; font-family: inherit; font-size: .72rem; font-weight: 700; line-height: 1; cursor: pointer; }
.password-toggle:hover { background: #e1e6ff; }
.reset-hint, .reset-validation, .password-match { display: block; min-height: 17px; margin-top: 5px; color: #7b8599; font-size: .72rem; }
.reset-validation { color: #20875f; }
.password-strength { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.strength-track { display: flex; flex: 1; gap: 4px; }
.strength-track i { height: 4px; flex: 1; border-radius: 99px; background: #e5e9f1; transition: background .18s ease; }
.password-strength[data-level="1"] .strength-track i:nth-child(1), .password-strength[data-level="2"] .strength-track i:nth-child(-n+2) { background: #e7b64a; }
.password-strength[data-level="3"] .strength-track i { background: #30b981; }
.strength-label { min-width: 112px; color: #7b8599; font-size: .69rem; text-align: right; }
.password-rules { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 7px; }
.password-rules span { color: #8b94a7; font-size: .69rem; }
.password-rules span::before { content: '○'; display: inline-block; margin-right: 5px; color: #9aa3b5; }
.password-rules span.is-met { color: #20875f; }
.password-rules span.is-met::before { content: '✓'; color: #20875f; }
.password-match.is-match { color: #20875f; }
.password-match.is-mismatch { color: #bd4d59; }
@media (max-width: 420px) { .strength-label { min-width: 92px; font-size: .64rem; } }

/* KulaCRM rebrand: full horizontal wordmark. */
.logo-project-image{display:block;width:min(230px,100%);height:auto;max-height:76px;object-fit:contain;margin:0 auto}
/* KulaCRM approved horizontal wordmark */
.logo-project-image{display:block;width:min(230px,100%);height:auto;max-height:76px;object-fit:contain;margin:0 auto}
