/* ========================================
   MESSAGEHUB OSM
   COMPONENTS
======================================== */


/* ========================================
   PAGE TITLE
======================================== */

.page-title {

    margin-bottom: 28px;
}


.page-title h2 {

    margin-bottom: 5px;

    font-size: 32px;

    font-weight: 600;

    color: var(--text-primary);
}


.page-title p {

    color: var(--text-secondary);

    font-size: 16px;
}


/* ========================================
   STATISTICS
======================================== */

.stats-grid {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 30px;

    margin-bottom: 70px;
}


.stat-card {

    min-height: 160px;

    display: flex;

    align-items: center;

    gap: 26px;

    padding: 26px 30px;

    background: var(--bg-card);

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

    border-radius: var(--radius);

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

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.stat-card:hover {

    transform: translateY(-2px);

    border-color: var(--border-glow);

    box-shadow:
        0 10px 35px rgba(30, 94, 255, 0.10);
}


.stat-icon {

    width: 78px;

    height: 78px;

    min-width: 78px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 50%;

    background: rgba(30, 94, 255, 0.18);

    border: 1px solid var(--blue);

    color: #72B5FF;

    font-size: 30px;
}


.stat-card span {

    display: block;

    margin-bottom: 3px;

    color: var(--text-secondary);

    font-size: 18px;
}


.stat-card strong {

    display: block;

    color: var(--text-primary);

    font-size: 32px;

    line-height: 1.1;
}


/* ========================================
   SECTION
======================================== */

.section {

    width: 100%;
}


.section-title {

    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 26px;
}


.section-title h3 {

    font-size: 26px;

    font-weight: 600;
}


.whatsapp-title {

    font-size: 26px;
}


/* ========================================
   DEVICE CARD
======================================== */

.device-card {

    width: 100%;

    padding: 26px 30px;

    background: var(--bg-card);

    border: 1px solid var(--border-glow);

    border-radius: var(--radius);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.12);
}


.device-header {

    display: flex;

    align-items: center;

    gap: 12px;

    padding-bottom: 20px;

    margin-bottom: 22px;

    border-bottom: 1px solid rgba(155, 179, 212, 0.10);

    color: var(--text-primary);

    font-size: 16px;
}


.device-icon {

    font-size: 20px;

    color: var(--text-primary);
}


.device-info {

    display: flex;

    flex-direction: column;

    gap: 5px;
}


.device-info strong {

    font-size: 20px;

    font-weight: 500;

    color: var(--text-primary);
}


.device-info > span {

    color: var(--text-primary);

    font-size: 16px;
}


.connected {

    display: flex;

    align-items: center;

    gap: 8px;

    margin-top: 4px;

    color: var(--whatsapp);

    font-size: 14px;
}


.connected > span {

    width: 7px;

    height: 7px;

    border-radius: 50%;

    background: var(--whatsapp);

    box-shadow:
        0 0 9px rgba(32, 230, 163, 0.7);
}


/* ========================================
   GENERIC CARD
======================================== */

.card {

    background: var(--bg-card);

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

    border-radius: var(--radius);

    padding: 20px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.15);
}


/* ========================================
   BUTTON
======================================== */

