:root {
    --bg: #f4f3ed;
    --surface: #fff;
    --text: #153d36;
    --muted: #6d7974;
    --line: #e2e3db;
    --gold: #d4ca82;
    --gold-dark: #8c8346;
    --gold-soft: #f4f0d9;
    --dark: #0f322c;
}

.topbar {
    min-height: 90px;
    background: linear-gradient(180deg, #0f322c 0%, #185953 100%);
    gap: 32px;
    border-bottom-color: var(--gold);
    box-shadow: 0 6px 24px rgba(5, 43, 36, .18);
}

.brand {
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.brand img {
    display: block;
    width: 80px;
    height: 80px;
    object-fit: contain;
}

.brand span {
    color: #e2da9a;
    font-family: inherit;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 2.5px;
    white-space: nowrap;
}

.topbar nav a,
.account a {
    color: #f2f2e9;
}

.topbar nav a:hover,
.account a:hover,
.topbar .link-button {
    color: #e2da9a;
}

.button-primary:hover {
    background: #14564b;
}

.button-secondary {
    border-color: #c9cec8;
}

.button-secondary:hover {
    border-color: var(--gold);
    background: #faf9f1;
}

.report-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
}

.report-filters label {
    min-width: 0;
}

.filter-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.report-table {
    overflow-x: auto;
}

.report-table table {
    min-width: 1100px;
}

.table-note {
    padding: 14px 18px 0;
    color: var(--muted);
    font-size: 13px;
}

.status-delivered {
    color: #146c43;
    background: #dff4e7;
}

.status-not_delivered {
    color: #a32d2d;
    background: #fde8e7;
}

.status-waiting {
    color: #745b13;
    background: var(--gold-soft);
}

.report-error {
    max-width: 320px;
    white-space: normal;
    word-break: break-word;
}

.report-pagination {
    margin-top: 18px;
    text-align: center;
}

@media (max-width: 1050px) {
    .report-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .report-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .filter-actions {
        grid-column: span 2;
    }
}

@media (max-width: 560px) {
    .report-filters {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        grid-column: auto;
        flex-direction: column;
    }

    .filter-actions .button {
        width: 100%;
    }
}

.auth-shell {
    background:
        radial-gradient(circle at 10% 10%, rgba(212, 202, 130, .27), transparent 32%),
        radial-gradient(circle at 90% 90%, rgba(11, 61, 53, .14), transparent 36%),
        var(--bg);
}

.auth-card {
    padding: 34px 42px 42px;
    box-shadow: 0 25px 70px rgba(8, 52, 45, .15);
}

.auth-brand {
    padding-left: 0;
    letter-spacing: normal;
}

.auth-brand img {
    display: block;
    width: 210px;
    height: 210px;
    object-fit: contain;
    margin: -15px auto -18px;
    border-radius: 18px;
}

.metric-card.accent,
.guide-callout,
.step-number {
    background: var(--dark);
}

.metric-card.accent::after {
    border-color: rgba(212, 202, 130, .18);
}

.list-dialog::backdrop,
.loading-overlay {
    background: rgba(5, 43, 36, .64);
}

.message-preview {
    padding: 0 19px 18px;
}

.message-preview pre {
    margin: 0;
    padding: 14px;
    white-space: pre-wrap;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #faf9f5;
    color: var(--text);
    font: 12px/1.55 inherit;
}

.message-preview small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 10px;
}

.bulk-layout {
    align-items: start;
}

.template-list-panel {
    max-width: none;
    margin-top: 20px;
}

.bulk-editor {
    max-width: 900px;
}

.bulk-phone-area {
    min-height: 320px;
}

.simple-steps {
    margin: 18px 0 0;
    padding-left: 22px;
}

.simple-steps li {
    margin: 0 0 13px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.compact-preview {
    max-width: 360px;
    max-height: 180px;
    overflow: auto;
    white-space: pre-wrap;
    padding: 10px;
    border-radius: 8px;
    background: #faf9f5;
    font: 11px/1.5 inherit;
}

.name-slots {
    margin-top: 22px;
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.name-slots summary {
    cursor: pointer;
    color: var(--gold-dark);
    font-size: 12px;
    font-weight: 800;
}

.name-slots pre {
    max-height: 260px;
    overflow: auto;
    padding: 13px;
    border-radius: 9px;
    background: #faf9f5;
    font-size: 11px;
    line-height: 1.6;
}

.name-slots small {
    color: var(--muted);
}

.bulk-summary {
    grid-template-columns: repeat(6, 1fr);
}

.progress-track {
    height: 9px;
    overflow: hidden;
    margin: -3px 0 18px;
    border-radius: 10px;
    background: #e5e7e1;
}

.progress-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--gold), var(--dark));
    transition: width .25s;
}

.status-approved,
.status-active {
    background: #e6f5ed;
    color: var(--success);
}

.status-unknown,
.status-not_found,
.status-pending,
.status-queued,
.status-paused {
    background: #fff1d7;
    color: #936318;
}

.status-rejected,
.status-disabled,
.status-error {
    background: #fde9eb;
    color: var(--danger);
}

@media (max-width: 760px) {
    .topbar {
        min-height: 72px;
        padding: 8px 17px;
    }

    .brand img {
        width: 62px;
        height: 62px;
    }

    .brand span {
        display: none;
    }

    .auth-card {
        padding: 28px 24px 34px;
    }

    .auth-brand img {
        width: 180px;
        height: 180px;
    }

    .bulk-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}
