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

body {
    min-height: 100vh;
    overflow: hidden;
    background-color: #004566;
    font-family: Arial, sans-serif;
    color: #ffffff;
}

/* ── 1080p Desktop (Ubiquiti Connect) ──────────────────────────── */

.dashboard {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    grid-template-rows: 1fr auto;
    gap: 24px;
    padding: 32px;
    height: calc(100vh - 64px);
}

/* Kort */
.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.card h2 {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 500;
}

/* Backlog (stort tal) */
.card-backlog {
    justify-content: center;
    align-items: center;
}

.hero-number {
    font-size: 16rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1;
}

.oldest-order {
    margin-top: 8px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1px;
}

/* Statuskort (undre raden, 4 st) */
.card-status {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}

.card-status h2 {
    margin-bottom: 0;
    font-size: 1.1rem;
}

.status-number {
    font-size: 2.8rem;
    font-weight: 700;
}

/* Diagram */
.card-chart {
    display: flex;
    flex-direction: column;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-header h2 {
    margin-bottom: 0;
}

.legend {
    display: flex;
    gap: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

.dot-created { background: #4fc3f7; }
.dot-fulfilled { background: #66bb6a; }

.chart-container {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 3px;
    padding-top: 8px;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.bar-value {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
    min-height: 1em;
}

.bar-pair {
    display: flex;
    gap: 2px;
    align-items: flex-end;
    width: 100%;
    flex: 1;
}

.bar {
    flex: 1;
    border-radius: 3px 3px 0 0;
    min-height: 2px;
}

.bar-created { background: #4fc3f7; }
.bar-fulfilled { background: #66bb6a; }

.bar-label {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 4px;
}

/* Footer */
footer {
    height: 64px;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#last-updated {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.4);
}

.logo {
    height: 40px;
}

/* ── Mobil ──────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
    body {
        overflow: auto;
    }

    .dashboard {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
        padding: 16px;
        gap: 12px;
    }

    .card {
        padding: 16px;
        border-radius: 12px;
    }

    .card h2 {
        font-size: 1rem;
    }

    .hero-number {
        font-size: 6rem;
    }

    .card-backlog {
        padding: 24px 16px;
    }

    .card-chart {
        min-height: 300px;
    }

    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .bar-value {
        font-size: 0.55rem;
    }

    .bar-label {
        font-size: 0.5rem;
    }

    .card-status {
        padding: 12px 16px;
    }

    .card-status h2 {
        font-size: 0.9rem;
    }

    .status-number {
        font-size: 2rem;
    }

    footer {
        height: 48px;
        padding: 0 16px;
    }

    .logo {
        height: 28px;
    }

    #last-updated {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .hero-number {
        font-size: 4rem;
    }

    .card-chart {
        min-height: 200px;
    }

    .status-number {
        font-size: 1.6rem;
    }
}
