*{box-sizing:border-box}body{margin:0;background:#111827;color:#e5e7eb;font-family:Arial,sans-serif}.card{max-width:760px;margin:40px auto;padding:28px;background:#1f2937;border-radius:16px;box-shadow:0 10px 35px #0006}h1{margin:0 0 5px;font-size:30px}.subtitle{margin-top:0;color:#9ca3af}.status{display:flex;align-items:center;gap:10px;padding:14px 0;font-size:18px}.dot{width:13px;height:13px;border-radius:50%;display:inline-block}.online{background:#22c55e}.offline{background:#ef4444}.pending{background:#eab308}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:15px 0 25px}.grid div{background:#111827;padding:14px;border-radius:10px}.grid b,.grid span{display:block}.grid b{color:#9ca3af;font-size:12px;margin-bottom:6px}h2{font-size:18px;margin-top:24px}ul{margin:8px 0;padding-left:20px}.talker{padding:15px;background:#111827;border-radius:10px;text-align:center}#talker{font-size:22px;font-weight:bold}button{margin-top:24px;padding:12px 20px;border:0;border-radius:9px;background:#2563eb;color:white;font-size:16px;cursor:pointer}.note{margin-top:24px;color:#9ca3af;font-size:13px;line-height:1.5}@media(max-width:600px){.card{margin:15px;padding:20px}.grid{grid-template-columns:1fr}}


/* ============================================================
   PTT
   ============================================================ */

.ptt {
    margin-top: 20px;
    text-align: center;
}


.ptt-button {
    width: 180px;
    height: 180px;
    min-height: 180px;
    margin-top: 20px;
    padding: 0;
    border-radius: 50%;
    border: 8px solid #222;
    background: linear-gradient(145deg, #ff4b4b 0%, #e60000 45%, #a00000 100%);
    color: white;
    font-size: 24px;
    font-weight: 900;
    letter-spacing: 2px;
    cursor: pointer;
    user-select: none;
    touch-action: none;
    box-shadow: 0 8px 0 #111, 0 12px 25px #0009, inset 0 5px 8px #fff8, inset 0 -10px 15px #600;
    text-shadow: 0 2px 3px #000;
    transition: transform 0.08s ease, box-shadow 0.08s ease;
}


.ptt-button.active {
    transform: translateY(6px) scale(0.97);
    box-shadow: 0 2px 0 #111, 0 5px 12px #0009, inset 0 5px 8px #fff5, inset 0 -10px 15px #600;
}


#pttStatus {
    margin-top: 10px;
    font-weight: bold;
}

/* Login-Formular */
.login form label {
    display: block;
    margin-bottom: 14px;
    color: #e5e7eb;
    font-weight: 600;
}

.login form input {
    display: block;
    width: 100%;
    max-width: 420px;
    margin-top: 6px;
    padding: 11px 12px;
    border: 1px solid #4b5563;
    border-radius: 8px;
    background: #f3f4f6;
    color: #111827;
    font-size: 16px;
}

.login form input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 2px #2563eb55;
}

.login form > div {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.login form button {
    margin-top: 8px;
}


/* ============================================================
   NODE-KACHELN
   ============================================================ */

#nodes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 12px 0 25px;
    padding: 0;
    list-style: none;
}

#nodes .node-card {
    margin: 0;
    padding: 16px;
    background: #111827;
    border: 1px solid #374151;
    border-radius: 12px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 4px 12px #0005;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

#nodes .node-card:hover {
    transform: translateY(-2px);
    border-color: #2563eb;
}

@media (max-width: 600px) {
    #nodes {
        grid-template-columns: 1fr 1fr;
    }
}


/* ============================================================
   PROFESSIONELLES TALKGROUP / MONITORING DESIGN
   ============================================================ */

.talkgroup-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 18px;
}

.tg-card {
    background: linear-gradient(145deg, #182235, #111827);
    border: 1px solid #334155;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 24px #0005;
}

.tg-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 22px;
}

.tg-card-header h2 {
    margin: 0 0 5px;
    font-size: 21px;
}

