/* CSS STYLESHEET PBB DESA WANAKERTA XAMPP */
:root {
    --primary: #1e3a8a;
    --primary-hover: #1e40af;
    --secondary: #64748b;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --border: #e2e8f0;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background-color: var(--bg-main); color: var(--text-main); font-size: 14px; line-height: 1.5; }

/* Login Page */
.bg-login { background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%); display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-card { background: #fff; width: 100%; max-width: 420px; border-radius: 12px; padding: 30px; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.3); }
.login-header { text-align: center; margin-bottom: 25px; }
.logo-circle { width: 60px; height: 60px; background: #dbeafe; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 12px; }
.login-header h2 { font-size: 20px; color: var(--primary); }
.login-header p { font-size: 13px; color: var(--secondary); }
.login-demo-box { background: #f1f5f9; border-radius: 8px; padding: 12px; margin-top: 20px; font-size: 12px; }
.login-demo-box ul { margin-left: 20px; margin-top: 5px; }
.login-footer { text-align: center; margin-top: 20px; color: #94a3b8; font-size: 11px; }

/* Layout App */
.app-layout { display: flex; min-height: 100vh; }
.sidebar { width: 250px; background: #0f172a; color: #f8fafc; display: flex; flex-direction: column; position: fixed; height: 100vh; z-index: 100; }
.brand { padding: 20px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #1e293b; }
.brand-icon { font-size: 28px; }
.brand h3 { font-size: 16px; font-weight: bold; color: #f8fafc; }
.brand small { color: #94a3b8; font-size: 11px; }

.menu { flex: 1; padding: 15px 10px; overflow-y: auto; }
.menu a { display: flex; align-items: center; gap: 10px; padding: 10px 14px; color: #cbd5e1; text-decoration: none; border-radius: 8px; margin-bottom: 4px; font-weight: 500; }
.menu a:hover, .menu a.active { background: var(--primary); color: #ffffff; }

.user-info { padding: 15px; border-top: 1px solid #1e293b; background: #090d16; }
.btn-logout { margin-top: 8px; width: 100%; text-align: center; background: #334155; color: #fff; text-decoration: none; }

.content { margin-left: 250px; flex: 1; padding: 25px; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; }
.topbar h2 { font-size: 22px; color: var(--primary); }
.topbar p { color: var(--secondary); font-size: 13px; }

/* Cards & Grid */
.card { background: var(--bg-card); border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 20px; overflow: hidden; }
.card-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.card-header h3 { font-size: 16px; color: var(--text-main); }
.card-body { padding: 20px; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 20px; display: flex; align-items: center; gap: 15px; }
.stat-icon { width: 50px; height: 50px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.bg-blue { background: #dbeafe; }
.bg-green { background: #dcfce7; }
.bg-red { background: #fee2e2; }

.stat-label { font-size: 12px; color: var(--secondary); text-transform: uppercase; font-weight: 600; }
.stat-value { font-size: 22px; font-weight: 700; color: var(--text-main); }
.stat-sub { font-size: 12px; color: var(--secondary); }

/* Progress Bar */
.progress-bar-container { background: #e2e8f0; height: 16px; border-radius: 8px; overflow: hidden; }
.progress-bar { background: linear-gradient(90deg, #2563eb, #16a34a); height: 100%; transition: width 0.3s ease; }

/* Tables */
.table { width: 100%; border-collapse: collapse; text-align: left; }
.table th, .table td { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.table th { background: #f8fafc; font-weight: 600; color: #475569; font-size: 12px; text-transform: uppercase; }
.table tr:hover { background: #f1f5f9; }

/* Forms & Buttons */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 13px; }
.form-control { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; outline: none; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(30,58,138,0.1); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 6px; font-weight: 600; text-decoration: none; cursor: pointer; border: none; font-size: 13px; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: #fff; border: 1px solid var(--border); color: var(--text-main); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* Badges & Alerts */
.badge { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 11px; font-weight: bold; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #dbeafe; color: #1e40af; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-weight: 500; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Utilities */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.text-green { color: var(--success); }
.text-red { color: var(--danger); }
.text-blue { color: var(--primary); }
.text-bold { font-weight: bold; }
.text-center { text-align: center; }
.my-20 { margin-top: 20px; margin-bottom: 20px; }

/* Modal */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-content { background: #fff; border-radius: 12px; width: 100%; max-width: 550px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 20px; max-height: 70vh; overflow-y: auto; }
.modal-footer { padding: 16px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: #f8fafc; }
.close { font-size: 24px; cursor: pointer; color: var(--secondary); }
