html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}


html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 0;
    padding-bottom: 0;
}

.img-responsive {
    max-width: 100%;
    height: auto;
}

.bold {
    font-weight: bold;
}

.hidden {
    display: none !important;
}

.text-purple {
    color: #a78bfa;
}

.text-overflow {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/*#region box Styles */
.info-box {
    padding: 15px;
    background-color: #2b2b2b;
    font-size: 0.9rem;
    border: 1px solid #393838;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #333;
}

.info-label {
    color: #a0aec0;
}

.info-value {
    font-weight: 500;
    color: #e0e0e0;
}

.alerts-content {
    height: calc(100% - 56px);
    overflow-y: auto;
    padding: 10px 15px;
}

.alert-item {
    display: flex;
    padding: 7px 0;
    border-bottom: 1px solid #333;
    gap: 10px;
    align-items: flex-start;
}

.alert-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;   
    color: #ef4444;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}
    .alert-icon.red {
        background-color: rgba(239, 68, 68, 0.2);
        color: #ef4444;
    }

    .alert-icon.yellow {
        background-color: rgba(239, 226, 68, 0.2);
        color: #facc15;
    }
    .alert-icon.blue {
        background-color: rgba(68, 81, 239, 0.2);
        color: #3b82f6;
    }
    .alert-icon svg {
        max-width: 20px;
    }

.alert-info {
    flex-grow: 1;
}

.alert-title {
    font-weight: 500;
    margin-bottom: 3px;
    color: #e0e0e0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; 
    max-width: 220px; 
}

.alert-desc {
    color: #a0aec0;
    font-size: 0.85rem;
}

.alert-time {
    color: #64748b;
    font-size: 0.9rem;
    margin-top: 3px;
}

.alert-panel-list {
    max-height: 145px;
    padding: 0;
    overflow-y: auto;
    padding-right: 4px;
}
    .alert-panel-list::-webkit-scrollbar {
        width: 6px;
    }

    .alert-panel-list::-webkit-scrollbar-thumb {
        background-color: #444;
        border-radius: 3px;
    }

.alert-panel {
    background-color: #2b2b2b;
    padding: 9px 14px;
    border-radius: 5px;
    border-left: 5px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* »óÅÂº° »ö»ó ¶óÀÎ */
.border-left-red {
    border-left-color: #ef4444;
}

.border-left-yellow {
    border-left-color: #facc15;
}

.border-left-blue {
    border-left-color: #3b82f6;
}


.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup {
    background: #2c3e50;
    color: #ffffff;
    border-radius: 12px;
    width: 380px;
    max-width: 90vw;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-header {
    background: #34495e;
    padding: 7px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #4a5568;
}

.popup-title {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.close-btn {
    background: none;
    border: none;
    color: #bdc3c7;
    font-size: 20px;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .close-btn:hover {
        background: #4a5568;
        color: #ffffff;
    }

.popup-body {
    padding: 24px 20px;
}

.notice-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
}

.notice-content {
    font-size: 14px;
    line-height: 1.6;
    color: #e2e8f0;
    margin-bottom: 16px;
}

.notice-footer {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 20px;
}

.info-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    opacity: 0.7;
}

.popup-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}


/* Ä¿½ºÅÒ ¿À¹ö·¹ÀÌ ½ºÅ¸ÀÏ */
.customoverlay {
    position: relative;
    border-radius: 8px;
    background: #2d3748;
    border: 1px solid #4a5568;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    min-width: 160px;
    font-size: 13px;
    cursor: auto;
    z-index: 999;
}

    .customoverlay:after {
        content: '';
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 0;
        border-left: 8px solid transparent;
        border-right: 8px solid transparent;
        border-top: 10px solid #2d3748;
    }

    .customoverlay .header {
        background: #1a202c;
        padding: 8px 12px;
        border-radius: 8px 8px 0 0;
        border-bottom: 1px solid #4a5568;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 10px;
    }

    .customoverlay .school-name {
        color: #ffffff;
        font-size: 1.2em;
        font-weight: 600;
        margin: 0;
    }

.status-badge {
    background: #153a32;
    border: 1px solid #22c55e;
    color: #22c55e;
    padding: 4px 6px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 500;
}
    .status-badge.off {
        background-color: rgba(255, 255, 255, 0.1);
        border: 1px solid #878787;
        color: #878787;
    }

    .status-badge.error {
        background: #3b0820;
        border: 1px solid #ef4444;
        color: #ef4444;
    }

    .status-badge.warning {
        background: #4a2c0f;
        border: 1px solid #facc15;
        color: #facc15;
    }

.customoverlay .content {
    padding: 8px 12px;
}

.customoverlay .info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #4a5568;
}

.customoverlay .info-label {
    color: #ffffff;
    font-size: 1em;
    font-weight: 400;
}

.customoverlay .info-value {
    color: #ffffff;
    font-size: 1em;
    font-weight: 500;
}

.customoverlay .status-value {
    color: #68d391;
    font-size: 0.9em;
    font-weight: 500;
}

    .customoverlay .status-value.error {
        color: #bdbdbd;
    }

    .customoverlay .status-value.off {
        color: #878787;
    }

.customoverlay .timestamp {
    text-align: left;
    padding-top: 8px;
    margin-top: 4px;
}

.customoverlay .timestamp-text {
    color: #bdbdbd;
    font-size: 0.9em;
    font-weight: 400;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .customoverlay {
        min-width: 180px;
        bottom: 75px;
    }

        .customoverlay .school-name {
            font-size: 14px;
        }

        .customoverlay .info-grid {
            gap: 8px;
        }

        .customoverlay .info-item {
            padding: 6px;
        }
}

/*#endregion */


.cctv-grid {
    flex: 1;
    height: calc(100vh - 145px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    overflow-y: auto;
    margin-top: 15px;
}

.cctv-item {
    background: #2a2a2a;
    border-radius: 8px;
    position: relative;
    max-height: 252px;
}

.cctv-video {
    width: 100%;
    height: 100%;
    min-height: 200px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .cctv-video video {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.no-signal {
    color: #666;
    font-size: 14px;
    text-align: center;
}

.cctv-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    padding: 6px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cctv-name {
    font-size: 14px;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cctv-status {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-active {
    background: #00ff00;
    box-shadow: 0 0 6px #00ff00;
  


}

.status-inactive {
    background: #ff0000;
    box-shadow: 0 0 6px #ff0000;
 

    
}

.status-netError {
    background: #d4bb24;
    box-shadow: 0 0 6px #ff0000;
    padding-left:1px;
  
}



.cctv-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #252525;
    padding: 3px 10px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    color: #ccc;
}

.cctv-controls {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.cctv-item:hover .cctv-controls {
    opacity: 1;
}

.control-btn {
    background: rgba(0,0,0,0.7);
    border: 1px solid #444;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .control-btn:hover {
        background: rgba(74, 144, 226, 0.8);
        border-color: #4a90e2;
    }


/* ½ºÅ©·Ñ¹Ù ½ºÅ¸ÀÏ¸µ */
.cctv-grid::-webkit-scrollbar {
    width: 6px;
}

.cctv-grid::-webkit-scrollbar-track {
    background: #1a1a1a;
    border-radius: 3px;
}

.cctv-grid::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

    .cctv-grid::-webkit-scrollbar-thumb:hover {
        background: #666;
    }

/* ¹ÝÀÀÇü */
@media (max-width: 1200px) {
    .cctv-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {

    .cctv-grid {
        grid-template-columns: repeat(2, 1fr);
        height: auto;
        margin-bottom: 50px;
    }
}

@media (max-width: 600px) {

    .cctv-grid {
        grid-template-columns: 1fr;
    }
}

.status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: auto;
    border-radius: 50%;
    background-color: #1e1e1e;
}

    .status-icon.success {
        background-color: rgba(34, 197, 94, 0.1);
        color: #22c55e; 
    }

    .status-icon.error {
        background-color: rgba(255, 255, 255, 0.1);
        color: #878787;
    }

    .status-icon i {
        font-size: 18px;
    }

.scrollable-tbody {
    display: block;
    overflow-y: auto;
}

    .scrollable-tbody tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .scrollable-tbody::-webkit-scrollbar {
        width: 6px;
    }

    .scrollable-tbody::-webkit-scrollbar-thumb {
        background: #444;
        border-radius: 3px;
    }

/* header °íÁ¤ È¿°ú À¯Áö */
.table-operation-history thead {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.table-operation-history td,
.table-operation-history th {
    background-color: #2b2b2b ;
    vertical-align: middle;
    font-size: 0.9rem;
    color: #e0e0e0;
    border-bottom: 3px solid #212121;
}

.table-operation-history th {
    background-color: transparent;
    font-weight: 500;
    color: #a0aec0;
}

.table-operation-history tr {
    border-radius: 8px;
}

    .table-operation-history tr td:first-child {
        border-top-left-radius: 5px;
        border-bottom-left-radius: 5px;
        text-wrap-mode: nowrap;
    }

    .table-operation-history tr td:last-child {
        border-top-right-radius: 5px;
        border-bottom-right-radius: 5px;
    }

table.dataTable {
    margin-bottom: 20px !important;
}

div.dataTables_wrapper div.dataTables_info {
    padding-top: 0;
    color: var(--bs-gray);
}
div.dataTables_wrapper div.dataTables_length {
    color: var(--bs-gray);
}
div.dataTables_wrapper td.dataTables_empty {
    color: var(--bs-gray);
}

.dataTables_wrapper .row {
    display: flex;
    justify-content: space-between;
    flex-direction: row-reverse;
}

div.table-responsive > div.dataTables_wrapper > div.row > div[class^=col-]:last-child{
    padding-left:0;
}

div.dataTables_wrapper div.dataTables_filter {
    text-align: left;
}
    div.dataTables_wrapper div.dataTables_filter input{
        margin-left: 0;
    }

    div.dataTables_wrapper div.dataTables_length label {
        text-align: right;
        float: right;
    }
/*// »õ·Î ÁöÁ¤*/

.btn_yes {
    color:#4497dd;
    font-weight: bold;
    cursor:pointer;
    margin-right:10px
}
.btn_no {
    color:#ef4444;
    font-weight: bold;
    cursor: pointer
}
.modal_title {
    color: #a1c8f7;
    font-weight: bold;
    margin-right: 10px
}

.btn-primary, .btn-light{
    min-width:100px !important;

}