:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #172033;
    --muted: #6b7280;
    --border: #dbe2ea;
    --primary: #1f5eff;
    --danger: #c62828;
    --success: #1b8b4b;
    --warning: #c77d00;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 260px;
    background: #111827;
    color: #fff;
    padding: 24px 16px;
}
.sidebar .brand { display: grid; gap: 6px; margin-bottom: 24px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar nav a {
    color: #e5e7eb;
    padding: 10px 12px;
    border-radius: 10px;
    display: block;
}
.sidebar nav a:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.content { flex: 1; padding: 24px; }
.content--wide { max-width: 560px; margin: 0 auto; padding-top: 80px; }
.page-header { margin-bottom: 20px; }
.page-header h1 { margin: 0; font-size: 28px; }
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 18px rgba(17, 24, 39, 0.04);
}
.card--narrow { max-width: 460px; margin-inline: auto; }
.grid { display: grid; gap: 16px; }
.grid--cards { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.grid--two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.grid--four { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.stat-card strong { font-size: 24px; }
.form-stack { display: grid; gap: 18px; }
label { display: grid; gap: 8px; font-weight: 600; }
label span { font-size: 14px; }
input, select, textarea, button {
    font: inherit;
}
input, select, textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 10px 12px;
}
textarea { resize: vertical; }
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 0;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
}
.button:hover { text-decoration: none; opacity: 0.95; }
.button--secondary { background: #eef2ff; color: var(--text); }
.button--danger { background: var(--danger); color: #fff; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions--inline { align-items: start; }
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: end;
}
.filter-bar label { min-width: 180px; }
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
th { font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
}
.alert--success { background: #eaf8f0; border-color: #b5e0c5; }
.alert--error { background: #fff0f0; border-color: #f1b4b4; }
.status {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
}
.status--draft { background: #eef2ff; color: #374151; }
.status--submitted { background: #fff7e6; color: #a16207; }
.status--approved { background: #eaf8f0; color: var(--success); }
.status--returned { background: #fff0f0; color: var(--danger); }
.repeater-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.repeater-row {
    padding: 14px 0;
    border-top: 1px solid var(--border);
}
.repeater-row:first-child { border-top: 0; padding-top: 0; }
.link-button {
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--danger);
    cursor: pointer;
}
.info-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}
.checkbox {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 500;
}
.checkbox input { width: auto; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; }
.inline-form--stacked { display: inline-flex; flex-wrap: wrap; }
@media (max-width: 900px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; }
    .content { padding: 16px; }
}
