/* HamThings v2 dashboard — branding override + utility extra. */

/* ── Shim Bootstrap 5 → 4 ─────────────────────────────────────────────
   Stack effettivo: AdminLTE 3 + Bootstrap 4.6 + jQuery (snapshot SAK).
   Le viste sono state scritte con utility classes BS5 (ms-*/me-*/form-
   label/form-select/bg-light text-dark) — qui ricostruisco il behavior
   minimo per non riscrivere tutte le viste. Migrazione vera ad AdminLTE
   4 + BS5 in PR successiva. */
.ms-auto { margin-left: auto !important; }
.ms-1    { margin-left: 0.25rem !important; }
.ms-2    { margin-left: 0.5rem !important; }
.ms-3    { margin-left: 1rem !important; }
.me-1    { margin-right: 0.25rem !important; }
.me-2    { margin-right: 0.5rem !important; }
.form-label    { display: inline-block; margin-bottom: 0.4rem; font-weight: 500; }
.form-select   { display: block; width: 100%; padding: .375rem 1.75rem .375rem .75rem;
                 font-size: 1rem; line-height: 1.5; color: #495057;
                 background-color: #fff; border: 1px solid #ced4da; border-radius: .25rem;
                 -webkit-appearance: none; appearance: none; }
.form-select-sm { padding: .25rem 1.5rem .25rem .5rem; font-size: .875rem; }
.bg-light.text-dark { background-color: #f8f9fa !important; color: #212529 !important; }
.badge.bg-success    { background-color: #28a745 !important; color: #fff !important; }
.badge.bg-danger     { background-color: #dc3545 !important; color: #fff !important; }
.badge.bg-info       { background-color: #17a2b8 !important; color: #fff !important; }
.badge.bg-secondary  { background-color: #6c757d !important; color: #fff !important; }
.badge.bg-warning    { background-color: #ffc107 !important; color: #212529 !important; }
.badge.bg-light      { background-color: #f8f9fa !important; color: #212529 !important; }

/* Modal close button: AdminLTE 3 a volte rende la X invisibile.
   Forziamo colore + dimensione visibile. */
.modal-header .close {
    color: #000 !important; opacity: .6 !important;
    font-size: 1.5rem; line-height: 1;
    background: transparent; border: 0; padding: .5rem .75rem;
    cursor: pointer;
}
.modal-header .close:hover { opacity: 1 !important; }



:root {
    --ht-primary: #0c5460;
    --ht-accent:  #17a2b8;
}

.app-brand {
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--ht-primary);
}

/* Login card centrata */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}
.login-card {
    width: 100%;
    max-width: 360px;
}

/* Stat card — pattern AdminLTE light */
.stat-card {
    border-left: 4px solid var(--ht-accent);
    transition: transform .15s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
}
.stat-card .stat-label {
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6c757d;
}

/* Tabella LH compatta */
.lh-table td, .lh-table th {
    vertical-align: middle;
    font-size: .9rem;
}
.lh-table .badge-tg {
    font-family: monospace;
    background: var(--ht-primary);
    color: white;
}

/* Loading spinner inline */
.loading-inline {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid #ddd;
    border-top-color: var(--ht-accent);
    border-radius: 50%;
    animation: ht-spin 0.6s linear infinite;
}
@keyframes ht-spin {
    to { transform: rotate(360deg); }
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
}
.empty-state .empty-icon {
    font-size: 3rem;
    opacity: .3;
    margin-bottom: 1rem;
}

/* ── World/Italy map TX markers + TG labels (mirror SAK) ───────────────── */
@keyframes ht-tx-pulse {
    0%   { transform: scale(1);   opacity: 1;   }
    70%  { transform: scale(2.2); opacity: 0.1; }
    100% { transform: scale(1);   opacity: 1;   }
}
.tx-source-marker .tx-ring {
    fill: #007bff; opacity: 0.6;
    transform-origin: center; transform-box: fill-box;
    animation: ht-tx-pulse 1.4s ease-out infinite;
}
.tx-source-marker .tx-core {
    fill: #007bff; stroke: #ffffff; stroke-width: 1.5;
}
.tx-source-marker .tx-icon {
    font-family: "Font Awesome 5 Free","Font Awesome 6 Free"; font-weight: 900;
    fill: #ffffff; pointer-events: none;
    text-anchor: middle; dominant-baseline: central;
}
.tg-label {
    pointer-events: none; user-select: none;
    fill: #ffffff; stroke: #000000; stroke-width: 3; paint-order: stroke;
    font-weight: bold;
}
