* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #f4f6f9;
    color: #222;
}
.navbar {
    background: #1e4620;
    color: #fff;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.navbar-brand { font-weight: bold; font-size: 1.1rem; }
.navbar-menu { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.navbar-menu a { color: #fff; text-decoration: none; font-size: 0.9rem; }
.navbar-menu a:hover { text-decoration: underline; }
.navbar-user { font-size: 0.85rem; opacity: 0.9; }
.btn-logout { background: #a33; padding: 5px 10px; border-radius: 4px; }

.container { max-width: 1100px; margin: 20px auto; padding: 0 16px; }

h1 { color: #1e4620; }

.stat-cards { display: flex; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.stat-card {
    background: #fff; border-radius: 8px; padding: 16px 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1); text-align: center;
}
.stat-number { display: block; font-size: 1.8rem; font-weight: bold; color: #1e4620; }
.stat-label { font-size: 0.85rem; color: #666; }
.stat-warning .stat-number { color: #c0392b; }

.filter-form {
    display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px;
    background: #fff; padding: 14px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.filter-form input, .filter-form select {
    padding: 8px; border: 1px solid #ccc; border-radius: 4px; font-size: 0.9rem;
}

.table-wrapper { overflow-x: auto; background: #fff; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.1); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid #eee; text-align: left; font-size: 0.9rem; }
.table th { background: #f0f2f5; }
.text-center { text-align: center; }
.text-muted { color: #888; }

.qr-thumb { width: 44px; height: 44px; }
.badge { padding: 3px 10px; border-radius: 12px; font-size: 0.78rem; color: #fff; }
.badge-ok { background: #2e7d32; }
.badge-warn { background: #c0392b; }

.actions { display: flex; gap: 6px; }
.btn-icon { text-decoration: none; font-size: 1.1rem; }

.btn {
    display: inline-block; padding: 9px 18px; border-radius: 6px; text-decoration: none;
    font-size: 0.9rem; cursor: pointer; border: none;
}
.btn-primary { background: #1e4620; color: #fff; }
.btn-secondary { background: #3f7a43; color: #fff; }
.btn-outline { background: #fff; color: #1e4620; border: 1px solid #1e4620; }
.btn-danger { color: #c0392b; }

.form-card, .detail-card {
    background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    max-width: 700px;
}
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-group { flex: 1; min-width: 200px; margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 4px; font-size: 0.85rem; font-weight: bold; color: #333; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 9px; border: 1px solid #ccc; border-radius: 4px; font-size: 0.9rem;
}

.detail-header { display: flex; justify-content: space-between; align-items: center; }
.detail-table { width: 100%; margin-top: 12px; }
.detail-table th { text-align: left; padding: 8px; width: 160px; color: #555; vertical-align: top; }
.detail-table td { padding: 8px; }
.detail-qr { text-align: center; margin-top: 16px; }
.detail-actions { margin-top: 20px; display: flex; gap: 10px; flex-wrap: wrap; }

.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-danger { background: #fdecea; color: #c0392b; border: 1px solid #f5c6cb; }

.info-box {
    background: #eef6ff; border: 1px solid #cfe3ff; padding: 14px; border-radius: 6px;
    margin-bottom: 16px; font-size: 0.88rem;
}

.login-page { display: flex; align-items: center; justify-content: center; height: 100vh; background: #1e4620; }
.login-box { background: #fff; padding: 32px; border-radius: 10px; width: 320px; text-align: center; }
.login-box h1 { font-size: 1.3rem; }
.login-box form { text-align: left; margin-top: 16px; }
.login-box label { font-size: 0.85rem; font-weight: bold; }
.login-box input { width: 100%; padding: 9px; margin: 6px 0 14px; border: 1px solid #ccc; border-radius: 4px; }
.login-box .btn { width: 100%; }
.login-box .hint { font-size: 0.75rem; color: #999; margin-top: 14px; }

.inline-form { display: inline-flex; gap: 8px; }
.inline-form input { padding: 9px; border: 1px solid #ccc; border-radius: 4px; }

.footer { text-align: center; padding: 20px; color: #888; font-size: 0.8rem; }

@media (max-width: 600px) {
    .navbar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .form-row { flex-direction: column; }
}
