/* Mail Room Hub */
.mailroom-hub { width: 100%; }

/* Mail Room Lists Grid — hide default grid header, full width */
.mailroom-lists-grid { width: 100% !important; }
.mailroom-lists-grid thead { display: none; }
.mailroom-lists-grid tr { border: none !important; }
.mailroom-lists-grid td { padding: .35rem .5rem !important; border: none !important; background: transparent !important; width: 100% !important; }

/* Mail Room List Members Grid — rounded-card rows */
.mailroom-members-grid { width: 100%; border-collapse: separate; border-spacing: 0 .35rem; }
.mailroom-members-grid thead { display: none; }
.mailroom-members-grid tbody tr { background: #FFF; }
.mailroom-members-grid tbody td {
    font-family: var(--font-primary);
    font-size: 14px;
    padding: .4rem .6rem !important;
    vertical-align: middle;
    border-top: 1px solid #DEE2E6;
    border-bottom: 1px solid #DEE2E6;
}
.mailroom-members-grid tbody td:first-child {
    border-left: 1px solid #DEE2E6;
    border-top-left-radius: .5rem;
    border-bottom-left-radius: .5rem;
}
.mailroom-members-grid tbody td:last-child {
    border-right: 1px solid #DEE2E6;
    border-top-right-radius: .5rem;
    border-bottom-right-radius: .5rem;
}
.mailroom-members-grid tbody tr:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .06); }
.mailroom-members-grid a { color: #27282A; text-decoration: none; }
.mailroom-members-grid a:hover { color: var(--color-tertiary); text-decoration: none; }
.mailroom-members-grid a.grid-action-btn { text-decoration: none !important; color: #FFF !important; }
.mailroom-members-grid a.grid-action-btn:hover { color: #FFF !important; }
.mailroom-members-grid .col-action { width: 60px; }
.mailroom-members-grid .col-select .mb-3 { margin-bottom: 0 !important; }

/* Row card */
.mr-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1.1rem;
    background: #FFF;
    border: 1px solid #E8EAED;
    border-left: 4px solid #CCC;
    border-radius: .5rem;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.mr-row:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
    border-left-width: 4px;
}
.mr-row-email { border-left-color: #00A1BE; }
.mr-row-email:hover { border-left-color: #00839B; }
.mr-row-postal { border-left-color: #7C5FC5; }
.mr-row-postal:hover { border-left-color: #5E44A0; }
.mr-row-text { border-left-color: #FF4A11; }
.mr-row-text:hover { border-left-color: #CC3B0E; }

/* Row icon */
.mr-row-icon {
    width: 48px;
    height: 48px;
    border-radius: .625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.mr-row-email .mr-row-icon { background: #E0F5F9; color: #00A1BE; }
.mr-row-postal .mr-row-icon { background: #F0ECFB; color: #7C5FC5; }
.mr-row-text .mr-row-icon { background: #FFF3EB; color: #FF4A11; }

/* Row body */
.mr-row-body { flex: 1; min-width: 0; }
.mr-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .35rem;
}
.mr-row-title {
    font-family: var(--font-headings);
    font-size: 1rem;
    font-weight: 600;
    color: #27282A;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Row actions */
.mr-row-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}
.mr-row-action {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .9rem;
    transition: background .15s ease, color .15s ease;
    text-decoration: none !important;
}
.mr-action-open { color: #00CC78; background: rgba(0, 204, 120, .08); }
.mr-action-open:hover { background: rgba(0, 204, 120, .18); color: #00995A; }
.mr-action-copy { color: #FF4A11; background: rgba(255, 74, 17, .08); }
.mr-action-copy:hover { background: rgba(255, 74, 17, .18); color: #CC3B0E; }
.mr-action-delete { color: #D8237C; background: rgba(216, 35, 124, .08); }
.mr-action-delete:hover { background: rgba(216, 35, 124, .18); color: #B01A65; }

/* Row meta */
.mr-row-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}
.mr-list-type-badge {
    display: inline-flex;
    align-items: center;
    padding: .15rem .6rem;
    border-radius: 1rem;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.mr-badge-email { background: #E0F5F9; color: #00839B; }
.mr-badge-postal { background: #F0ECFB; color: #5E44A0; }
.mr-badge-text { background: #FFF3EB; color: #CC3B0E; }
.mr-row-id { font-size: .78rem; color: #8C9197; font-weight: 500; }
.mr-row-date { font-size: .78rem; color: #8C9197; }
.mr-row-locked {
    font-size: .75rem;
    font-weight: 600;
    color: #D8237C;
    background: #FDE8F0;
    padding: .1rem .5rem;
    border-radius: 1rem;
}

/* Phase 2 — derived membership status on an email list row (subscribed / unsubscribed / cleaned).
   Plain inline text, deliberately NOT a bordered or rounded box: the row card is the only rounded
   container, and nothing rounded nests inside it. */
.mr-row-status {
    display: inline-flex;
    align-items: center;
    font-size: .78rem;
    font-weight: 600;
}
.mr-status-sub { color: #00875A; }
.mr-status-unsub { color: #8C9197; }
.mr-status-cleaned { color: #CC3B0E; }
.mr-status-other { color: #8C9197; }

/* Responsive */
@media (max-width: 767.98px) {
    .mr-row { flex-direction: column; align-items: flex-start; gap: .5rem; }
    .mr-row-icon { width: 36px; height: 36px; }
    .mr-row-icon i { font-size: 1.2rem !important; }
    .mr-row-top { flex-direction: column; align-items: flex-start; gap: .35rem; }
    .mr-row-title { white-space: normal; }
}

/* Hero */
.mr-hero {
    background: linear-gradient(135deg, #00A1BE 0%, #038CA5 60%, #026E82 100%);
    border-radius: .75rem;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.mr-hero::after {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 320px;
    height: 320px;
    background: rgba(255, 255, 255, .06);
    border-radius: 50%;
    pointer-events: none;
}
.mr-hero::before {
    content: '';
    position: absolute;
    bottom: -30%;
    left: 5%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, .04);
    border-radius: 50%;
    pointer-events: none;
}
.mr-hero-content { position: relative; z-index: 1; }
.mr-hero h2 {
    font-family: var(--font-headings);
    color: #FFF;
    font-size: 1.6rem;
    margin: 0 0 .5rem;
    font-weight: 700;
}
.mr-hero p {
    color: rgba(255, 255, 255, .85);
    font-family: var(--font-primary);
    font-size: .95rem;
    margin: 0;
    max-width: 600px;
    line-height: 1.5;
}

/* Section */
.mr-section { margin-bottom: 2rem; }
.mr-section-label {
    font-family: var(--font-headings);
    font-size: .85rem;
    font-weight: 700;
    color: #6C757D;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: .75rem;
    padding-left: .25rem;
}
.mr-section-label i {
    color: #00A1BE;
    margin-right: .4rem;
}

/* Quick Action Cards — large, prominent */
.mr-action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
.mr-action-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: .75rem;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease;
    border: 1px solid transparent;
}
.mr-action-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .1);
}
.mr-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.4rem;
}
.mr-action-text { display: flex; flex-direction: column; }
.mr-action-text strong {
    font-family: var(--font-headings);
    font-size: 1.05rem;
    margin-bottom: .25rem;
}
.mr-action-text span {
    font-size: .82rem;
    line-height: 1.4;
}

/* Card color themes */
.mr-action-primary {
    background: #EBF9FC;
    border-color: #C6EFF6;
}
.mr-action-primary .mr-action-icon {
    background: #00A1BE;
    color: #FFF;
}
.mr-action-primary .mr-action-text strong { color: #00839B; }
.mr-action-primary .mr-action-text span { color: #5A9DAD; }

.mr-action-send {
    background: #E8FBF2;
    border-color: #B8F0D5;
}
.mr-action-send .mr-action-icon {
    background: #00CC78;
    color: #FFF;
}
.mr-action-send .mr-action-text strong { color: #00995A; }
.mr-action-send .mr-action-text span { color: #5AAD86; }

.mr-action-text-msg {
    background: #FFF3EB;
    border-color: #FFDCC4;
}
.mr-action-text-msg .mr-action-icon {
    background: #FF4A11;
    color: #FFF;
}
.mr-action-text-msg .mr-action-text strong { color: #CC3B0E; }
.mr-action-text-msg .mr-action-text span { color: #B07A60; }

.mr-action-postal {
    background: #F0ECFB;
    border-color: #D5CCF3;
}
.mr-action-postal .mr-action-icon {
    background: #7C5FC5;
    color: #FFF;
}
.mr-action-postal .mr-action-text strong { color: #5E44A0; }
.mr-action-postal .mr-action-text span { color: #8E7FB3; }

/* Tile Grid — smaller, even cards */
.mr-tile-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}
.mr-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem 1rem;
    background: #FFF;
    border: 1px solid #E8EAED;
    border-radius: .625rem;
    text-decoration: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    cursor: pointer;
}
.mr-tile:hover {
    border-color: #00A1BE;
    box-shadow: 0 4px 16px rgba(0, 161, 190, .12);
    transform: translateY(-2px);
}
.mr-tile i {
    font-size: 1.6rem;
    color: #00A1BE;
    margin-bottom: .65rem;
}
.mr-tile:hover i { color: #038CA5; }
.mr-tile span {
    font-family: var(--font-headings);
    font-size: .88rem;
    font-weight: 600;
    color: #27282A;
    margin-bottom: .25rem;
}
.mr-tile small {
    font-size: .75rem;
    color: #8C9197;
    line-height: 1.35;
}

/* Responsive */
@media (max-width: 991.98px) {
    .mr-action-grid { grid-template-columns: 1fr; }
    .mr-tile-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
    .mr-hero { padding: 1.5rem 1.25rem; }
    .mr-hero h2 { font-size: 1.3rem; }
    .mr-tile-grid { grid-template-columns: 1fr; }
    .mr-action-card { padding: 1.1rem; gap: 1rem; }
    .mr-action-icon { width: 44px; height: 44px; font-size: 1.1rem; }
}

/* ===== Text Messaging Workspace (/text-messaging) — clean, light, data-forward ===== */

.tmw-page { width: 100%; }

/* Intro line + inline connection status (replaces the old dark hero banner) */
.tmw-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: .35rem 0 1.75rem;
}
.tmw-intro { font-size: .95rem; color: #6C757D; margin: 0; max-width: 640px; line-height: 1.5; }
.tmw-conn {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .82rem;
    font-weight: 600;
    padding: .45rem .85rem;
    border-radius: 1rem;
    white-space: nowrap;
}
.tmw-conn-ok { background: #E8FBF2; color: #00995A; }
.tmw-conn-ok i { color: #00CC78; }
.tmw-conn-warn { background: #FFF3EB; color: #CC3B0E; text-decoration: none; }
.tmw-conn-warn i { color: #FF4A11; }

/* Section labels */
.tmw-section-label {
    font-family: var(--font-headings);
    font-size: .8rem;
    font-weight: 700;
    color: #8C9197;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin: 0 0 .8rem .15rem;
}

/* Stat cards — white, subtle */
.tmw-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .85rem; margin-bottom: .6rem; }
.tmw-stat {
    background: #FFF;
    border: 1px solid #E8EAED;
    border-radius: .75rem;
    padding: 1.3rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    transition: box-shadow .15s ease;
}
.tmw-stat:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .05); }
.tmw-stat-top { display: flex; align-items: flex-start; justify-content: space-between; }
.tmw-stat-value { font-family: var(--font-headings); font-size: 1.9rem; font-weight: 700; color: #27282A; line-height: 1; }
.tmw-stat-chip {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    flex-shrink: 0;
}
.tmw-chip-teal { background: #E0F5F9; color: #00A1BE; }
.tmw-chip-green { background: #E8FBF2; color: #00CC78; }
.tmw-chip-orange { background: #FFF3EB; color: #FF4A11; }
.tmw-stat-label { font-size: .76rem; color: #8C9197; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }

/* Delivery-rate bar (inside the Delivered card) */
.tmw-rate { margin-top: .5rem; }
.tmw-rate-track { width: 100%; height: 6px; background: #EDEFF1; border-radius: 3px; overflow: hidden; }
.tmw-rate-fill { height: 100%; background: #00CC78; border-radius: 3px; }
.tmw-rate-text { font-size: .72rem; color: #8C9197; margin-top: .3rem; display: inline-block; }

.tmw-stats-footnote { font-size: .78rem; color: #8C9197; margin: 0 0 2rem .15rem; }

/* Quick action cards — white with a colored icon chip */
.tmw-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: .85rem; margin-bottom: 2rem; }
.tmw-action {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    background: #FFF;
    border: 1px solid #E8EAED;
    border-radius: .75rem;
    padding: 1.35rem 1.5rem;
    text-decoration: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tmw-action:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0, 0, 0, .07); border-color: #D6DBDF; }
.tmw-action-icon {
    width: 52px;
    height: 52px;
    border-radius: .75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    color: #FFF;
}
.tmw-action-primary .tmw-action-icon { background: #FF4A11; }
.tmw-action-secondary .tmw-action-icon { background: #00A1BE; }
.tmw-action-body { display: flex; flex-direction: column; }
.tmw-action-body strong { font-family: var(--font-headings); font-size: 1.05rem; color: #27282A; margin-bottom: .2rem; }
.tmw-action-body span { font-size: .85rem; color: #8C9197; line-height: 1.4; }

/* Manage tiles — white */
.tmw-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .85rem; }
.tmw-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
    background: #FFF;
    border: 1px solid #E8EAED;
    border-radius: .75rem;
    padding: 1.35rem;
    text-decoration: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tmw-tile:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0, 0, 0, .06); border-color: #D6DBDF; }
.tmw-tile-icon {
    width: 40px;
    height: 40px;
    border-radius: .6rem;
    background: #F1F5F7;
    color: #00A1BE;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: .2rem;
}
.tmw-tile strong { font-family: var(--font-headings); font-size: .95rem; color: #27282A; }
.tmw-tile small { font-size: .78rem; color: #8C9197; line-height: 1.35; }

/* Responsive */
@media (max-width: 991.98px) {
    .tmw-stats { grid-template-columns: repeat(2, 1fr); }
    .tmw-actions { grid-template-columns: 1fr; }
    .tmw-tiles { grid-template-columns: 1fr; }
}
@media (max-width: 575.98px) {
    .tmw-stats { grid-template-columns: 1fr; }
    .tmw-topbar { flex-direction: column; align-items: flex-start; }
}

/* ─── SMART LISTS (2026-07-12, Charlie) ────────────────────────────────────────────────────────
   Christine: "it has to be clear to the users, so you'll need to do very clean ux/ui."
   The two kinds of list must be distinguishable at a glance, from across the room, without
   reading a word. So: the smart one gets the brand teal and a wand; the hand-built one gets a
   quiet grey. Both are labelled — never rely on "no badge" to mean anything, because nobody
   knows what an absent badge means.
   ──────────────────────────────────────────────────────────────────────────────────────────── */
.mr-smart-icon { color: #0DA9A6; }

.mr-kind-badge {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: .375rem;
    white-space: nowrap;
}
.mr-kind-smart  { background: #E6F6F6; color: #0B7F7D; border: 1px solid #B7E4E3; }
.mr-kind-manual { background: #F1F3F5; color: #6C757D; border: 1px solid #DEE2E6; }

/* The rule as a sentence, on the row itself, so nobody opens a modal just to find out who is on a list. */
.mr-rule-summary {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-primary);
    font-size: 12px;
    color: #0B7F7D;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 46ch;
}

/* Rule editor */
.mr-rule-explainer {
    background: #F8F9FA;
    border: 1px solid #DEE2E6;
    padding: .75rem 1rem;
    font-size: 14px;
    color: #464646;
}
.mr-aff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: .35rem 1.25rem;
    padding: .75rem 1rem;
    background: #F8F9FA;
    border: 1px solid #DEE2E6;
    border-radius: .375rem;
}
.mr-rule-preview {
    background: #F8F9FA;
    border: 1px solid #DEE2E6;
    padding: .75rem 1rem;
}
.mr-rule-sentence {
    font-family: var(--font-primary);
    font-size: 15px;
    font-weight: 600;
    color: #0B7F7D;
}
.mr-rule-count { font-family: var(--font-primary); font-size: 14px; color: #464646; }
.mr-rule-note  { font-family: var(--font-primary); font-size: 12px; color: #6C757D; }

/* The topic block. Called out with the brand teal because it is the one condition on the rule
   that the PERSON chose for themselves; every other condition is something we observed. */
.mr-rule-topics {
    border-left: 3px solid var(--color-primary);
    padding-left: .75rem;
}
.mr-rule-topics-help { font-family: var(--font-primary); font-size: 12px; color: #6C757D; }

/* Topics page */
.mr-topics-intro {
    background: #F8F9FA;
    border: 1px solid #DEE2E6;
    border-radius: .375rem;
    padding: .75rem 1rem;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #464646;
}
.mr-topics-empty {
    background: #F8F9FA;
    border: 1px solid #DEE2E6;
    border-radius: .375rem;
    padding:1.25rem;
    font-family: var(--font-primary);
    font-size: 14px;
    color: #464646;
}
.mr-topics-grid { width: 100%; border: 1px solid #CCC; border-collapse: collapse; }
.mr-topics-grid td { padding: 1rem .75rem; border-bottom: 1px solid #DEE2E6; background: #FFF; }
.mr-topic-name { font-family: var(--font-primary); font-size: 16px; font-weight: 600; color: #27282A; }
.mr-topic-desc { font-family: var(--font-primary); font-size: 13px; color: #6C757D; margin-top: .25rem; max-width: 60ch; }
.mr-topic-num { font-family: var(--font-primary); font-size: 20px; font-weight: 600; color: #0B7F7D; line-height: 1.1; }
.mr-topic-num-gap { color: var(--color-tertiary); }
.mr-topic-num-label { font-family: var(--font-primary); font-size: 11px; color: #6C757D; text-transform: uppercase; letter-spacing: .03em; }
.mr-topic-badge { font-family: var(--font-primary); font-size: 11px; padding: .1rem .45rem; border-radius: .25rem; margin-left: .5rem; white-space: nowrap; }
.mr-topic-retired { background: #F1F3F5; color: #6C757D; border: 1px solid #DEE2E6; }
.mr-topic-private { background: #FFF4E5; color: #A15C00; border: 1px solid #FFE0B2; }
.mr-topics-help { font-family: var(--font-primary); font-size: 12px; color: #6C757D; }
.mr-topics-count-note {
    background: #F8F9FA;
    border: 1px solid #DEE2E6;
    border-radius: .375rem;
    padding: .6rem .85rem;
    font-family: var(--font-primary);
    font-size: 13px;
    color: #464646;
}