.tg-description {
    margin: 0;
    color: #94a3b8;
    font-size: 14px;
}

.tg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 34px;
    padding: 0 10px;
    border-radius: 9px;
    background: #2563eb;
    color: white;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
}

.monitor-icon {
    background: #0f766e;
}

.tg-control label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
}

.tg-input-row {
    display: flex;
    gap: 10px;
}

.tg-input-row input,
.monitoring-input {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid #475569;
    border-radius: 9px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 15px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tg-input-row input {
    max-width: 150px;
}

.tg-input-row input:focus,
.monitoring-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px #2563eb33;
}

.tg-primary,
.tg-secondary {
    min-height: 46px;
    padding: 10px 18px;
    border: 0;
    border-radius: 9px;
    color: white;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.tg-primary {
    background: #2563eb;
}

.tg-secondary {
    background: #475569;
}

.tg-primary:hover,
.tg-secondary:hover {
    filter: brightness(1.12);
    transform: translateY(-1px);
}

.tg-current-status,
.monitoring-status {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 9px;
    background: #0f172acc;
    border: 1px solid #334155;
    color: #e2e8f0;
    font-size: 14px;
    font-weight: 600;
}

.status-dot {
    width: 9px;
    height: 9px;
    flex: 0 0 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 9px #22c55e99;
}

.status-dot.inactive {
    background: #64748b;
    box-shadow: none;
}

.monitoring-input {
    margin-bottom: 12px;
}

.monitoring-buttons {
    display: flex;
    gap: 10px;
}

.monitoring-buttons button {
    flex: 1;
}

.monitoring-card {
    min-width: 0;
}

/* Falls das JavaScript die überwachten TGs als Text einträgt */
#monitoringStatus {
    line-height: 1.6;
    word-break: break-word;
}

/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 800px) {
    .talkgroup-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .tg-input-row {
        flex-direction: column;
    }

    .tg-input-row input {
        max-width: none;
    }

    .monitoring-buttons {
        flex-direction: column;
    }

    .tg-card {
        padding: 17px;
    }
}


/* Aktuelle Sprechfunker */
#talker {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

#talker .active-talker {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background: #1f2937;
    border-radius: 7px;
    font-size: 20px;
    font-weight: bold;
}

#nodes {
    gap: 10px;
}

#nodes .node-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding: 12px 15px;
    border: 1px solid rgba(100, 180, 255, 0.18);
    border-radius: 10px;
    background: linear-gradient(
        135deg,
        rgba(30, 55, 80, 0.72),
        rgba(15, 30, 48, 0.88)
    );
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: all 0.2s ease;
    overflow: hidden;
}

#nodes .node-card:hover {
    transform: translateY(-2px);
    border-color: rgba(100, 180, 255, 0.42);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.28);
}

#nodes .node-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: currentColor;
    opacity: 0.45;
}

#nodes .node-card > div:first-child {
    width: 100%;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

#nodes .node-card .node-tg {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 6px;
    background: rgba(100, 180, 255, 0.10);
    border: 1px solid rgba(100, 180, 255, 0.18);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.6px;
    opacity: 0.9;
}

/* Modulationsanzeige */
.modulation-display {
    width: 100%;
    margin-top: 12px;
    text-align: center;
}

.modulation-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 3px;
    height: 42px;
    overflow: hidden;
    font-size: 28px;
    line-height: 1;
    font-weight: bold;
}

.modulation-bars span {
    display: block;
    min-width: 8px;
    transition: transform 0.08s ease, opacity 0.08s ease;
}

.modulation-line {
    width: 100%;
    height: 2px;
    margin-top: 3px;
    background: currentColor;
    opacity: 0.35;
}

.modulation-label {
    margin-top: 5px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 2px;
    opacity: 0.65;
}


/* ============================================================
   ON-AIR PANEL
   ============================================================ */

.onair-panel {
    position: relative;
    overflow: hidden;
}

.onair-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-bottom: 8px;
}

