* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #f4f6f8;
    color: #1a1a2e;
    line-height: 1.5;
    min-height: 100vh;
}

.nav {
    background: #1a1a2e;
    color: #fff;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1rem; }
.nav-links { display: flex; gap: 0.25rem; }
.nav-links a {
    color: #a0aec0;
    text-decoration: none;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255,255,255,0.1); }

.container { max-width: 960px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.footer { text-align: center; padding: 1rem; color: #718096; font-size: 0.8rem; }

h1 { font-size: 1.5rem; margin-bottom: 1.25rem; }
h2 { font-size: 1rem; margin-bottom: 0.75rem; color: #4a5568; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat {
    background: #fff;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.stat .label { font-size: 0.75rem; color: #718096; text-transform: uppercase; letter-spacing: 0.05em; }
.stat .value { font-size: 1.5rem; font-weight: 700; margin-top: 0.25rem; }
.stat .value.green { color: #38a169; }
.stat .value.red { color: #e53e3e; }
.stat .value.blue { color: #3182ce; }
.stat .value.orange { color: #dd6b20; }

.card {
    background: #fff;
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    margin-bottom: 1.25rem;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
th { text-align: left; padding: 0.5rem 0.75rem; border-bottom: 2px solid #e2e8f0; color: #718096; font-weight: 600; font-size: 0.75rem; text-transform: uppercase; }
td { padding: 0.6rem 0.75rem; border-bottom: 1px solid #f0f0f0; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f7fafc; }

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
}
.badge-low { background: #fed7d7; color: #c53030; }
.badge-ok { background: #c6f6d5; color: #276749; }

form .row { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
form .field { flex: 1; min-width: 140px; }
form label { display: block; font-size: 0.75rem; color: #718096; margin-bottom: 0.25rem; font-weight: 600; }
form input, form select, form textarea {
    width: 100%;
    padding: 0.45rem 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    background: #fff;
}
form input:focus, form select:focus { outline: none; border-color: #3182ce; box-shadow: 0 0 0 2px rgba(49,130,206,0.2); }

.btn {
    display: inline-block;
    padding: 0.45rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
}
.btn-primary { background: #3182ce; color: #fff; }
.btn-primary:hover { background: #2b6cb0; }
.btn-danger { background: #e53e3e; color: #fff; font-size: 0.75rem; padding: 0.3rem 0.6rem; }
.btn-danger:hover { background: #c53030; }
.btn-sm { font-size: 0.75rem; padding: 0.3rem 0.6rem; }

.alert { padding: 0.75rem 1rem; border-radius: 6px; margin-bottom: 1rem; font-size: 0.875rem; }
.alert-success { background: #c6f6d5; color: #276749; }
.alert-error { background: #fed7d7; color: #c53030; }

.actions { display: flex; gap: 0.5rem; align-items: center; }
.text-right { text-align: right; }
.text-muted { color: #a0aec0; font-size: 0.8rem; }
.mt-1 { margin-top: 0.75rem; }
