:root {
  --dnd-red: #b7061b;
  --dnd-blue: #082f75;
  --dnd-soft: #ece8ff;
}

.auth-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #f8faff 0%, var(--dnd-soft) 45%, #fff 100%);
  font-family: 'Inter Tight', system-ui, sans-serif;
}

.auth-page-inner {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 2.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.auth-topbar-logo {
  flex-shrink: 1;
  min-width: 0;
  max-width: 70%;
}

.auth-topbar-nav {
  display: flex;
  gap: 1.25rem;
}

.auth-topbar-nav a {
  color: var(--dnd-blue);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
}

.auth-topbar-nav a:hover { color: var(--dnd-red); }

.auth-shell {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-content: center;
}

@media (min-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: stretch;
  }
}

@media (max-width: 899px) {
  .auth-shell {
    display: flex;
    flex-direction: column;
  }

  .auth-panel-form {
    order: -1;
  }

  .auth-topbar-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

.auth-panel {
  background: #fff;
  border: 1px solid rgba(8, 47, 117, 0.1);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 16px 48px rgba(8, 47, 117, 0.06);
}

.auth-panel-features {
  background: linear-gradient(145deg, var(--dnd-blue) 0%, #0a3d8f 55%, #1a4a9e 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
}

.auth-panel-features h1,
.auth-panel-features h2,
.auth-panel-features h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #fff !important;
}

.auth-panel-features .auth-sub {
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.auth-feature-list {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  flex: 1;
}

.auth-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.5rem 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
}

.auth-feature-list li::before {
  content: '✓';
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.auth-panel-signin-mini {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  margin-top: auto;
}

.auth-panel-signin-mini p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.9);
}

.auth-panel-signin-mini a {
  display: block;
  text-align: center;
  padding: 0.7rem 1rem;
  border-radius: 10px;
  background: #fff;
  color: var(--dnd-blue);
  font-weight: 600;
  text-decoration: none;
}

.auth-panel-form h1 {
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--dnd-blue);
  margin: 0 0 0.35rem;
}

.auth-panel-form .auth-sub {
  color: #64748b;
  margin-bottom: 1.5rem;
}

.auth-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

.auth-field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.auth-field-row label { margin-bottom: 0; }

.auth-forgot {
  color: var(--dnd-red);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-password-wrap {
  position: relative;
  margin-bottom: 1rem;
}

.auth-password-wrap input {
  width: 100%;
  padding: 0.85rem 2.75rem 0.85rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
  margin-bottom: 0;
}

.auth-password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  border-radius: 8px;
}

.auth-password-toggle:hover {
  color: var(--dnd-blue);
  background: rgba(8, 47, 117, 0.06);
}

.auth-password-icon {
  width: 1.15rem;
  height: 1.15rem;
}

.auth-form input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  margin-bottom: 1rem;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-password-wrap input:focus {
  outline: none;
  border-color: var(--dnd-blue);
  box-shadow: 0 0 0 3px rgba(8, 47, 117, 0.12);
}

.auth-form input:focus {
  outline: none;
  border-color: var(--dnd-blue);
  box-shadow: 0 0 0 3px rgba(8, 47, 117, 0.12);
}

.auth-btn {
  width: 100%;
  background: var(--dnd-red);
  color: #fff;
  border: none;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-btn:hover { background: var(--dnd-blue); }

.auth-alt-action {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e2e8f0;
  text-align: center;
}

.auth-alt-action-label {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #64748b;
}

.auth-btn-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: var(--dnd-red);
  color: #fff;
  text-decoration: none;
  box-sizing: border-box;
}

.auth-btn-brand:hover {
  background: var(--dnd-blue);
  color: #fff;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  color: #94a3b8;
  font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.auth-google-btn:hover:not(.is-disabled) {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.auth-google-btn.is-disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.auth-google-btn svg {
  width: 20px;
  height: 20px;
}

.auth-alert {
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.auth-alert-error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.auth-foot {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.9rem;
  color: #64748b;
}

.auth-foot a {
  color: var(--dnd-blue);
  font-weight: 600;
  text-decoration: none;
}

.auth-foot a:hover { color: var(--dnd-red); }

.auth-demo {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.8rem;
  color: #64748b;
}

.auth-demo summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--dnd-blue);
}

.auth-demo-hint {
  margin: 0.5rem 0 0;
  line-height: 1.45;
}

.auth-demo-hint code {
  font-size: 0.78rem;
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.auth-demo-table-wrap {
  margin-top: 0.75rem;
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.auth-demo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.75rem;
}

.auth-demo-table th,
.auth-demo-table td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.auth-demo-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #334155;
}

.auth-demo-table tr:last-child td {
  border-bottom: none;
}

.auth-standalone {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  flex: 1;
  width: 100%;
}

.auth-page-inner .auth-standalone {
  padding: 0.5rem 0 2rem;
}

.auth-card {
  background: #fff;
  border-radius: 20px;
  padding: 2rem;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 16px 40px rgba(8, 47, 117, 0.1);
}

.auth-logo {
  display: block;
  height: 48px;
  width: auto;
  margin-bottom: 1rem;
}

.auth-card h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dnd-blue);
  margin: 0 0 0.35rem;
}

.auth-alert-success {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Client logo marquee */
.dnd-logo-marquee {
  overflow: hidden;
  width: 100%;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.dnd-logo-marquee-track {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  width: max-content;
  animation: dnd-marquee 28s linear infinite;
}

.dnd-logo-marquee-track img {
  height: 48px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .dnd-logo-marquee { mask-image: none; }
  .dnd-logo-marquee-track {
    animation: none;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
  }
  .dnd-logo-marquee-duplicate { display: none; }
}

@keyframes dnd-marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.dnd-register-aside-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (min-width: 1024px) {
  .dnd-register-aside-grid {
    grid-template-columns: 1fr;
  }
}
