* {
    box-sizing: border-box;
}


body {
    margin: 0;
    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background:
        #f5f7fa;

    color:
        #202124;
}


.page-container {
    width: 100%;
    max-width: 1500px;

    margin:
        0 auto;

    padding:
        20px;
}


.page-header {
    display: flex;

    justify-content:
        space-between;

    align-items:
        center;

    margin-bottom:
        15px;
}


.page-header h1 {
    margin:
        0 0 5px;

    font-size:
        28px;
}


.page-header p {
    margin: 0;

    color:
        #6b7280;
}


.btn {
    display:
        inline-block;

    border:
        0;

    border-radius:
        6px;

    padding:
        9px 15px;

    text-decoration:
        none;

    cursor:
        pointer;

    font-size:
        14px;
}


.btn-primary {
    background:
        #2563eb;

    color:
        white;
}


.btn-secondary {
    background:
        #e5e7eb;

    color:
        #111827;
}


.btn-success {
    background:
        #16a34a;

    color:
        white;
}


.btn-danger {
    background:
        #dc2626;

    color:
        white;
}


.btn-small {
    padding:
        6px 10px;

    background:
        #e5e7eb;

    color:
        #111827;
}


.filter-card,
.form-card,
.table-card {
    background:
        white;

    border:
        1px solid #e5e7eb;

    border-radius:
        10px;

    padding:
        20px;

    margin-bottom:
        20px;
}


.filter-form {
    display:
        flex;

    gap:
        15px;

    align-items:
        end;

    flex-wrap:
        wrap;
}


.form-group {
    display:
        flex;

    flex-direction:
        column;

    gap:
        6px;
}


.form-group label {
    font-size:
        13px;

    font-weight:
        600;
}


.form-group input,
.form-group select {
    min-width:
        220px;

    padding:
        9px 10px;

    border:
        1px solid #d1d5db;

    border-radius:
        6px;

    font-size:
        14px;
}


.required {
    color:
        #dc2626;
}


.form-actions {
    display:
        flex;

    gap:
        10px;

    margin-top:
        20px;
}


table {
    width:
        100%;

    border-collapse:
        collapse;
}


th,
td {
    padding:
        12px 10px;

    border-bottom:
        1px solid #e5e7eb;

    text-align:
        left;

    font-size:
        13px;
}


th {
    background:
        #f9fafb;

    font-weight:
        700;
}


.status-badge {
    display:
        inline-block;

    padding:
        4px 8px;

    border-radius:
        20px;

    font-size:
        11px;

    font-weight:
        700;
}


.status-online {
    background:
        #dcfce7;

    color:
        #166534;
}


.status-offline {
    background:
        #fee2e2;

    color:
        #991b1b;
}


.empty-state {
    text-align:
        center;

    padding:
        40px;

    color:
        #6b7280;
}


.form-note {
    margin-top:
        15px;

    padding:
        12px;

    background:
        #f3f4f6;

    border-radius:
        6px;

    color:
        #4b5563;

    font-size:
        13px;
}


.card-grid {
    display:
        grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(200px, 1fr)
        );

    gap:
        15px;

    margin-bottom:
        20px;
}


.info-card {
    background:
        white;

    border:
        1px solid #e5e7eb;

    border-radius:
        10px;

    padding:
        18px;
}


.info-card span {
    display:
        block;

    color:
        #6b7280;

    font-size:
        12px;

    margin-bottom:
        7px;
}


.info-card strong {
    font-size:
        16px;
}


.info-card small {
    display:
        block;

    color:
        #6b7280;

    margin-top:
        4px;
}


.section-header {
    margin-bottom:
        15px;
}


.section-header h2 {
    margin:
        0 0 4px;
}


.section-header p {
    margin:
        0;

    color:
        #6b7280;
}
.btn-action{
    min-width: 120px;
    text-align: center;
    
}
.bg-orange {
    background-color: #fd7e14 !important;
}
.form-help {
    display: block;
    margin-top: 6px;
    color: #6c757d;
    font-size: 13px;
}


.module-badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 5px;
    background: #f1f3f5;
    color: #495057;
    font-size: 12px;
    font-weight: 600;
}


.status-badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
}


.status-active {
    background: #e8f5e9;
    color: #2e7d32;
}


.status-inactive {
    background: #f5f5f5;
    color: #757575;
}


code {
    font-size: 13px;
    font-weight: 600;
}
.permission-assignment-card {
    margin-top: 20px;
}


.assignment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e5e5;
}


.assignment-header h2 {
    margin: 0 0 6px 0;
    font-size: 22px;
}


.assignment-header p {
    margin: 0;
    color: #6c757d;
}


.assignment-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}


.permission-module {
    border: 1px solid #e3e6e8;
    border-radius: 8px;
    margin-bottom: 18px;
    overflow: hidden;
}


.permission-module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 14px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e3e6e8;
}


.permission-module-header h3 {
    margin: 0 0 3px 0;
    font-size: 16px;
}


