@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --accent: #246BCE;
    --accent-dim: #1a518f;
    --accent-glow: rgba(36,107,206,0.18);
    --bg: #0b0d10;
    --surface: #12151a;
    --surface2: #1a1e26;
    --border: rgba(255,255,255,0.07);
    --text: #f0f2f5;
    --muted: #8891a0;
    --radius: 12px;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    background-image: 
        linear-gradient(rgba(36, 107, 206, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(36, 107, 206, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    min-height: 100vh;
    color: var(--text);
}

.toolbar-frame {
    width: 100%;
    height: 70px;
    border: none;
    display: block;
    background: transparent;
}

.dashboard {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h1 {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
    font-family: 'Syne', sans-serif;
}

.subtitle {
    color: var(--muted);
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: rgba(36, 107, 206, 0.3);
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    stroke-width: 2;
}

.stat-icon.blue {
    background: rgba(36, 107, 206, 0.15);
}

.stat-icon.blue svg {
    stroke: var(--accent);
}

.stat-icon.green {
    background: rgba(36, 107, 206, 0.15);
}

.stat-icon.green svg {
    stroke: var(--accent);
}

.stat-icon.orange {
    background: rgba(239, 159, 39, 0.15);
}

.stat-icon.orange svg {
    stroke: #ef9f27;
}

.stat-icon.purple {
    background: rgba(36, 107, 206, 0.15);
}

.stat-icon.purple svg {
    stroke: var(--accent);
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
    margin-bottom: 6px;
    font-family: 'Syne', sans-serif;
}

.stat-label {
    color: var(--muted);
    font-size: 13px;
    font-family: 'DM Sans', sans-serif;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.dashboard-card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
}

.dashboard-card.full-width {
    grid-column: 1 / -1;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    font-family: 'Syne', sans-serif;
}

.view-all {
    color: var(--accent);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s ease;
    font-family: 'DM Sans', sans-serif;
}

.view-all:hover {
    opacity: 0.7;
}

.card-content {
    padding: 20px;
}

.alerts-list,
.staff-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item,
.staff-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--surface2);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.alert-item:hover,
.staff-item:hover {
    border-color: rgba(36, 107, 206, 0.3);
}

.alert-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.alert-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.alert-icon.critical {
    background: rgba(226, 75, 74, 0.15);
}

.alert-icon.critical svg {
    stroke: #e24b4a;
}

.alert-icon.high {
    background: rgba(239, 159, 39, 0.15);
}

.alert-icon.high svg {
    stroke: #ef9f27;
}

.alert-icon.medium {
    background: rgba(239, 159, 39, 0.15);
}

.alert-icon.medium svg {
    stroke: #e5a000;
}

.alert-icon.low {
    background: rgba(36, 107, 206, 0.15);
}

.alert-icon.low svg {
    stroke: var(--accent);
}

.alert-info {
    flex: 1;
}

.alert-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    font-family: 'Syne', sans-serif;
}

.alert-meta {
    font-size: 12px;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
}

.staff-avatar {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.staff-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-info {
    flex: 1;
}

.staff-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    font-family: 'Syne', sans-serif;
}

.staff-stats {
    font-size: 12px;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
}

.staff-score {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-bar {
    width: 80px;
    height: 6px;
    background: #2a2a2a;
    border-radius: 3px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.score-fill.low {
    background: var(--accent);
}

.score-fill.medium {
    background: #ef9f27;
}

.score-fill.high {
    background: #e24b4a;
}

.score-value {
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    min-width: 35px;
    text-align: right;
    font-family: 'Syne', sans-serif;
}

.distribution-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    padding: 20px 0;
    gap: 12px;
}

.distribution-bar {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.distribution-fill {
    width: 100%;
    max-width: 80px;
    background: linear-gradient(to top, var(--accent), var(--accent-dim));
    border-radius: 8px 8px 0 0;
    transition: height 0.3s ease;
    position: relative;
    overflow: hidden;
}

.distribution-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.distribution-label {
    font-size: 12px;
    color: var(--muted);
    font-family: 'DM Sans', sans-serif;
    text-align: center;
}

.distribution-count {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    font-family: 'Syne', sans-serif;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--muted);
}

.empty-state svg {
    width: 48px;
    height: 48px;
    stroke: #444;
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
}
