/* ═══ STUDIOHAUS PORTAL — Workflow: Today, send preview, sidebar counts ═══ */
/* Monochrome only: no new accents. */

/* ─── Sidebar counts ─── */
.wf-badge {
  margin-left: auto;
  min-width: 18px;
  padding: 1px 6px;
  border-radius: 100px;
  background: var(--text-10);
  color: var(--text-60);
  font-size: 10px;
  font-weight: var(--fw-semi);
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.admin-sidebar-item.active .wf-badge { color: var(--text); }
@media (max-width: 768px) {
  .wf-badge {
    position: absolute;
    top: 2px;
    right: calc(50% - 22px);
    margin: 0;
    min-width: 14px;
    padding: 0 4px;
    font-size: 9px;
    line-height: 14px;
  }
}

/* ─── Today ─── */
.today-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.today-header h2 { margin: 0; font-size: 1.2rem; font-weight: 600; color: var(--text); }
.today-date { margin-top: 4px; font-size: 12px; color: var(--text-45); }
.today-summary { font-size: 12px; color: var(--text-60); }
.today-warning {
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text-60);
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}
.today-grid--shoots { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); margin-bottom: 24px; }

.today-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  min-width: 0;
}
.today-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.today-card-head h3 {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-45);
}
.today-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-45);
  font-variant-numeric: tabular-nums;
}
.today-count.has-items { color: var(--text); }

.today-empty { padding: 18px 16px; font-size: 12px; color: var(--text-45); }

.today-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s ease;
}
.today-row:last-child { border-bottom: none; }
.today-row:hover { background: var(--bg-card-hover); }
.today-row:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.today-row-lead {
  flex: 0 0 auto;
  min-width: 64px;
  font-size: 11px;
  color: var(--text-60);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.today-row-main { flex: 1; min-width: 0; }
.today-row-title,
.today-row-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.today-row-title { font-size: 13px; color: var(--text); }
.today-row-sub { font-size: 11px; color: var(--text-45); margin-top: 2px; }
.today-row-meta {
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--text-60);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.today-row-meta.is-muted { color: var(--text-45); }
.today-row-btn { flex: 0 0 auto; }
.today-more {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: none;
  border-top: 1px solid var(--border);
  background: none;
  color: var(--text-60);
  font: inherit;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.today-more:hover { color: var(--text); background: var(--bg-card-hover); }

@media (max-width: 768px) {
  .today-grid, .today-grid--shoots { grid-template-columns: 1fr; }
  .today-row-lead { min-width: 48px; }
  .today-header { margin-bottom: 12px; }

  /* Empty cards step aside; one quiet line at the top says what is clear */
  .today-card--empty { display: none; }
  .today-grid--shoots:not(:has(.today-card:not(.today-card--empty))) { display: none; }
  .today-grid--shoots { margin-bottom: 12px; }
  .today-quiet {
    margin: 0 0 16px;
    font-size: 12px;
    line-height: 1.5;
    color: var(--text-45);
  }

  /* Titles wrap to two lines instead of cutting off */
  .today-row-title {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
  }
  /* Shoot rows: title and office on top, then date (or time) and photographer */
  .today-row--stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "main main" "lead meta";
    gap: 6px 12px;
    align-items: baseline;
  }
  .today-row--stack .today-row-main { grid-area: main; }
  .today-row--stack .today-row-lead { grid-area: lead; min-width: 0; }
  .today-row--stack .today-row-meta { grid-area: meta; text-align: right; font-size: 11px; }
}

/* ─── Send preview ─── */
.send-preview-fields {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 8px 12px;
  margin: 0 0 20px;
  font-size: 13px;
}
.send-preview-fields dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-45);
  padding-top: 2px;
}
.send-preview-fields dd { margin: 0; color: var(--text); word-break: break-word; }
.send-preview-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-45);
  margin: 0 0 8px;
}
.send-preview-body {
  display: block;
  width: 100%;
  height: 220px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #ffffff;
}
.send-preview-pdf {
  display: block;
  width: 100%;
  height: 420px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}
.send-preview-open {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-60);
}
.send-preview-open:hover { color: var(--text); }
.send-preview-loading { padding: 24px 0; font-size: 13px; color: var(--text-45); }
.send-preview-error {
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
}
.send-preview .modal-actions button[disabled] { opacity: 0.4; cursor: not-allowed; }

/* ─── Gmail draft note (quote/invoice saved to Ross's Gmail drafts) ─── */
.mail-draft-note {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-45);
  white-space: nowrap;
}
.toast a:hover { text-decoration: underline; }

/* ─── System: file server status (Today card + admin banner) ─── */
.box-state { font-size: 12px; font-weight: 600; color: var(--text-45); }
.box-state.is-up { color: var(--success); }
.box-state.is-down { color: var(--error); }
.box-row { cursor: default; }
.box-row:hover { background: transparent; }
.box-row .today-row-sub { white-space: normal; }
.box-row .today-row-meta.is-alert { color: var(--error); }
.box-meter {
  height: 4px;
  margin-top: 6px;
  border-radius: 2px;
  background: var(--text-10);
  overflow: hidden;
}
.box-meter-fill { height: 100%; background: var(--text-60); }
.box-meter-fill.is-alert { background: var(--error); }

.box-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid rgba(var(--error-rgb), 0.3);
  border-radius: var(--radius-sm);
  background: rgba(var(--error-rgb), 0.08);
  color: var(--error);
  font-size: 12px;
}
.box-banner > div { flex: 1 1 320px; }
.box-banner-link {
  flex: 0 0 auto;
  padding: 0;
  border: none;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

/* Today: Recent (what happened lately), full width under the cards */
.today-recent { margin-top: 16px; }
