* {
    box-sizing: border-box;
}

:root {
    --background: #f3f5f8;
    --card: #ffffff;
    --text: #172033;
    --muted: #677084;
    --border: #e1e6ee;

    --green: #159447;
    --blue: #1267d6;
    --orange: #ee6c0b;
    --purple: #8b2dcc;

    --header-dark: #142033;
    --nav-blue: #294d7f;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

.header {
    background: var(--header-dark);
    color: white;
    box-shadow: 0 4px 14px rgba(20, 32, 51, 0.25);
}

.header-inner {
    max-width: 1180px;
    min-height: 90px;
    margin: auto;
    padding: 20px 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;

    font-size: 34px;
    font-weight: 700;
}

.brand-icon {
    font-size: 38px;
}

.version {
    font-size: 20px;
    font-weight: 600;
}

.navigation {
    min-height: 72px;
    background: var(--nav-blue);

    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-link {
    min-width: 190px;
    padding: 22px 26px;

    color: white;
    font-size: 19px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;

    border-bottom: 4px solid transparent;
    transition:
        background 0.2s,
        border-color 0.2s;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    border-bottom-color: #8aa8ff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.disabled {
    opacity: 0.55;
    pointer-events: none;
}

.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px 30px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.card {
    min-height: 385px;
    padding: 26px;

    background: var(--card);
    border: 1px solid rgba(225, 230, 238, 0.75);
    border-radius: 16px;

    box-shadow:
        0 7px 24px rgba(25, 37, 60, 0.09);

    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 12px 30px rgba(25, 37, 60, 0.14);
}

.card-heading {
    display: flex;
    align-items: center;
    gap: 18px;
}

.card h2 {
    margin: 0;
    font-size: 28px;
}

.subtitle {
    margin-top: 10px;
    font-size: 22px;
}

.icon-circle {
    width: 66px;
    height: 66px;
    flex: 0 0 66px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 31px;
    font-weight: bold;
}

.icon-green {
    background: #d9f5df;
    color: var(--green);
}

.icon-blue {
    background: #dceaff;
    color: var(--blue);
}

.icon-orange {
    background: #ffebcc;
    color: var(--orange);
}

.icon-purple {
    background: #eedcff;
    color: var(--purple);
}

.green {
    color: var(--green);
}

.blue {
    color: var(--blue);
}

.orange {
    color: var(--orange);
}

.purple {
    color: var(--purple);
}

.divider {
    height: 1px;
    margin: 28px 0;
    background: var(--border);
}

.info-label {
    color: var(--muted);
    font-size: 16px;
}

.info-value-small {
    margin-top: 8px;
    font-size: 17px;
    font-weight: 600;
    word-break: break-word;
}

.spacing-top {
    margin-top: 28px;
}

.status-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 7px 14px;

    background: var(--green);
    color: white;

    border-radius: 20px;

    font-size: 17px;
    font-weight: bold;
}

.large-number {
    margin-top: 6px;
    font-size: 34px;
    font-weight: 700;
}

.pickup-name {
    margin-top: 28px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.4;
}

.pickup-date {
    margin-top: 8px;

    color: var(--orange);

    font-size: 30px;
    font-weight: 700;
}

.pickup-days {
    margin-top: 8px;

    color: var(--orange);

    font-size: 23px;
    font-weight: 700;
}

.device-row {
    min-height: 42px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    font-size: 18px;
}

.device-row strong {
    font-size: 24px;
}

.muted-row {
    color: var(--muted);
    font-size: 15px;
}

.button {
    width: 100%;
    margin-top: 28px;
    padding: 14px 18px;

    display: block;

    border-radius: 9px;

    color: white;
    text-align: center;
    text-decoration: none;

    font-size: 17px;
    font-weight: 700;

    transition:
        filter 0.2s,
        transform 0.2s;
}

.button:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.button-purple {
    background: var(--purple);
}

.tool-list {
    margin-top: 28px;

    display: flex;
    flex-direction: column;
    gap: 13px;
}

.tool-button {
    width: 100%;
    padding: 13px 15px;

    border-radius: 8px;
    background: white;

    font-size: 16px;
    font-weight: 700;
    text-align: left;
    text-decoration: none;

    cursor: pointer;
}

.tool-green {
    color: var(--green);
    border: 1px solid var(--green);
}

.tool-blue {
    color: var(--blue);
    border: 1px solid var(--blue);
}

.tool-orange {
    color: var(--orange);
    border: 1px solid var(--orange);
}

.tool-dark {
    color: #404755;
    border: 1px solid #8992a1;
}

.tool-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.coming-soon {
    margin-top: 16px;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.4;
}

.api-list {
    margin-top: 28px;

    display: flex;
    flex-direction: column;
    gap: 14px;
}

.api-list a {
    padding: 15px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border: 1px solid var(--border);
    border-radius: 9px;

    color: var(--blue);
    text-decoration: none;
    font-size: 17px;
    font-weight: 700;

    transition:
        background 0.2s,
        border-color 0.2s;
}

.api-list a:hover {
    background: #f4f8ff;
    border-color: #accbff;
}

.footer {
    max-width: 1120px;
    margin: 10px auto 0;
    padding: 28px 20px 45px;

    border-top: 1px solid #cfd5df;

    color: var(--muted);
    text-align: center;
    line-height: 1.7;
}

/* Tablet */

@media (max-width: 950px) {
    .card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .brand {
        font-size: 28px;
    }
}

/* Handy */

@media (max-width: 650px) {
    .header-inner {
        padding: 18px;
        flex-direction: column;
        align-items: flex-start;
    }

    .brand {
        font-size: 25px;
    }

    .brand-icon {
        font-size: 30px;
    }

    .version {
        font-size: 16px;
    }

    .navigation {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-link {
        min-width: 0;
        padding: 16px 10px;
        font-size: 15px;
    }

    .container {
        padding: 25px 16px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        min-height: auto;
        padding: 22px;
    }

    .card h2 {
        font-size: 24px;
    }
}
.calendar-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.calendar-info-card,
.calendar-upload-card {
    min-height: 430px;
}

.calendar-stat {
    min-height: 52px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    border-bottom: 1px solid var(--border);
}

.calendar-stat span {
    color: var(--muted);
}

.calendar-stat strong {
    text-align: right;
}

.file-input {
    width: 100%;
    margin: 20px 0;
    padding: 14px;

    border: 1px solid var(--border);
    border-radius: 9px;

    background: #f8fafc;
}

.upload-button {
    width: 100%;
    padding: 15px;

    border: 0;
    border-radius: 9px;

    background: var(--green);
    color: white;

    font-size: 17px;
    font-weight: bold;
    cursor: pointer;
}

.upload-button:hover {
    filter: brightness(1.08);
}

.upload-hinweis {
    margin-top: 24px;
    padding: 15px;

    border-radius: 9px;

    background: #fff3cd;
    color: #664d03;

    line-height: 1.5;
}

.upload-meldung {
    margin-bottom: 25px;
    padding: 16px 20px;

    border-radius: 10px;
    font-weight: bold;
}

.upload-erfolg {
    background: #d9f5df;
    color: #116530;
}

.upload-fehler {
    background: #f8d7da;
    color: #842029;
}

@media (max-width: 800px) {
    .calendar-layout {
        grid-template-columns: 1fr;
    }
}
.button-blue {
    background: var(--blue);
}
.footer-credit {
    font-size: 13px;
    color: #7a8392;
}
.device-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 700;
}

.summary-online {
    color: var(--green);
}

.summary-offline {
    color: #c73535;
}

.device-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.device-entry {
    min-height: 62px;
    padding: 11px 13px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fafbfd;
}

.device-main {
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 12px;
}

.device-status-dot {
    width: 14px;
    height: 14px;
    flex: 0 0 14px;

    display: inline-block;
    border-radius: 50%;
}

.status-online {
    background: #20ae5a;
    box-shadow: 0 0 0 4px rgba(32, 174, 90, 0.13);
}

.status-offline {
    background: #d83b45;
    box-shadow: 0 0 0 4px rgba(216, 59, 69, 0.12);
}

.device-text {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 5px;
}

.device-text strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    font-size: 16px;
}

.device-text span {
    color: var(--muted);
    font-size: 13px;
}

.device-badge {
    flex: 0 0 auto;
    padding: 6px 10px;

    border-radius: 18px;

    font-size: 12px;
    font-weight: 700;
}

.badge-online {
    background: #daf4e3;
    color: #13763b;
}

.badge-offline {
    background: #f8dadd;
    color: #a32631;
}

.device-empty {
    padding: 20px;

    border: 1px dashed var(--border);
    border-radius: 10px;

    color: var(--muted);
    text-align: center;
}

.device-actions {
    margin-top: 22px;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.device-actions .button {
    margin-top: 0;
}

@media (max-width: 650px) {
    .device-entry {
        align-items: flex-start;
    }

    .device-actions {
        grid-template-columns: 1fr;
    }
}
