/* ================================================================
   DrValue IAM - Base Stylesheet
   ================================================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  line-height: 1.5;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, "Helvetica Neue", sans-serif;
  color: #333;
  background-color: #f5f7fa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: #c8102e;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* --- Navigation --- */
.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background-color: #8b1225;
  color: #f1f5f9;
}

.nav-brand a {
  color: #f1f5f9;
  font-weight: 700;
  font-size: 1.125rem;
  display: flex;
  align-items: center;
}

.nav-brand a:hover {
  text-decoration: none;
}

.nav-logo {
  height: 44px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  color: #fecdd3;
  font-size: 0.875rem;
}

.nav-links a:hover {
  color: #fff;
  text-decoration: none;
}

.nav-user {
  color: #fda4af;
  font-size: 0.8125rem;
  margin-right: 0.5rem;
}

.nav-logout-form {
  display: inline;
}

.nav-link-btn {
  background: none;
  border: none;
  color: #fecdd3;
  font-size: 0.875rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}

.nav-link-btn:hover {
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background-color: #f1f5f9;
  border-radius: 1px;
}

/* --- Layout --- */
.container {
  max-width: 640px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-top: 3px solid #c8102e;
}

.container-wide {
  max-width: 1260px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border-top: 3px solid #c8102e;
}

.page-content {
  flex: 1;
  padding: 1rem 1.5rem;
}

/* --- Headings --- */
h1 {
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  color: #7f1d1d;
}

h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #991b1b;
}

h3 {
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  color: #9a1c2e;
}

/* --- Forms --- */
form div {
  margin-bottom: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  color: #475569;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
textarea,
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.15s;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #c8102e;
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* --- Buttons --- */
button,
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-family: inherit;
  transition:
    background-color 0.15s,
    opacity 0.15s;
}

button[type="submit"],
.btn-primary {
  background-color: #c8102e;
  color: #fff;
}

button[type="submit"]:hover,
.btn-primary:hover {
  background-color: #a00d24;
}

.btn-secondary {
  background-color: #64748b;
  color: #fff;
}

.btn-secondary:hover {
  background-color: #475569;
}

.btn-danger {
  background-color: #dc2626;
  color: #fff;
}

.btn-danger:hover {
  background-color: #b91c1c;
}

.btn-sm {
  padding: 0.25rem 0.625rem;
  font-size: 0.8125rem;
}

button:disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* --- Messages --- */
.error {
  color: #dc2626;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.success {
  color: #16a34a;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.info {
  color: #9a1c2e;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

/* --- Tables --- */
table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

th,
td {
  text-align: left;
  padding: 0.625rem 0.75rem;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.875rem;
}

th {
  background-color: #fef2f2;
  font-weight: 600;
  color: #7f1d1d;
}

tbody tr:hover {
  background-color: #fff5f5;
}

/* --- Cards --- */
.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: 3px solid #c8102e;
  border-radius: 6px;
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #7f1d1d;
  margin-bottom: 0.5rem;
}

.card-meta {
  font-size: 0.8125rem;
  color: #64748b;
  margin-bottom: 0.5rem;
}

/* --- Links / Social login --- */
.links {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.875rem;
}

.links a {
  margin: 0 0.5rem;
}

.social-login {
  margin-top: 1.25rem;
  text-align: center;
}

.social-login a {
  display: inline-block;
  margin: 0 0.375rem;
  padding: 0.5rem 1rem;
  background-color: #f1f5f9;
  border-radius: 4px;
  font-size: 0.875rem;
  color: #334155;
}

.social-login a:hover {
  background-color: #e2e8f0;
  text-decoration: none;
}

/* --- Section separator --- */
.section {
  margin-top: 2rem;
}

/* --- Settings section (flat, no card) --- */
.settings-section {
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.settings-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

/* --- Inline form row --- */
.form-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}

.form-row > * {
  flex: 1;
}

.form-row > button,
.form-row > .btn {
  flex: 0 0 auto;
}

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 9999px;
  text-transform: uppercase;
}

.badge-owner {
  background-color: #fef3c7;
  color: #92400e;
}

.badge-admin {
  background-color: #dbeafe;
  color: #1e40af;
}

.badge-member {
  background-color: #e2e8f0;
  color: #475569;
}

.badge-pending {
  background-color: #fef9c3;
  color: #854d0e;
}

.badge-expired {
  background-color: #fee2e2;
  color: #991b1b;
}

.badge-active {
  background-color: #dcfce7;
  color: #166534;
}

.badge-disabled {
  background-color: #e2e8f0;
  color: #64748b;
}

.shlink-slug-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shlink-slug-row input {
  flex: 1;
  min-width: 0;
}

.shlink-suffix {
  color: #64748b;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.875rem;
  white-space: nowrap;
}

.shlink-lock-hint {
  margin-top: 0.25rem;
  font-size: 0.8125rem;
}

.shlink-lock-hint:empty {
  display: none;
}

