:root {
    --bg-dark: hsl(0 15% 90%);
    --bg: hsl(0 15% 95%);
    --bg-light: hsl(0 15% 100%);

    --text: hsl(60 1% 13%);
    --text-muted: hsl(60 1% 38%);

    --one: hsl(0 100% 42%);
    --two: hsl(195 55% 32%);

    --border: hsl(0 0% 82%);
    --shadow: 0 10px 30px hsl(0 0% 0% / 0.08);

    --radius: 0.9rem;
    --space: 1rem;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: linear-gradient(180deg, var(--bg-light), var(--bg));
    line-height: 1.5;
}

main,
.page {
    flex: 1;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.25rem;
}

.card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

h1,
h2 {
    line-height: 1.2;
    margin-top: 0;
}

h1 {
    font-size: clamp(2rem, 3vw, 3rem);
}

h2 {
    font-size: 1.35rem;
    color: var(--two);
}

a {
    color: var(--two);
    font-weight: 600;
}

a:hover {
    color: var(--one);
}

.button,
button,
input[type="submit"] {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    background: var(--two);
    color: white;
    padding: 0.65rem 1rem;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.button:hover,
button:hover {
    background: var(--one);
    color: white;
}

.button-secondary {
    background: var(--bg-dark);
    color: var(--text);
}

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

.button-small {
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
}

small {
    color: var(--text-muted);
}

.link-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

input,
select,
textarea {
    width: 100%;
    max-width: 36rem;
    border: 1px solid var(--border);
    border-radius: 0.6rem;
    padding: 0.65rem 0.75rem;
    font: inherit;
    background: white;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

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

th {
    background: var(--bg-dark);
    font-weight: 700;
}

code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    padding: 0.2rem 0.35rem;
    font-size: 0.9em;
}

.nav-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 0.2rem 0.6rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.badge-active {
    background: hsl(151 55% 88%);
    color: hsl(151 70% 22%);
}

.badge-expired {
    background: hsl(0 90% 92%);
    color: hsl(0 80% 34%);
}

.badge-disabled {
    background: hsl(0 0% 88%);
    color: hsl(0 0% 28%);
}

.badge-used {
    background: hsl(35 100% 88%);
    color: hsl(28 90% 32%);
}

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

.success {
    color: hsl(151 70% 28%);
    font-weight: 700;
}

.site-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text);
    text-decoration: none;
}

.brand:hover {
    color: var(--text);
}

.brand-logo {
    height: 46px;
    width: auto;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-size: 1.35rem;
}

.brand-text span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.page-narrow {
    max-width: 860px;
}

.hero-card {
    border-top: 5px solid var(--one);
}

.eyebrow {
    margin: 0 0 0.6rem;
    color: var(--one);
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.lead {
    font-size: 1.15rem;
    color: var(--text);
    max-width: 42rem;
}

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

.upload-card input[type="file"] {
    padding: 1rem;
    background: var(--bg);
    border: 2px dashed var(--border);
}

.status-card {
    border-left: 5px solid var(--two);
}

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

.status-grid div {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 1rem;
}

.status-grid strong {
    display: block;
    font-size: 1.6rem;
    color: var(--two);
}

.status-grid span {
    color: var(--text-muted);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.meatec-footer-brand svg,
.meatec-header-brand svg {
    width: 140px;
    height: auto;
    display: block;
    margin-bottom: 0.8rem;
}

.meatec-logo-arc {
    fill: var(--one);
}

.meatec-header-brand .meatec-logo-text{
    fill: var(--text);
}

.meatec-footer-brand .meatec-logo-text {
    fill: var(--bg-light);
}

.site-footer {
    margin-top: 3rem;
    background: var(--text);
    color: white;
    padding: 1.5rem 1.25rem;
}

.site-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    font-size: 0.9rem;
    color: hsl(0 0% 92%);
}

.site-footer strong {
    color: white;
}

@media (max-width: 800px) {
    table {
        font-size: 0.9rem;
    }

    th,
    td {
        padding: 0.5rem;
    }
}

.page-login {
    max-width: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
}

.form-error {
    background: hsl(0 90% 94%);
    color: hsl(0 80% 34%);
    border-left: 5px solid hsl(0 80% 45%);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-weight: 700;
}
