/* xneelo email outage status — palette taken from the live xneelo theme stylesheet. */

:root {
    --brand:        #f13e5f;
    --brand-dark:   #d93856;
    --brand-darker: #a92c43;
    --brand-deep:   #601926;
    --brand-tint:   #fdeef1;

    --ink:          #333d51;
    --ink-strong:   #242b39;
    --muted:        #82889d;
    --muted-soft:   #707891;

    --border:       #d6d8dc;
    --border-soft:  #e6e9ee;
    --surface:      #ffffff;
    --surface-alt:  #eef2f5;
    --page:         #f6f8fa;

    --ok:           #2f8f4e;
    --ok-tint:      #e8f6ec;
    --warn:         #b26a00;
    --warn-tint:    #fdf3e3;
    --info:         #3796f3;
    --info-tint:    #e9f3fd;

    --radius:       6px;
    --radius-lg:    10px;
    --shadow:       0 1px 2px rgba(36, 43, 57, .06), 0 8px 24px rgba(36, 43, 57, .06);

    --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-dark); }
a:hover { color: var(--brand-darker); }

h1, h2, h3 { color: var(--ink-strong); line-height: 1.25; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
p  { margin: 0 0 1rem; }

/* ---------- chrome ---------- */

.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border-soft);
}

.site-header__inner,
.wrap {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.is-admin .wrap--admin {
    max-width: 100%;
}

.is-admin main { padding: 1.25rem 0 2.5rem; }
.is-admin h1 { font-size: 1.35rem; }

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 68px;
    flex-wrap: wrap;
}

.site-header__logo img { display: block; height: 32px; width: auto; }

.site-header__meta {
    font-size: .8125rem;
    color: var(--muted);
}

.wrap--narrow { max-width: 720px; }
.wrap--login  { max-width: 420px; margin: 0 auto; padding: 0 1.25rem; }

main { padding: 2.5rem 0 4rem; }

.site-footer {
    border-top: 1px solid var(--border-soft);
    padding: 1.5rem 0;
    font-size: .8125rem;
    color: var(--muted);
    background: var(--surface);
}

/* ---------- incident banner ---------- */

.banner {
    background: linear-gradient(180deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    padding: 1.75rem 0;
}

.banner h1 { color: #fff; margin-bottom: .35rem; }
.banner p  { margin: 0; color: rgba(255, 255, 255, .92); max-width: 62ch; }

/* ---------- cards & forms ---------- */

.card {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.field { margin-bottom: 1.25rem; }

label, .label {
    display: block;
    font-weight: 600;
    font-size: .9375rem;
    color: var(--ink-strong);
    margin-bottom: .35rem;
}

.hint {
    display: block;
    font-weight: 400;
    font-size: .8125rem;
    color: var(--muted);
    margin: -.2rem 0 .45rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: .65rem .75rem;
    font: inherit;
    font-size: .9375rem;
    color: var(--ink-strong);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color .12s ease, box-shadow .12s ease;
}

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

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(241, 62, 95, .16);
}

.choice-group { display: grid; gap: .5rem; }

.choice {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    padding: .7rem .85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    font-size: .9375rem;
    color: var(--ink);
    margin: 0;
    background: var(--surface);
}

.choice:hover { border-color: var(--muted); }
.choice input { margin: .25rem 0 0; accent-color: var(--brand); flex: none; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-tint); }

.field--error input,
.field--error select,
.field--error textarea { border-color: var(--brand-dark); }

.error-text {
    display: block;
    margin-top: .35rem;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--brand-darker);
}

/* Honeypot: hidden from people, visible to naive bots. */
.hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .65rem 1.35rem;
    font: inherit;
    font-size: .9375rem;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    background: var(--brand);
    border: 1px solid var(--brand);
    border-radius: var(--radius);
    cursor: pointer;
    text-decoration: none;
    transition: background .12s ease, border-color .12s ease;
}

