@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;700&display=swap');

body * {
    margin: 0;
    padding: 0;
    color: #333;
    box-sizing: border-box;
    font-family: 'Noto Sans KR', sans-serif;
}

:root {
    --primary-blue: var(--inet-primary, #1e3a8a);
    --text-slate: #475569;
    --table-header-color: #ffffff;
    --table-font-size: clamp(12px, 0.75vw + 4px, 15px); /* 화면 크기에 따른 유동적 폰트 */
    --table-line-height: 1.28;
}

.container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
    background-color: transparent;
}

.card-container {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid #f1f5f9;
}

/* device-list: wider centered container on desktop */
@media (min-width: 1024px) {
    body.device-list-page .container {
        max-width: 1820px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
    }
    body.device-list-page .device-list-container {
        width: 100%;
    }
}

.need:before {
    content: "*";
    color: #ff4757;
    margin: 0 0 0 3px;
}

input, textarea, select {
    border-radius: 5px;
    border: 1px solid #ccd1d3;
    padding: 10px;
    transition: all 0.3s ease;
    resize: none;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    box-shadow: 0 0 5px rgba(61, 150, 255, 0.5);
    border-color: rgba(61, 150, 255, 0.5);
}

.title {
    text-align: left;
    margin-bottom: 25px;
    padding-left: 10px;
}

.title .subject {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--inet-text-slate, #1e293b);
    margin-bottom: 8px;
}

.title .subtitle {
    font-size: 1.1rem;
    color: #64748b;
    font-weight: 500;
}

.main {
    font-weight: 400;
}

.sign_table {
    width: 100%;
}

.sign_table input, .sign_table select, .sign_table textarea {
    width: 100%;
    margin: 5px 0 20px 0;
}

.gender {
    display: flex;
    align-items: center;
    margin: 10px 0 20px 0;
}

.gender label {
    margin-right: 10px;
    display: flex;
    align-items: center;
}

.gender input {
    width: 20px;
    margin-right: 5px;
    margin-bottom: 5px;
}

