@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --rust: #C05621;
    --rust-dark: #943f1d;
    --sand: #e9dcc3;
    --cream: #fffaf0;
    --paper: rgba(255, 252, 245, 0.96);
    --dark: #2D241E;
    --darkest: #17120f;
    --green: #1E3A1E;
    --gold: #E0A34A;
    --slate: #0f172a;
    --muted: #667085;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--slate);
    font-family: Poppins, Arial, Helvetica, sans-serif;
    background-color: var(--sand);
    background-image:
        linear-gradient(
            to bottom,
            rgba(255, 250, 240, 0.83),
            rgba(235, 214, 178, 0.90)
        ),
        url('/images/savanna-grass-bg.jpg');
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
}

a {
    color: inherit;
}

.topbar {
    position: relative;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    flex-wrap: wrap;
    min-height: 84px;
    padding: 14px 28px;
    color: #fff;
    border-bottom: 4px solid var(--rust);
    background:
        linear-gradient(
            135deg,
            rgba(20, 16, 11, 0.88),
            rgba(45, 36, 30, 0.82)
        ),
        url('/images/savanna-grass-bg.jpg');
    background-size: cover;
    background-position: center 45%;
    box-shadow: 0 12px 34px rgba(45, 36, 30, 0.28);
}

.topbar > div:first-child {
    position: relative;
    display: flex;
    min-height: 52px;
    flex-direction: column;
    justify-content: center;
    padding-left: 66px;
}

.topbar > div:first-child::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 54px;
    height: 54px;
    transform: translateY(-50%);
    background:
        url('/images/Family-Voice-Logo.png')
        center / contain no-repeat;
    filter: drop-shadow(0 6px 11px rgba(0, 0, 0, 0.42));
}

.topbar strong {
    display: block;
    color: #fff;
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.topbar span {
    color: #fdba74;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.topbar nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.topbar a {
    padding: 9px 12px;
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.2s ease;
}

.topbar a:hover {
    background: rgba(192, 86, 33, 0.82);
    transform: translateY(-1px);
}

.container {
    width: min(1180px, calc(100% - 30px));
    margin: 30px auto 70px;
}

.admin-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    overflow: hidden;
    margin-bottom: 24px;
    padding: 32px 36px;
    color: #fff;
    border: 1px solid rgba(255, 215, 150, 0.28);
    border-bottom: 5px solid var(--rust);
    border-radius: 28px;
    background:
        linear-gradient(
            135deg,
            rgba(20, 16, 11, 0.75),
            rgba(45, 36, 30, 0.64)
        ),
        url('/images/savanna-grass-bg.jpg');
    background-size: cover;
    background-position: center 48%;
    box-shadow: 0 24px 54px rgba(45, 36, 30, 0.25);
}

.admin-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(
            circle at 16% 18%,
            rgba(255, 210, 120, 0.18),
            transparent 30%
        );
}

.admin-hero > * {
    position: relative;
    z-index: 2;
}

.admin-hero-brand {
    display: flex;
    align-items: center;
    gap: 24px;
}

.admin-hero-logo {
    display: block;
    width: 118px;
    max-width: 25vw;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.48));
}

.admin-eyebrow {
    margin-bottom: 8px;
    color: #fdba74;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.admin-hero h1 {
    margin: 0 0 9px;
    color: #fff;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.04;
    letter-spacing: -0.045em;
    text-transform: uppercase;
    text-shadow: 0 4px 13px rgba(0, 0, 0, 0.44);
}

.admin-hero p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, 0.83);
    font-size: 14px;
    line-height: 1.7;
}

.admin-hero-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-primary {
    background: var(--rust) !important;
}

.hero-secondary {
    border: 1px solid rgba(255, 220, 150, 0.52) !important;
    background: rgba(20, 16, 11, 0.58) !important;
}

.dashboard-stats,
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat {
    position: relative;
    overflow: hidden;
    padding: 21px 23px;
    border: 1px solid rgba(192, 86, 33, 0.16);
    border-radius: 20px;
    background: var(--paper);
    box-shadow: 0 15px 34px rgba(45, 36, 30, 0.12);
}

.stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: var(--rust);
}

.stat-published::before {
    background: var(--green);
}

.stat-drafts::before {
    background: var(--gold);
}

.stat-contacts::before {
    background: var(--dark);
}

