/* ==============================================
   Lanthan Cloud — Custom Styles
   Bootstrap 5.3 dark/light mode compatible
   ============================================== */

/* ---- Body & Layout ---- */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* ---- Navbar ---- */
.navbar-brand {
    letter-spacing: 0.5px;
}

/* ---- Cards ---- */
.card {
    border-radius: 0.5rem;
}

/* ---- Tables ---- */
.table th {
    white-space: nowrap;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.table td {
    vertical-align: middle;
}

/* ---- Status badges ---- */
.badge {
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* ---- Charts ---- */
canvas {
    display: block;
    width: 100% !important;
}

/* ---- Code / monospace ---- */
.font-monospace {
    font-size: 0.85em;
}

/* ---- Auth page ---- */
.auth-card {
    max-width: 420px;
    margin: auto;
}

/* ---- Pagination ---- */
.pagination {
    gap: 2px;
}

/* ---- Dark mode tweaks ---- */
[data-bs-theme="dark"] {
    --bs-body-bg: #1a1d21;
    --bs-card-bg: #212529;
}

[data-bs-theme="dark"] .table-light {
    --bs-table-bg: #2c3034;
    --bs-table-color: #dee2e6;
}

[data-bs-theme="dark"] .navbar.bg-primary {
    background-color: #0b5ed7 !important;
}

/* ---- Responsive table scroll on mobile ---- */
@media (max-width: 767px) {
    .table-responsive table {
        font-size: 0.82rem;
    }

    .btn-group-sm > .btn {
        padding: 0.2rem 0.4rem;
    }
}

/* ---- Device status indicator pulse ---- */
@keyframes pulse-online {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.5; }
}

.status-online-pulse {
    animation: pulse-online 2s ease-in-out infinite;
}

/* ---- Input group icons ---- */
.input-group-text {
    min-width: 2.5rem;
    justify-content: center;
}

/* ---- Config table ---- */
.table td input.form-control-sm {
    min-width: 60px;
}

/* ---- Footer ---- */
footer {
    font-size: 0.78rem;
}