.module-count {
    font-size: 12px;
    color: #6c757d;
}


.permission-list {
    display: grid;
    grid-template-columns: repeat(
        2,
        minmax(0, 1fr)
    );
    gap: 0;
}


.permission-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    margin: 0;
    border-bottom: 1px solid #eeeeee;
    cursor: pointer;
}


.permission-item:nth-child(odd) {
    border-right: 1px solid #eeeeee;
}


.permission-item:hover {
    background: #fafafa;
}


.permission-item input[type="checkbox"] {
    margin-top: 3px;
    width: 17px;
    height: 17px;
    cursor: pointer;
}

#is_active{
     margin-top: 3px;
    width: 25px;
    height: 25px;
    cursor: pointer;
}

.permission-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}


.permission-name {
    font-weight: 600;
    font-size: 14px;
}


.permission-code {
    font-family: monospace;
    font-size: 12px;
    color: #6c757d;
}


.permission-description {
    font-size: 12px;
    color: #777;
    margin-top: 2px;
}


.empty-state {
    text-align: center;
    padding: 50px 20px;
}


.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}


.empty-state-text {
    color: #6c757d;
}


@media (
    max-width: 768px
) {

    .assignment-header {
        flex-direction: column;
        align-items: flex-start;
    }


    .permission-list {
        grid-template-columns: 1fr;
    }


    .permission-item:nth-child(odd) {
        border-right: none;
    }

}

/* =========================================================
   DEVICE DASHBOARD
========================================================= */

.dashboard-page {
    padding: 24px;
    background: #f5f7fa;
    min-height: 100vh;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dashboard-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.dashboard-subtitle {
    margin-top: 5px;
    color: #6c757d;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.dashboard-card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.dashboard-card-subtitle {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 18px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.dashboard-summary-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
}

.dashboard-summary-label {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 8px;
}

.dashboard-summary-value {
    font-size: 28px;
    font-weight: 700;
}

.dashboard-summary-help {
    color: #6c757d;
    font-size: 12px;
    margin-top: 5px;
}

.dashboard-device-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.dashboard-field-label {
    color: #6c757d;
    font-size: 13px;
    margin-bottom: 5px;
}

.dashboard-field-value {
    font-size: 16px;
    font-weight: 600;
    word-break: break-word;
}

.dashboard-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.dashboard-status-online {
    background: #d1e7dd;
    color: #0f5132;
}

.dashboard-status-offline {
    background: #f8d7da;
    color: #842029;
}

.dashboard-chart-container {
    position: relative;
    height: 350px;
}

.dashboard-sku-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.dashboard-sku-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    background: #ffffff;
}

.dashboard-sku-name {
    font-size: 17px;
    font-weight: 700;
}

.dashboard-sku-code {
    color: #6c757d;
    font-size: 12px;
}

.dashboard-progress {
    height: 10px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 12px;
}

.dashboard-progress-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.dashboard-empty {
    padding: 25px;
    text-align: center;
    color: #6c757d;
}

.dashboard-error {
    padding: 12px 16px;
    border-radius: 8px;
    background: #f8d7da;
    color: #842029;
    margin-bottom: 20px;
}

.dashboard-refresh-button {
    border: 0;
    border-radius: 7px;
    padding: 9px 16px;
    cursor: pointer;
    background: #0d6efd;
    color: #ffffff;
}