.stat span {
    color: #475467;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.stat b {
    display: block;
    margin: 7px 0 2px;
    color: var(--slate);
    font-size: 34px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.stat small {
    color: #7b8491;
    font-size: 11px;
}

.card {
    margin-bottom: 22px;
    padding: 24px;
    border: 1px solid rgba(192, 86, 33, 0.16);
    border-radius: 22px;
    background: var(--paper);
    box-shadow: 0 18px 42px rgba(45, 36, 30, 0.14);
    backdrop-filter: blur(4px);
}

.updates-card {
    padding: 0;
    overflow: hidden;
}

.card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    padding: 24px 26px;
    border-bottom: 1px solid rgba(192, 86, 33, 0.13);
    background:
        linear-gradient(
            135deg,
            rgba(255, 252, 245, 0.99),
            rgba(248, 233, 205, 0.93)
        );
}

.card-heading h2 {
    margin: 2px 0 0;
    font-size: 29px;
    letter-spacing: -0.035em;
}

.rust-text {
    color: var(--rust);
}

.btn,
button {
    appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 10px 15px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: var(--rust);
    box-shadow: 0 7px 17px rgba(45, 36, 30, 0.13);
    cursor: pointer;
    text-decoration: none;
    font: inherit;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    transition:
        transform 0.18s ease,
        background 0.18s ease,
        box-shadow 0.18s ease;
}

.btn:hover,
button:hover {
    transform: translateY(-1px);
    background: var(--rust-dark);
    box-shadow: 0 10px 23px rgba(45, 36, 30, 0.19);
}

.btn.secondary,
button.secondary {
    background: #4c525a;
}

.btn.gold,
button.gold {
    color: #18120d;
    background: var(--gold);
}


.btn.facebook,
button.facebook {
    color: #ffffff;
    background: #1877F2;
}

.btn.facebook:hover,
button.facebook:hover {
    color: #ffffff;
    background: #0f5fc7;
}

.btn.live {
    background: var(--green);
}

button.publish {
    background: var(--green);
}

button.unpublish {
    background: #7c3d31;
}

.btn.danger,
button.danger {
    background: #9c2f2f;
}

.btn.disabled {
    color: #81796d;
    background: #ece6dc;
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    color: #111827;
    border: 1px solid #cfc8bd;
    border-radius: 9px;
    outline: none;
    background: rgba(255, 255, 255, 0.96);
    font: inherit;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--rust);
    box-shadow: 0 0 0 3px rgba(192, 86, 33, 0.13);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

label {
    display: block;
    margin-bottom: 14px;
    font-weight: 700;
}

