* {
  box-sizing: border-box;
}

body.crm-auth-page {
  margin: 0;
  min-height: 100vh;
  background: var(--surface-2);
  color: var(--text-primary);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.crm-auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.crm-auth-card {
  width: 100%;
  max-width: 390px;
  padding: 2rem 1.75rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.crm-auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-bottom: 1.5rem;
}

.crm-auth-logo__mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--fill-accent);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 700;
}

.crm-auth-logo__text {
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
}

.crm-auth-title {
  margin: 0 0 5px;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 600;
  text-align: center;
}

.crm-auth-subtitle {
  margin: 0 0 1.5rem;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
  text-align: center;
}

.crm-form-group {
  margin-bottom: 14px;
}

.crm-form-label {
  display: block;
  margin-bottom: 5px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
}

.crm-form-control {
  width: 100%;
  padding: 9px 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
}

.crm-form-control:focus {
  outline: none;
  border-color: var(--fill-accent);
  box-shadow: 0 0 0 3px rgba(55, 138, 221, 0.12);
}

.crm-auth-submit {
  width: 100%;
  padding: 10px 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--fill-accent);
  color: var(--on-accent);
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
}

.crm-auth-submit:hover {
  background: var(--fill-accent-hover);
}

.crm-auth-alert {
  margin-bottom: 14px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  line-height: 1.45;
}

.crm-auth-alert--error {
  background: rgba(229, 72, 77, 0.08);
  border-color: rgba(229, 72, 77, 0.25);
  color: var(--danger);
}

.crm-auth-alert--success {
  background: rgba(31, 157, 85, 0.08);
  border-color: var(--border-success);
  color: var(--text-success);
}

.crm-auth-footer,
.crm-auth-row-end {
  color: var(--text-secondary);
  font-size: 12.5px;
}

.crm-auth-footer {
  margin-top: 1.25rem;
  text-align: center;
}

.crm-auth-row-end {
  display: flex;
  justify-content: flex-end;
  margin: -5px 0 14px;
}

.crm-auth-footer a,
.crm-auth-row-end a {
  color: var(--text-accent);
  font-weight: 500;
  text-decoration: none;
}

.crm-auth-footer a:hover,
.crm-auth-row-end a:hover {
  text-decoration: underline;
}
