:root {
    color-scheme: light;
    --ink: #1f2933;
    --muted: #6b7280;
    --line: #d8dee9;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --bg: #f7faf9;
    --panel: #ffffff;
    --danger: #b42318;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
}

a {
    color: var(--brand-dark);
    text-decoration: none;
}

.site-header,
.site-footer {
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    padding: 14px clamp(16px, 4vw, 48px);
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    color: var(--ink);
    font-weight: 700;
    font-size: 20px;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.container {
    width: min(1080px, calc(100% - 32px));
    margin: 28px auto;
}

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.product-card {
    display: grid;
    gap: 10px;
}

.product-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    background: #edf2f7;
}

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

.price {
    font-weight: 700;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.btn,
button {
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    padding: 9px 14px;
    background: var(--brand);
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.btn-secondary {
    background: #334155;
}

.btn-danger {
    background: var(--danger);
}

.btn[aria-disabled="true"],
button:disabled {
    opacity: .55;
    cursor: not-allowed;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

label {
    display: grid;
    gap: 6px;
    font-weight: 600;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

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

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

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 680px;
}

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

th {
    background: #eef7f5;
}

.summary {
    margin-left: auto;
    width: min(360px, 100%);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
}

.summary-row strong {
    font-size: 18px;
}

.alert {
    border-radius: 6px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.alert-success {
    background: #e6f6ed;
    color: #166534;
}

.alert-error {
    background: #fee4e2;
    color: var(--danger);
}

.status {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 10px;
    background: #e2e8f0;
    color: #334155;
    font-size: 13px;
}

@media (max-width: 640px) {
    .site-header,
    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    table {
        min-width: 560px;
    }
}

