* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background: #f0f2f5;
    display: flex;
}

/* 사이드바 */
.sidebar {
    width: 220px;
    height: 100vh;
    background: #1a1f2e;
    color: white;
    position: fixed;
    padding: 20px 0;
}

.logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid #2d3347;
}

.logo h2 {
    color: #4a9eff;
    font-size: 20px;
}

.logo p {
    color: #8892a4;
    font-size: 12px;
    margin-top: 4px;
}

nav {
    padding: 20px 0;
}

nav a {
    display: block;
    padding: 12px 20px;
    color: #8892a4;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
}

nav a:hover, nav a.active {
    background: #2d3347;
    color: white;
    border-left: 3px solid #4a9eff;
}

/* 메인 */
.main {
    margin-left: 220px;
    padding: 30px;
    width: calc(100% - 220px);
}

/* 헤더 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header h1 {
    font-size: 24px;
    color: #1a1f2e;
}

#current-time {
    color: #8892a4;
    font-size: 14px;
}

/* 요약 카드 */
.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-icon {
    font-size: 32px;
}

.card-info h3 {
    font-size: 28px;
    color: #1a1f2e;
}

.card-info p {
    font-size: 13px;
    color: #8892a4;
    margin-top: 4px;
}

/* 섹션 */
.section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.section h2 {
    font-size: 16px;
    color: #1a1f2e;
    margin-bottom: 16px;
}

/* 출입문 */
.door-card {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fc;
    border-radius: 8px;
    padding: 12px 16px;
    margin: 0 8px 8px 0;
}

.door-name {
    font-weight: 600;
    font-size: 14px;
}

.btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.btn-open {
    background: #4a9eff;
    color: white;
}

.btn-lock {
    background: #ff4a4a;
    color: white;
}

.btn-unlock {
    background: #4aff7a;
    color: #1a1f2e;
}