.btn:hover  { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn:active { background: var(--brand-darker); border-color: var(--brand-darker); }

.btn:focus-visible {
    outline: 2px solid var(--brand-darker);
    outline-offset: 2px;
}

.btn--block { width: 100%; }

.btn--secondary {
    color: var(--ink-strong);
    background: var(--surface);
    border-color: var(--border);
}

.btn--secondary:hover { background: var(--surface-alt); border-color: var(--muted); color: var(--ink-strong); }

.btn--sm { padding: .35rem .7rem; font-size: .8125rem; }

.btn--link {
    padding: 0;
    background: none;
    border: none;
    color: var(--brand-dark);
    font-weight: 600;
    font-size: .8125rem;
    cursor: pointer;
    text-decoration: underline;
}

/* ---------- notices ---------- */

.notice {
    border: 1px solid var(--border);
    border-left: 4px solid var(--muted);
    border-radius: var(--radius);
    background: var(--surface-alt);
    padding: .9rem 1.1rem;
    margin-bottom: 1.25rem;
    font-size: .9375rem;
}

.notice--ok    { border-left-color: var(--ok);    background: var(--ok-tint);   border-color: #cfe7d6; }
.notice--warn  { border-left-color: var(--warn);  background: var(--warn-tint); border-color: #f0dfc0; }
.notice--error { border-left-color: var(--brand); background: var(--brand-tint); border-color: #f6ced7; }
.notice--info  { border-left-color: var(--info);  background: var(--info-tint); border-color: #cee2f8; }
.notice p:last-child { margin-bottom: 0; }
.notice strong { color: var(--ink-strong); }

/* ---------- admin ---------- */

.admin-nav {
    padding: .75rem 0;
    border-bottom: 1px solid var(--border-soft);
    background: var(--surface);
}

/* Inline style attributes are blocked by our CSP, so layout lives here. */
.admin-nav__inner {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.admin-nav a {
    font-size: .9375rem;
    font-weight: 600;
    color: var(--muted-soft);
    text-decoration: none;
    padding: .2rem 0;
    border-bottom: 2px solid transparent;
}

.admin-nav a:hover { color: var(--ink-strong); }
.admin-nav a.is-active { color: var(--brand-dark); border-bottom-color: var(--brand); }
.admin-nav__spacer { margin-left: auto; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: .875rem;
    margin-bottom: 1.5rem;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: .9rem 1.1rem;
}

.stat__value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--ink-strong);
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.stat--alert .stat__value { color: var(--brand-dark); }

.stat__label {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
}

.filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: .5rem;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    padding: .65rem .8rem;
    margin-bottom: 1rem;
}

.filters .field { margin: 0; }
.filters label { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.filters input, .filters select { min-width: 120px; }
.filters .field--grow { flex: 1 1 180px; }

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-lg);
    overflow-x: auto;
}

table { width: 100%; border-collapse: collapse; font-size: .875rem; }

.admin-table { font-size: .8125rem; }

th, td {
    padding: .7rem .9rem;
    text-align: left;
    border-bottom: 1px solid var(--border-soft);
    vertical-align: top;
}

.admin-table th,
.admin-table td {
    padding: .4rem .5rem;
    vertical-align: middle;
}

thead th {
    position: sticky;
    top: 0;
    background: var(--surface-alt);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--muted-soft);
    white-space: nowrap;
}

thead th a { color: inherit; text-decoration: none; display: inline-flex; gap: .3rem; }
thead th a:hover { color: var(--ink-strong); }
thead th .sort-arrow { color: var(--brand); }

tbody tr:hover { background: #fbfcfd; }

/*
 * The actions column stays put while the rest of the table scrolls.
 *
 * The admin table is wide — ten columns — so on a laptop the resolve button
 * ended up off the right edge with nothing to indicate the table scrolled at
 * all. It read as though the button had been removed.
 */
.table-wrap th:last-child,
.table-wrap td:last-child {
    position: sticky;
    right: 0;
    background: var(--surface);
    box-shadow: inset 1px 0 0 var(--border-soft), -6px 0 12px -8px rgba(36, 43, 57, .28);
}

.table-wrap thead th:last-child {
    background: var(--surface-alt);
    z-index: 3;
}

.table-wrap tbody tr:hover td:last-child { background: #fbfcfd; }
.table-wrap tbody tr.is-resolved td:last-child { background: var(--surface); }
tbody tr.is-resolved { color: var(--muted); }
tbody tr.is-resolved td:first-child { border-left: 3px solid var(--ok); }
tbody tr:last-child td { border-bottom: none; }

/* Customer notes: a preview that opens to the full text, no JavaScript. */
.note { display: block; }

.note > summary {
    cursor: pointer;
    list-style: none;
    color: var(--muted);
}

.note > summary::-webkit-details-marker { display: none; }

.note > summary::after {
    content: " show all";
    font-weight: 600;
    color: var(--brand-dark);
    white-space: nowrap;
}

.note[open] > summary::after { content: " show less"; }
.note > summary:hover::after { text-decoration: underline; }

.note > summary:focus-visible {
    outline: 2px solid var(--brand-darker);
    outline-offset: 2px;
    border-radius: 2px;
}

.note[open] > summary { color: transparent; font-size: 0; }
.note[open] > summary::after { font-size: .8125rem; }

.note__full {
    margin-top: .35rem;
    padding: .5rem .65rem;
    background: var(--surface-alt);
    border-radius: var(--radius);
    color: var(--ink);
    white-space: normal;
    max-width: 46ch;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: .8125rem;
}

.nowrap { white-space: nowrap; }
.numeric { font-variant-numeric: tabular-nums; text-align: right; }

.tag {
    display: inline-block;
    padding: .12rem .5rem;
    border-radius: 999px;
    font-size: .6875rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tag--matched       { background: var(--ok-tint);    color: var(--ok); }
.tag--unmatched     { background: var(--brand-tint); color: var(--brand-darker); }
.tag--none          { background: var(--warn-tint);  color: var(--warn); }
.tag--lookup_failed { background: var(--surface-alt); color: var(--muted-soft); }
.tag--pending       { background: var(--info-tint);  color: var(--info); }
.tag--resolved      { background: var(--ok-tint);    color: var(--ok); }
.tag--open          { background: var(--brand-tint); color: var(--brand-darker); }
.tag--standard      { background: var(--info-tint);  color: #1d6fb8; }
.tag--premium       { background: #f4e9ff;          color: #6b3fa0; }

.pagination {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    font-size: .875rem;
    color: var(--muted);
}

.empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--muted);
}

.inline-form { display: inline; }

.muted { color: var(--muted); }
.small { font-size: .8125rem; }
.stack > * + * { margin-top: .35rem; }
.stack--tight > * + * { margin-top: .15rem; }

@media (max-width: 640px) {
    main { padding: 1.5rem 0 3rem; }
    .card { padding: 1.25rem; }
    h1 { font-size: 1.4rem; }
    .filters { flex-direction: column; align-items: stretch; }
    .filters input, .filters select { min-width: 0; width: 100%; }
}

@media print {
    .site-header, .admin-nav, .filters, .pagination, .site-footer, .btn { display: none !important; }
    .table-wrap { border: none; }
}
