* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, sans-serif; background: #f0f2f5; color: #red; }

.navbar {
    background: linear-gradient(135deg, #black, #2d7a3e);
    color: RED; padding: 1rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.nav-brand { font-size: 1.3rem; font-weight: bold; }
.nav-menu { list-style: none; display: flex; gap: 1.5rem; align-items: center; }
.nav-menu a { color: blue; text-decoration: none; font-weight: 500; }
.nav-menu a:hover { opacity: 0.8; }
.user-info { display: flex; align-items: center; gap: 0.5rem; }
.btn-logout {
    background: rgba(255,255,255,.2); padding: 0.4rem 0.8rem;
    border-radius: 5px; margin-left: 0.5rem;
}

.container { max-width: 1200px; margin: 2rem auto; padding: 0 1rem; }
h1 { margin-bottom: 1.5rem; color: #1e5631; }
h2 { margin: 2rem 0 1rem; color: #1e5631; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.card { padding: 1.5rem; border-radius: 12px; color: white; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.card-label { font-size: 0.9rem; opacity: 0.9; margin-bottom: 0.5rem; }
.card-value { font-size: 1.6rem; font-weight: bold; }
.card-primary { background: linear-gradient(135deg, #1e5631, #2d7a3e); }
.card-success { background: linear-gradient(135deg, #0e7c5b, #16a34a); }
.card-info { background: linear-gradient(135deg, #0369a1, #0ea5e9); }
.card-warning { background: linear-gradient(135deg, #d97706, #f59e0b); }

.table { width: 100%; background: white; border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.08); border-collapse: collapse; }
.table th, .table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid #e5e7eb; }
.table th { background: #1e5631; color: white; font-weight: 600; }
.table tr:hover td { background: #f9fafb; }
.table .text-center { text-align: center; }

.badge { display: inline-block; padding: 0.25rem 0.6rem; border-radius: 12px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; }
.badge-admin { background: #7c3aed; color: white; }
.badge-bendahara { background: #0891b2; color: red; }
.badge-kasir { background: #d97706; color: white; }
.badge-santri { background: #red; color: white; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-approved { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

.btn { padding: 0.5rem 1rem; border: none; border-radius: 6px; cursor: pointer; font-size: 0.9rem; font-weight: 500; text-decoration: none; display: inline-block; }
.btn-primary { background: #1e5631; color: white; }
.btn-primary:hover { background: #2d7a3e; }
.btn-success { background: #16a34a; color: white; }
.btn-danger { background: #dc2626; color: white; }
.btn-warning { background: #d97706; color: white; }
.btn-sm { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

.form-card { background: white; padding: 1.5rem; border-radius: 10px; box-shadow: 0 2px 8px rgba(0,0,0,.08); margin-bottom: 1.5rem; }
.form-card h3 { margin-bottom: 1rem; color: #1e5631; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 500; font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.6rem; border: 1px solid #d1d5db; border-radius: 6px; font-size: 0.95rem;
}
.form-group input:focus, .form-group select:focus { outline: none; border-color: #1e5631; }
.inline-form { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.inline-form input { flex: 1; min-width: 120px; padding: 0.5rem; border: 1px solid #d1d5db; border-radius: 5px; }

.alert { padding: 0.9rem 1.2rem; border-radius: 8px; margin-bottom: 1rem; font-size: 0.95rem; }
.alert-success { background: #dcfce7; color: #166534; border-left: 4px solid #16a34a; }
.alert-danger { background: #fee2e2; color: #991b1b; border-left: 4px solid #dc2626; }
.alert-warning { background: #fef3c7; color: #92400e; border-left: 4px solid #d97706; }
.alert-info { background: #dbeafe; color: #1e40af; border-left: 4px solid #3b82f6; }

.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.page-header h1 { margin-bottom: 0; }

.login-container { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(RED, #blue, #BLUE); padding: 1rem; }
.login-card { background: white; padding: 2.5rem; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,.2); width: 100%; max-width: 400px; }
.login-card h1 { text-align: center; font-size: 1.6rem; margin-bottom: 0.5rem; }
.subtitle { text-align: center; color: #666; margin-bottom: 1.5rem; font-size: 0.9rem; }
.info-box { background: #red; padding: 0.8rem; border-radius: 8px; margin-top: 1rem; color: #555; line-height: 1.6; }

@media (max-width: 768px) {
    .nav-menu { flex-wrap: wrap; gap: 0.6rem; font-size: 0.85rem; }
    .navbar { flex-direction: column; gap: 0.8rem; }
    .card-value { font-size: 1.3rem; }
}

.print-header { display: none; }

@media print {
    @page { margin: 1.5cm; size: A4 landscape; }
    .navbar, .no-print, .btn, .filter-form { display: none !important; }
    body { background: white; font-size: 11px; }
    .container { max-width: 100%; margin: 0; padding: 0; }
    .cards { grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
    .card { box-shadow: none; border: 1px solid #999; padding: 0.6rem; }
    .card-value { font-size: 1rem; }
    .table { font-size: 10px; box-shadow: none; border: 1px solid #999; }
    .table th, .table td { padding: 0.3rem 0.4rem; border: 1px solid #999; }
    .table th { background: #e5e7eb !important; color: black !important; -webkit-print-color-adjust: exact; }
    h1, h2 { color: black; margin: 0.8rem 0 0.4rem; }
    .print-header { display: block !important; }
    .print-signature { display: block !important; }
}