/**
 * Auth + dashboard styles — marketplace white theme extension.
 */
:root {
  --auth-max: 420px;
  --dash-sidebar: 240px;
}

body.page-auth,
body.page-dashboard {
  font-family: var(--mp-font, 'Manrope', system-ui, sans-serif);
  color: var(--mp-ink, #1a1f26);
  background: var(--mp-surface, #f7f8f9);
  min-height: 100vh;
}

.auth-screen {
  min-height: calc(100vh - var(--header-h, 64px));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 48px;
}

.auth-card {
  width: min(100%, var(--auth-max));
  background: #fff;
  border: 1px solid var(--mp-border, #e4e7eb);
  border-radius: var(--mp-radius-lg, 12px);
  padding: 28px 24px 32px;
  box-shadow: var(--mp-shadow-md, 0 4px 16px rgba(26, 31, 38, 0.08));
}

.auth-card h1 {
  margin: 12px 0 6px;
  font-size: 1.45rem;
  font-weight: 700;
}

.auth-card > p {
  margin: 0 0 20px;
  color: var(--mp-muted, #6b7280);
  font-size: 0.92rem;
  line-height: 1.45;
}

.auth-form label {
  display: block;
  margin-bottom: 14px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--mp-ink-soft, #3d4654);
}

.auth-form input,
.auth-form textarea {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border: 1px solid var(--mp-border, #e4e7eb);
  border-radius: var(--mp-radius, 8px);
  font: inherit;
  background: #fff;
}

.auth-form input:focus,
.auth-form textarea:focus {
  outline: 2px solid var(--mp-accent-soft, rgba(13, 115, 119, 0.08));
  border-color: var(--mp-accent, #0d7377);
}

.auth-form textarea {
  resize: vertical;
  min-height: 72px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: var(--mp-muted);
  font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--mp-border);
}

.auth-links {
  margin-top: 18px;
  text-align: center;
  font-size: 0.88rem;
  color: var(--mp-muted);
}

.auth-links a {
  color: var(--mp-accent);
  font-weight: 600;
}

.auth-alert {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: var(--mp-radius);
  font-size: 0.88rem;
}

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

.auth-alert--ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

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

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

/* Dashboard */
.dash-layout {
  display: grid;
  grid-template-columns: var(--dash-sidebar) 1fr;
  min-height: calc(100vh - var(--header-h, 64px));
  max-width: var(--mp-max, 1200px);
  margin: 0 auto;
  gap: 0;
}

@media (max-width: 768px) {
  .dash-layout {
    grid-template-columns: 1fr;
  }
  .dash-sidebar {
    border-right: none !important;
    border-bottom: 1px solid var(--mp-border);
  }
}

.dash-sidebar {
  background: #fff;
  border-right: 1px solid var(--mp-border);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.dash-user {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dash-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--mp-accent-soft);
  color: var(--mp-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.dash-nav__item {
  text-align: left;
  padding: 10px 12px;
  border: none;
  background: transparent;
  border-radius: var(--mp-radius);
  font: inherit;
  cursor: pointer;
  color: var(--mp-ink-soft);
}

.dash-nav__item:hover,
.dash-nav__item.active {
  background: var(--mp-accent-soft);
  color: var(--mp-accent);
  font-weight: 600;
}

.dash-main {
  padding: 24px 20px 48px;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dash-header h1 {
  margin: 0;
  font-size: 1.35rem;
}

.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

@media (max-width: 560px) {
  .dash-stats {
    grid-template-columns: 1fr;
  }
}

.dash-stat {
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg);
  padding: 16px;
  text-align: center;
}

.dash-stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--mp-accent);
}

.dash-stat span {
  font-size: 0.82rem;
  color: var(--mp-muted);
}

.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
}

.dash-card {
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg);
  padding: 18px;
}

.dash-card h2 {
  margin: 0 0 10px;
  font-size: 1.05rem;
}

.dash-muted {
  color: var(--mp-muted);
  font-size: 0.88rem;
  margin: 0;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dash-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dash-list__item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--mp-border);
}

.dash-list__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.dash-list__item--unread {
  background: var(--mp-accent-soft);
  margin: 0 -8px;
  padding-left: 8px;
  padding-right: 8px;
  border-radius: var(--mp-radius);
}

.dash-badge {
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--mp-surface);
  color: var(--mp-muted);
  white-space: nowrap;
}

.dash-badge--ok {
  background: #ecfdf5;
  color: #047857;
}

.dash-stub {
  position: relative;
  border: 1px dashed var(--mp-border-strong);
  border-radius: var(--mp-radius);
  padding: 14px;
  margin-top: 12px;
  background: #fafbfc;
}

.dash-stub__badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #b45309;
  background: #fffbeb;
  padding: 2px 6px;
  border-radius: 4px;
}

.dash-stub-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

.dash-alert {
  padding: 10px 12px;
  border-radius: var(--mp-radius);
  font-size: 0.88rem;
}

.dash-alert--error {
  background: #fef2f2;
  color: #b91c1c;
}

.dash-alert--ok {
  background: #ecfdf5;
  color: #047857;
}

.dash-photo-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.dash-avatar--lg {
  width: 72px;
  height: 72px;
  font-size: 1.5rem;
  overflow: hidden;
}

.dash-avatar--lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dash-photo-upload {
  font-size: 0.85rem;
  font-weight: 600;
}

.dash-photo-upload input[type='file'] {
  display: block;
  margin-top: 6px;
  font-weight: 400;
}

.dash-empty {
  text-align: center;
  padding: 32px 24px;
  background: #fff;
  border: 1px solid var(--mp-border);
  border-radius: var(--mp-radius-lg);
}

.dash-empty h3 {
  margin: 8px 0;
  font-size: 1.1rem;
  font-weight: 700;
}

.dash-empty p {
  margin: 0 0 16px;
  color: var(--mp-muted);
  line-height: 1.5;
}

.dash-hr {
  border: none;
  border-top: 1px solid var(--mp-border);
  margin: 28px 0;
}

.dash-danger h3 {
  margin: 0 0 8px;
  color: #b91c1c;
}

.dash-gate {
  text-align: center;
  padding: 48px 16px;
  color: var(--mp-muted);
}
