/* =========================
ASB Drohnenportal
Zentrale CSS Datei
========================= */

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

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f6f9;
    color: #222;
}

/* =========================
Sidebar
========================= */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 240px;
    height: 100vh;
    background: #20232a;
    color: #fff;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.2);

    display: flex;
    flex-direction: column;
}

.sidebar-header {
    background: #c00000;
    text-align: center;
    padding: 20px 15px;
}

.sidebar-header h2 {
    font-size: 28px;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 14px;
    opacity: .9;
}

/* Navigation */

.sidebar nav {
    flex: 1;
    padding: 15px 0;
}

.sidebar nav a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 15px 25px;
    transition: .2s;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: #c00000;
}

/* Benutzerbereich */

.userbox {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, .15);
    font-size: 14px;
    color: #ddd;
}

.userbox p {
    margin-bottom: 6px;
}

.userbox strong {
    display: block;
    color: #fff;
    font-size: 15px;
    margin-bottom: 12px;
}

.userbox a {
    display: block;
    text-align: center;
    background: #c00000;
    color: #fff;
    text-decoration: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: bold;
    transition: .2s;
}

.userbox a:hover {
    background: #a00000;
}

.sidebar-logo {
    width: 180px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: auto;
}

.asb-logo {
    font-size: 58px;
    color: #ffd400;
    -webkit-text-stroke: 1px #000;
    text-shadow: 1px 1px 0 #000;
}

/* =========================
Content
========================= */

.content {
    margin-left: 150px;
    padding: 25px;
}

/* =========================
Cards
========================= */

.card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.status-card {
    flex: 1;
    min-width: 260px;
}

/* =========================
Status Farben
========================= */

.online {
    color: #00a000;
    font-weight: bold;
}

.warning {
    color: #ff9900;
    font-weight: bold;
}

.offline {
    color: #d40000;
    font-weight: bold;
}

.fahrzeug-label {
    background: white;
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: bold;
    white-space: nowrap;
}

.status-box {
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    color: white;
    transition: 0.3s;
}

.status-green {
    background: #28a745;
}

.status-red {
    background: #dc3545;
}

.status-gray {
    background: #6c757d;
}

.status-yellow {
    background: #ffc107;
    color: #000;
}

.status-box h4 {
    margin-bottom: 10px;
    color: inherit;
}

.status-box span {
    font-size: 20px;
    color: inherit;
}

.vehicle-card {

    background: #fff;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);

    width: 100%;
    margin-left: 0;
    margin-right: 0;

}

.vehicle-header {
    margin-bottom: 20px;
}

.vehicle-header h2 {
    margin: 0;
}

.vehicle-header p {
    color: #666;
}

.vehicle-image {
    text-align: center;
    margin: 25px 0;
}

.vehicle-image img {
    max-width: 550px;
    width: 100%;
    height: auto;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.status-box {
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    color: white;
}

.status-box h4 {
    margin: 0 0 10px 0;
    color: white;
}

.status-box span {
    font-size: 22px;
    font-weight: bold;
}

.status-info {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}


/* =========================
Fahrzeugliste
========================= */

.vehicle {
    padding: 15px 0;
}

.vehicle h3 {
    margin-bottom: 5px;
}

.vehicle p {
    margin: 2px 0;
}

hr {
    border: none;
    border-top: 1px solid #ddd;
    margin: 15px 0;
}

/* =========================
Buttons
========================= */

.btn {
    display: inline-block;
    background: #c00000;
    color: white;
    text-decoration: none;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

.btn:hover {
    background: #a00000;
}

/* =========================
Tabellen
========================= */

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: #c00000;
    color: white;
    text-align: left;
    padding: 12px;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
}

/* =========================
Login
========================= */

.login-page {
    height: 100vh;
    background: url('../img/autodrohne1.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    width: 450px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 35px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.25);
}

.login-box img {
    width: 120px;
    margin-bottom: 15px;
}

.login-box h1 {
    margin-bottom: 10px;
    font-size: 48px;
}

.subtitle {
    color: #555;
    margin-bottom: 20px;
}

.error {
    background: #ffdede;
    color: #a00000;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-weight: bold;
}

.login-box input {
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.login-box button {
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    background: #c00000;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
}

.login-box button:hover {
    background: #a00000;
}


.footer {
    margin-top: 20px;
    color: #666;
    font-size: 12px;
}

.dashboard-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    flex: 1;
}

.dashboard-card-link .card {
    cursor: pointer;
    transition: 0.2s;
}

.dashboard-card-link .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.vehicle-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: 0.2s;
}

.vehicle-link:hover {
    transform: translateX(5px);
}

.status-yellow {
    background: #f0ad4e;
    color: #fff;
}

/* =========================
Responsive
========================= */

@media(max-width:900px) {


    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }

    .content {
        margin-left: 0;
    }

    .cards {
        flex-direction: column;
    }

    .login-box {
        width: 90%;
    }
}

/* =========================
   Einsaetze
   ========================= */

.einsatz-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 700px;
}

