/* ============================================================
 * Signed-in pages — November 2026 redesign (direction B,
 * "The Mantelpiece"; director portal mock on the design canvas).
 *
 * The dashboard, the director portal, the my-* lists, account settings and
 * the create and edit flows each grew their own white cards, icon tiles,
 * gold buttons and blue links. This file brings their shared class names
 * onto the new look in one place, so the pages agree with each other and
 * with the public site.
 *
 * Load it LAST in each signed-in page's <head>, after the page's own
 * <style>, so it wins on source order with the same selectors. Page-only
 * pieces stay in the page. Tokens come from shared.css (var(--mm-…)).
 *
 * Rules: cream page, cream cards with a line border and no shadow, one
 * green button per screen, old gold only as a rule, no icon tiles beside
 * headings or numbers, links are text.
 * ============================================================ */

body { background-color: var(--mm-cream); }
.loading-overlay { background: var(--mm-cream); }
.loading-spinner { border-color: var(--mm-line); border-top-color: var(--mm-green); }
.user-avatar { background: var(--mm-green); color: var(--mm-cream); }

/* ---------- Page openings ---------- */
.welcome-section h1, .page-header h1 { font-family: var(--mm-font-display); font-weight: 500; letter-spacing: -0.015em; color: var(--mm-ink); }
.welcome-section p, .page-header p { color: var(--mm-muted); }
.breadcrumb, .breadcrumb a { color: var(--mm-muted); }
.breadcrumb a:hover { color: var(--mm-green); }
.breadcrumb .current { color: var(--mm-ink); }

/* The old dark-green banner some create/edit pages open with becomes a
   plain cream opening; the heading's icon goes. */
.page-hero {
    background: var(--mm-cream) !important;
    color: var(--mm-ink) !important;
    border-bottom: 1px solid var(--mm-line);
}
.page-hero h1 { color: var(--mm-ink) !important; font-family: var(--mm-font-display); font-weight: 500; letter-spacing: -0.015em; }
.page-hero h1 > i, .page-hero h1 > .fas, .page-hero h1 > .fa { display: none; }
.page-hero p { color: var(--mm-muted) !important; opacity: 1; }

/* ---------- Cards ---------- */
.stat-card, .action-card, .dashboard-section, .tab-section, .not-director-card,
.settings-section, .edit-section, .form-container, .mantle-card,
.notice-card, .card {
    background: var(--mm-card);
    border: 1px solid var(--mm-line);
    border-radius: var(--mm-radius-card);
    box-shadow: none;
}
.stat-card:hover, .action-card:hover, .mantle-card:hover, .notice-card:hover { transform: none; box-shadow: none; }

/* Stat cards: kicker, number, one line of meaning. No icon tile. */
.stat-card { display: flex; flex-direction: column; padding: 1.15rem 1.25rem; }
.stat-card .stat-icon { display: none; }
.stat-card .stat-label { order: -1; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mm-muted); margin: 0 0 0.4rem; }
.stat-card .stat-value { font-family: var(--mm-font-display); font-weight: 500; font-size: 2.2rem; line-height: 1; color: var(--mm-ink); margin: 0 0 0.3rem; }
.stat-card .stat-sub, .stat-card .stat-link { font-size: 0.9rem; color: var(--mm-muted); line-height: 1.45; }
.stat-card a { color: var(--mm-link); font-weight: 600; }

