body {
    margin: 0;
    padding: 0;

    background: #0f1722;
    color: #f1f5f9;

    font-family: Arial, Helvetica, sans-serif;
}

header {
    background: #182433;
    padding: 20px;
    border-bottom: 3px solid #3b82f6;
}

header h1 {
    margin: 0;
    font-size: 36px;
}

header h2 {
    margin: 5px 0 0 0;
    color: #9fb7d7;
    font-weight: normal;
}

#status {
    float: right;
    margin-top: -45px;
    font-size: 20px;
    font-weight: bold;
}

.dashboard-status {
    text-align: right;
    font-size: 14px;
    color: #ccc;
    margin-bottom: 12px;
}

.dashboard-status span {
    margin-left: 10px;
}

.container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 20px;
}

.card {
    background: #182433;
    border-radius: 12px;
    padding: 20px;
    min-height: 220px;
    box-shadow: 0 0 18px rgba(0,0,0,.45);

    position: relative;
}

.card h3 {
    margin-top: 0;
    border-bottom: 1px solid #334155;
    padding-bottom: 10px;
}

/* -------------------------------------------------
   DATA STATUS INDICATORS
   ------------------------------------------------- */

.panel-status {
    position: absolute;
    top: 20px;
    right: 20px;

    width: 16px;
    height: 16px;

    border-radius: 50%;

    background: #22c55e;

    box-shadow:
        0 0 6px rgba(34,197,94,.8),
        0 0 12px rgba(34,197,94,.4);
}

/* Green - data 0 to 30 minutes old */
.panel-status.green {
    background: #22c55e;

    box-shadow:
        0 0 6px rgba(34,197,94,.8),
        0 0 12px rgba(34,197,94,.4);
}

/* Yellow - data 31 to 60 minutes old */
.panel-status.yellow {
    background: #facc15;

    box-shadow:
        0 0 6px rgba(250,204,21,.8),
        0 0 12px rgba(250,204,21,.4);
}

/* Red - data older than 60 minutes */
.panel-status.red {
    background: #ef4444;

    box-shadow:
        0 0 6px rgba(239,68,68,.8),
        0 0 12px rgba(239,68,68,.4);
}

/* Data age displayed inside a panel */

.data-age {
    margin-top: 10px;

    font-size: 12px;

    color: #94a3b8;

    text-align: right;
}

footer {
    text-align: center;
    color: #94a3b8;
    padding: 20px;
}

/* Panel status indicator */

.card {
    position: relative;
}

.panel-status {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34,197,94,.8);
}

.panel-status.green {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34,197,94,.8);
}

.panel-status.yellow {
    background: #facc15;
    box-shadow: 0 0 8px rgba(250,204,21,.8);
}

.panel-status.red {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239,68,68,.8);
}

/* Ensure panel status indicators are visible above card contents */
.panel-status {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    min-height: 16px !important;
    border-radius: 50% !important;
    display: block !important;
    z-index: 100 !important;
}

.panel-status.green {
    background: #22c55e !important;
    box-shadow: 0 0 8px rgba(34,197,94,.8) !important;
}

.panel-status.yellow {
    background: #facc15 !important;
    box-shadow: 0 0 8px rgba(250,204,21,.8) !important;
}

.panel-status.red {
    background: #ef4444 !important;
    box-shadow: 0 0 8px rgba(239,68,68,.8) !important;
}

/* Flight Operations table */
#flightOperations table {
    width: 100%;
    border-collapse: collapse;
    color: #f1f5f9;
}

#flightOperations th {
    color: #9fb7d7;
    text-align: left;
    padding: 6px 0;
}

#flightOperations td {
    color: #f1f5f9;
    padding: 5px 0;
}

#flightOperations td b {
    color: #ffffff;
}


/* Individual Raspberry Pi health indicators */

.pi-health-status {
    display: inline-block;
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.pi-health-status.green {
    background: #22c55e;
    box-shadow:
        0 0 6px rgba(34,197,94,.8),
        0 0 12px rgba(34,197,94,.4);
}

.pi-health-status.yellow {
    background: #facc15;
    box-shadow:
        0 0 6px rgba(250,204,21,.8),
        0 0 12px rgba(250,204,21,.4);
}

.pi-health-status.red {
    background: #ef4444;
    box-shadow:
        0 0 6px rgba(239,68,68,.8),
        0 0 12px rgba(239,68,68,.4);
}