.einsatz-form input,
.einsatz-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 14px;
}

.einsatz-form textarea {
    min-height: 120px;
}

.einsatz-form button {
    width: 220px;
}

.einsatz-card {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
}

.einsatz-card h3 {
    margin-bottom: 10px;
}

.einsatz-card p {
    margin: 6px 0;
}

.einsatz-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-green {
    background: #28a745;
}

.btn-green:hover {
    background: #218838;
}

.btn-red {
    background: #dc3545;
}

.btn-red:hover {
    background: #c82333;
}

.btn-gray {
    background: #6c757d;
}

.btn-gray:hover {
    background: #5a6268;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .45);
}

.modal-content {
    position: relative;
    background: #fff;
    margin: 5% auto;
    width: 90%;
    max-width: 1000px;
    min-height: 600px;
    border-radius: 12px;
    padding: 20px;
}

.close {
    float: right;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: red;
}


/* ===========================================================
   Einsatztagebuch
=========================================================== */

.einsatz-form {
    width: 100%;
    margin-top: 20px;
}

.einsatz-grid {

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
    margin-bottom: 30px;

}

.einsatz-block {

    background: #ffffff;

    border: 1px solid #e5e5e5;

    border-radius: 15px;

    padding: 25px;

    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);

}

.einsatz-block h3 {

    margin: 0 0 20px 0;

    padding-bottom: 12px;

    border-bottom: 1px solid #ececec;

    font-size: 22px;

    color: #c40000;

}

.einsatz-block label {

    display: block;

    margin-top: 12px;

    margin-bottom: 6px;

    font-weight: 600;

    color: #333;

}

.einsatz-block input,
.einsatz-block select,
.einsatz-block textarea {

    width: 100%;

    padding: 12px;

    border: 1px solid #cfcfcf;

    border-radius: 8px;

    font-size: 15px;

    box-sizing: border-box;

    margin-bottom: 18px;

    background: #fff;

}

.einsatz-block textarea {

    resize: vertical;

    min-height: 140px;

}

.einsatz-speichern {

    text-align: right;

    margin-top: 20px;

}

.einsatz-speichern .btn {

    min-width: 220px;

}

/* ==========================================
   Historie
========================================== */
.historie-content {
    margin-left: 240px;
}

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

.grid label {
    display: block;
    margin-bottom: 6px;
    font-weight: bold;
}

.grid input,
.grid select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
}

.einsatz-card {

    background: #fff;

    border-radius: 15px;

    padding: 25px;

    margin-top: 20px;

    box-shadow: 0 2px 10px rgba(0, 0, 0, .08);

}

.einsatz-card h3 {

    margin-top: 0;

    margin-bottom: 15px;

}

.einsatz-card p {

    margin: 8px 0;

}

.einsatz-actions {

    display: flex;

    gap: 10px;

    margin-top: 20px;

}

/* ==========================================
   Modal
========================================== */

.modal {

    display: none;

    position: fixed;

    left: 0;

    top: 0;

    width: 100%;

    height: 100%;

    background: rgba(0, 0, 0, .45);

    z-index: 9999;

    justify-content: center;

    align-items: center;

}

.modal-content {

    background: #fff;

    width: 90%;

    max-width: 900px;

    border-radius: 15px;

    padding: 25px;

}

.close {

    float: right;

    font-size: 30px;

    cursor: pointer;

}

.close:hover {

    color: #c40000;

}

/* ==========================================
   Responsive
========================================== */

@media (max-width:900px) {

    .einsatz-grid {

        grid-template-columns: 1fr;

    }

    .einsatz-speichern {

        text-align: center;

    }

    .einsatz-speichern .btn {

        width: 100%;

    }

}

.dropzone {

    border: 3px dashed #c70000;

    border-radius: 12px;

    padding: 35px;

    text-align: center;

    background: #fafafa;

    cursor: pointer;

    transition: .2s;

    margin-top: 10px;

}

.dropzone:hover {

    background: #f3f3f3;

}

.dropzone.dragover {

    background: #ffeaea;

    border-color: #ff0000;

}

.dropzone-icon {

    font-size: 42px;

    margin-bottom: 10px;

}

.etb-verlauf {

    height: 700px;

    overflow-y: auto;

    padding-right: 10px;

}

.dragover {

    border: 3px dashed #009688;

    background: #e8fffb;

    transition: .2s;

}

#dateiliste {

    margin-top: 15px;

    font-size: 14px;

}

#dateiliste div {

    padding: 6px 0;

    border-bottom: 1px solid #ddd;

}

.popup-kein-einsatz {

    position: fixed;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 500px;

    max-width: 90%;

    background: #ffffff;

    border-radius: 12px;

    padding: 30px;

    box-shadow: 0 0 25px rgba(0, 0, 0, .3);

    text-align: center;

    z-index: 9999;

}

.pflicht-fehlt {

    border: 2px solid #d40000 !important;

    background: #fff3f3;

}

.pflicht {

    color: #d40000;

    font-weight: bold;

    margin-left: 4px;

}