/* Action cards: a quiet card per action, no gradient icon tile. */
.action-card { padding: 1.15rem 1.35rem; gap: 0.75rem; border-width: 1px; }
.action-card:hover { border-color: var(--mm-green); }
.action-card .action-icon { display: none; }
.action-card .action-content h3 { font-family: var(--mm-font-display); font-weight: 500; font-size: 1.25rem; color: var(--mm-ink); margin: 0 0 0.25rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.action-card .action-content p { color: var(--mm-muted); font-size: 0.95rem; line-height: 1.45; margin: 0; }
.action-free-badge, .credit-tag, .action-content .credit-tag {
    display: inline-block; font-family: var(--mm-font-text); font-size: 0.75rem; font-weight: 600;
    letter-spacing: 0; text-transform: none; padding: 0.15rem 0.55rem; border-radius: 999px;
    background: var(--mm-green-tint); color: var(--mm-green); border: 0;
}

/* Sections */
.dashboard-section { padding: 1.35rem 1.5rem; }
.section-header { border-bottom: 1px solid var(--mm-line); }
.section-header h2, .dashboard-section h2 { font-family: var(--mm-font-display); font-weight: 500; font-size: 1.45rem; color: var(--mm-ink); }
.section-header a { color: var(--mm-link); font-weight: 600; }

/* Recent rows */
/* Let the tags and row actions drop under the name instead of squeezing it
   into a one-word-wide column. */
.recent-item { flex-wrap: wrap; row-gap: 0.4rem; }
.recent-info { flex: 1 1 12rem; }
.recent-item { border-radius: 10px; }
.recent-item:hover { background-color: var(--mm-cream); }
.recent-thumb { border-radius: 8px; background: #ece4d3; color: var(--mm-muted); }
.recent-info h4 { font-family: var(--mm-font-display); font-weight: 500; font-size: 1.1rem; color: var(--mm-ink); }
.recent-info p { color: var(--mm-muted); }

/* Empty states: a small muted mark, not a large grey icon */
.empty-state { color: var(--mm-muted); }
.empty-state i { font-size: 1.6rem !important; color: #cfc6b3 !important; margin-bottom: 0.6rem !important; }
.empty-state h3 { font-family: var(--mm-font-display); font-weight: 500; color: var(--mm-ink); }
.empty-state a { color: var(--mm-link); }

/* ---------- Tags (status, type, ownership) ---------- */
.badge, .recent-badge, .badge-status {
    display: inline-block; font-size: 0.78rem; font-weight: 600; padding: 0.2rem 0.6rem;
    border-radius: 999px; white-space: nowrap; background: #ece4d3; color: var(--mm-muted);
}
.badge-paid, .badge-free, .badge-promo, .badge-loyalty, .badge-director_credit,
.badge-premium_memorial_credit, .badge-basic_memorial_credit, .badge-family, .badge-live,
.badge-mantle { background: var(--mm-green-tint); color: var(--mm-green); }
.badge-notice, .badge-director, .badge-invited, .badge-refunded { background: #ece4d3; color: var(--mm-muted); }
.badge-pending { background: #f3ead6; color: #6b5a2e; }
.badge-failed { background: #f6e1df; color: #8a2f2a; }

/* ---------- Tabs ---------- */
.tab-section { overflow: hidden; }
.tab-nav { background: transparent; border-bottom: 1px solid var(--mm-line); padding: 0 1.25rem; gap: 1.6rem; }
.tab-btn {
    padding: 0.9rem 0.1rem; border-radius: 0; background: none; color: var(--mm-muted);
    font-weight: 500; font-size: 0.98rem; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab-btn i { display: none; }
/* Some pages hid the tab text on phones and kept only the icon; with the
   icons gone the label must always show. */
.tab-btn span { display: inline !important; }
.tab-btn.active { background: none; color: var(--mm-green); border-bottom-color: var(--mm-gold); }
.tab-btn:hover:not(.active) { background: none; color: var(--mm-ink); }

/* ---------- Tables ---------- */
.notices-table { font-size: 0.95rem; }
.notices-table th {
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--mm-muted); border-bottom: 1px solid var(--mm-line);
}
.notices-table td { border-bottom: 1px solid var(--mm-line); padding: 0.8rem 0.75rem; }
.notices-table tr:hover td { background: var(--mm-cream); }
.notices-table a { color: var(--mm-ink); }
.notices-table td:first-child a { font-family: var(--mm-font-display); font-weight: 500; font-size: 1.05rem; }
.empty-table { color: var(--mm-muted); }
@media (max-width: 640px) { .notices-table td:first-child { min-width: 9.5rem; } .tab-nav { gap: 1.1rem; padding: 0 1rem; } }

/* Row actions: text, not coloured chips */
.btn-action { background: none !important; padding: 0.3rem 0.45rem; border-radius: 6px; font: inherit; font-size: 0.9rem; font-weight: 600; color: var(--mm-link) !important; }
.btn-action i { font-size: 0.85em; }
.btn-action:hover { opacity: 1; background: var(--mm-green-tint) !important; }
.btn-action-view, .btn-action-delete { color: var(--mm-muted) !important; }
.btn-action-delete:hover { background: #f6e1df !important; color: #8a2f2a !important; }

/* ---------- Forms ---------- */
.form-label, .form-group label { color: var(--mm-ink); font-weight: 600; }
.form-hint { color: var(--mm-muted); }
.form-input, .form-textarea, .form-select, .search-box input, .filter-select {
    background: #ffffff; border: 1px solid #cfc6b3; border-radius: 10px; color: var(--mm-ink); font-family: inherit;
}
.form-input:focus, .form-textarea:focus, .form-select:focus, .search-box input:focus, .filter-select:focus {
    outline: none; border-color: var(--mm-green); box-shadow: 0 0 0 3px var(--mm-green-tint);
}
.required { color: #8a2f2a; }

/* ---------- Buttons ---------- */
/* Buttons don't inherit the page font by default; several fell back to the
   system sans in bold. */
button, .btn-primary, .btn-secondary, .btn-save, .btn-cancel, .btn-action, .btn-modal-send, .btn-modal-cancel { font-family: inherit; }
.btn-primary, .btn-save, .btn-modal-send, .modal-btn-primary {
    background: var(--mm-green) !important; color: var(--mm-cream) !important; border: 0;
    border-radius: 999px; font-weight: 600; box-shadow: none;
}
.btn-primary:hover, .btn-save:hover, .btn-modal-send:hover, .modal-btn-primary:hover { background: var(--mm-green-press) !important; transform: none; box-shadow: none; }
.btn-secondary, .btn-cancel, .btn-modal-cancel, .modal-btn-secondary {
    background: transparent !important; color: var(--mm-ink) !important; border: 1.5px solid var(--mm-ink);
    border-radius: 999px; font-weight: 600; box-shadow: none;
}
.btn-secondary:hover, .btn-cancel:hover, .btn-modal-cancel:hover, .modal-btn-secondary:hover { background: var(--mm-card) !important; }
.btn-primary:focus-visible, .btn-secondary:focus-visible, .btn-save:focus-visible, .btn-cancel:focus-visible { outline: 3px solid var(--mm-green); outline-offset: 2px; }

/* ---------- Status messages ---------- */
.status-success { background: var(--mm-green-tint); color: var(--mm-green); }
.status-error { background: #f6e1df; color: #8a2f2a; }

/* ---------- Modals ---------- */
.modal-box { background: var(--mm-card); border-radius: var(--mm-radius-card); border: 1px solid var(--mm-line); }
.modal-box h3 { font-family: var(--mm-font-display); font-weight: 500; color: var(--mm-ink); }
.modal-box p { color: var(--mm-muted); }

/* Card action rows on the my-* lists: one-line labels, and the row wraps */
.notice-actions, .mantle-actions { flex-wrap: wrap; }
.notice-actions .btn-action, .mantle-actions .btn-action { white-space: nowrap; flex: 0 0 auto; }

/* ---------- Photo positioner ----------
   The same 5:6 portrait frame the notice and memorial pages show
   (view-2026.css), so the crop a family sets is the crop visitors see.
   The positioner script covers the frame's width and height. The class
   keeps its old name because four pages' scripts look it up. */
.photo-positioner-circle {
    border-radius: 6px !important;
    aspect-ratio: 5 / 6;
    height: auto !important;
    border: 10px solid var(--mm-card) !important;
    border-bottom-width: 14px !important;
    box-shadow: 0 12px 28px rgba(60, 45, 20, 0.18) !important;
    background-color: #ece4d3 !important;
}

/* ---------- Step indicators (create flows) ---------- */
.progress-steps { background: var(--mm-card); border: 1px solid var(--mm-line); box-shadow: none; }
.step.active .step-number, .step.completed .step-number { background: var(--mm-green); color: var(--mm-cream); }
.step.active, .step.active .step-label { color: var(--mm-green); }
.progress-step.active .step-number, .progress-step.completed .step-number { background: var(--mm-green); border-color: var(--mm-green); color: var(--mm-cream); }

/* ---------- Package choice (create a memorial) ---------- */
.pricing-selector, .pricing-section, .package-section { background: var(--mm-card) !important; border: 1px solid var(--mm-line); box-shadow: none !important; border-radius: var(--mm-radius-card); }
.pricing-card { background: var(--mm-card); border-width: 1px; border-radius: var(--mm-radius-card); }
.pricing-card.featured, .pricing-card.selected { border-color: var(--mm-green); border-width: 1.5px; }
.pricing-card-icon { display: none !important; }
.pricing-select-btn { border-radius: 999px; font-family: inherit; background: transparent; }
.pricing-card.selected .pricing-select-btn, .pricing-card.featured.selected .pricing-select-btn { background: var(--mm-green); color: var(--mm-cream); border-color: var(--mm-green); }

/* ---------- Order a slideshow ---------- */
.info-panel, .settings-panel, .credits-bar, .music-category, .pricing-card, .modal-box {
    background: var(--mm-card); border: 1px solid var(--mm-line); box-shadow: none; border-radius: var(--mm-radius-card);
}
.music-option, .theme-card, .photo-card, .enhance-preset { background: var(--mm-card); box-shadow: none; }
.music-option.selected, .theme-card.selected, .pricing-card.selected { border-color: var(--mm-green); }
.upload-zone { background: var(--mm-card); border-color: #cfc6b3; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--mm-green); background: var(--mm-green-tint); }
.settings-panel h2, .info-panel h2 { font-family: var(--mm-font-display); font-weight: 500; }
.settings-panel h2 i, .info-panel h2 i { display: none; }
