:root {
    font-family: Inter, Arial, sans-serif;
    color: #153b35;
    background: #f4f7f6;
    font-synthesis: none;
    text-rendering: optimizeLegibility;
}
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    min-height: 100vh;
}
.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
    background: linear-gradient(135deg, #f4f7f6, #e6f1ed);
}
.login-card {
    width: min(100%, 440px);
    padding: 40px;
    background: #fff;
    border: 1px solid #dce8e3;
    border-radius: 18px;
    box-shadow: 0 18px 55px #163d3315;
}
.admin-brand {
    display: inline-flex;
    flex-direction: column;
    text-decoration: none;
    color: #153b35;
    font-size: 27px;
    font-weight: 800;
    letter-spacing: -1.3px;
}
.admin-brand span {
    display: inline;
    color: #bd8b35;
}
.admin-brand small {
    margin-top: 3px;
    font-size: 9px;
    letter-spacing: 2px;
    font-weight: 600;
}
.eyebrow {
    margin: 28px 0 9px;
    color: #9a712a;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
}
h1,
h2,
p {
    margin-top: 0;
}
h1 {
    margin-bottom: 9px;
    font-size: 32px;
    letter-spacing: -1px;
}
.muted {
    color: #6a7b75;
    line-height: 1.55;
}
.login-card form,
.password-panel form {
    display: grid;
    gap: 10px;
}
.login-card form {
    margin-top: 26px;
}
.login-card label,
.password-panel label {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 700;
}
.login-card input,
.password-panel input,
.status-form select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #cfddd7;
    border-radius: 8px;
    background: #fff;
    color: #153b35;
    font: inherit;
}
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    padding: 9px 15px;
    border: 1px solid transparent;
    border-radius: 8px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}
.button:disabled {
    opacity: 0.65;
    cursor: wait;
}
.button.primary {
    margin-top: 12px;
    background: #176b55;
    color: white;
}
.button.primary:hover {
    background: #105540;
}
.button.secondary {
    background: #fff;
    border-color: #d6e2dd;
    color: #214b40;
}
.button.small {
    min-height: 35px;
    padding: 7px 10px;
    background: #e7f1ed;
    color: #195944;
}
.back-link {
    display: block;
    margin-top: 23px;
    color: #42675b;
    font-size: 13px;
    text-decoration: none;
}
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px max(24px, calc((100vw - 1200px) / 2));
    background: #fff;
    border-bottom: 1px solid #dce7e2;
}
.admin-header .admin-brand {
    font-size: 23px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.header-actions form {
    margin: 0;
}
.dashboard {
    width: min(1200px, calc(100% - 40px));
    margin: 38px auto 70px;
}
.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}
.page-heading .eyebrow {
    margin: 0 0 9px;
}
.page-heading h1 {
    margin-bottom: 8px;
}
.signed-in,
.result-count {
    color: #6a7b75;
    font-size: 12px;
}
.metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}
.metric {
    padding: 20px;
    background: #fff;
    border: 1px solid #dce8e3;
    border-radius: 12px;
}
.metric span {
    display: block;
    color: #6a7b75;
    font-size: 13px;
}
.metric strong {
    display: block;
    margin-top: 7px;
    font-size: 30px;
}
.panel {
    margin: 18px 0;
    padding: 22px;
    background: #fff;
    border: 1px solid #dce8e3;
    border-radius: 12px;
}
.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.panel-heading h2 {
    margin-bottom: 5px;
    font-size: 20px;
}
.panel-heading p {
    margin-bottom: 0;
    font-size: 13px;
}
.table-wrap {
    overflow-x: auto;
    margin: 18px -2px 0;
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
th,
td {
    padding: 14px 11px;
    border-bottom: 1px solid #e7eeeb;
    vertical-align: top;
}
th {
    color: #6a7b75;
    font-size: 10px;
    letter-spacing: 0.8px;
}
td {
    font-size: 13px;
    line-height: 1.45;
}
td:first-child strong,
td:first-child a {
    display: block;
}
td:first-child a {
    margin-top: 3px;
    color: #286b57;
    text-decoration: none;
}
.message-cell {
    min-width: 240px;
    max-width: 400px;
}
.message-cell p {
    margin: 7px 0 0;
    color: #6a7b75;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.service-tag {
    display: inline-block;
    margin-left: 5px;
    padding: 3px 7px;
    border-radius: 20px;
    background: #eef5f2;
    color: #42675b;
    font-size: 10px;
}
.status {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 20px;
    background: #f3f1e8;
    color: #846c32;
    font-size: 11px;
    font-weight: 700;
}
.status-contacted {
    background: #e7f1fa;
    color: #35618c;
}
.status-closed {
    background: #edf0ee;
    color: #62716b;
}
.status-form {
    display: flex;
    gap: 6px;
    min-width: 150px;
}
.status-form select {
    min-height: 35px;
    padding: 6px;
    font-size: 12px;
}
.empty-state {
    padding: 45px 10px;
    text-align: center;
}
.empty-state p {
    margin: 7px 0 0;
    color: #6a7b75;
}
.pagination {
    padding-top: 18px;
}
.pagination nav {
    display: flex;
    justify-content: center;
}
.pagination nav div:first-child {
    display: none;
}
.pagination nav div:last-child {
    display: flex;
    gap: 5px;
}
.pagination a,
.pagination span {
    padding: 7px 10px;
    border: 1px solid #dce8e3;
    border-radius: 6px;
    color: #235c49;
    text-decoration: none;
    font-size: 12px;
}
.pagination [aria-current="page"] span {
    background: #176b55;
    color: #fff;
}
.notice {
    margin: 16px 0;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
}
.notice.error {
    background: #fff0ec;
    color: #9a3527;
}
.notice.success {
    background: #e8f5ed;
    color: #236b45;
}
.password-panel summary {
    font-weight: 700;
    cursor: pointer;
}
.password-panel > p {
    margin: 13px 0;
}
.password-panel form {
    max-width: 440px;
}
.password-panel #password-status {
    min-height: 20px;
    margin-top: 6px;
    font-size: 13px;
}
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
@media (max-width: 700px) {
    .login-card {
        padding: 28px 23px;
    }
    .admin-header {
        align-items: flex-start;
        padding: 14px 18px;
    }
    .header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    .dashboard {
        width: calc(100% - 24px);
        margin-top: 25px;
    }
    .page-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .metrics {
        gap: 8px;
    }
    .metric {
        padding: 14px;
    }
    .metric strong {
        font-size: 24px;
    }
    .panel {
        padding: 15px;
    }
    .panel-heading {
        align-items: flex-start;
        flex-direction: column;
    }
    .header-actions .button {
        padding: 7px 9px;
        font-size: 12px;
    }
}