.onair-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.8;
    animation: onair-pulse 1.4s ease-in-out infinite;
}

.onair-title {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 3px;
}

.onair-panel h2 {
    margin-top: 4px;
}

@keyframes onair-pulse {
    0%, 100% {
        transform: scale(0.85);
        opacity: 0.45;
    }

    50% {
        transform: scale(1.25);
        opacity: 1;
    }
}


/* ============================================================
   TALKGROUP DASHBOARD - MODERN
   ============================================================ */

.talkgroup-panel {
    gap: 20px;
}

.tg-card {
    position: relative;
    overflow: hidden;
}

.active-tg-card {
    border: 1px solid currentColor;
}

.tg-card-header {
    position: relative;
}

.active-tg-card .tg-icon {
    font-weight: 900;
    letter-spacing: 1px;
}

.tg-current-status {
    margin-top: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: rgba(128, 128, 128, 0.10);
    border: 1px solid rgba(128, 128, 128, 0.25);
}

.tg-current-status .status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    animation: tg-status-pulse 1.8s ease-in-out infinite;
}

@keyframes tg-status-pulse {
    0%, 100% {
        transform: scale(0.85);
        opacity: 0.45;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

.monitoring-card {
    border: 1px solid rgba(128, 128, 128, 0.25);
}

.monitor-icon {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 1px;
}


/* ============================================================
   MONITORING - SCANNER STATUS
   ============================================================ */

.monitoring-card {
    position: relative;
    overflow: hidden;
}

.monitoring-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.35;
}

.monitoring-card .monitor-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(128, 128, 128, 0.12);
}

.monitoring-card #monitoringStatus {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 9px;
    background: rgba(128, 128, 128, 0.08);
    border: 1px solid rgba(128, 128, 128, 0.20);
    font-weight: 700;
    text-align: center;
}

.monitoring-card .monitoring-buttons {
    margin-top: 12px;
}


/* ============================================================
   LIVE SCANNER - ON AIR
   ============================================================ */

.monitor-icon.scanner-onair {
    animation: scanner-onair-pulse 0.9s ease-in-out infinite;
    font-weight: 900;
}

@keyframes scanner-onair-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.75;
    }

    50% {
        transform: scale(1.06);
        opacity: 1;
    }
}


/* ============================================================
   MODULATIONSMETER - FARBIG / LIVE
   ============================================================ */

.modulation-display {
    width: 100%;
    margin-top: 18px;
}

.modulation-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    font-size: 22px;
    font-weight: 800;
}

.modulation-wave {
    font-size: 30px;
    line-height: 1;
}

.modulation-meter {
    position: relative;
    padding: 22px 22px 18px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.30);
    border: 1px solid rgba(100, 180, 255, 0.25);
    overflow: hidden;
}

.modulation-meter::before {
    content: "";
    position: absolute;
    inset: 15% 5% 20%;
    background:
        radial-gradient(circle at 20% 50%, rgba(0, 180, 255, 0.18), transparent 35%),
        radial-gradient(circle at 45% 50%, rgba(0, 255, 80, 0.18), transparent 35%),
        radial-gradient(circle at 70% 50%, rgba(255, 220, 0, 0.16), transparent 35%),
        radial-gradient(circle at 90% 50%, rgba(255, 40, 40, 0.18), transparent 35%);
    pointer-events: none;
}

.modulation-bars {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    gap: 7px;
    height: 125px;
}

.modulation-bars span {
    flex: 1;
    min-width: 8px;
    height: 18%;
    border-radius: 5px 5px 2px 2px;
    opacity: 0.18;
    transform-origin: bottom;
    transition:
        height 0.10s ease,
        opacity 0.10s ease,
        filter 0.10s ease,
        transform 0.10s ease;
}

/* Farbverlauf der 20 Segmente */
.modulation-bars span:nth-child(1),
.modulation-bars span:nth-child(2),
.modulation-bars span:nth-child(3),
.modulation-bars span:nth-child(4) {
    background: #159cff;
}

