:root {
    --hc-bg: #f4f6fb;
    --hc-surface: #ffffff;
    --hc-primary: #0d6efd;
    --hc-primary-700: #0a58ca;
    --hc-sidebar-bg: #0f172a;
    --hc-sidebar-text: #cbd5e1;
    --hc-sidebar-active: #1e293b;
    --hc-border: #e5e7eb;
    --hc-text: #0f172a;
    --hc-muted: #64748b;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--hc-bg); color: var(--hc-text); }

.hc-shell { display: flex; min-height: 100vh; }
.hc-sidebar { width: 260px; background: var(--hc-sidebar-bg); color: var(--hc-sidebar-text); padding: 20px 14px; flex-shrink: 0; }
.hc-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.hc-header { height: 60px; background: var(--hc-surface); border-bottom: 1px solid var(--hc-border); display: flex; align-items: center; justify-content: space-between; padding: 0 24px; }
.hc-header-title { font-size: 1.05rem; }

.hc-content { padding: 24px; }

.hc-brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.15rem; padding: 8px 6px 20px; border-bottom: 1px solid #1e293b; margin-bottom: 14px; }
.hc-brand i { color: #ef4444; }

.hc-nav { display: flex; flex-direction: column; gap: 4px; }
.hc-nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; color: var(--hc-sidebar-text); text-decoration: none; border-radius: 8px; font-size: 0.95rem; transition: background .15s, color .15s; }
.hc-nav-item i { width: 18px; text-align: center; }
.hc-nav-item:hover { background: var(--hc-sidebar-active); color: #fff; }
.hc-nav-item.active { background: var(--hc-primary); color: #fff; }
.hc-nav-section { margin-top: 20px; padding: 6px 12px; color: #64748b; font-size: .75rem; text-transform: uppercase; letter-spacing: 1px; }

.hc-card { background: var(--hc-surface); border: 1px solid var(--hc-border); border-radius: 12px; padding: 20px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.hc-card + .hc-card { margin-top: 16px; }
.hc-page-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 4px; }
.hc-page-subtitle { color: var(--hc-muted); margin: 0 0 20px; }

.hc-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }

.hc-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.hc-stat { background: var(--hc-surface); border: 1px solid var(--hc-border); border-radius: 12px; padding: 18px; display: flex; align-items: center; gap: 14px; }
.hc-stat-icon { width: 44px; height: 44px; border-radius: 10px; background: #e7f1ff; color: var(--hc-primary); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.hc-stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.hc-stat-label { color: var(--hc-muted); font-size: .85rem; }

.hc-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.hc-badge-primary { background: #dbeafe; color: #1d4ed8; }
.hc-badge-success { background: #dcfce7; color: #166534; }
.hc-badge-warning { background: #fef3c7; color: #854d0e; }
.hc-badge-danger { background: #fee2e2; color: #991b1b; }
.hc-badge-secondary { background: #e2e8f0; color: #334155; }

.hc-modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; z-index: 1050; }
.hc-modal { background: #fff; border-radius: 12px; width: min(640px, 92vw); max-height: 90vh; overflow: auto; }
.hc-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--hc-border); }
.hc-modal-body { padding: 20px; }
.hc-modal-footer { padding: 14px 20px; border-top: 1px solid var(--hc-border); display: flex; justify-content: flex-end; gap: 8px; }

.hc-loader { display: flex; align-items: center; gap: 10px; color: var(--hc-muted); padding: 24px; justify-content: center; }
.hc-spinner { width: 22px; height: 22px; border: 3px solid #e2e8f0; border-top-color: var(--hc-primary); border-radius: 50%; animation: hc-spin .9s linear infinite; }
@keyframes hc-spin { to { transform: rotate(360deg); } }

.hc-alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; border: 1px solid transparent; display: flex; align-items: flex-start; gap: 10px; }
.hc-alert-info { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.hc-alert-success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.hc-alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.hc-alert-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.hc-table { width: 100%; border-collapse: collapse; }
.hc-table th, .hc-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hc-border); font-size: .92rem; }
.hc-table th { background: #f8fafc; font-weight: 600; color: #334155; }
.hc-table tbody tr:hover { background: #f8fafc; }

.form-label { font-weight: 500; font-size: .9rem; }
.btn { border-radius: 8px; }
#blazor-error-ui { background: #fee2e2; bottom: 0; box-shadow: 0 -1px 2px rgba(0,0,0,.2); display: none; left: 0; padding: 10px 20px; position: fixed; width: 100%; z-index: 1000; color: #7f1d1d; }
#blazor-error-ui .dismiss { cursor: pointer; position: absolute; right: 12px; top: 6px; }
