@import url("https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,400;0,6..12,500;0,6..12,600;0,6..12,700;0,6..12,800&display=swap");
@import url("/css/timetec-hr-theme.css");

html,
body {
  margin: 0;
  min-height: 100%;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.login-card {
  width: min(440px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  padding: 2.25rem 2rem 1.75rem;
}

.brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.brand-logo {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 0.85rem;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.brand h1 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand p {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.role-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.25rem;
  background: rgba(0, 0, 0, 0.28);
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.role-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.role-tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.field input {
  width: 100%;
  padding: 0.72rem 0.85rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #e8ecf0;
  color: #0f172a;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.field input::placeholder {
  color: #64748b;
}

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

/* Override browser autofill yellow on dark login card */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #e8ecf0 inset !important;
  box-shadow: 0 0 0 1000px #e8ecf0 inset !important;
  -webkit-text-fill-color: #0f172a !important;
  caret-color: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.22);
  transition: background-color 99999s ease-in-out 0s;
}

.field input:autofill {
  box-shadow: 0 0 0 1000px #e8ecf0 inset !important;
  -webkit-text-fill-color: #0f172a !important;
}

.field .hint {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--muted);
}

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

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

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

.link-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
}

.link-btn:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.btn-primary {
  width: 100%;
  padding: 0.8rem 1rem;
  border: none;
  border-radius: 999px;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-footer {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

.form-footer a {
  color: var(--accent);
}

.alert {
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  display: none;
}

.alert.visible {
  display: block;
}


.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 10, 40, 0.72);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  width: min(420px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.modal h3 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

.modal p {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.btn-secondary {
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

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