.popup-overlay {

    position: fixed;
    inset: 0;

    background: rgba(0, 0, 0, .45);

    display: flex;

    justify-content: center;

    align-items: center;

    z-index: 99999;

}

.popup {

    width: 500px;
    max-width: 90%;

    background: #fff;

    border-radius: 12px;

    padding: 25px;

    text-align: center;

    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);

}

.popup h2 {

    color: #c00000;

}


.sidebar-logo {

    width: 180px;
    max-width: 100%;

    height: auto;

    display: block;

    margin: 10px auto;

}

/* ==========================================
   Mobile Ansicht
========================================== */

@media (max-width:900px) {

    /* Sidebar auf Mobil ausblenden */
    .sidebar {
        display: none;
    }

    /* Inhalt auf volle Breite */
    .content {
        margin-left: 0;
        padding: 15px;
    }

    /* Login anpassen */
    .login-box {
        width: 90%;
        max-width: 400px;
        margin: 30px auto;
    }

    /* Fahrzeugkarten */
    .fahrzeug-card {
        width: 100%;
    }

    /* Status-Kacheln */
    .status-grid {
        grid-template-columns: 1fr;
    }

}

.adsb-plane {

    font-size: 22px;

    color: #1565c0;

    text-align: center;

    width: 22px;

    height: 22px;

}

.adsb-plane i {

    display: block;

    transform-origin: center center;

}

.flarm-plane {

    color: #00bfff;

    font-size: 18px;

}

/* =====================================
   NATO-Zeit
===================================== */

.nato-time {

    position: fixed;

    top: 20px;

    right: 25px;

    z-index: 9999;

    text-align: right;

    color: #ffffff;

    font-weight: bold;

    font-size: 15px;

    text-shadow: 0 0 4px #000;

}

#natoDate {

    font-size: 14px;

}

#natoClock {

    font-size: 20px;

}

#localClock {

    margin-top: 4px;

    font-size: 16px;

}

/* ==========================================================
   PWA
========================================================== */


body.pwa-body {

    margin: 0;
    padding: 0;

    width: 100%;
    height: 100%;

    background: #181818;
    color: #ffffff;

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

    overflow: hidden;

}

body.pwa-body .pwa-container {

    width: 100%;
    min-height: 100vh;

    background: #181818;

    padding: 15px;

    box-sizing: border-box;

}

/* ==========================================================
   Kopf
========================================================== */

body.pwa-body .pwa-header {

    text-align: center;

    margin-bottom: 15px;

}

body.pwa-body .pwa-header h1 {

    margin: 0;

    font-size: 34px;

    font-weight: bold;

}

body.pwa-body .pwa-header p {

    margin-top: 5px;

    font-size: 18px;

    color: #cfcfcf;

}

/* ==========================================================
   Kacheln
========================================================== */

body.pwa-body .status-grid {

    display: grid;

    grid-template-columns: 1fr;

    gap: 12px;

}

body.pwa-body .status-box {

    min-height: 85px;

    border-radius: 12px;

    padding: 14px;

    text-align: center;

    color: #ffffff;

    box-shadow: 0 2px 8px rgba(0, 0, 0, .35);

}

body.pwa-body .status-box h4 {

    margin: 0 0 8px;

    font-size: 20px;

    font-weight: bold;

}

body.pwa-body .status-box span {

    display: block;

    font-size: 28px;

    font-weight: bold;

}

body.pwa-body .status-box small {

    display: block;

    margin-top: 6px;

    font-size: 16px;

}

/* ==========================================================
   Statusfarben
========================================================== */

body.pwa-body .status-green {

    background: #2fa93f;

}

body.pwa-body .status-red {

    background: #d9303e;

}

body.pwa-body .status-yellow {

    background: #d69a00;

}

body.pwa-body .status-gray {

    background: #6b737c;

}

/* ==========================================================
   Blinken
========================================================== */

body.pwa-body .blink {

    animation: blink 1s infinite;

}

@keyframes blink {

    0% {
        opacity: 1;
    }

    50% {
        opacity: .35;
    }

    100% {
        opacity: 1;
    }

}

.support-info {
    font-size: 12px;
    color: #4b4a4a;
    text-align: left;
    margin-top: 12px;
}

/* =====================================
   ADS-B / FLARM
===================================== */

.system-block {
    text-align: center;
    padding: 8px 0;
}

.system-block h4 {
    margin: 0;
    font-size: 18px;
    color: #fff;
}

.system-status {

    font-size: 18px;
    font-weight: bold;

    margin-top: 4px;

}

.system-count {

    font-size: 13px;

    font-weight: normal;

    margin-top: 3px;

}

.status-box hr {

    border: none;

    border-top: 1px solid rgba(255, 255, 255, .4);

    margin: 10px 0;

}

/* =====================================
   FLARM Popup
===================================== */

.flarm-modal {

    width: 800px;

    max-width: 90%;

    max-height: 80vh;

    overflow-y: auto;

}
