/* Component Styles - Include in all pages */
[x-cloak] { display: none !important; }
.sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: 16rem; background: white; border-right: 1px solid #e2e8f0; transform: translateX(-100%); transition: transform 0.3s; }
.sidebar.open { transform: translateX(0); }
@media (min-width: 1024px) { .sidebar { transform: none; position: fixed; } }
.sidebar-header { display: flex; align-items: center; gap: 0.75rem; padding: 0 1.5rem; height: 4rem; border-bottom: 1px solid #f1f5f9; }
.sidebar-logo { width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; background: linear-gradient(135deg, #4f46e5, #7c3aed); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 1.125rem; }
.sidebar-brand { font-weight: 700; font-size: 1.125rem; color: #0f172a; }
.sidebar-balance { padding: 0.75rem 1rem; background: linear-gradient(135deg, #059669, #047857); color: white; }
.sidebar-balance-label { font-size: 0.75rem; opacity: 0.8; }
.sidebar-balance-value { font-size: 1.125rem; font-weight: 700; }
.sidebar-nav { padding: 1rem; display: flex; flex-direction: column; gap: 0.25rem; }
.sidebar-nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; color: #475569; text-decoration: none; transition: all 0.15s; }
.sidebar-nav-item:hover { background: #f1f5f9; }
.sidebar-nav-item.active { background: #eef2ff; color: #4f46e5; }
.sidebar-nav-icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.sidebar-overlay { position: fixed; inset: 0; z-index: 30; background: rgba(15, 23, 42, 0.5); }
.topbar { position: sticky; top: 0; z-index: 20; background: white; border-bottom: 1px solid #e2e8f0; height: 4rem; display: flex; align-items: center; padding: 0 1rem; gap: 1rem; }
@media (min-width: 1024px) { .topbar { padding: 0 1.5rem; } }
.topbar-title { font-size: 1.125rem; font-weight: 600; color: #1e293b; }
.topbar-actions { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.main-wrapper { min-height: 100vh; }
.main-content { padding-bottom: 2rem; }
@media (min-width: 1024px) { .main-content { margin-left: 16rem; } }
.content-area { padding: 1rem; }
@media (min-width: 1024px) { .content-area { padding: 1.5rem; } }
.card { background: white; border-radius: 0.75rem; box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1); border: 1px solid rgba(226, 232, 240, 0.8); }
.card:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); }
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; justify-content: space-between; }
.card-header-title { font-size: 1rem; font-weight: 600; color: #0f172a; }
.card-body { padding: 1.25rem; }
.card-footer { padding: 1rem 1.25rem; border-top: 1px solid #f1f5f9; }
.stat-card { background: white; border-radius: 0.75rem; box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1); border: 1px solid rgba(226, 232, 240, 0.8); padding: 1.25rem; display: flex; align-items: center; gap: 1rem; }
.stat-icon { width: 3rem; height: 3rem; border-radius: 0.75rem; display: flex; align-items: center; justify-content: center; }
.stat-icon-primary { background: #e0e7ff; color: #4f46e5; }
.stat-icon-success { background: #d1fae5; color: #059669; }
.stat-icon-warning { background: #fef3c7; color: #d97706; }
.stat-icon-danger { background: #fee2e2; color: #dc2626; }
.stat-content { flex: 1; min-width: 0; }
.stat-label { font-size: 0.875rem; color: #64748b; }
.stat-value { font-size: 1.25rem; font-weight: 700; color: #0f172a; margin-top: 0.125rem; }
.grid-stats { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .grid-stats { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .grid-stats { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; } }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 1024px) { .grid-2 { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; } }
.grid-chart { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 1024px) { .grid-chart { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; } }
.badge { display: inline-flex; align-items: center; padding: 0.25rem 0.625rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 500; }
.badge-primary { background: #e0e7ff; color: #4338ca; }
.badge-success { background: #d1fae5; color: #047857; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }
.badge-muted { background: #f1f5f9; color: #475569; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.625rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; transition: all 0.2s; border: none; cursor: pointer; text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: #4f46e5; color: white; }
.btn-primary:hover { background: #4338ca; }
.btn-success { background: #059669; color: white; }
.btn-success:hover { background: #047857; }
.btn-danger { background: #dc2626; color: white; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { background: transparent; color: #475569; }
.btn-ghost:hover { background: #f1f5f9; }
.btn-outline { border: 1px solid #cbd5e1; color: #334155; background: white; }
.btn-outline:hover { background: #f8fafc; }
.btn-muted { background: #f1f5f9; color: #334155; }
.btn-muted:hover { background: #e2e8f0; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.75rem; border-radius: 0.375rem; }
.btn-lg { padding: 0.75rem 1.5rem; font-size: 1rem; border-radius: 0.75rem; }
.form-group { margin-bottom: 1rem; }
.form-label { display: block; font-size: 0.875rem; font-weight: 500; color: #334155; margin-bottom: 0.375rem; }
.form-input { width: 100%; padding: 0.625rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; color: #0f172a; background: #f8fafc; border: 1px solid #e2e8f0; transition: all 0.2s; box-sizing: border-box; }
.form-input::placeholder { color: #94a3b8; }
.form-input:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); background: white; }
.form-input:disabled { opacity: 0.6; cursor: not-allowed; background: #f1f5f9; }
.form-select { width: 100%; padding: 0.625rem 2.5rem 0.625rem 1rem; border-radius: 0.5rem; font-size: 0.875rem; color: #0f172a; background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") no-repeat right 0.75rem center; background-size: 1.25rem; border: 1px solid #e2e8f0; appearance: none; transition: all 0.2s; box-sizing: border-box; }
.form-select:focus { outline: none; border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1); background-color: white; }
.form-helper { font-size: 0.75rem; color: #64748b; margin-top: 0.25rem; }
.form-error { font-size: 0.75rem; color: #dc2626; margin-top: 0.25rem; }
.table-wrapper { overflow-x: auto; }
.table { width: 100%; font-size: 0.875rem; text-align: left; }
.table thead { background: #f8fafc; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: #64748b; font-weight: 600; }
.table th { padding: 0.75rem 1rem; font-weight: 600; color: #475569; }
.table td { padding: 0.875rem 1rem; border-top: 1px solid #f1f5f9; }
.table tbody tr { transition: background-color 0.15s; }
.table tbody tr:hover { background-color: rgba(248, 250, 252, 0.5); }
.table tbody tr:last-child td { border-bottom: none; }
.pagination { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-top: 1px solid #f1f5f9; }
.pagination-info { font-size: 0.875rem; color: #64748b; }
.pagination-controls { display: flex; align-items: center; gap: 0.5rem; }
.pagination-btn { padding: 0.375rem 0.75rem; border-radius: 0.5rem; font-size: 0.875rem; font-weight: 500; border: 1px solid #e2e8f0; color: #475569; background: white; cursor: pointer; }
.pagination-btn:hover { background: #f8fafc; }
.pagination-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.filter-bar { background: white; border-radius: 0.75rem; box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1); border: 1px solid rgba(226, 232, 240, 0.8); padding: 1rem; margin-bottom: 1.5rem; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.filter-item { flex: 1; min-width: 200px; }
.filter-actions { display: flex; align-items: center; gap: 0.5rem; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem 0; text-align: center; }
.empty-state-icon { width: 4rem; height: 4rem; border-radius: 9999px; background: #f1f5f9; display: flex; align-items: center; justify-content: center; font-size: 1.875rem; color: #94a3b8; margin-bottom: 1rem; }
.empty-state-title { font-size: 1rem; font-weight: 500; color: #334155; margin-bottom: 0.25rem; }
.empty-state-description { font-size: 0.875rem; color: #64748b; max-width: 24rem; }
.alert { border-radius: 0.5rem; padding: 1rem; display: flex; align-items: flex-start; gap: 0.75rem; }
.alert-info { background: #eef2ff; border: 1px solid #c7d2fe; color: #4338ca; }
.alert-success { background: #d1fae5; border: 1px solid #a7f3d0; color: #047857; }
.alert-warning { background: #fef3c7; border: 1px solid #fde68a; color: #b45309; }
.alert-danger { background: #fee2e2; border: 1px solid #fecaca; color: #b91c1c; }
.alert-icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; margin-top: 0.125rem; }
.tabs { display: flex; border-bottom: 1px solid #e2e8f0; margin-bottom: -1px; }
.tab { padding: 0.75rem 1rem; font-size: 0.875rem; font-weight: 500; color: #64748b; border-bottom: 2px solid transparent; cursor: pointer; transition: all 0.15s; }
.tab:hover { color: #334155; border-color: #cbd5e1; }
.tab.active { color: #4f46e5; border-color: #4f46e5; }
.divide-y > * + * { border-top: 1px solid #f1f5f9; }
.text-mono { font-family: ui-monospace, monospace; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
@media (max-width: 640px) { .card-body { padding: 1rem; } .card-header { padding: 0.75rem 1rem; } .filter-bar { padding: 0.75rem; } .filter-item { min-width: 100%; } }
@media print { .sidebar, .topbar, .toast-container { display: none !important; } .main-content { margin-left: 0 !important; } body { background: white !important; } .card { box-shadow: none !important; border: 1px solid #ddd !important; } }

/* Modal */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(15, 23, 42, 0.5); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-content { background: white; border-radius: 0.75rem; box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1); max-width: 32rem; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-bottom: 1px solid #f1f5f9; }
.modal-title { font-size: 1rem; font-weight: 600; color: #0f172a; }
.modal-body { padding: 1.25rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: 0.5rem; padding: 0.75rem 1.25rem; border-top: 1px solid #f1f5f9; background: #f8fafc; border-bottom-left-radius: 0.75rem; border-bottom-right-radius: 0.75rem; }

/* Breadcrumbs */
.breadcrumbs { display: flex; align-items: center; gap: 0.375rem; font-size: 0.875rem; color: #64748b; }
.breadcrumbs a { color: #64748b; text-decoration: none; }
.breadcrumbs a:hover { color: #334155; }
.breadcrumbs-sep { color: #cbd5e1; }
.breadcrumbs-current { color: #0f172a; font-weight: 600; }

/* Icon circle (avatar/icon container) */
.icon-circle { display: flex; align-items: center; justify-content: center; border-radius: 9999px; flex-shrink: 0; }
.icon-circle-sm { width: 2rem; height: 2rem; }
.icon-circle-md { width: 3rem; height: 3rem; }
.icon-circle-lg { width: 4rem; height: 4rem; }
.icon-circle-xl { width: 6rem; height: 6rem; }
.icon-circle-primary { background: #e0e7ff; color: #4f46e5; }
.icon-circle-success { background: #d1fae5; color: #059669; }
.icon-circle-warning { background: #fef3c7; color: #d97706; }
.icon-circle-danger { background: #fee2e2; color: #dc2626; }
.icon-circle-muted { background: #f1f5f9; color: #64748b; }

/* Button icon (square icon-only button) */
.btn-icon { padding: 0.5rem; width: 2.25rem; height: 2.25rem; }

/* Sidebar gradient balance (member) */
.sidebar-balance-gradient { padding: 0.75rem 1rem; margin: 0.75rem; border-radius: 0.75rem; background: linear-gradient(135deg, #059669, #047857); color: white; }
.sidebar-balance-gradient .sidebar-balance-label { font-size: 0.75rem; opacity: 0.85; }
.sidebar-balance-gradient .sidebar-balance-value { font-size: 1.25rem; font-weight: 700; margin-top: 0.125rem; }