:root {
    --brand: #1f3a5f;
    --brand-dark: #142440;
    --accent: #c98a3a;
    --soft: #f5f2ec;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--soft);
    color: #2b2b2b;
}

.bg-brand { background-color: var(--brand) !important; }
.bg-brand-dark { background-color: var(--brand-dark) !important; }
.text-brand { color: var(--brand) !important; }
.btn-brand {
    background-color: var(--brand);
    color: #fff;
    border-color: var(--brand);
}
.btn-brand:hover { background-color: var(--brand-dark); color:#fff; }
.btn-accent {
    background-color: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.btn-accent:hover { background-color: #a06e28; color:#fff; }

.sidebar {
    width: 240px;
    min-height: calc(100vh - 56px);
    background: var(--brand-dark) !important;
}
.sidebar .nav-link {
    border-radius: 8px;
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
}
.sidebar .nav-link:hover { background: rgba(255,255,255,.08); }
.sidebar .nav-link.active { background: var(--accent) !important; }

.card {
    border: 1px solid #e6e1d6;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card-header {
    background: #fff;
    border-bottom: 1px solid #eee6d6;
    font-weight: 600;
}
.page-title {
    font-size: 1.55rem;
    font-weight: 600;
    color: var(--brand);
    margin-bottom: 1.2rem;
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:wrap;
    gap:.5rem;
}
.stat-card {
    background: #fff;
    padding: 1.2rem;
    border-radius: 12px;
    border: 1px solid #eee6d6;
}
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; color: var(--brand); }
.stat-card .stat-label { color: #666; text-transform: uppercase; font-size: 0.75rem; letter-spacing: 0.5px; }

.table thead {
    background: #f0ebe0;
    color: var(--brand);
}
.table > :not(caption) > * > * { padding: 0.65rem 0.75rem; }

.login-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1f3a5f 0%, #142440 100%);
    padding: 20px;
}
.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px rgba(0,0,0,.3);
}
.login-card h1 { color: var(--brand); font-size: 1.5rem; margin-bottom: 4px; }
.login-card p.muted { color: #888; margin-bottom: 24px; font-size: 0.9rem; }

.form-label { font-weight: 500; color: #444; font-size: 0.9rem; }

.badge { font-weight: 500; padding: 0.4em 0.7em; }

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    padding: 0.35rem 0.6rem;
}

.low-stock { color: #d33; font-weight: 600; }

@media (max-width: 991.98px) {
    .sidebar { display: none; }
    main { padding: 1rem !important; }
}

.inline-form { display: flex; gap: 6px; align-items: center; }
.inline-form select, .inline-form input { min-width: 140px; }

.small-muted { color: #888; font-size: 0.85rem; }
