/* ConvertHub auth shell — aligned with converthub-web / cloudconvert tokens */
:root {
  --brand: #7c3aed;
  --brand-hover: #6d28d9;
  --surface: #ffffff;
  --surface-muted: #f5f6f8;
  --text-primary: #1a1a1a;
  --text-muted: #5c6370;
  --border: #e2e5ea;
  --shadow: rgba(0, 0, 0, 0.08);
  --auth-radius: 12px;
}

:root.dark,
[data-theme='dark'] {
  --brand: #7c3aed;
  --brand-hover: #8b5cf6;
  --surface: #121418;
  --surface-muted: #1c2028;
  --text-primary: #f0f2f5;
  --text-muted: #9aa3b2;
  --border: #2a3140;
  --shadow: rgba(0, 0, 0, 0.35);
}

html,
body {
  background: var(--surface-muted);
  color: var(--text-primary);
  min-height: 100%;
}

body.auth-body {
  margin: 0;
}

/* Brand overrides — replace Bootstrap blue */
.btn-primary,
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
}

.btn-outline-primary {
  color: var(--brand) !important;
  border-color: var(--brand) !important;
}

.btn-outline-primary:hover {
  background-color: var(--brand) !important;
  border-color: var(--brand) !important;
  color: #fff !important;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-hover);
}

/* Auth shell */
.auth-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.auth-shell__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.auth-shell__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.125rem;
}

.auth-shell__brand:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.auth-shell__brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.auth-shell__brand-text .ch-accent {
  color: var(--brand);
}

.auth-shell__controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-shell__control {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  cursor: pointer;
  line-height: 1.25;
}

.auth-shell__control:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.auth-shell__main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}

/* Auth card */
.ch-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--auth-radius);
  box-shadow: 0 4px 24px var(--shadow);
  padding: 2rem 1.75rem;
}

.ch-auth-card__title {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.ch-auth-card__subtitle {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.ch-auth-field {
  margin-bottom: 1rem;
}

.ch-auth-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.ch-auth-field .form-control {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.625rem 0.875rem;
}

.ch-auth-field .form-control:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
  background: var(--surface);
}

.ch-auth-field--ltr .form-control {
  direction: ltr;
  text-align: left;
}

.ch-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.ch-auth-actions .btn-primary {
  flex: 1 1 auto;
  min-width: 120px;
  padding: 0.625rem 1rem;
  font-weight: 600;
  border-radius: 8px;
}

.ch-auth-links {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

.ch-auth-links p {
  margin: 0 0 0.5rem;
}

.ch-auth-remember {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.validation-summary-errors,
.text-danger {
  color: var(--brand) !important;
}

/* Admin layout brand refresh */
.menu.ch-admin-menu {
  background: var(--surface) !important;
  border-bottom: 1px solid var(--border) !important;
}

.menu.ch-admin-menu .menu-logo a.logo {
  color: var(--text-primary);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.menu.ch-admin-menu .menu-logo .ch-accent {
  color: var(--brand);
}

.container.body-content {
  color: var(--text-primary);
}

@media (max-width: 767px) {
  .auth-shell__main {
    padding: 1.25rem 0.75rem 2rem;
  }

  .ch-auth-card {
    padding: 1.5rem 1.25rem;
  }
}