.shlink-target {
  max-width: 24rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge-success {
  background-color: #dcfce7;
  color: #166534;
}

.badge-warning {
  background-color: #fef9c3;
  color: #854d0e;
}

.badge-social {
  font-size: 0.75rem;
  letter-spacing: 0.02em;
}

.badge-google {
  background-color: #e8f0fe;
  color: #1a73e8;
}

.badge-kakao {
  background-color: #fef01b;
  color: #3c1e1e;
}

.badge-naver {
  background-color: #e8f5e9;
  color: #1ec800;
}

/* --- Social account list (profile section) --- */
.social-accounts {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.social-account-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.social-email {
  color: #64748b;
  font-size: 0.8125rem;
}

/* --- Toggle Switch --- */
.toggle {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  vertical-align: middle;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  border-radius: 22px;
  transition: background-color 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.toggle input:checked + .toggle-slider {
  background-color: #c8102e;
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(18px);
}

.toggle input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Error Pages --- */
.error-icon {
  margin-bottom: 1.25rem;
}

.error-icon svg {
  display: inline-block;
}

.error-description {
  font-size: 0.9375rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

/* --- Footer --- */
.main-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  font-size: 0.8125rem;
  color: #94a3b8;
  margin-top: auto;
  border-top: 1px solid #fecaca;
}

/* --- Utility --- */
.text-muted {
  color: #94a3b8;
}

.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 560px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 1.5rem;
  margin: 1rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.modal-header h3 {
  margin-bottom: 0;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.modal-close:hover {
  color: #1e293b;
  background-color: #f1f5f9;
}

/* --- Popup (Alert / Confirm) --- */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popupFadeIn 0.15s ease;
}

@keyframes popupFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popup {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 400px;
  padding: 2rem 1.75rem 1.5rem;
  margin: 1rem;
  text-align: center;
  animation: popupSlideIn 0.2s ease;
}

.popup-icon {
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.popup-message {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: #334155;
  margin-bottom: 1.5rem;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.popup-actions {
  display: flex;
  gap: 0.625rem;
  justify-content: center;
}

.popup-actions .btn {
  min-width: 100px;
  padding: 0.5rem 1.25rem;
}

.popup-error .popup-icon {
  color: #dc2626;
}
.popup-warning .popup-icon {
  color: #f59e0b;
}
.popup-info .popup-icon {
  color: #c8102e;
}
.popup-success .popup-icon {
  color: #16a34a;
}

.member-name-link {
  cursor: pointer;
  color: #c8102e;
  font-weight: 500;
}

.member-name-link:hover {
  text-decoration: underline;
}

/* --- Service Toggle Row --- */
.service-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.375rem 0;
}

.service-toggle-label {
  font-size: 0.875rem;
  color: #334155;
}

/* --- Pagination Controls --- */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.pagination-info {
  font-size: 0.8125rem;
  color: #64748b;
}

.hidden {
  display: none !important;
}

/* --- Table scroll wrapper --- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ================================================================
   Responsive — Main pages
   ================================================================ */

@media (max-width: 768px) {
  .main-nav {
    flex-wrap: wrap;
  }

  .nav-toggle {
    display: flex;
    min-height: 44px;
    min-width: 44px;
    align-items: center;
    justify-content: center;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 0.5rem;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a,
  .nav-link-btn {
    padding: 0.5rem 0;
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .nav-user {
    margin-right: 0;
    padding: 0.375rem 0;
  }

  .container,
  .container-wide {
    margin: 1rem 0.5rem;
    padding: 1.25rem;
  }

  .page-content {
    padding: 0.5rem;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  table {
    min-width: 540px;
  }

  .form-row {
    flex-direction: column;
  }

  .modal {
    max-width: 100%;
    max-height: 90vh;
    margin: 0.5rem;
    padding: 1rem;
  }

  .modal-overlay {
    align-items: flex-end;
  }

  .btn-sm {
    padding: 0.375rem 0.75rem;
    min-height: 36px;
  }

  .pagination-controls {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .pagination-controls .btn {
    min-height: 36px;
  }

  .service-toggle-row {
    padding: 0.5rem 0;
  }

  .toggle {
    width: 44px;
    height: 24px;
  }
}

@media (max-width: 480px) {
  .main-nav {
    padding: 0.5rem 1rem;
  }

  .nav-logo {
    height: 36px;
    max-width: 200px;
  }

  .container,
  .container-wide {
    margin: 0.5rem 0;
    padding: 1rem 0.75rem;
    border-radius: 0;
    box-shadow: none;
    border-top: 3px solid #c8102e;
  }

  h1 {
    font-size: 1.25rem;
  }

  h2 {
    font-size: 1.1rem;
  }

  .card {
    padding: 1rem;
  }

  .popup {
    max-width: calc(100% - 1rem);
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .modal-overlay {
    padding: 0;
  }

  .modal {
    margin: 0;
    border-radius: 12px 12px 0 0;
    max-height: 85vh;
  }

  .badge {
    font-size: 0.6875rem;
    padding: 0.125rem 0.375rem;
  }

  .popup-actions {
    flex-direction: column;
  }

  .popup-actions .btn {
    width: 100%;
    min-height: 44px;
  }
}

/* ================================================================
   Auth Pages (login, register, forgot-password, reset-password)
   ================================================================ */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: #f5f7fa;
  padding: 1rem;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 2.5rem 2rem 2rem;
}

.auth-logo {
  display: block;
  margin: 0 auto 1.75rem;
  width: 200px;
  max-width: 80%;
  height: auto;
  object-fit: contain;
}

.auth-title {
  font-size: 1.625rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: #64748b;
  margin-bottom: 1.5rem;
}

.auth-subtitle a {
  color: #c8102e;
  font-weight: 500;
}

.auth-subtitle a:hover {
  text-decoration: underline;
}

.auth-description {
  font-size: 0.875rem;
  color: #64748b;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* --- Auth form --- */
.auth-form .auth-field {
  margin-bottom: 1rem;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9375rem;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
  transition:
    border-color 0.15s,
    box-shadow 0.15s;
}

.auth-input::placeholder {
  color: #9ca3af;
}

.auth-input:focus {
  outline: none;
  border-color: #c8102e;
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.15);
}

.auth-input:read-only {
  background-color: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

/* --- Checkbox --- */
.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
  margin-bottom: 1.25rem;
  cursor: pointer;
  font-weight: 400;
}

.auth-checkbox input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  accent-color: #c8102e;
  cursor: pointer;
  margin: 0;
}

/* --- Primary button (scoped for specificity over button[type="submit"]) --- */
.auth-page .auth-btn-primary {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #c8102e;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s;
  text-align: center;
}

.auth-page .auth-btn-primary:hover {
  background-color: #a00d24;
}

.auth-page .auth-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Secondary / inline button (scoped for specificity) --- */
.auth-page .auth-btn-secondary {
  padding: 0.75rem 1rem;
  background-color: #f1f5f9;
  color: #334155;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.15s;
  white-space: nowrap;
}

.auth-page .auth-btn-secondary:hover {
  background-color: #e2e8f0;
}

.auth-page .auth-btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Divider --- */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: #9ca3af;
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background-color: #e5e7eb;
}

.auth-divider span {
  padding: 0 0.75rem;
}

/* --- Social buttons --- */
.auth-social-group {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.auth-btn-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.15s,
    border-color 0.15s;
}

.auth-btn-social:hover {
  background-color: #f9fafb;
  border-color: #9ca3af;
  text-decoration: none;
}

.auth-btn-social svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* --- Footer link --- */
.auth-footer {
  margin-top: 1.5rem;
  text-align: center;
}

.auth-footer a {
  color: #c8102e;
  font-size: 0.875rem;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* --- Inline row (field + button) --- */
.auth-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.auth-row .auth-input {
  flex: 1;
  min-width: 0;
}

/* --- Status text --- */
.auth-status {
  font-size: 0.8125rem;
  margin-top: 0.25rem;
  min-height: 1.25em;
}

.auth-status.is-success {
  color: #16a34a;
}

.auth-status.is-error {
  color: #dc2626;
}

/* --- Messages --- */
.auth-message {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.auth-message.is-error {
  color: #991b1b;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
}

.auth-message.is-success {
  color: #166534;
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.auth-message.is-info {
  color: #9a1c2e;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
}

/* --- Legal page (privacy / terms) --- */
.auth-card--legal {
  max-width: 760px;
}

.legal-content {
  color: #334155;
  font-size: 0.9375rem;
  line-height: 1.7;
  text-align: left;
}

.legal-content > p {
  margin-bottom: 1.25rem;
}

.legal-content section {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.legal-content section:first-of-type {
  margin-top: 1.5rem;
}

.legal-content h2 {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #334155;
  margin-top: 1rem;
  margin-bottom: 0.375rem;
}

.legal-content p {
  margin-bottom: 0.75rem;
}

.legal-content ul {
  margin: 0 0 1rem 1.25rem;
  padding: 0;
  list-style: disc;
}

.legal-content ul li {
  margin-bottom: 0.25rem;
}

.legal-content code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8125rem;
  background: #f1f5f9;
  padding: 0.0625rem 0.375rem;
  border-radius: 4px;
}

.legal-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
  font-size: 0.875rem;
}

.legal-content th,
.legal-content td {
  border: 1px solid #e2e8f0;
  padding: 0.5rem 0.75rem;
  text-align: left;
  vertical-align: top;
}

.legal-content th {
  background: #f8fafc;
  font-weight: 600;
  color: #1e293b;
}

/* --- Auth page responsive --- */
@media (max-width: 480px) {
  .auth-page {
    padding: 0;
    align-items: flex-start;
  }

  .auth-card {
    max-width: 100%;
    border-radius: 0;
    box-shadow: none;
    min-height: 100vh;
    padding: 2rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
  }

  .auth-logo {
    width: 160px;
    max-width: 70%;
    margin-bottom: 1.5rem;
  }

  .auth-btn-social {
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
  }
}