label span {
    display: block;
    margin-top: 4px;
    color: #69717c;
    font-size: 12px;
    font-weight: 400;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.full {
    grid-column: 1 / -1;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

th,
td {
    padding: 15px 13px;
    vertical-align: top;
    text-align: left;
    border-bottom: 1px solid rgba(109, 91, 66, 0.14);
}

th {
    color: #667085;
    background: rgba(250, 246, 237, 0.88);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.update-row {
    transition: background 0.18s ease;
}

.update-row:hover {
    background: rgba(255, 247, 237, 0.72);
}

.update-row.is-published {
    box-shadow: inset 4px 0 0 var(--green);
}

.update-row.is-draft {
    box-shadow: inset 4px 0 0 var(--gold);
}

.update-title-cell {
    min-width: 240px;
}

.update-title-cell strong {
    display: block;
    color: #111827;
    font-size: 14px;
    line-height: 1.4;
}

.update-title-cell small,
.cell-note {
    display: block;
    margin-top: 4px;
    color: #7a8491;
    font-size: 11px;
    line-height: 1.45;
}

.campaign-number {
    display: block;
    font-size: 12px;
}

.never-sent {
    display: inline-block;
    color: #81745f;
    font-size: 11px;
    font-weight: 700;
}

.actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dashboard-actions {
    min-width: 285px;
}

.status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.status.active,
.status.published,
.status.sent,
.status.completed {
    color: #175e2d;
    background: #dff2e3;
}

.status.draft,
.status.pending {
    color: #675b42;
    background: #eee5cf;
}

.status.unsubscribed,
.status.invalid,
.status.failed {
    color: #7c2020;
    background: #f7dddd;
}

.alert {
    margin-bottom: 18px;
    padding: 14px 17px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 9px 22px rgba(45, 36, 30, 0.10);
}

.alert.success {
    color: #175e2d;
    border-left: 5px solid #2f7d45;
    background: #dff2e3;
}

.alert.error {
    color: #7c2020;
    border-left: 5px solid #a33e3e;
    background: #f7dddd;
}

.alert.info {
    color: #214b73;
    border-left: 5px solid #3d6f9d;
    background: #e1ebf7;
}

.empty-state {
    padding: 48px 28px;
    text-align: center;
}

.empty-state h3 {
    margin-top: 0;
}

.dashboard-help {
    padding: 17px 21px;
    color: #594b3d;
    border-left: 5px solid var(--rust);
    border-radius: 0 15px 15px 0;
    background: rgba(255, 247, 237, 0.93);
    box-shadow: 0 12px 28px rgba(45, 36, 30, 0.11);
    font-size: 13px;
    line-height: 1.65;
}

.login {
    width: min(480px, calc(100% - 28px));
    margin: 70px auto;
}

.login .card {
    padding: 30px;
}

.muted {
    color: var(--muted);
}

.email-preview {
    width: 100%;
    min-height: 760px;
    border: 1px solid #cfc8bd;
    border-radius: 14px;
    background: #fff;
}

.video-frame {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%;
    border-radius: 14px;
    background: #000;
}

.video-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.public-page {
    background: #f4f1eb;
}

.public-shell {
    width: min(900px, calc(100% - 28px));
    margin: 26px auto 60px;
}

.public-hero {
    padding: 34px;
    color: #fff;
    text-align: center;
    border-radius: 14px 14px 0 0;
    background: var(--darkest);
}

.public-content {
    padding: 30px;
    border-radius: 0 0 14px 14px;
    background: #fff;
}

.public-content p {
    font-size: 17px;
    line-height: 1.7;
}

.center {
    text-align: center;
}

@media (max-width: 820px) {
    body {
        background-attachment: scroll;
    }

    .admin-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 26px;
    }

    .admin-hero-actions {
        justify-content: flex-start;
    }

    .admin-hero-brand {
        align-items: flex-start;
    }

    .admin-hero-logo {
        width: 92px;
    }
}

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

    .topbar {
        padding: 13px 15px;
    }

    .topbar > div:first-child {
        padding-left: 53px;
    }

    .topbar > div:first-child::before {
        width: 43px;
        height: 43px;
    }

    .topbar nav {
        gap: 4px;
    }

    .topbar a {
        padding: 7px 9px;
        font-size: 11px;
    }

    .container {
        width: min(100% - 18px, 1180px);
        margin-top: 18px;
    }

    .admin-hero {
        border-radius: 20px;
    }

    .admin-hero-brand {
        flex-direction: column;
        gap: 14px;
    }

    .admin-hero h1 {
        font-size: 31px;
    }

    .card-heading {
        padding: 20px;
    }

    th,
    td {
        white-space: normal;
    }

    .updates-table {
        min-width: 950px;
    }
}


/* FAMILY VOICE SUPPORTER MANAGER */

.supporter-summary a.stat {
    color: inherit;
    text-decoration: none;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}

.supporter-summary a.stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 19px 40px rgba(45, 36, 30, 0.17);
}

.stat-unsubscribed::before {
    background: #9c2f2f;
}

.stat-invalid::before {
    background: #667085;
}

.supporter-toolbar-card {
    padding: 20px 22px;
}

.supporter-toolbar {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 210px auto;
    gap: 15px;
    align-items: end;
}

.supporter-toolbar label {
    margin: 0;
}

.supporter-toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    padding-bottom: 1px;
}

.supporter-result-count {
    margin-top: 14px;
    padding-top: 13px;
    color: #667085;
    border-top: 1px solid rgba(109, 91, 66, 0.13);
    font-size: 12px;
}

.supporter-add-card {
    padding: 0;
    overflow: hidden;
}

.supporter-add-card summary {
    padding: 21px 24px;
    color: #111827;
    background:
        linear-gradient(
            135deg,
            rgba(255, 252, 245, 0.99),
            rgba(248, 233, 205, 0.93)
        );
    cursor: pointer;
    font-size: 16px;
    font-weight: 900;
    list-style-position: inside;
}

.supporter-add-form,
.supporter-edit-form {
    padding: 24px;
}

.supporter-edit-card {
    padding: 0;
    overflow: hidden;
    scroll-margin-top: 25px;
}

.supporter-edit-heading h2 {
    margin: 2px 0 0;
}

.supporter-list-card {
    padding: 0;
    overflow: hidden;
}

.supporter-table {
    min-width: 1030px;
}

.supporter-row strong {
    display: block;
    min-width: 145px;
}