.sub-but {
    width: auto;
    padding: 8px 16px;
    border: none;
    background-color: rgba(61, 150, 255, 0.87);
    color: white;
    font-weight: 700;
    font-size: 14px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.sub-but:hover {
    background-color: rgba(37, 90, 154, 0.87);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.but {
    margin-top: 40px;
    width: 100%;
    text-align: center;
}

/* device table */
.device-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.device-table th {
    background-color: var(--primary-blue);
    color: var(--table-header-color);
    padding: 7px 8px;
    text-align: center;
    font-weight: 700;
    font-size: var(--table-font-size);
    line-height: var(--table-line-height);
    vertical-align: middle;
    border: none;
    white-space: nowrap; /* 헤더는 가급적 1줄 유지 */
}

.device-table td {
    padding: 6px 8px;
    text-align: center;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-family: 'Noto Sans KR', sans-serif;
    font-size: var(--table-font-size);
    color: var(--text-slate);
    line-height: var(--table-line-height);
    white-space: normal; /* 기본적으로 줄바꿈 허용 */
    word-break: keep-all; /* 한글 단어 깨짐 방지 */
}

.device-table tbody tr:hover {
    background-color: #f8fafc;
}

/* column widths (class-based) */
.col-school { width: 80px; }
.col-cno { width: 100px; }
.col-uid { width: 100px; }
.col-manage { width: 90px; }
.col-type { width: 80px; }
.col-pos { width: 60px; }
.col-name { width: 80px; }
.col-mfg { width: 90px; }
.col-model { width: 120px; }
.col-date { width: 90px; }
.col-ip { width: 100px; }
.col-room { width: 80px; }
.col-purpose { width: 70px; }
.col-set { width: 80px; }
.col-note { width: 100px; }
.col-unused { width: 50px; }
.col-action { width: 90px; }
.col-inspect { width: 60px; }

/* desktop: min-width for device list table (+ CNo) */
@media (min-width: 1024px) {
    .device-list-container .device-table {
        min-width: 1780px;
        width: 100%;
    }
}

/* horizontal scroll wrapper (desktop/laptop) */
.device-table-scroll-wrapper {
    overflow-x: auto;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

/* 유형 컬럼 스타일 - 4글자까지 줄바꿈 안되게 */
.device-type {
    white-space: nowrap;
}

/* IP 주소 컬럼 스타일 - 줄바꿈 안되게 */
.ip-address {
    white-space: nowrap;
}

@media (max-width: 1400px) {
    .device-table tbody td.col-model,
    .device-table tbody td.col-manage {
        max-height: calc(2 * var(--table-line-height) * 1em);
        overflow: hidden;
        vertical-align: middle;
    }
}

/* 불용 컬럼 스타일 (헤더·행 class 기준 — bulk/검사열 유무와 무관) */
.device-table th.col-unused,
.device-table tbody td.col-unused {
    text-align: center;
    font-weight: 600;
}

@media (max-width: 1220px) {
    .device-type, 
    .ip-address,
    .device-table td:nth-child(11) {
        white-space: normal;
    }
}

/* 버튼 공통 스타일 */
.btn {
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn i { font-size: 1.1rem; }

.btn-primary { background: #4f46e5; color: #fff; } /* 장비 등록 - 파랑 */
.btn-orange { background: #f59e0b; color: #fff; } /* 장비 검사 - 주황 */
.btn-cyan { background: #06b6d4; color: #fff; } /* QR 다운 - 하늘 */
.btn-success { background: #10b981; color: #fff; } /* 엑셀 다운 - 초록 */
.btn-danger { background: #ef4444; color: #fff; } /* 일괄 삭제 - 빨강 */
.btn-history { background: #0ea5e9; color: #fff; } /* 수정내역 - 밝은 파랑 */
.btn-outline { background: #fff; color: #4b5563; border: 1px solid #d1d5db; box-shadow: none; }
.btn-outline:hover { background: #f9fafb; border-color: #9ca3af; }



.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    filter: brightness(1.1);
}

/* 버튼 안의 아이콘 스타일 */
.btn-primary i, .btn-success i, .btn-warning i, .btn-danger i {
    margin-right: 6px;
}

.btn-warning i, .btn-danger i {
    margin-right: 0;
}

/* 액션 버튼 컨테이너 */
.action-buttons-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
}

/* 테이블 내 액션 버튼 */
.action-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
}

/* 필터 컨테이너 */
.filter-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #f1f5f9;
}

.filter-action-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-row-integrated {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    background: #f8fafc;
    padding: 15px 25px;
    border-radius: 12px;
}

.filter-row-integrated .select-group {
    display: flex;
    gap: 12px;
}

.filter-row-integrated .checkbox-group {
    display: flex;
    gap: 25px;
    background: #fff;
    padding: 8px 18px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.action-buttons-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.stats-bar {
    background: #f1f5f9;
    padding: 12px 25px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center; /* 추가: 세로 중앙 정렬 */
    flex-wrap: wrap;    /* 추가: 모바일 대응 */
    gap: 15px;          /* 추가: 간격 설정 */
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
}

.stats-bar span {
    font-weight: 700;
    color: #475569;
}

.stats-bar .highlight {
    color: #2563eb;
    font-size: 1.1rem;
    margin: 0 5px;
}

/* 장비 목록·점검: 통계 줄 중앙에 페이지네이션 */
.stats-bar.stats-bar--with-pager {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
}

/* 교실·유형·페이지네이션을 한 줄에 유지 */
.stats-bar.stats-bar--with-pager .stats-bar__filters-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
}

.stats-bar.stats-bar--with-pager .stats-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
}

/* stats bar selects: compact for single-row layout */
.stats-bar.stats-bar--with-pager .stats-filters select,
.stats-bar.stats-bar--with-pager .stats-type-pager > select {
    max-width: 11rem;
    min-width: 5.25rem;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    box-sizing: border-box;
}

.stats-bar.stats-bar--with-pager .stats-type-pager {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.stats-bar.stats-bar--with-pager .stats-type-pager > select {
    flex-shrink: 0;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination {
    margin-top: 0;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
}

/* stats bar: compact pager (page dropdown + prev/next) */
.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact {
    gap: 10px;
    line-height: 1;
    padding: 0 2px;
    --pager-control-height: 28px;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__btn,
.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__num {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 9px;
    min-height: var(--pager-control-height);
    height: var(--pager-control-height);
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    color: #475569;
    background: #fff;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__btn {
    padding: 0 10px;
    min-width: 26px;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__btn i {
    font-size: 0.65rem;
    line-height: 1;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__sym {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1;
    display: inline-block;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__num {
    min-width: 26px;
    padding: 0 8px;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact a.pagination__btn:hover,
.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact a.pagination__num:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__btn--disabled {
    opacity: 0.38;
    cursor: default;
    background: #f8fafc;
    color: #94a3b8;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__num.active {
    background-color: rgba(61, 150, 255, 0.9);
    color: #fff;
    border-color: rgba(61, 150, 255, 0.9);
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__pagepos {
    font-size: 11px;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    padding: 0 4px;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__page-select-wrap {
    display: inline-flex;
    align-items: center;
    margin: 0 2px;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__page-select {
    box-sizing: border-box;
    min-width: 4.5rem;
    max-width: 8rem;
    min-height: var(--pager-control-height);
    height: var(--pager-control-height);
    padding: 0 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.2;
    color: #334155;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    cursor: pointer;
    vertical-align: middle;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__page-select:hover {
    border-color: #94a3b8;
    background: #f8fafc;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__page-select:focus {
    outline: none;
    border-color: #3d96ff;
    box-shadow: 0 0 0 2px rgba(61, 150, 255, 0.2);
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__goto {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.stats-bar.stats-bar--with-pager .stats-bar__pager .pagination.pagination--compact .pagination__goto-input {
    width: 3.25rem;
    padding: 3px 6px;
    font-size: 11px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    text-align: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.stats-bar.stats-bar--with-pager .stats-info {
    margin-left: auto;
    flex-shrink: 0;
}

.p.search-pill-container {
    display: flex;
    justify-content: center;
    margin: 40px 0;
}

.search-pill {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 50px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    padding: 6px;
    width: 700px;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.search-pill:focus-within {
    border-color: #3b82f6;
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.15);
}

.search-pill input {
    flex: 1;
    border: none !important;
    box-shadow: none !important;
    padding: 14px 30px;
    font-size: 1.1rem;
    background: transparent;
    font-weight: 500;
}

.search-pill .btn-search {
    background: #3b82f6;
    color: #fff;
    border-radius: 50%;
    border: none;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}

.search-pill .btn-camera {
    background: #10b981;
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 5px;
}

.search-pill .btn-search:hover, .search-pill .btn-camera:hover {
    opacity: 0.9;
}

/* 장비 등록/수정: 제조사·제품명 — 목록 필터 셀렉트와 유사 트리거 + 펼침 시 스크롤 패널(목록 모달 학교선택과 동일) */
.inet-product-combobox {
    position: relative;
    width: 100%;
}

.inet-product-combobox-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

.inet-product-combobox-ui {
    position: relative;
    width: 100%;
}

.inet-product-combobox-trigger {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    font-size: 13px;
    color: #333;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 38px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.inet-product-combobox-trigger:hover {
    border-color: #c5c5c5;
}

.inet-product-combobox-trigger:focus {
    outline: none;
    border-color: rgba(61, 150, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(61, 150, 255, 0.2);
}

.inet-product-combobox-trigger .fa-chevron-down {
    font-size: 0.7rem;
    color: #6b7280;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.inet-product-combobox.open .inet-product-combobox-trigger .fa-chevron-down {
    transform: rotate(180deg);
}

.inet-product-combobox-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inet-product-combobox-panel {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    max-height: 42vh;
    max-height: 42dvh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    z-index: 3000;
}

.inet-product-combobox.open .inet-product-combobox-panel {
    display: block;
}

.inet-product-combobox-option {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    color: #333;
}

.inet-product-combobox-option:last-child {
    border-bottom: none;
}

.inet-product-combobox-option:hover,
.inet-product-combobox-option:focus {
    background: #f8f9fa;
}

.inet-product-combobox-option.selected {
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

/* 등록/수정 폼 카드: 트리거를 기존 form-group-modern 셀렉트와 톤 맞춤 */
.form-group-modern .inet-product-combobox-trigger {
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    font-size: 1rem;
    min-height: 44px;
}

.form-group-modern .inet-product-combobox-option {
    padding: 0.65rem 1rem;
    font-size: 1rem;
}

/* 태블릿·모바일: 콤보 트리거/옵션 글자 살짝 축소 (3칸 가로 배치 등 좁은 폭에서 말줄임 완화) */
@media (max-width: 1024px) {
    .form-group-modern .inet-product-combobox-trigger {
        font-size: 0.875rem;
    }
    .form-group-modern .inet-product-combobox-option {
        font-size: 0.875rem;
    }
}

@media (max-width: 768px) {
    .form-group-modern .inet-product-combobox-trigger {
        font-size: 0.8125rem;
        padding: 0.55rem 0.7rem;
        min-height: 40px;
    }
    .form-group-modern .inet-product-combobox-option {
        font-size: 0.8125rem;
        padding: 0.5rem 0.7rem;
    }
    /* 고유번호·관리번호 한 줄 3칸: 조금 더 작게 */
    .number-fields-wrapper .inet-product-combobox-trigger {
        font-size: 0.75rem;
        padding: 0.5rem 0.55rem;
        min-height: 38px;
    }
    .number-fields-wrapper .inet-product-combobox-option {
        font-size: 0.75rem;
    }
}

/* 고유번호·관리번호 등 multi-input 안 셀렉트: 래퍼가 flex를 받도록 */
.multi-input-container > .inet-product-combobox {
    flex: 1;
    min-width: 120px;
}

/* datalist 대체: 입력값 유지 + ▼로 전체 목록 패널 */
.inet-datalist-combobox {
    position: relative;
    width: 100%;
    min-width: 0;
}

.inet-datalist-combobox-ui {
    display: flex;
    align-items: stretch;
    gap: 6px;
    width: 100%;
}

.inet-datalist-combobox-ui > input {
    flex: 1;
    min-width: 0;
}

.inet-datalist-combobox-caret {
    flex-shrink: 0;
    width: 40px;
    min-height: 38px;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    font-size: 0.65rem;
    line-height: 1;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.inet-datalist-combobox-caret:hover {
    border-color: #c5c5c5;
    background: #f1f5f9;
}

.inet-datalist-combobox-caret:focus {
    outline: none;
    border-color: rgba(61, 150, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(61, 150, 255, 0.2);
}

.inet-datalist-combobox.open .inet-datalist-combobox-caret-icon {
    display: inline-block;
    transform: rotate(180deg);
}

.inet-datalist-combobox-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    margin-top: 4px;
    max-height: 42vh;
    max-height: 42dvh;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    z-index: 12000;
}

.inet-datalist-combobox-options {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 40vh;
    max-height: 40dvh;
}

.inet-datalist-combobox-option {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    color: #333;
}

.inet-datalist-combobox-option:last-child {
    border-bottom: none;
}

.inet-datalist-combobox-option:hover,
.inet-datalist-combobox-option:focus {
    background: #f8f9fa;
}

.inet-datalist-combobox-empty {
    padding: 12px;
    font-size: 13px;
    color: #64748b;
    text-align: center;
}

.form-group-modern .inet-datalist-combobox-caret {
    min-height: 44px;
    border-radius: 12px;
    border-width: 2px;
    border-color: #e5e7eb;
    font-size: 0.7rem;
}

.device-edit-field .inet-datalist-combobox-caret {
    min-height: 38px;
}

.multi-input-container > .inet-datalist-combobox {
    flex: 1;
    min-width: 120px;
}

@media (max-width: 768px) {
    .form-group-modern .inet-datalist-combobox-caret {
        min-height: 40px;
        width: 36px;
    }
}

.floorplan-bulk-operator .inet-datalist-combobox {
    flex: 1;
    min-width: 100px;
    max-width: none;
}

.floorplan-data-table td .inet-datalist-combobox {
    width: 100%;
    min-width: 0;
}

/* 교실 헤더 스타일 - Image 1의 파란색 바 */
.device-table tr.classroom-header {
    background: #3b82f6 !important;
    border: none;
}

.device-table tr.classroom-header td {
    padding: 7px 14px;
    font-weight: 700;
    color: #fff !important;
    text-align: left;
    font-size: 0.95rem;
}

.device-table tr.classroom-header i { margin-right: 10px; color: #fff; }

/* 담당자 서브 헤더 - 연한 갈색/회색 바 */
.device-table tr.operator-header {
    background: #f1f5f9 !important;
}

.device-table tr.operator-header td {
    padding: 5px 16px;
    font-weight: 600;
    color: #64748b !important;
    text-align: left;
    font-size: 0.88rem;
    border-bottom: 1px solid #e2e8f0;
}

.device-table tr.operator-header i { margin-right: 8px; color: #94a3b8; }

/* 그룹 헤더 스타일 */
.device-table tr.group-header {
    background-color: #eaeef2 !important;
    border-top: 1px solid #ccc;
}

.device-table tr.group-header td {
    padding: 5px 8px;
    font-weight: 600;
    color: #2d3436;
    text-align: left;
}

.device-table tr.group-header strong {
    font-size: 13px;
    font-weight: 700;
    color: #3d96ff;
}

.device-table tr.group-item {
    border-left: 3px solid transparent;
}

.device-table tr.set-group-item {
    border-left: 3px solid #3d96ff;
}

.device-table tr.operator-group-item {
    border-left: 3px solid #ffa502;
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 8px;
    list-style: none;
    padding-left: 0;
}

.pagination a {
    padding: 6px 12px;
    text-decoration: none;
    border: 1px solid #e0e0e0;
    color: #495057;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: inline-block;
    font-size: 13px;
}

.pagination a:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
}

.pagination a.active {
    background-color: rgba(61, 150, 255, 0.87);
    color: white;
    border-color: rgba(61, 150, 255, 0.87);
}

.pagination a.disabled {
    color: #6c757d;
    pointer-events: none;
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* device 페이지 전용 스타일 */
.device-form-container {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 30px 20px;
    margin-bottom: 30px;
}

.device-title {
    text-align: center;
    margin-bottom: 25px;
}

.device-title h2 {
    font-weight: 700;
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: #2d3a4b;
}

.device-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 0;
}

.table-striped th, .table-striped td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.btn-primary, .btn-warning, .btn-danger {
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.form-select, .form-control {
    border-radius: 4px;
    font-size: 0.9rem;
}

.pagination .page-link {
    border-radius: 4px;
    color: #2d3a4b;
}

.pagination .active .page-link {
    background: #2d3a4b;
    color: #fff;
    border-color: #2d3a4b;
}

/* 모바일 페이지네이션: 줄바꿈, 터치 영역 확보 */
@media (max-width: 768px) {
    #device-pagination .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding: 12px 8px;
        margin-top: 20px;
    }
    #device-pagination .pagination li {
        margin: 0;
    }
    #device-pagination .pagination a {
        min-width: 44px;
        min-height: 44px;
        padding: 10px 12px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        box-sizing: border-box;
    }
    #device-pagination .pagination li.pagination-ellipsis {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        padding: 0 4px;
    }
    #device-pagination .pagination li.pagination-ellipsis span {
        color: #6c757d;
        font-size: 14px;
        user-select: none;
    }
}

/* 페이지 컨테이너 수정 - 네비게이션 바와 푸터를 고려 */
.device-list-container {
    padding: 10px 0;
    width: 100%;
}

/* 반응형 스타일 조정 */
@media (max-width: 1220px) {
    .container {
        width: 95%;
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
    }
    
    .footer-links {
        margin-left: 0;
        margin-top: 1rem;
    }
    
    .footer-links ul {
        flex-direction: column;
    }
    
    .container {
        padding: 12px;
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
        padding-bottom: max(15px, env(safe-area-inset-bottom));
        margin: 0 auto;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .main {
        padding-left: 0;
        padding-right: 0;
    }
    
    .filter-container {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
    }
    
    .filter-container .sub-but {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .action-buttons-container .btn,
    .action-buttons-container a.btn {
        min-height: 44px;
        touch-action: manipulation;
    }
}


/* 테이블 내 관리 버튼 아이콘 */
.manage-btns { display: flex; gap: 8px; justify-content: center; }
.btn-edit { color: #f59e0b; cursor: pointer; font-size: 1.25rem; }
.btn-delete { color: #ef4444; cursor: pointer; font-size: 1.25rem; }
.btn-edit:hover, .btn-delete:hover { filter: brightness(0.8); }

/* 줄무늬 효과 대신 짝수행 구분 */
.device-table tbody tr:nth-child(even) { background: #fafafa; }

/* Device list / inspection: collapsible mobile toolbox */
.device-page-toolbox {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
    margin-bottom: 8px;
    flex-shrink: 0;
}
.device-page-toolbox > summary {
    list-style: none;
    cursor: pointer;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 0.88rem;
    color: #1e3a8a;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
}
.device-page-toolbox > summary::-webkit-details-marker { display: none; }
.device-page-toolbox-summary-hint {
    margin-left: auto;
    font-weight: 600;
    font-size: 0.8rem;
    color: #64748b;
}
.device-page-toolbox > summary::after {
    content: '\25BC';
    font-size: 0.55rem;
    opacity: 0.65;
    margin-left: 4px;
}
.device-page-toolbox:not([open]) > summary::after {
    content: '\25B6';
}
.device-page-toolbox-panel {
    padding: 0 10px 10px;
    border-top: 1px solid #f1f5f9;
}
@media (min-width: 992px) {
    .device-page-toolbox {
        border: none;
        background: transparent;
        margin-bottom: 0;
    }
    .device-page-toolbox > summary {
        display: none;
    }
    .device-page-toolbox-panel {
        padding: 0;
        border: none;
    }
}
@media (max-width: 991px) {
    .device-page-toolbox-panel .title .subject {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .device-page-toolbox-panel .navbar-search-pill {
        max-width: 100% !important;
        width: 100% !important;
    }
    .device-page-toolbox-panel .view-mode-toggle .btn span {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }
    .device-page-toolbox-panel .view-mode-toggle .btn {
        position: relative;
        min-width: 40px;
        justify-content: center;
    }
    .stats-bar.stats-bar--with-pager {
        padding: 6px 10px !important;
        margin-bottom: 6px !important;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px 8px;
    }
    .stats-bar.stats-bar--with-pager .stats-bar__filters-row {
        flex: 1 1 auto;
        min-width: 0;
        flex-wrap: nowrap;
        gap: 6px 8px;
    }
    /* row1: classroom + type + pager */
    .stats-bar.stats-bar--with-pager .stats-filters {
        width: auto;
        flex: 0 1 auto;
    }
    .stats-bar.stats-bar--with-pager .stats-filters select {
        width: auto;
        max-width: min(30vw, 7.5rem);
        min-width: 4.75rem;
        padding: 3px 6px !important;
        font-size: 0.74rem !important;
    }
    .stats-bar.stats-bar--with-pager .stats-type-pager {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
        flex-wrap: nowrap;
        gap: 6px;
    }
    .stats-bar.stats-bar--with-pager .stats-type-pager > select {
        flex: 0 1 auto;
        min-width: 0;
        max-width: min(28vw, 7rem);
        padding: 3px 6px !important;
        font-size: 0.74rem !important;
    }
    .stats-bar.stats-bar--with-pager .stats-bar__pager {
        flex: 1 1 auto;
        justify-content: center;
        min-width: 0;
    }
    .stats-bar.stats-bar--with-pager .stats-bar__pager .pagination {
        justify-content: center;
    }
    /* stats text: full width below filters row */
    .stats-bar.stats-bar--with-pager .stats-info {
        flex-basis: 100%;
        margin-left: 0;
        width: 100%;
        justify-content: flex-start;
        font-size: 0.78rem;
        gap: 8px 12px !important;
    }
    .stats-bar.stats-bar--with-pager .stats-info .stats-info-line2 {
        display: none;
    }
    .device-list-page .stats-bar.stats-bar--with-pager .stats-classroom-order-btn {
        display: none !important;
    }
}
.detail-row .detail-panel-heading {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
}
.detail-item--note .detail-value {
    white-space: pre-wrap;
    font-weight: 500;
}
.detail-row .detail-panel-heading .fa-chevron-down {
    transition: transform 0.2s ease;
}
.detail-row.active .detail-panel-heading .fa-chevron-down {
    transform: rotate(-180deg);
}
