﻿
.fc-page-actions,
.fc-table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.fc-table-actions {
    flex-wrap: nowrap;
}

    .fc-table-actions .fc-btn {
        white-space: nowrap;
    }

@media (max-width: 768px) {
    .fc-page-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .fc-page-actions .fc-btn {
            text-align: center;
        }
}


/* IoT Dashboard Layout Fix */

.iot-page .iot-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.iot-page .fc-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.iot-page .fc-stat-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    min-width: 0;
}

    .iot-page .fc-stat-card span {
        display: block;
        font-size: 13px;
        color: #64748b;
    }

    .iot-page .fc-stat-card strong {
        display: block;
        font-size: 28px;
        font-weight: 700;
        color: #0f172a;
    }

.iot-page .fc-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
}

@media (max-width: 900px) {
    .iot-page .fc-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .iot-page .fc-stats-grid {
        grid-template-columns: 1fr;
    }

    .iot-page .iot-page-header {
        align-items: stretch;
        flex-direction: column;
    }
}


/* ==========================================
   DEVICE DETAIL - INFORMATION GRID FIX
========================================== */

.iot-page .fc-info-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding: 22px;
    width: 100%;
    box-sizing: border-box;
}

    .iot-page .fc-info-grid > div {
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-width: 0;
    }

        .iot-page .fc-info-grid > div > span {
            display: block;
            font-size: 12px;
            font-weight: 500;
            color: #64748b;
            line-height: 1.5;
        }

        .iot-page .fc-info-grid > div > strong {
            display: block;
            font-size: 15px;
            font-weight: 600;
            color: #0f172a;
            overflow-wrap: anywhere;
        }

/* Panel heading */

.iot-page .fc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e2e8f0;
}

    .iot-page .fc-panel-header h2 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
    }

/* Responsive */

@media (max-width: 900px) {
    .iot-page .fc-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .iot-page .fc-info-grid {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 18px;
    }
}


/* =====================================
   DEVICE MONITORING CHARTS
===================================== */

.iot-page .fc-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

    .iot-page .fc-chart-grid .fc-panel {
        margin-bottom: 0;
        min-width: 0;
    }

.iot-page .fc-chart-body {
    position: relative;
    height: 320px;
    padding: 20px;
    box-sizing: border-box;
}

    .iot-page .fc-chart-body canvas {
        width: 100% !important;
        height: 100% !important;
    }

@media (max-width: 900px) {
    .iot-page .fc-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .iot-page .fc-chart-body {
        height: 260px;
        padding: 12px;
    }
}

/* =====================================
   DEVICE MONITORING CHARTS
===================================== */

.iot-page .fc-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

    .iot-page .fc-chart-grid .fc-panel {
        margin-bottom: 0;
        min-width: 0;
    }

.iot-page .fc-chart-body {
    position: relative;
    height: 320px;
    padding: 20px;
    box-sizing: border-box;
}

    .iot-page .fc-chart-body canvas {
        width: 100% !important;
        height: 100% !important;
    }

@media (max-width: 900px) {
    .iot-page .fc-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .iot-page .fc-chart-body {
        height: 260px;
        padding: 12px;
    }
}