.supporter-email {
    color: var(--rust);
    font-weight: 700;
    text-decoration: none;
}

.supporter-email:hover {
    text-decoration: underline;
}

.supporter-manage-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 315px;
}

.supporter-status-form {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
}

.supporter-status-form select {
    width: 145px;
    min-width: 145px;
    padding: 9px 10px;
}

.supporter-status-form button {
    min-height: 38px;
}

.supporter-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    flex-wrap: wrap;
    padding: 23px;
    border-top: 1px solid rgba(109, 91, 66, 0.14);
    background: rgba(250, 246, 237, 0.74);
}

.supporter-pagination > span {
    padding: 0 8px;
    color: #667085;
    font-size: 12px;
}

@media (max-width: 800px) {
    .supporter-toolbar {
        grid-template-columns: 1fr;
    }

    .supporter-toolbar-actions {
        padding-bottom: 0;
    }

    .supporter-manager-hero .admin-hero-actions {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .supporter-toolbar-actions,
    .supporter-manager-hero .admin-hero-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .supporter-toolbar-actions .btn,
    .supporter-toolbar-actions button,
    .supporter-manager-hero .btn {
        width: 100%;
    }
}

/* FAMILY VOICE POSTMARK DELIVERY TRACKING */
.delivery-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(125px, 1fr));
    gap: 12px;
    margin: 18px 0 4px;
}

.delivery-stat {
    display: block;
    padding: 15px 16px;
    color: inherit;
    border: 1px solid rgba(109, 91, 66, 0.14);
    border-radius: 16px;
    background: rgba(255, 252, 245, 0.94);
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(45, 36, 30, 0.08);
}

.delivery-stat span {
    display: block;
    color: #667085;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.delivery-stat strong {
    display: block;
    margin-top: 6px;
    color: #111827;
    font-size: 25px;
    line-height: 1;
}

.delivery-stat.delivered { border-left: 5px solid #2f7d45; }
.delivery-stat.accepted { border-left: 5px solid #3d6f9d; }
.delivery-stat.bounced { border-left: 5px solid #a33e3e; }
.delivery-stat.complained { border-left: 5px solid #7c2020; }
.delivery-stat.suppressed { border-left: 5px solid #7c3d31; }
.delivery-stat.failed { border-left: 5px solid #9c2f2f; }
.delivery-stat.pending { border-left: 5px solid #d69a46; }

.results-summary a.delivery-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(45, 36, 30, 0.14);
}

.delivery-results-card {
    padding: 0;
    overflow: hidden;
}

.delivery-results-table {
    min-width: 960px;
}

.delivery-detail-cell {
    min-width: 260px;
    max-width: 430px;
    white-space: normal;
    line-height: 1.55;
}

.delivery-pill {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    color: #4b5563;
    background: #ece7df;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.delivery-pill.delivered { color: #175e2d; background: #dff2e3; }
.delivery-pill.accepted { color: #214b73; background: #e1ebf7; }
.delivery-pill.bounced,
.delivery-pill.complained,
.delivery-pill.failed { color: #7c2020; background: #f7dddd; }
.delivery-pill.suppressed,
.delivery-pill.skipped { color: #675b42; background: #eee5cf; }
.delivery-pill.pending { color: #675b42; background: #fff0c9; }

@media (max-width: 700px) {
    .delivery-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* FAMILY VOICE POSTMARK ENGAGEMENT TRACKING */
.delivery-stat.opened {
    border-left: 5px solid #8b5cf6;
}

.delivery-stat.clicked {
    border-left: 5px solid #c05621;
}

.engagement-cell {
    min-width: 175px;
    white-space: normal;
    line-height: 1.45;
}

.clicked-link {
    display: inline-block;
    margin-top: 5px;
    color: var(--rust);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.clicked-link:hover {
    text-decoration: underline;
}


/* Campaign Builder */
.campaign-builder{display:grid;gap:18px}.builder-section{margin:0}.builder-heading{display:flex;align-items:flex-start;gap:14px;margin-bottom:20px}.builder-heading>span{display:grid;place-items:center;flex:0 0 38px;height:38px;border-radius:50%;background:var(--rust);color:#fff;font-weight:900}.builder-heading h2{margin:0 0 4px}.builder-heading p{margin:0;color:var(--muted);font-size:13px}.preview-toolbar{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap}.email-preview-shell{max-width:760px;margin:16px auto 0;transition:max-width .2s ease}.preview-size.active{background:var(--rust)!important;color:#fff!important}.email-preview{width:100%}
