@font-face {
    font-family: "Brandon Grotesque";
    src: url("/assets/fonts/font.woff2") format("woff2"), url("/assets/fonts/font.woff") format("woff");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --ink: #22314e;
    --accent: #ef5448;
    --line: #d9dde7;
    --muted: #667085;
    --surface: #f7f8fb;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--surface);
    color: var(--ink);
    font-family: "Brandon Grotesque", Arial, Helvetica, sans-serif;
}

a {
    color: var(--ink);
}

.shell {
    min-height: 100vh;
}

.topbar {
    align-items: center;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: 18px clamp(18px, 4vw, 48px);
}

.brand {
    align-items: center;
    display: flex;
    gap: 14px;
    text-decoration: none;
}

.brand img {
    height: 46px;
    width: auto;
}

.brand span {
    font-size: 18px;
    font-weight: 700;
}

.nav {
    align-items: center;
    display: flex;
    gap: 14px;
}

.container {
    margin: 0 auto;
    max-width: 1120px;
    padding: 36px clamp(18px, 4vw, 48px);
}

.narrow {
    max-width: 480px;
}

.panel {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 28px;
}

.page-title {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 24px;
}

h1 {
    font-size: 30px;
    line-height: 1.15;
    margin: 0 0 8px;
}

p {
    line-height: 1.5;
    margin: 0 0 16px;
}

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

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

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 16px;
}

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

label {
    font-size: 14px;
    font-weight: 700;
}

input {
    border: 1px solid #bfc6d4;
    border-radius: 8px;
    color: var(--ink);
    font: inherit;
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
}

input:focus {
    border-color: var(--ink);
    outline: 2px solid rgba(34, 49, 78, 0.14);
}

.error {
    color: #b42318;
    font-size: 13px;
}

.alert {
    background: #fff4f2;
    border: 1px solid #f6b4ad;
    border-radius: 8px;
    color: #9f2d24;
    margin-bottom: 18px;
    padding: 12px 14px;
}

.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.button,
button {
    align-items: center;
    background: var(--ink);
    border: 1px solid var(--ink);
    border-radius: 8px;
    color: var(--white);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 700;
    justify-content: center;
    min-height: 42px;
    padding: 9px 16px;
    text-decoration: none;
}

.button:hover,
button:hover {
    background: var(--accent);
    border-color: var(--accent);
}

.button.secondary {
    background: var(--white);
    color: var(--ink);
}

.button.danger,
button.danger {
    background: #b42318;
    border-color: #b42318;
}

.table-wrap {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow-x: auto;
}

table.admin-table {
    border-collapse: collapse;
    min-width: 800px;
    width: 100%;
}

.admin-table th,
.admin-table td {
    border-bottom: 1px solid var(--line);
    padding: 13px 14px;
    text-align: left;
    vertical-align: middle;
}

.admin-table th {
    background: #eef1f6;
    font-size: 13px;
    text-transform: uppercase;
}

.admin-table tr:last-child td {
    border-bottom: 0;
}

.inline-form {
    display: inline;
}

.preview-area {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow-x: auto;
    padding: 24px;
}

.copy-status {
    color: var(--muted);
    min-height: 22px;
}

textarea.source {
    height: 220px;
    margin-top: 18px;
    width: 100%;
}

@media (max-width: 760px) {
    .topbar,
    .page-title {
        align-items: stretch;
        flex-direction: column;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}