/* ── 출입문 제어 카드 (2줄: 이름+상태 / 버튼들) ── */
.door-ctrl {
    background: #f8f9fc;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.door-ctrl-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.door-ctrl .door-name { font-weight: 600; font-size: 15px; }
.door-ctrl-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}
.door-ctrl-actions .btn { flex: 1; min-width: 64px; line-height: 1.2; text-align: center; }
/* 차분한 파랑 톤 + 잠금만 빨강(위험 강조) */
.dbtn-open    { background: #4a9eff; color: #fff; }
.dbtn-hold    { background: #7bb8f5; color: #0b2a4a; }
.dbtn-release { background: #eef3f9; color: #2b5a8c; border: 1px solid #cbd8e8; }
.dbtn-lock    { background: #ff4a4a; color: #fff; }
/* 현재 상태(활성) 또는 열기 3초 플래시 → 눈에 띄게 강조 */
.door-ctrl-actions .btn.active,
.door-ctrl-actions .btn.flash {
    outline: 3px solid rgba(0, 0, 0, .22);
    outline-offset: -1px;
    filter: saturate(1.5) brightness(.94);
    font-weight: 700;
}
/* 개방유지·잠금 현재 상태 메시지 줄 */
.door-state {
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    padding: 7px 10px;
    border-radius: 6px;
}
.door-state.hold { background: #fff3e0; color: #a05a00; }
.door-state.lock { background: #ffe6e6; color: #c62828; }

/* 회사 관리 카드 (모바일 우선 — 가로 스크롤 제거) */
#companies-list { max-width: 640px; }
.company-card {
    background: #fff; border-radius: 12px; padding: 16px;
    margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.cc-head { display: flex; align-items: center; justify-content: space-between;
           gap: 10px; flex-wrap: wrap; }
.cc-name { font-size: 17px; font-weight: 700; }
.cc-type { font-size: 13px; padding: 5px 8px; border-radius: 6px; border: 1px solid #ddd; }
.cc-info { font-size: 13px; color: #555; margin-top: 8px; line-height: 1.7; }
.cc-info > div { word-break: break-all; }
.cc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cc-actions .btn {
    flex: 1; min-width: 72px;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 4px; line-height: 1.2; white-space: nowrap;
}

/* 목록 카드 (모바일 우선 공통) — 사용자 등 */
#users-list, #groups-list { max-width: 640px; }
.list-card {
    background: #fff; border-radius: 12px; padding: 16px;
    margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.list-card.clickable { cursor: pointer; transition: box-shadow .12s; }
.list-card.all-access { border: 1.5px solid #2d6cdf; background: #f5f9ff; }
.list-card.clickable:hover { box-shadow: 0 4px 14px rgba(0,0,0,.14); }
.lc-head { display: flex; align-items: center; justify-content: space-between;
           gap: 10px; flex-wrap: wrap; }
.lc-title { font-size: 17px; font-weight: 700; }
/* 이름 줄 오른쪽 끝 묶음 (상태 배지 + 삭제) */
.lc-head-right { display: flex; align-items: center; gap: 8px; }
.lc-info { font-size: 13px; color: #555; margin-top: 8px; line-height: 1.7; }
.lc-info > div { word-break: break-all; }
.lc-info > span { display: inline-block; margin-right: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.lc-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.lc-actions .btn {
    flex: 1; min-width: 72px;
    display: inline-flex; align-items: center; justify-content: center;
    gap: 4px; line-height: 1.2; white-space: nowrap;
}

/* 근태 필터 (모바일 우선) */
.att-filters { max-width: 640px; }
.att-filters .f-tabs { margin-bottom: 10px; }
.att-filters .f-tabs .tab { flex: 1; text-align: center; padding: 9px 6px; }

.f-row {
    display: flex; gap: 8px; flex-wrap: wrap;
    align-items: center; margin-bottom: 10px;
}
.f-row:last-child { margin-bottom: 0; }
#grant-dept-filter { padding: 8px 10px; border: 1px solid #e0e0e0; border-radius: 8px;
    font-size: 14px; max-width: 46%; }
.grant-urow .move-opt { margin: 0; }
.f-grow { flex: 1 1 120px; min-width: 0; }   /* min-width:0 이 없으면 입력칸이 안 줄어듦 */
.f-full { width: 100%; }

.f-field { margin-bottom: 14px; }
.f-field > label {
    display: block; font-size: 13px; color: #667;
    font-weight: 600; margin-bottom: 6px;
}
.f-field input, .f-field select, .att-filters input, .att-filters select {
    padding: 9px 12px; border: 1px solid #e0e0e0;
    border-radius: 8px; font-size: 14px; outline: none;
    max-width: 100%; box-sizing: border-box;
}
.f-field input:focus, .att-filters input:focus, .att-filters select:focus { border-color: #4a9eff; }

.f-more { margin-top: 4px; border-top: 1px solid #eee; padding-top: 10px; }
/* 접기 두 개를 한 줄에 나란히 (좁으면 자동 줄바꿈) */
.f-more-row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; }
.f-more-row > .f-more { flex: 1 1 200px; margin-top: 4px; }
.f-more > summary {
    cursor: pointer; font-size: 14px; color: #4a9eff;
    font-weight: 600; padding: 6px 0; list-style: none;
}
.f-more > summary::-webkit-details-marker { display: none; }
.f-more[open] > summary { margin-bottom: 10px; }
.f-hint { color: #999; font-size: 12.5px; margin: 6px 0 0; line-height: 1.5; }

/* 섹션 제목 */
.sec-title { margin: 0 0 12px; font-size: 17px; }
.sec-head {
    display: flex; justify-content: space-between;
    align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
}
.sec-head .sec-title { margin: 0; }

/* 모달 하단 유의사항 */
.notice-box {
    background: #fff8e6; border: 1px solid #ffe0a3;
    border-radius: 10px; padding: 14px 16px; margin-top: 18px;
}
.notice-title { font-weight: 700; font-size: 14px; color: #8a6100; margin-bottom: 8px; }
.notice-list { margin: 0; padding-left: 20px; }
.notice-list li {
    font-size: 13px; color: #6b5320; line-height: 1.65; margin-bottom: 7px;
}
.notice-list li:last-child { margin-bottom: 0; }

/* 화면 간 이동 배너 (스케줄 ↔ 출입문/출입권한) */
.nav-banner {
    background: linear-gradient(135deg, #2d6cdf, #4a9eff);
    color: #fff; border-radius: 10px; padding: 14px 16px;
    margin-bottom: 16px; box-shadow: 0 3px 12px rgba(45,108,223,.3);
}
.nav-banner .nb-title { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.nav-banner .nb-sub { font-size: 13px; opacity: .9; margin-top: 8px; line-height: 1.5; }
.nav-banner .nb-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.nb-btn {
    display: inline-block; background: #fff; color: #2d6cdf;
    border: 0; border-radius: 8px; padding: 11px 18px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    text-decoration: none; box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.nb-btn:hover { background: #f0f6ff; }

/* 모달 최상단 '새로 만들기' 유도 버튼 */
.make-new {
    display: block; width: 100%; box-sizing: border-box;
    background: #f0f6ff; border: 1.5px dashed #4a9eff; color: #2d6cdf;
    border-radius: 10px; padding: 13px; margin-bottom: 16px;
    font-size: 15px; font-weight: 700; text-align: center;
    cursor: pointer; text-decoration: none;
}
.make-new:hover { background: #e3efff; }
.make-new small { display: block; font-weight: 400; font-size: 12.5px;
                  color: #6b8cbf; margin-top: 3px; }

/* 근무 요일 선택 — 체크박스를 알약 버튼처럼 */
.wd-group { display: flex; gap: 6px; flex-wrap: wrap; }
.wd { position: relative; flex: 1 1 40px; min-width: 40px; cursor: pointer; }
.wd input { position: absolute; opacity: 0; width: 0; height: 0; }
.wd span {
    display: block; text-align: center; padding: 9px 4px;
    border: 1px solid #e0e0e0; border-radius: 8px;
    background: #fff; color: #8892a4; font-size: 14px; user-select: none;
}
.wd input:checked + span {
    background: #4a9eff; border-color: #4a9eff; color: #fff; font-weight: 600;
}

.f-check {
    display: flex; align-items: center; gap: 7px;
    font-size: 14px; color: #556; cursor: pointer; margin-bottom: 10px;
}
.f-check input { width: 17px; height: 17px; }

/* 공휴일 목록 */
.hol-item {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; padding: 8px 10px; margin-top: 6px;
    background: #f7f9fc; border-radius: 8px; font-size: 14px;
}
.hol-del {
    border: 1px solid #ffd0d0; background: #fff; color: #d05050;
    border-radius: 6px; padding: 5px 10px; font-size: 13px; cursor: pointer;
}

/* 회사 기능설정 — 세부 옵션 들여쓰기 */
.feat-item { border-bottom: 1px solid #f0f2f5; padding: 10px 0; }
.feat-main { display: block; font-size: 15px; }
.sub-feats { margin: 8px 0 0 22px; }
.sub-feat {
    display: block; font-size: 13.5px; color: #667; padding: 5px 0;
}

/* 근태 집계 카드 (모바일 우선) */
#attendance-list { max-width: 640px; }
.att-card {
    background: #fff; border-radius: 10px; padding: 12px 14px;
    margin-bottom: 8px; box-shadow: 0 1px 5px rgba(0,0,0,.06);
}
.att-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.att-who { font-weight: 700; font-size: 15px; }
.att-meta {
    display: flex; gap: 14px; flex-wrap: wrap;
    margin-top: 6px; font-size: 13px; color: #666;
}
.att-absent { background: #fff7f7; border-left: 3px solid #ff6b6b; }
.att-absent .att-who { color: #b04141; }

/* 출입 이벤트 카드 (모바일 우선) */
#events-list { max-width: 640px; }
.ev-card {
    background: #fff; border-radius: 10px; padding: 12px 14px;
    margin-bottom: 8px; box-shadow: 0 1px 5px rgba(0,0,0,.06);
}
.ev-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ev-who { font-weight: 700; font-size: 15px; }
.ev-meta {
    display: flex; gap: 14px; flex-wrap: wrap;
    margin-top: 6px; font-size: 13px; color: #666;
}

/* 조직 관리: 세로 접이식 조직도 (모바일 우선) */
#org-tree { max-width: 640px; }
.org-group {
    background: #fff; border-radius: 12px; padding: 12px 14px;
    margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.org-group > summary, .org-sub > summary {
    cursor: pointer; font-size: 16px; font-weight: 700;
    display: flex; align-items: center; gap: 6px; list-style: none;
}
.org-group > summary::-webkit-details-marker,
.org-sub > summary::-webkit-details-marker { display: none; }
.org-group > summary::before, .org-sub > summary::before {
    content: '▸'; color: #999; font-weight: 400; transition: transform .15s;
}
.org-group[open] > summary::before, .org-sub[open] > summary::before {
    content: '▾';
}
.org-group > summary small, .org-sub > summary small { color: #aaa; font-weight: 400; }
.org-cnt {
    margin-left: auto; font-size: 12px; font-weight: 700;
    background: #eef3ff; color: #2d6cdf; padding: 2px 9px; border-radius: 10px;
}
.org-sub {
    margin: 8px 0 0 14px; padding: 10px 12px;
    background: #f8f9fc; border-radius: 10px;
}
.org-sub > summary { font-size: 15px; }
.org-actions { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.org-actions .btn { padding: 5px 10px; font-size: 12px; min-height: 30px; }
.org-members { margin-top: 6px; }
.org-user {
    display: flex; align-items: center; justify-content: space-between;
    padding: 9px 10px; border-radius: 8px; cursor: pointer;
    border: 1px solid #eef0f5; margin-bottom: 6px; font-size: 14px;
    transition: background .12s;
}
.org-user:hover { background: #eef3ff; }
.org-user.sel { background: #e8f0ff; border-color: #2d6cdf; font-weight: 600; }
/* 여러 명 선택 시 하단 고정 바 (폰에서 엄지로 닿게) */
.sel-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
    background: #2d6cdf; color: #fff; padding: 10px 14px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    box-shadow: 0 -2px 10px rgba(0,0,0,.2);
}
.sel-bar .btn { min-height: 36px; padding: 7px 14px; }
.org-emp { color: #888; margin-left: 4px; }
.org-move { color: #2d6cdf; font-size: 12px; font-weight: 700; }
.org-empty { color: #bbb; font-size: 13px; padding: 4px 2px; }
.move-opt {
    display: block; padding: 11px 10px; border: 1px solid #e3e6ee;
    border-radius: 8px; margin-bottom: 7px; cursor: pointer; font-size: 15px;
}
.move-opt:hover { background: #f5f8ff; }

/* 클릭해서 수정하는 행(사용자 목록 등) */
tr.row-click { cursor: pointer; transition: background .12s; }
tr.row-click:hover { background: #eef3ff; }
tr.row-click:hover td:first-child::before {
    content: '✏️ ';
    font-size: 12px;
}

.btn:hover {
    opacity: 0.85;
}

/* 테이블 */
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

th {
    text-align: left;
    padding: 10px 12px;
    background: #f8f9fc;
    color: #8892a4;
    font-weight: 500;
}

td {
    padding: 12px;
    border-bottom: 1px solid #f0f2f5;
    color: #1a1f2e;
}

.badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-fail { background: #ffebee; color: #c62828; }
.badge-door { background: #e3f2fd; color: #1565c0; }
.badge-other { background: #f5f5f5; color: #616161; }

/* 잠금 깜빡임 효과 */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.badge-locked {
    background: #ffebee;
    color: #c62828;
    animation: blink 1s ease-in-out infinite;
}

/* 검색 바 */
.search-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;          /* 좁은 화면에서 가로로 삐져나가지 않게 */
}

.search-bar input { min-width: 0; }   /* flex 아이템 기본 min-width:auto 해제 */

.search-bar input {
    flex: 1;
    padding: 10px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.search-bar input:focus {
    border-color: #4a9eff;
}

/* 탭 */
.tab-group {
    display: flex;
    gap: 8px;
}

.tab {
    padding: 8px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 13px;
    color: #8892a4;
}

.tab.active {
    background: #4a9eff;
    color: white;
    border-color: #4a9eff;
}

/* 모달 */
.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    z-index: 1000;
    width: 420px;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f2f5;
}

.modal-header h3 {
    font-size: 16px;
    color: #1a1f2e;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #8892a4;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f2f5;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* 폼 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    color: #8892a4;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

.form-group input:focus {
    border-color: #4a9eff;
}

/* =========================================
   반응형 (스마트폰 / 태블릿) + 터치 친화
   ========================================= */
@media (max-width: 820px) {
    body { display: block; }

    /* 사이드바 → 상단 가로 메뉴 */
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
        padding: 8px 0 0;
    }
    .logo {
        padding: 8px 16px;
        display: flex;
        align-items: baseline;
        gap: 8px;
        border-bottom: none;
    }
    .logo h2 { font-size: 18px; }
    .logo p { margin-top: 0; }
    nav {
        padding: 12px 16px 16px;
        border-bottom: 1px solid #2d3347;
    }
    /* 홈(대시보드): 메뉴를 타일로 → 탭하면 바로 이동 */
    body.home nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    body.home nav a {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        background: #2d3347;
        color: #e8ecf4;
        border-radius: 14px;
        padding: 20px 10px;
        font-size: 15px;
        font-weight: 600;
        min-height: 64px;
        border-left: none;
    }
    body.home nav a:hover, body.home nav a.active {
        background: #4a9eff;
        color: #fff;
        border-left: none;
    }
    /* 그 외 페이지: 홈 버튼(대시보드)만 노출 */
    body:not(.home) nav a { display: none; }
    body:not(.home) nav a[href="/dashboard"] {
        display: inline-flex;
        align-items: center;
        background: #2d3347;
        color: #fff;
        border-radius: 10px;
        padding: 12px 18px;
        font-size: 15px;
        border-left: none;
    }
    .logged-in { padding: 8px 16px; color: #8892a4; font-size: 13px; }

    /* 메인 전체폭 */
    .main {
        margin-left: 0;
        width: 100%;
        padding: 16px;
    }
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-bottom: 16px;
    }
    .header h1 { font-size: 20px; }

    /* 카드 2열 — 대시보드가 한 화면에 들어오도록 압축 */
    .cards { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
    .card { padding: 13px; gap: 10px; }
    .card-icon { font-size: 22px; }
    .card-info h3 { font-size: 21px; }
    .card-info p { font-size: 12px; }

    .section { padding: 16px; }

    /* 터치 친화적 버튼/탭 (한 화면에 더 들어오도록 살짝 낮춤) */
    .btn {
        padding: 9px 12px;
        font-size: 14px;
        min-height: 38px;
    }
    .header .btn { width: 100%; }
    .tab {
        padding: 9px 12px;
        font-size: 14px;
        min-height: 38px;
        flex: 1;
        text-align: center;
    }
    .tab-group { display: flex; flex-wrap: wrap; gap: 8px; }

    /* 검색바 세로 배치 */
    .search-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .search-bar input { width: 100%; }

    /* 표 가로 스크롤 (좁은 화면에서 잘림 방지) */
    .section table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    th, td { padding: 12px 10px; }

    /* 출입문 카드 줄바꿈 */
    .door-card { display: flex; flex-wrap: wrap; width: 100%; }

    /* 모달 화면에 맞게 */
    .modal {
        width: 94vw;
        max-width: 94vw;
        max-height: 88vh;
        overflow-y: auto;
    }
    .modal-content { max-width: 100% !important; }
    .modal-body { padding: 16px; }
    .modal-footer { padding: 12px 16px; }
    .modal-footer .btn { flex: 1; }

    /* 입력/셀렉트: 16px 이상이어야 iOS 자동확대 안 함 */
    input, select, textarea { font-size: 16px !important; }

    /* 로그인 박스 */
    .login-box { width: 90vw !important; max-width: 360px; }
}

/* 손끝 터치 여백 (모든 기기 공통, 살짝 키움) */
@media (hover: none) and (pointer: coarse) {
    .btn, .tab, nav a { min-height: 44px; }
    input[type="checkbox"] { width: 18px; height: 18px; }
}

/* 식수·이용 집계 통계 타일 */
.usage-stats { display: flex; gap: 12px; flex-wrap: wrap; }
.ustat {
    flex: 1 1 120px; background: #fff; border: 1px solid #e6ebf2;
    border-radius: 12px; padding: 16px; text-align: center;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.ustat-num { font-size: 30px; font-weight: 800; color: #2d6cdf; line-height: 1.1;
             font-variant-numeric: tabular-nums; }
.ustat-label { font-size: 13px; color: #667; margin-top: 6px; }
.ustat-total { background: #f5f9ff; border-color: #b9d0f7; }
.ustat-total .ustat-num { color: #1a4fa0; }
.ustat-unit { font-size: 14px; font-weight: 600; color: #99a; margin-left: 2px; }
.ustat-amt { font-size: 15px; font-weight: 700; color: #1f9d57; margin-top: 4px; }