.btn {

    min-height: 40px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    padding: 0 16px;

    border-radius: 9px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


.btn-primary {

    background: var(--blue);

    color: var(--text-primary);

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


.btn-primary:hover {

    background: var(--blue-light);

    box-shadow:
        0 0 18px rgba(30, 94, 255, 0.25);

    transform: translateY(-1px);
}


.btn-secondary {

    background: rgba(30, 94, 255, 0.08);

    color: var(--text-secondary);

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


.btn-secondary:hover {

    color: var(--text-primary);

    border-color: var(--border-glow);

    background: rgba(30, 94, 255, 0.14);
}


/* ========================================
   INPUT
======================================== */

.input {

    width: 100%;

    height: 42px;

    padding: 0 13px;

    background: #07182F;

    border: 1px solid rgba(155, 179, 212, 0.16);

    border-radius: 9px;

    outline: none;

    color: var(--text-primary);

    transition:
        border 0.2s ease,
        box-shadow 0.2s ease;
}


.input::placeholder {

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


.input:focus {

    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(30, 94, 255, 0.10);
}


/* ========================================
   SELECT
======================================== */

.select {

    width: 100%;

    height: 42px;

    padding: 0 13px;

    background: #07182F;

    border: 1px solid rgba(155, 179, 212, 0.16);

    border-radius: 9px;

    outline: none;

    color: var(--text-primary);

    cursor: pointer;
}


.select:focus {

    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(30, 94, 255, 0.10);
}


/* ========================================
   TABLE
======================================== */

.table-wrapper {

    width: 100%;

    overflow-x: auto;

    background: var(--bg-card);

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

    border-radius: var(--radius);
}


.table {

    width: 100%;

    border-collapse: collapse;

    min-width: 600px;
}


.table th {

    padding: 14px 18px;

    text-align: left;

    background: rgba(30, 94, 255, 0.06);

    color: var(--text-secondary);

    font-size: 12px;

    font-weight: 600;

    border-bottom: 1px solid rgba(155, 179, 212, 0.08);
}


.table td {

    padding: 15px 18px;

    color: var(--text-primary);

    border-bottom: 1px solid rgba(155, 179, 212, 0.06);
}


.table tbody tr {

    transition:
        background 0.2s ease;
}


.table tbody tr:hover {

    background: rgba(30, 94, 255, 0.05);
}


/* ========================================
   STATUS
======================================== */

.status {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    font-size: 12px;

    color: var(--text-secondary);
}


.status-dot {

    width: 7px;

    height: 7px;

    border-radius: 50%;
}


.status-online {

    color: var(--whatsapp);
}


.status-online .status-dot {

    background: var(--whatsapp);

    box-shadow:
        0 0 8px rgba(32, 230, 163, 0.7);
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 1000px) {

    .stats-grid {

        grid-template-columns:
            1fr;
    }


    .stat-card {

        min-height: 130px;
    }

}


@media (max-width: 600px) {

    .page-title h2 {

        font-size: 26px;
    }


    .stat-card {

        padding: 20px;
    }


    .stat-icon {

        width: 62px;

        height: 62px;

        min-width: 62px;

        font-size: 24px;
    }


    .stat-card strong {

        font-size: 26px;
    }


    .device-card {

        padding: 20px;
    }

}

/* =========================================
   MODAL
========================================= */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 10, 25, 0.75);
    backdrop-filter: blur(4px);

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

    z-index: 9999;
    padding: 20px;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    width: 100%;
    max-width: 480px;

    background: #0B1F3A;
    border: 1px solid #1E5EFF;
    border-radius: 16px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.45),
        0 0 25px rgba(30, 94, 255, 0.15);

    overflow: hidden;
    animation: modalShow 0.2s ease;
}

@keyframes modalShow {

    from {
        opacity: 0;
        transform: translateY(-10px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px 22px;

    border-bottom: 1px solid rgba(30, 94, 255, 0.25);
}

.modal-title {
    margin: 0;

    color: #ffffff;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    width: 34px;
    height: 34px;

    border: none;
    background: transparent;

    color: #9BB3D4;
    font-size: 24px;

    border-radius: 8px;
    cursor: pointer;

    transition: 0.2s;
}

.modal-close:hover {
    background: rgba(30, 94, 255, 0.15);
    color: #ffffff;
}

.modal-body {
    padding: 22px;
}

.modal-message {
    margin: 0;

    color: #9BB3D4;
    line-height: 1.6;
}

.modal-form-group {
    margin-bottom: 18px;
}

.modal-form-group label {
    display: block;

    margin-bottom: 8px;

    color: #ffffff;
    font-size: 14px;
}

.modal-form-group input,
.modal-form-group select {
    width: 100%;
    box-sizing: border-box;

    padding: 12px 14px;

    background: #07132A;
    color: #ffffff;

    border: 1px solid #214477;
    border-radius: 10px;

    outline: none;

    transition: 0.2s;
}

.modal-form-group input:focus,
.modal-form-group select:focus {
    border-color: #1E5EFF;
    box-shadow: 0 0 0 3px rgba(30, 94, 255, 0.12);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;

    padding: 16px 22px;

    border-top: 1px solid rgba(30, 94, 255, 0.2);
}

.modal-button {
    padding: 10px 18px;

    border-radius: 9px;
    border: 1px solid #214477;

    background: transparent;
    color: #9BB3D4;

    cursor: pointer;

    transition: 0.2s;
}

.modal-button:hover {
    border-color: #1E5EFF;
    color: #ffffff;
}

.modal-button.primary {
    background: #1E5EFF;
    border-color: #1E5EFF;
    color: #ffffff;
}

.modal-button.primary:hover {
    background: #3470ff;
}

.modal-button.danger {
    background: #c0392b;
    border-color: #c0392b;
    color: #ffffff;
}

.modal-button.danger:hover {
    background: #e04b3b;
}