html, body {
    font-family: "Poppins", system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
    color: var(--mm-text);
    background: var(--mm-bg);
}
/* --- Wedding-inspired palette (soft rose + clean neutrals + warm accent) --- */
:root {
    --mm-primary: #e8a5b6; /* soft rose */
    --mm-primary-700: #d37a92;
    --mm-accent: #ff8a4c;  /* warm coral/orange */
    --mm-bg: #fff8fb;      /* very light rose */
    --mm-surface: #ffffff;
    --mm-text: #2b2b2b;
    --mm-muted: #6b7280;
    --mm-border: #f0d9e2;
}

h1, h2, h3, .navbar-brand {
    font-family: "Playfair Display", Georgia, "Times New Roman", Times, serif;
}

/* Surfaces */
.mm-surface {
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
}

/* Navbar */
.mm-navbar {
    background-color: var(--mm-primary);
    /* Use navbar-dark for white text and visible toggler */
}
.mm-navbar .navbar-brand {
    color: #fff;
    letter-spacing: 0.2px;
}
.mm-navbar .nav-link {
    color: #ffffffcc;
    font-weight: 500;
}
.mm-navbar .nav-link.active,
.mm-navbar .nav-link:focus,
.mm-navbar .nav-link:hover {
    color: #fff;
    text-decoration: none;
}
.mm-navbar .navbar-toggler {
    border-color: #ffffff66;
}

/* Footer */
.mm-footer {
    border-top: 1px solid var(--mm-border);
    background: rgba(255,255,255,0.7);
}

/* Buttons */
.btn-primary {
    background-color: var(--mm-primary);
    border-color: var(--mm-primary);
}
.btn-primary:hover {
    background-color: var(--mm-primary-700);
    border-color: var(--mm-primary-700);
}
.btn-accent {
    color: #fff;
    background-color: var(--mm-accent);
    border-color: var(--mm-accent);
}

/* Links */
a {
    color: var(--mm-primary-700);
}
a:hover, a:focus {
    color: var(--mm-primary);
}

/* Tables: responsive on small screens */
.table-responsive {
    overflow-x: auto;
}
.mm-surface .table {
    margin-bottom: 0;
}

.th-sort {
    cursor: pointer;
    user-select: none;
    position: relative;
    text-align: center; /* center header text */
}

.th-sort:hover {
    background-color: var(--mm-border);
}

.table thead th { text-align: center; } /* center all header cells */

.table .col-id { width: 80px; }
.table .col-phone { width: 160px; }
.table .col-relationship { width: 200px; }
.table .col-actions { width: 120px; }
.table .col-invitation { width: 180px; }
.table .col-event { width: 320px; }

/* Relationships page inputs */
.rel-input { max-width: 420px; }
/* Events page inputs */
.event-input { max-width: 420px; }
/* Statuses page inputs */
.status-input { max-width: 420px; }

/* Utilities */
.shadow-sm { box-shadow: 0 .125rem .25rem rgba(17, 24, 39, 0.08) !important; }
.rounded-3 { border-radius: 1rem !important; }

/* Spacing tweaks for compact, clean layout */
.container-xxl { max-width: 1280px; }
#blazor-error-ui {
    background: lightyellow; bottom: 0; box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none; left: 0; padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed; right: 0; z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer; position: absolute; right: 0.75rem; top: 0.5rem;
}
.mm-person-badge {
    background: #f8f9fa;
    color: #333;
    border: 1px solid var(--mm-border);
    padding-right: 1.4rem;
    display: inline-flex;
    align-items: center;
    position: relative;
    font-weight: 500;
}

.mm-remove-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 1.2rem;
    height: 100%;
    border: none;
    background: transparent;
    color: #d37a92;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}
.mm-remove-btn:hover:not(:disabled) {
    color: #b84e69;
}
.mm-remove-btn:disabled {
    opacity: .4;
    cursor: wait;
}

/* Modal styles */
.mm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(30, 30, 30, 0.45);
    backdrop-filter: blur(2px);
    z-index: 1040;
}
.mm-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(100% - 2rem, 960px);
    max-height: calc(100vh - 4rem);
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 1rem;
    border: 1px solid var(--mm-border);
    box-shadow: 0 10px 32px -4px rgba(0,0,0,.25);
    display: flex;
    flex-direction: column;
    z-index: 1050;
}
.mm-modal-header, .mm-modal-footer {
    padding: .75rem 1.25rem;
    border-bottom: 1px solid var(--mm-border);
}
.mm-modal-footer {
    border-top: 1px solid var(--mm-border);
    border-bottom: none;
}
.mm-modal-body {
    padding: 1rem 1.25rem 1.25rem;
    overflow-y: auto;
}

/* Adjust table inside modal */
.mm-modal-body .table-bordered th,
.mm-modal-body .table-bordered td {
    vertical-align: middle;
    font-size: .85rem;
}