.dashboard-refresh-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.dashboard-threshold {
    margin-top: 12px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.dashboard-threshold span {
    padding: 4px 8px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
}

.threshold-normal {
    background: #d1e7dd;
    color: #0f5132;
}

.threshold-1 {
    background: #fff3cd;
    color: #664d03;
}

.threshold-2 {
    background: #ffe5d0;
    color: #984c0c;
}

.threshold-3 {
    background: #f8d7da;
    color: #842029;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (
    max-width: 992px
) {

    .dashboard-grid,
    .dashboard-device-grid,
    .dashboard-sku-grid {
        grid-template-columns: repeat(
            2,
            1fr
        );
    }

}


@media (
    max-width: 576px
) {

    .dashboard-page {
        padding: 12px;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .dashboard-grid,
    .dashboard-device-grid,
    .dashboard-sku-grid {
        grid-template-columns: 1fr;
    }

}
/*=================================================
    LOGIN PAGE
=================================================*/

.login-page {

    min-height: 100vh;

    display: flex;

    align-items: center;

    justify-content: center;

    padding: 30px;

}


.login-card {

    width: 100%;

    max-width: 420px;

    background: #ffffff;

    border-radius: 12px;

    padding: 32px;

    box-shadow:
        0 8px 30px rgba(
            0,
            0,
            0,
            0.08
        );

}


.login-header {

    text-align: center;

    margin-bottom: 25px;

}


.login-header h1 {

    margin: 0 0 8px;

    font-size: 28px;

}


.login-header p {

    margin: 0;

    color: #6c757d;

}


.login-error {

    background: #f8d7da;

    color: #842029;

    border: 1px solid #f5c2c7;

    border-radius: 6px;

    padding: 10px 12px;

    margin-bottom: 18px;

    font-size: 14px;

}


.password-wrapper {

    position: relative;

}


.password-wrapper .form-control {

    padding-right: 70px;

}


.password-toggle {

    position: absolute;

    right: 8px;

    top: 50%;

    transform: translateY(-50%);

    border: none;

    background: transparent;

    cursor: pointer;

    color: #198754;

    font-size: 13px;

}


.login-button {

    width: 100%;

    margin-top: 10px;

}
.tdcard{
    background-color: #2cb5f4ef;
    text-align:right;
    color:white;
      font-weight:bold;
    font-size:16px;
}

.tonlinedcard{
    background-color: #3b426c;
    text-align:right;
    color:white;
      font-weight:bold;
    font-size:16px;
}
.tofflinecard{
    background-color: #e77e77a8;
    text-align:right;
    color:white;
      font-weight:bold;
    font-size:16px;
}

.tcriticalcard{
    background-color: #ce5148a8;
    text-align:right;
    color:white;
    font-weight:bold;
    font-size:16px;
}
/* =========================================================
   DEVICE INFORMATION CARD
========================================================= */

.device-info-card {
    background: #ffffff;
    border: 1px solid #e7ebf0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.04),
        0 10px 24px rgba(0, 0, 0, 0.05);
}


/* =========================================================
   HEADER
========================================================= */

.device-info-header {
    padding: 18px 22px 14px 22px;
    border-bottom: 1px solid #edf0f3;
    background:
        linear-gradient(
            180deg,
            #ffffff 0%,
            #fafbfc 100%
        );
}


.device-info-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    color: #20252b;
}


.device-info-subtitle {
    margin-top: 3px;
    font-size: 12px;
    color: #7a828b;
}


/* =========================================================
   CONTENT
========================================================= */

.device-info-content {
    padding: 18px 22px 20px 22px;
}


/* =========================================================
   ROWS
========================================================= */

.device-info-row {
    display: grid;
    align-items: center;
}


.device-info-row-three {
    grid-template-columns:
        2fr
        1fr
        1fr;

    column-gap: 28px;
    margin-bottom: 14px;
}


.device-info-row-two {
    grid-template-columns:
        1.4fr
        1fr;

    column-gap: 28px;
}


/* =========================================================
   ITEM
========================================================= */

.device-info-item {
    min-height: 52px;

    display: flex;
    align-items: center;

    gap: 7px;

    padding: 10px 12px;

    border-radius: 9px;

    background: #f8f9fb;
}


/* =========================================================
   LABEL
========================================================= */

.device-info-label {
    margin: 0;

    font-size: 13px;

    font-weight: 500;

    color: #77808a;

    white-space: nowrap;
}


/* =========================================================
   VALUE
========================================================= */

.device-info-value {
    font-size: 16px;

    font-weight: 650;

    color: #20252b;

    line-height: 1.3;
}


.device-id-value {
    font-size: 14px;
}


/* =========================================================
   STATUS
========================================================= */

#deviceStatus.dashboard-status {
    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-width: 82px;

    padding: 6px 14px;

    border-radius: 999px;

    font-size: 14px;

    font-weight: 700;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 991px) {

    .device-info-row-three {
        grid-template-columns: 1fr 1fr;
        row-gap: 12px;
    }


    .device-info-row-two {
        grid-template-columns: 1fr;
        row-gap: 12px;
    }

}


@media (max-width: 767px) {

    .device-info-row-three {
        grid-template-columns: 1fr;
    }


    .device-info-item {
        align-items: flex-start;
        flex-direction: column;

        gap: 3px;
    }

}
/* =========================================================
   REPORT MODULE
========================================================= */

.report-print-area {
    background: #ffffff;
}


.report-document-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    padding: 18px 20px;

    border-bottom: 2px solid #6f8eae;
}


.report-document-header h4 {
    margin: 0 0 3px;
    font-weight: 700;
}


.report-footer {
    padding: 12px 16px;

    border-top: 1px solid #dee2e6;

    font-size: 13px;

    color: #6c757d;
}


.report-print-area table {
    font-size: 13px;
}


.report-print-area thead th {
    white-space: nowrap;

    font-weight: 600;

    vertical-align: middle;
}


/* =========================================================
   PRINT
========================================================= */

@media print {

    body * {
        visibility: hidden !important;
    }


    .report-print-area,
    .report-print-area * {
        visibility: visible !important;
    }


    .report-print-area {
        position: absolute;

        left: 0;
        top: 0;

        width: 100%;

        padding: 0;

        margin: 0;
    }


    .report-print-area table {
        width: 100%;

        font-size: 10px;
    }


    .report-print-area th,
    .report-print-area td {
        padding: 5px 6px !important;
    }


    .report-document-header {
        padding: 0 0 10px;

        margin-bottom: 10px;
    }


    .report-footer {
        padding-left: 0;
        padding-right: 0;
    }


    @page {
        size: landscape;

        margin: 10mm;
    }

}