/* =========================================================================
ADMIN DASHBOARD STYLES (css/admin.css)
========================================================================= */

body { background-color: var(--bg-body, #f4f4f5); margin: 0; padding: 0; font-family: 'Inter', system-ui, -apple-system, sans-serif; -webkit-font-smoothing: antialiased; }
.exec-header { background: var(--primary, #09090b); padding: 12px 32px; display: flex; justify-content: space-between; align-items: center; color: white; border-bottom: 1px solid rgba(255,255,255,0.1); position: sticky; top: 0; z-index: 100; }
.btn-header { background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1); color: white; padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; outline: none; cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; }
.btn-header:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.2); }
.btn-header.primary-action { background: var(--accent, #3b82f6); border-color: transparent; }
.btn-header.primary-action:hover { background: #2563eb; }
.main-layout { display: flex; flex-direction: column; gap: 24px; max-width: 1650px; margin: 0 auto; padding: 32px 24px; }

/* Login Screen */
.admin-login-wrapper { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: var(--bg-body, #f4f4f5); padding: 20px; }
.admin-login-card { background: var(--bg-surface, #ffffff); padding: 48px; border-radius: 24px; box-shadow: 0 20px 40px -10px rgba(0,0,0,0.05); width: 100%; max-width: 440px; border: 1px solid rgba(15, 23, 42, 0.05); }
.admin-login-header { text-align: center; margin-bottom: 32px; }
.admin-login-header svg { width: 56px; height: 56px; color: var(--accent, #3b82f6); margin-bottom: 20px; background: rgba(59, 130, 246, 0.08); padding: 12px; border-radius: 16px; }
.admin-login-header h2 { font-size: 24px; font-weight: 900; color: var(--text-main, #0f172a); margin: 0 0 8px 0; letter-spacing: -0.5px; }
.admin-login-header p { font-size: 14px; color: var(--text-muted, #64748b); font-weight: 500; margin: 0; }

/* Panels & Cards */
.panel { background: var(--bg-surface, #ffffff); border-radius: 16px; border: 1px solid rgba(15, 23, 42, 0.06); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.panel-header { padding: 20px 24px; border-bottom: 1px solid rgba(15, 23, 42, 0.04); display: flex; justify-content: space-between; align-items: center; }
.panel-title { font-size: 11px; font-weight: 800; color: var(--text-muted, #64748b); text-transform: uppercase; letter-spacing: 0.8px; margin: 0; }

.kpi-compact-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; width: 100%; }
.kpi-compact-card { background: var(--bg-surface, #ffffff); padding: 24px; border-radius: 16px; border: 1px solid rgba(15, 23, 42, 0.06); display: flex; flex-direction: column; align-items: flex-start; gap: 12px; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02); position: relative; overflow: hidden; min-width: 0; }
.kpi-header-row { display: flex; justify-content: space-between; width: 100%; align-items: flex-start; }
.kpi-compact-lbl { font-size: 12px; font-weight: 700; color: var(--text-muted, #64748b); }
.kpi-compact-icon { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, 0.04); }
.kpi-icon-success { color: #10b981; background: rgba(16, 185, 129, 0.1) !important; }
.kpi-icon-primary { color: #3b82f6; background: rgba(59, 130, 246, 0.1) !important; }
.kpi-icon-neutral { color: #64748b; background: rgba(100, 116, 139, 0.1) !important; }
.kpi-icon-danger { color: #f43f5e; background: rgba(244, 63, 94, 0.1) !important; }
.kpi-compact-val { font-size: 2.5rem; font-weight: 900; color: var(--text-main, #0f172a); line-height: 1; letter-spacing: -1.5px; }
.kpi-subtext { font-size: 12px; font-weight: 500; margin-top: auto; color: var(--text-muted, #64748b); }

.charts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; width: 100%; }
.native-chart-container { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; padding: 24px; flex: 1; max-height: 350px; }
.native-bar-row { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 8px; margin: -8px -12px; cursor: pointer; transition: background 0.2s; }
.native-bar-row:hover { background: var(--bg-body, #f4f4f5); }
.native-bar-label { width: 90px; font-size: 13px; font-weight: 700; color: var(--text-main, #0f172a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.native-bar-track-wrapper { flex: 1; }
.native-bar-track { width: 100%; height: 6px; background: var(--bg-body, #f4f4f5); border-radius: 99px; overflow: hidden; position: relative; }
.native-bar-fill { height: 100%; background: var(--accent, #3b82f6); border-radius: 99px; transition: width 1s cubic-bezier(0.16, 1, 0.3, 1); }
.native-bar-value { width: 50px; font-size: 12px; font-weight: 700; color: var(--text-muted, #64748b); font-family: monospace; text-align: right; }

.donut-container { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; padding: 32px 24px; flex: 1; }
.native-donut-wrapper { width: 200px; height: 200px; min-width: 200px; min-height: 200px; border-radius: 50%; position: relative; display: flex; align-items: center; justify-content: center; background-color: var(--bg-body, #e2e8f0); flex-shrink: 0; }
.native-donut-hole { width: 130px; height: 130px; background: var(--bg-surface, #ffffff); border-radius: 50%; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center-val { font-size: 32px; font-weight: 900; color: var(--text-main, #0f172a); line-height: 1; letter-spacing: -1.5px; }
.donut-center-lbl { font-size: 10px; font-weight: 800; color: var(--text-muted, #64748b); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
.native-donut-legend { display: flex; flex-direction: column; gap: 8px; width: 100%; padding: 0 20px; }

.native-stacked-container { padding: 24px; border-bottom: 1px solid rgba(244, 63, 94, 0.1); }
.native-stacked-track { width: 100%; height: 8px; background: var(--bg-body, #f4f4f5); border-radius: 99px; display: flex; overflow: hidden; margin-bottom: 20px; }
.native-stacked-segment { height: 100%; transition: width 1s cubic-bezier(0.16, 1, 0.3, 1); }
.native-legend-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.native-legend-item { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-muted, #64748b); }
.native-legend-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.alert-feed-container { padding: 16px 24px; overflow-y: auto; flex: 1; max-height: 250px; }

.progress-bg { width: 100%; height: 6px; background: var(--bg-body, #f4f4f5); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; border-radius: 99px; transition: width 0.8s ease; }
.area-group-header { background: #f8fafc; color: #475569; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; padding: 16px 32px !important; border-bottom: 1px solid rgba(0,0,0,0.03); border-top: 1px solid rgba(0,0,0,0.03); }
#standort-table th { padding: 16px 24px !important; font-size: 11px !important; border-bottom: 1px solid rgba(0,0,0,0.06); }
#standort-table td { padding: 20px 24px !important; font-size: 14px !important; border-bottom: 1px solid rgba(0,0,0,0.03); font-weight: 500; }
.matrix-row { transition: background-color 0.2s ease; background-color: var(--bg-surface, #ffffff); cursor: pointer; }
.matrix-row:hover { background-color: #f8fafc; }

.sortable-th { cursor: pointer; user-select: none; transition: color 0.2s; position: relative; }
.sortable-th:hover { color: var(--text-main, #0f172a); }
.sortable-th .sort-arrow { display: inline-block; margin-left: 6px; font-size: 10px; opacity: 0.3; }
.sortable-th.active-sort { color: var(--accent, #3b82f6); }
.sortable-th.active-sort .sort-arrow { opacity: 1; }
.ranking-row { transition: background 0.2s; border-bottom: 1px solid rgba(0,0,0,0.04); }
.ranking-row:hover { background: var(--bg-body, #f4f4f5); }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.15); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 1400px) { .charts-grid { grid-template-columns: 1fr; } .kpi-compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }