/* National ID System - Custom Styles */
* { box-sizing: border-box; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }

/* Status Badge Colors */
.badge { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }
.badge-draft        { background: #e5e7eb; color: #374151; }
.badge-submitted    { background: #dbeafe; color: #1d4ed8; }
.badge-panel_review { background: #fef3c7; color: #d97706; }
.badge-panel_rejected { background: #fee2e2; color: #dc2626; }
.badge-mayor_review { background: #fde68a; color: #92400e; }
.badge-mayor_rejected { background: #fee2e2; color: #dc2626; }
.badge-approved     { background: #d1fae5; color: #065f46; }
.badge-payment_pending { background: #ede9fe; color: #7c3aed; }
.badge-payment_done { background: #d1fae5; color: #065f46; }
.badge-printing     { background: #cffafe; color: #0e7490; }
.badge-completed    { background: #d1fae5; color: #065f46; }
.badge-cancelled    { background: #f3f4f6; color: #6b7280; }
.badge-expired      { background: #fee2e2; color: #dc2626; }
.badge-active       { background: #d1fae5; color: #065f46; }
.badge-under_review { background: #fef3c7; color: #d97706; }
.badge-rejected     { background: #fee2e2; color: #dc2626; }
.badge-printed      { background: #d1fae5; color: #065f46; }
.badge-inactive     { background: #f3f4f6; color: #6b7280; }
.badge-paid         { background: #d1fae5; color: #065f46; }
.badge-revoked      { background: #fee2e2; color: #dc2626; }
.badge-lost         { background: #fef3c7; color: #d97706; }

/* Sidebar */
.sidebar { transition: transform 0.3s ease; }
.sidebar-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 8px; cursor: pointer; transition: all 0.2s; color: #94a3b8; font-size: 0.875rem; }
.sidebar-item:hover { background: rgba(255,255,255,0.1); color: white; }
.sidebar-item.active { background: rgba(255,255,255,0.2); color: white; font-weight: 600; }
.sidebar-item i { width: 18px; text-align: center; font-size: 0.875rem; }
.sidebar-group-label { padding: 12px 14px 4px; font-size: 0.65rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: #4a6fa5; }

/* Card */
.card { background: white; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* Table */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { background: #f8fafc; padding: 12px 16px; text-align: left; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; border-bottom: 1px solid #e2e8f0; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; font-size: 0.875rem; color: #334155; vertical-align: middle; }
.tbl tr:hover td { background: #f8fafc; }
.tbl tr:last-child td { border-bottom: none; }

/* Form */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 0.8rem; font-weight: 600; color: #374151; margin-bottom: 4px; }
.form-input { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.875rem; outline: none; transition: border-color 0.2s; }
.form-input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.1); }
.form-select { width: 100%; padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 0.875rem; background: white; outline: none; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 8px; font-size: 0.875rem; font-weight: 600; cursor: pointer; border: none; transition: all 0.2s; }
.btn-primary { background: #2563eb; color: white; }
.btn-primary:hover { background: #1d4ed8; }
.btn-success { background: #16a34a; color: white; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: #d97706; color: white; }
.btn-warning:hover { background: #b45309; }
.btn-secondary { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-sm { padding: 4px 10px; font-size: 0.8rem; }
.btn-xs { padding: 2px 8px; font-size: 0.75rem; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: white; border-radius: 16px; max-width: 700px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid #e2e8f0; display: flex; align-items: center; justify-content: space-between; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid #e2e8f0; display: flex; justify-content: flex-end; gap: 8px; }

/* Timeline */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 0; bottom: 0; width: 2px; background: #e2e8f0; }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-dot { position: absolute; left: -28px; width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; }
.timeline-dot.completed { background: #16a34a; color: white; }
.timeline-dot.pending { background: #e2e8f0; color: #94a3b8; }
.timeline-dot.rejected { background: #dc2626; color: white; }
.timeline-dot.current { background: #2563eb; color: white; }

/* Dashboard stats */
.stat-card { background: white; border-radius: 12px; padding: 20px; border-left: 4px solid; }
.stat-card.blue { border-color: #3b82f6; }
.stat-card.green { border-color: #16a34a; }
.stat-card.orange { border-color: #f59e0b; }
.stat-card.red { border-color: #ef4444; }
.stat-card.purple { border-color: #8b5cf6; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn 0.3s ease; }

/* Alert */
.alert { padding: 12px 16px; border-radius: 8px; font-size: 0.875rem; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.alert-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }

/* Login */
.login-bg { background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%); }

/* Tabs */
.tab { padding: 8px 16px; border-radius: 8px; cursor: pointer; font-size: 0.875rem; font-weight: 500; color: #64748b; }
.tab.active { background: #2563eb; color: white; }
.tab:hover:not(.active) { background: #f1f5f9; }

/* Receipt */
.receipt { border: 2px dashed #d1d5db; border-radius: 8px; padding: 20px; }

/* Pagination */
.page-btn { padding: 6px 12px; border: 1px solid #e2e8f0; border-radius: 6px; cursor: pointer; font-size: 0.8rem; }
.page-btn:hover { background: #f1f5f9; }
.page-btn.active { background: #2563eb; color: white; border-color: #2563eb; }

/* Print ID Card */
.id-card { width: 340px; height: 214px; border-radius: 12px; background: linear-gradient(135deg, #1e3a8a, #2563eb); color: white; padding: 16px; position: relative; overflow: hidden; font-family: monospace; }
.id-card::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: rgba(255,255,255,0.05); }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Loading */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; }
.spinner { width: 32px; height: 32px; border: 3px solid #e2e8f0; border-top-color: #3b82f6; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.empty-state { text-align: center; padding: 60px 20px; color: #94a3b8; }
.empty-state i { font-size: 3rem; margin-bottom: 12px; display: block; }

/* Red flag rows */
.row-rejected { background: #fff5f5 !important; }
.row-rejected td { color: #dc2626 !important; }

/* Print */
@media print {
  .no-print { display: none !important; }
  .print-only { display: block !important; }
}
