/* Staff area (login, dashboard, settings) — shared page-specific styles, built on
   the site's existing design tokens (main.css :root). */

.dash-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 28px; flex-wrap: wrap; gap: 16px; }
.dash-header h1 { font-size: 24px; margin: 0 0 4px; }
.dash-header .dash-email { font-size: 13px; color: var(--text-secondary); }
.dash-actions { display: flex; gap: 10px; align-items: center; }
.dash-actions a, .dash-actions button { font-size: 13px; }

.dash-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.dash-stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.dash-stat .num { font-family: var(--font-serif); font-size: 26px; font-weight: 600; color: var(--text-primary); }
.dash-stat .lbl { font-size: 11px; color: var(--text-muted-safe); letter-spacing: .4px; text-transform: uppercase; margin-top: 4px; }

.dash-toolbar { display: flex; gap: 10px; margin-bottom: 16px; align-items: center; flex-wrap: wrap; }
.dash-toolbar input, .dash-toolbar select { width: auto; flex: 0 0 auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 11px; font-size: 13px; background: #fff; }
.dash-toolbar input[type="text"] { flex: 1; min-width: 200px; }
.dash-count { font-size: 12.5px; color: var(--text-muted-safe); margin-left: auto; white-space: nowrap; }

table.dash-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 12.5px; }
table.dash-table thead th { background: var(--bg-page); text-align: left; padding: 10px 12px; font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--text-muted-safe); border-bottom: 1px solid var(--border); font-weight: 600; white-space: nowrap; }
table.dash-table tbody td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.dash-table tbody tr:last-child td { border-bottom: none; }
table.dash-table tbody tr:hover { background: var(--bg-page); }
.dash-name { font-weight: 600; }
.dash-sub { font-size: 11.5px; color: var(--text-muted-safe); margin-top: 2px; }
.dash-badge { display: inline-block; padding: 2px 8px; border-radius: var(--radius-pill); font-size: 10.5px; font-weight: 500; margin-right: 4px; }
.dash-badge--stale { background: #F3E7D0; color: var(--copper-dark); }
.dash-badge--dup { background: #F3E0DA; color: #8C3B2E; }
.dash-links a { font-size: 11.5px; color: var(--navy); margin-right: 8px; }
select.dash-status { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; font-size: 12px; padding: 5px 6px; }
.dash-empty { text-align: center; padding: 48px 20px; color: var(--text-muted-safe); font-size: 14px; }
.dash-detail-row td { background: var(--bg-page); padding: 14px 16px; }
.dash-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px 20px; }
.dash-detail-label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted-safe); margin-bottom: 2px; }
.dash-detail-value { font-size: 12.5px; color: var(--text-primary); }
.dash-detail-empty { font-size: 12.5px; color: var(--text-muted-safe); }

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

/* --- Shared form-field styling (login form, settings forms) --- */
.form-section { margin-bottom: 40px; }
.form-section:last-of-type { margin-bottom: 24px; }
.form-section-head { margin-bottom: 20px; }
.form-section-head h2 { font-size: 18px; margin: 6px 0 6px; }
.form-section-head p { color: var(--text-secondary); font-size: 13.5px; margin: 0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { margin-bottom: 0; }
.form-field.full { grid-column: 1 / -1; }

.form-field label { display: block; font-size: 13px; font-weight: 500; color: var(--text-primary); margin-bottom: 7px; }

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 13px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--text-primary);
  background: #FFFFFF;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}

.form-error {
  display: none; background: #F3E0DA; color: #8C3B2E; border: 1px solid #E3BBAE;
  padding: 14px 18px; border-radius: var(--radius); font-size: 13.5px; margin-bottom: 24px;
}
.form-error.show { display: block; }

.form-confirm {
  display: none; background: var(--bg-tint-esg); color: var(--forest); border: 1px solid var(--border-esg);
  padding: 14px 18px; border-radius: var(--radius); font-size: 13.5px; margin-bottom: 24px;
}
.form-confirm.show { display: block; }

.form-submit-row { margin-top: 8px; }

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