.modulation-bars span:nth-child(5),
.modulation-bars span:nth-child(6),
.modulation-bars span:nth-child(7) {
    background: #00d9d9;
}

.modulation-bars span:nth-child(8),
.modulation-bars span:nth-child(9),
.modulation-bars span:nth-child(10) {
    background: #00e878;
}

.modulation-bars span:nth-child(11),
.modulation-bars span:nth-child(12),
.modulation-bars span:nth-child(13) {
    background: #b8f000;
}

.modulation-bars span:nth-child(14),
.modulation-bars span:nth-child(15),
.modulation-bars span:nth-child(16) {
    background: #ffd000;
}

.modulation-bars span:nth-child(17),
.modulation-bars span:nth-child(18) {
    background: #ff8514;
}

.modulation-bars span:nth-child(19),
.modulation-bars span:nth-child(20) {
    background: #ff3030;
}

.modulation-scale {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.75;
}

.modulation-value {
    position: absolute;
    z-index: 3;
    top: 22px;
    right: 22px;
    font-size: 38px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -1px;
}


/* ============================================================
   LOGIN-POPUP / EINSTELLUNGEN
   ============================================================ */

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

.topbar h1 {
    margin-bottom: 4px;
}

.settings-button {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(100, 180, 255, 0.30);
    border-radius: 12px;
    background: rgba(20, 40, 65, 0.85);
    color: #8fd3ff;
    font-size: 25px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.settings-button:hover {
    transform: rotate(25deg);
    background: rgba(30, 80, 130, 0.90);
    box-shadow: 0 0 18px rgba(50, 170, 255, 0.30);
}

/* Hintergrund des Login-Fensters */
.login-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 8, 18, 0.78);
    backdrop-filter: blur(8px);
}

/* Login-Karte */
.login-modal-content {
    position: relative;
    width: min(500px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    border: 1px solid rgba(80, 170, 255, 0.30);
    border-radius: 18px;
    background: rgba(15, 28, 45, 0.97);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.55),
        0 0 35px rgba(30, 140, 255, 0.12);
}

.login-modal-content .login {
    margin: 0;
}

.login-modal-content .login h2 {
    margin-top: 0;
    margin-bottom: 24px;
    font-size: 24px;
}

/* X zum Schließen */
.login-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-close:hover {
    background: rgba(255, 70, 70, 0.20);
    color: #ff7777;
}

/* Login-Felder */
.login-modal-content input {
    box-sizing: border-box;
    width: 100%;
}

@media (max-width: 600px) {
    .login-modal-content {
        padding: 24px 18px;
    }

    .settings-button {
        width: 44px;
        height: 44px;
    }
}


/* ============================================================
   DATUM / UHRZEIT
   ============================================================ */

.datetime-display {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(100, 180, 255, 0.18);
    text-align: center;
}

.datetime-display #currentWeekday {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 1px;
}

.datetime-display #currentDate {
    margin-top: 3px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.70;
}

.datetime-display #currentTime {
    margin-top: 7px;
    font-size: 26px;
    font-weight: 900;
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}

.node-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.node-card .node-tg {
    font-size: 13px;
    font-weight: 700;
    opacity: 0.75;
    letter-spacing: 0.5px;
}


#nodes .node-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

#nodes .node-name {
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.4px;
}

#nodes .node-tg {
    flex-shrink: 0;
}

#nodes .node-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1px;
    opacity: 0.65;
}

#nodes .node-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.8;
}

#nodes .node-onair {
    opacity: 1;
    animation: node-onair-pulse 1.3s ease-in-out infinite;
}

#nodes .node-onair .node-status-dot {
    animation: node-onair-dot 1s ease-in-out infinite;
}

@keyframes node-onair-pulse {
    0%, 100% {
        opacity: 0.75;
    }
    50% {
        opacity: 1;
    }
}

@keyframes node-onair-dot {
    0%, 100% {
        transform: scale(0.8);
        opacity: 0.55;
    }
    50% {
        transform: scale(1.35);
        opacity: 1;
    }
}

