:root {
    --navy: #193b65;
    --navy-dark: #102b4c;
    --blue: #1e5b9b;
    --light: #f3f6fa;
    --line: #dbe3ec;
    --text: #172033;
    --muted: #667085;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Malgun Gothic", "Apple SD Gothic Neo", Arial, sans-serif;
    background: var(--light);
    color: var(--text);
}
button, input, select, textarea { font: inherit; }

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 15% 20%, rgba(255,255,255,.13), transparent 28%),
        linear-gradient(135deg, var(--navy-dark), var(--navy));
}
.login-card {
    width: min(440px, 100%);
    background: white;
    border-radius: 20px;
    box-shadow: 0 22px 70px rgba(0,0,0,.28);
    padding: 38px;
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-brand img { width: 300px; max-width: 100%; height: auto; object-fit: contain; }
.login-brand h1 { margin: 12px 0 4px; color: var(--navy); }
.login-brand p { margin: 0; color: var(--muted); }
.login-form { display: grid; gap: 10px; }
.login-form label { font-weight: 700; margin-top: 7px; }
.login-form input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #ccd6e2;
    border-radius: 10px;
    outline: none;
}
.login-form input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(30,91,155,.14);
}
.btn-primary {
    background: var(--navy);
    color: white;
    border: 0;
    border-radius: 9px;
    padding: 11px 18px;
    cursor: pointer;
}
.btn-login { margin-top: 18px; padding: 14px; font-weight: 700; }
.login-footer {
    margin-top: 25px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}
.alert { padding: 12px; border-radius: 8px; margin-bottom: 14px; }
.alert-error { background: #fff0f0; color: #b42318; }

.top-header {
    background: var(--navy);
    color: white;
    padding: 24px 28px;
    box-shadow: 0 2px 7px rgba(0,0,0,.12);
}
.top-header.compact { padding-top: 16px; padding-bottom: 16px; }
.brand-row {
    max-width: 1800px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.brand { display: flex; align-items: center; gap: 18px; }
.brand img { width: 245px; max-width: 35vw; height: auto; object-fit: contain; }
.brand h1 { margin: 0 0 8px; font-size: 28px; }
.brand p { margin: 0; opacity: .86; }
.user-area { display: flex; align-items: center; gap: 14px; }
.btn-logout, .btn-back {
    color: white;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.35);
    padding: 9px 13px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
}
.dashboard-wrap { max-width: 1820px; margin: 0 auto; padding: 26px; }
.toolbar {
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 22px;
}
.toolbar h2 { margin: 0 0 5px; }
.toolbar p { margin: 0; color: var(--muted); }
.search-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.search-controls input {
    min-width: 320px;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}
.search-controls select {
    padding: 10px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: white;
}
.btn-secondary {
    border: 1px solid #b8c5d3;
    background: white;
    border-radius: 8px;
    padding: 10px 14px;
    cursor: pointer;
}
.table-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(17, 24, 39, .05);
}
.result-count {
    padding: 12px 16px;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 1150px; }
th {
    background: #eaf0f7;
    text-align: left;
    padding: 15px 14px;
    font-size: 14px;
    white-space: nowrap;
}
td {
    padding: 13px 14px;
    border-top: 1px solid #e5e9ef;
    vertical-align: middle;
}
tbody tr:hover { background: #f8fbff; }
.hospital-link, .action-link {
    color: #164f88;
    text-decoration: none;
    font-weight: 700;
}
.status-badge {
    display: inline-flex;
    min-width: 72px;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 13px;
}
.status-normal { color: #087a38; background: #ddf7e7; }
.status-info { color: #8a6900; background: #fff4c5; }
.status-warning { color: #a84b00; background: #ffead5; }
.status-critical { color: #b42318; background: #fee4e2; }
.status-unknown { color: #475467; background: #eaecf0; }
.btn-kakao, .btn-sms {
    border: 0;
    border-radius: 7px;
    padding: 8px 11px;
    cursor: pointer;
    font-weight: 700;
}
.btn-kakao { background: #fee500; color: #191919; }
.btn-sms { background: #e8f1fb; color: #14538c; }
.empty { text-align: center; padding: 35px; color: var(--muted); }

.modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    display: grid;
    place-items: center;
    padding: 20px;
    z-index: 50;
}
.modal[hidden] { display: none; }
.modal-card {
    width: min(520px, 100%);
    background: white;
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 25px 80px rgba(0,0,0,.3);
}
.modal-title { display: flex; justify-content: space-between; align-items: center; }
.modal-title h3 { margin: 0; }
.modal-title button {
    border: 0; background: transparent; font-size: 26px; cursor: pointer;
}
.modal-card textarea {
    width: 100%; padding: 12px; border: 1px solid #ccd6e2;
    border-radius: 8px; resize: vertical;
}
.modal-actions {
    margin: 14px 0 8px; display: flex; justify-content: end; gap: 8px;
}
.modal-card small { color: var(--muted); }

@media (max-width: 900px) {
    .toolbar, .brand-row { align-items: stretch; flex-direction: column; }
    .search-controls input { min-width: 100%; }
    .brand h1 { font-size: 22px; }
    .user-area { justify-content: space-between; }
}


/* 실제 선진메디칼 로고의 투명 배경과 가로 비율 최적화 */
.login-brand img,
.brand img {
    display: block;
}
@media (max-width: 700px) {
    .brand img { width: 210px; max-width: 100%; }
    .login-brand img { width: 260px; }
}


.toolbar-stack {
    display: block;
}
.toolbar-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 15px;
}
.date-quick-buttons {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
}
.date-quick-buttons button {
    border: 1px solid #b8c5d3;
    background: white;
    color: #24486d;
    border-radius: 8px;
    padding: 9px 14px;
    cursor: pointer;
    font-weight: 700;
}
.date-quick-buttons button:hover,
.date-quick-buttons button.active {
    background: #173b68;
    border-color: #173b68;
    color: white;
}
.custom-date-area {
    margin-bottom: 13px;
    padding: 12px;
    border: 1px solid #d7e0ea;
    background: #f8fbff;
    border-radius: 9px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.custom-date-area[hidden] {
    display: none;
}
.custom-date-area label {
    font-weight: 700;
}
.custom-date-area input {
    margin-left: 6px;
    padding: 8px 10px;
    border: 1px solid #c4cfdb;
    border-radius: 7px;
}
.search-controls.full-width {
    width: 100%;
}
.search-controls.full-width input {
    flex: 1;
}
.period-label {
    margin-left: 14px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #e8f1fb;
    color: #174f83;
    font-size: 13px;
    font-weight: 700;
}
.btn-pdf-send {
    border: 0;
    border-radius: 7px;
    padding: 8px 11px;
    cursor: pointer;
    font-weight: 700;
    background: #173b68;
    color: white;
}
@media (max-width: 900px) {
    .toolbar-title {
        align-items: stretch;
        flex-direction: column;
    }
    .date-quick-buttons button {
        flex: 1;
    }
}


/* V3.0 CONFIG 및 새로고침 */
.btn-header {
    color: white;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.35);
    padding: 9px 13px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}
.btn-header:hover, .btn-logout:hover { background: rgba(255,255,255,.22); }
.btn-config { min-width: 105px; }
.column-hidden { display: none !important; }
.config-card { width: min(650px, 100%); max-height: 90vh; overflow-y: auto; }
.small-card { width: min(420px, 100%); }
.config-section { margin-top: 18px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: #f8fbff; }
.config-section h4 { margin: 0 0 13px; color: var(--navy); }
.column-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.column-options label, .refresh-options label, .refresh-enabled { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.column-options input, .refresh-options input, .refresh-enabled input { width: 18px; height: 18px; }
.refresh-options { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 13px; }
.refresh-enabled { margin-top: 15px; font-weight: 700; }
.btn-refresh-now { border: 0; border-radius: 8px; padding: 10px 15px; background: #e8f1fb; color: #14538c; cursor: pointer; font-weight: 800; }
.config-password { width: 100%; padding: 13px; border: 1px solid #cbd5e1; border-radius: 8px; }
.config-help { color: var(--muted); font-size: 14px; }
.config-error { color: #b42318; background: #fff0f0; border-radius: 7px; padding: 9px 11px; }
@media (max-width: 700px) {
    .column-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .user-area { flex-wrap: wrap; }
}

/* ============================================================
   Smart Care V2 확장 화면 전용 스타일
   .v2-head가 존재하는 화면에서만 적용되어 V1과 충돌하지 않습니다.
   ============================================================ */
body:has(.v2-head) *{box-sizing:border-box}body:has(.v2-head),body:has(.v2-head){min-height:100%}body:has(.v2-head){margin:0;background:#f3f6fb;font-family:"Malgun Gothic","Apple SD Gothic Neo",Arial,sans-serif;color:#172033}body:has(.v2-head) a{color:inherit}body:has(.v2-head) .v2-head{background:#0c2035;color:#fff;padding:15px 24px;display:flex;justify-content:space-between;gap:20px;align-items:center;box-shadow:0 2px 8px rgba(15,23,42,.16);position:sticky;top:0;z-index:50}body:has(.v2-head) .v2-brand{display:flex;align-items:center;gap:11px;min-width:260px}body:has(.v2-head) .v2-brand img{width:38px;height:38px;object-fit:contain;background:#fff;border-radius:8px;padding:3px}body:has(.v2-head) .v2-brand b{display:block;font-size:18px}body:has(.v2-head) .v2-brand small{display:block;margin-top:3px;color:#b9c8d8}body:has(.v2-head) .v2-head nav{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}body:has(.v2-head) .v2-head nav a{color:#e7eef7;text-decoration:none;border:1px solid #ffffff26;background:#ffffff0d;padding:9px 12px;border-radius:8px;font-size:14px;font-weight:700}body:has(.v2-head) .v2-head nav a:hover{background:#1769aa;border-color:#4a90c7;color:#fff}body:has(.v2-head) .v2-wrap{max-width:1540px;margin:auto;padding:26px}body:has(.v2-head) .page-title-row,body:has(.v2-head) .title{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:18px}body:has(.v2-head) .page-title-row h1,body:has(.v2-head) .title h1,body:has(.v2-head) h1{margin:0;font-size:29px;color:#102d50}body:has(.v2-head) .page-title-row p{margin:7px 0 0;color:#64748b}body:has(.v2-head) .card{background:#fff;border:1px solid #dbe3ef;border-radius:14px;padding:21px;margin:16px 0;box-shadow:0 4px 15px rgba(15,23,42,.045)}body:has(.v2-head) .card h2{margin:0 0 17px;font-size:19px;color:#163a63}body:has(.v2-head) .btn,body:has(.v2-head) button.btn{display:inline-flex;align-items:center;justify-content:center;gap:5px;background:#1769aa;color:#fff;border:1px solid #1769aa;border-radius:8px;padding:10px 15px;text-decoration:none;cursor:pointer;font:inherit;font-weight:800}body:has(.v2-head) .btn:hover{background:#0f5792}body:has(.v2-head) .btn.secondary{background:#fff;color:#334155;border-color:#cbd5e1}body:has(.v2-head) .btn.secondary:hover{background:#f8fafc}body:has(.v2-head) .form-page{max-width:1180px;margin:auto}body:has(.v2-head) .form-section{padding:24px}body:has(.v2-head) .formgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px}body:has(.v2-head) .formgrid label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:800;color:#334155}body:has(.v2-head) .formgrid input,body:has(.v2-head) .formgrid select,body:has(.v2-head) .formgrid textarea,body:has(.v2-head) .search input,body:has(.v2-head) .search select{width:100%;min-height:43px;padding:9px 11px;border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#111827;font:inherit;font-weight:400}body:has(.v2-head) .formgrid textarea{resize:vertical}body:has(.v2-head) .formgrid input:focus,body:has(.v2-head) .formgrid select:focus,body:has(.v2-head) .formgrid textarea:focus,body:has(.v2-head) .search input:focus{outline:3px solid rgba(37,99,235,.14);border-color:#2563eb}body:has(.v2-head) .wide{grid-column:1/-1}body:has(.v2-head) .required{color:#dc2626}body:has(.v2-head) .check-row{display:flex;gap:22px;flex-wrap:wrap;margin-top:17px;padding:14px;background:#f8fafc;border-radius:9px}body:has(.v2-head) .check-row label{font-weight:800}body:has(.v2-head) .form-actions{display:flex;justify-content:flex-end;gap:10px;margin:18px 0 35px}body:has(.v2-head) .flash{padding:13px 16px;border-radius:9px;background:#dcfce7;color:#166534;margin-bottom:12px;font-weight:700}body:has(.v2-head) .flash.error{background:#fee2e2;color:#991b1b}body:has(.v2-head) .search{display:flex;gap:8px;align-items:center}body:has(.v2-head) .search input{flex:1}body:has(.v2-head) .scroll{overflow:auto;border:1px solid #e2e8f0;border-radius:10px}body:has(.v2-head) table{width:100%;border-collapse:collapse;min-width:850px;background:#fff}body:has(.v2-head) th,body:has(.v2-head) td{padding:11px 12px;border-bottom:1px solid #e5e7eb;text-align:left;font-size:14px}body:has(.v2-head) th{background:#f8fafc;color:#334155;font-size:13px;white-space:nowrap}body:has(.v2-head) tbody tr:hover{background:#f8fbff}body:has(.v2-head) .stat-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px}body:has(.v2-head) .stat-card{background:#fff;border:1px solid #dbe3ef;border-radius:13px;padding:19px;box-shadow:0 4px 14px rgba(15,23,42,.04)}body:has(.v2-head) .stat-card span,body:has(.v2-head) .stat-card small{display:block;color:#64748b}body:has(.v2-head) .stat-card strong{display:block;font-size:28px;color:#163a63;margin:8px 0}body:has(.v2-head) .info-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1px;background:#e2e8f0;border:1px solid #e2e8f0;border-radius:9px;overflow:hidden}body:has(.v2-head) .info-grid>div{background:#fff;padding:14px;display:grid;grid-template-columns:155px 1fr;gap:12px}body:has(.v2-head) .info-grid b{color:#475569}body:has(.v2-head) .info-grid span{word-break:break-all}body:has(.v2-head) .ok{color:#15803d;font-weight:800}body:has(.v2-head) .button-row{display:flex;gap:9px;flex-wrap:wrap;align-items:center}body:has(.v2-head) .button-row form{margin:0}body:has(.v2-head) .help{color:#64748b;font-size:13px;margin:15px 0 0}body:has(.v2-head) .login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:25px;background:linear-gradient(135deg,#edf4fb,#f8fafc)}body:has(.v2-head) .login-card{width:min(420px,100%);background:#fff;border:1px solid #dbe3ef;border-radius:18px;padding:32px;box-shadow:0 20px 55px rgba(15,23,42,.13)}body:has(.v2-head) .login-brand{text-align:center}body:has(.v2-head) .login-brand img{max-width:150px;max-height:70px;object-fit:contain}body:has(.v2-head) .login-brand h1{margin:15px 0 4px}body:has(.v2-head) .login-brand p{color:#64748b}body:has(.v2-head) .login-form{display:flex;flex-direction:column;gap:8px;margin-top:25px}body:has(.v2-head) .login-form label{font-weight:800;color:#334155;margin-top:7px}body:has(.v2-head) .login-form input{height:45px;border:1px solid #cbd5e1;border-radius:9px;padding:0 12px;font:inherit}body:has(.v2-head) .btn-login{width:100%;margin-top:13px}body:has(.v2-head) .login-footer{display:flex;justify-content:space-between;gap:10px;margin-top:22px;color:#64748b;font-size:12px}body:has(.v2-head) .alert{padding:12px;border-radius:8px;margin:10px 0}body:has(.v2-head) .alert-error{background:#fee2e2;color:#991b1b}body:has(.v2-head) .alert-success{background:#dcfce7;color:#166534}
@media (max-width:950px){body:has(.v2-head) .v2-head{align-items:flex-start;flex-direction:column;position:static}body:has(.v2-head) .v2-head nav{justify-content:flex-start}body:has(.v2-head) .stat-grid{grid-template-columns:1fr 1fr}body:has(.v2-head) .v2-wrap{padding:16px}body:has(.v2-head) .info-grid{grid-template-columns:1fr}}
@media (max-width:650px){body:has(.v2-head) .formgrid,body:has(.v2-head) .stat-grid{grid-template-columns:1fr}body:has(.v2-head) .wide{grid-column:auto}body:has(.v2-head) .page-title-row{align-items:flex-start;flex-direction:column}body:has(.v2-head) .v2-wrap{padding:11px}body:has(.v2-head) .form-section{padding:17px}body:has(.v2-head) .info-grid>div{grid-template-columns:1fr}body:has(.v2-head) .login-footer{flex-direction:column;text-align:center}}

/* ============================================================
   V2.4 공통 상단 헤더 — 대시보드와 전체 관리 화면 동일 적용
   ============================================================ */
.smartcare-common-header .brand-row,
.top-header .brand-row {
    max-width: 1900px;
}

.common-menu-area {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.common-menu-area .header-user {
    white-space: nowrap;
    margin-right: 2px;
}

.btn-header.common-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.btn-header.common-nav-btn.active {
    background: #fff;
    border-color: #fff;
    color: var(--navy);
    box-shadow: 0 3px 9px rgba(0, 0, 0, .16);
}

.btn-header.btn-config {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 39px;
    text-decoration: none;
    white-space: nowrap;
}

.enterprise-content-wrap {
    max-width: 1820px;
    margin: 0 auto;
    padding: 26px;
}

/* 예전 V2 전용 헤더가 없는 통합 화면에서도 기존 V2 본문 디자인 유지 */
.enterprise-content-wrap .page-title-row,
.enterprise-content-wrap .title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.enterprise-content-wrap .page-title-row h1,
.enterprise-content-wrap .title h1,
.enterprise-content-wrap h1 {
    margin: 0;
    font-size: 29px;
    color: #102d50;
}
.enterprise-content-wrap .page-title-row p { margin: 7px 0 0; color: #64748b; }
.enterprise-content-wrap .card { background:#fff; border:1px solid #dbe3ef; border-radius:14px; padding:21px; margin:16px 0; box-shadow:0 4px 15px rgba(15,23,42,.045); }
.enterprise-content-wrap .card h2 { margin:0 0 17px; font-size:19px; color:#163a63; }
.enterprise-content-wrap .btn,
.enterprise-content-wrap button.btn { display:inline-flex; align-items:center; justify-content:center; gap:5px; background:#1769aa; color:#fff; border:1px solid #1769aa; border-radius:8px; padding:10px 15px; text-decoration:none; cursor:pointer; font:inherit; font-weight:800; }
.enterprise-content-wrap .btn.secondary { background:#fff; color:#334155; border-color:#cbd5e1; }
.enterprise-content-wrap .form-page { max-width:1180px; margin:auto; }
.enterprise-content-wrap .form-section { padding:24px; }
.enterprise-content-wrap .formgrid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px 20px; }
.enterprise-content-wrap .formgrid label { display:flex; flex-direction:column; gap:7px; font-size:13px; font-weight:800; color:#334155; }
.enterprise-content-wrap .formgrid input,
.enterprise-content-wrap .formgrid select,
.enterprise-content-wrap .formgrid textarea,
.enterprise-content-wrap .search input,
.enterprise-content-wrap .search select { width:100%; min-height:43px; padding:9px 11px; border:1px solid #cbd5e1; border-radius:8px; background:#fff; color:#111827; font:inherit; font-weight:400; }
.enterprise-content-wrap .wide { grid-column:1/-1; }
.enterprise-content-wrap .check-row { display:flex; gap:22px; flex-wrap:wrap; margin-top:17px; padding:14px; background:#f8fafc; border-radius:9px; }
.enterprise-content-wrap .form-actions { display:flex; justify-content:flex-end; gap:10px; margin:18px 0 35px; }
.enterprise-content-wrap .flash { padding:13px 16px; border-radius:9px; background:#dcfce7; color:#166534; margin-bottom:12px; font-weight:700; }
.enterprise-content-wrap .flash.error { background:#fee2e2; color:#991b1b; }
.enterprise-content-wrap .search { display:flex; gap:8px; align-items:center; }
.enterprise-content-wrap .search input { flex:1; }
.enterprise-content-wrap .scroll { overflow:auto; border:1px solid #e2e8f0; border-radius:10px; }
.enterprise-content-wrap table { width:100%; border-collapse:collapse; min-width:850px; background:#fff; }
.enterprise-content-wrap th,
.enterprise-content-wrap td { padding:11px 12px; border-bottom:1px solid #e5e7eb; text-align:left; font-size:14px; }
.enterprise-content-wrap th { background:#f8fafc; color:#334155; font-size:13px; white-space:nowrap; }
.enterprise-content-wrap .stat-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.enterprise-content-wrap .stat-card { background:#fff; border:1px solid #dbe3ef; border-radius:13px; padding:19px; box-shadow:0 4px 14px rgba(15,23,42,.04); }
.enterprise-content-wrap .stat-card span,
.enterprise-content-wrap .stat-card small { display:block; color:#64748b; }
.enterprise-content-wrap .stat-card strong { display:block; font-size:28px; color:#163a63; margin:8px 0; }
.enterprise-content-wrap .info-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:1px; background:#e2e8f0; border:1px solid #e2e8f0; border-radius:9px; overflow:hidden; }
.enterprise-content-wrap .info-grid > div { background:#fff; padding:14px; display:grid; grid-template-columns:155px 1fr; gap:12px; }
.enterprise-content-wrap .button-row { display:flex; gap:9px; flex-wrap:wrap; align-items:center; }
.enterprise-content-wrap .help { color:#64748b; font-size:13px; margin:15px 0 0; }

@media (max-width: 1350px) {
    .smartcare-common-header .brand-row,
    .top-header .brand-row { align-items: flex-start; flex-direction: column; }
    .common-menu-area { justify-content: flex-start; width: 100%; }
}

@media (max-width: 700px) {
    .enterprise-content-wrap { padding: 12px; }
    .enterprise-content-wrap .formgrid,
    .enterprise-content-wrap .stat-grid { grid-template-columns: 1fr; }
    .enterprise-content-wrap .wide { grid-column: auto; }
    .common-menu-area .header-user { width: 100%; }
}

/* V2.5 업데이트 관리 */
.update-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}.update-tab{background:#fff;border:1px solid #cbd5e1;border-radius:9px;padding:10px 15px;text-decoration:none;font-weight:800;color:#172033}.update-tab.active{background:#193b65;color:#fff;border-color:#193b65}.release-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin-bottom:15px}.release-grid label{display:flex;flex-direction:column;gap:7px;font-weight:800}.release-grid input,.release-grid select,.release-grid textarea,#keyName{min-height:42px;padding:9px 11px;border:1px solid #cbd5e1;border-radius:8px;background:#fff}.release-grid .wide{grid-column:1/-1}.hash-cell{max-width:260px;word-break:break-all;font-size:11px}.api-key-result{margin-top:15px;padding:15px;background:#fff7d6;border:1px solid #ead17a;border-radius:9px}.api-key-result code{display:block;margin:10px 0;padding:12px;background:#fff;border-radius:7px;word-break:break-all}.common-nav-btn.active{background:#fff!important;color:#193b65!important;border-color:#fff!important}@media(max-width:900px){.release-grid{grid-template-columns:1fr}}

/* V2.6 계약/장비 관리 */
.management-toolbar{display:flex!important;gap:9px;align-items:center;flex-wrap:wrap}.management-toolbar input{flex:1;min-width:280px}.management-toolbar select{min-width:160px}.import-panel{display:flex;justify-content:space-between;align-items:center;gap:20px}.import-panel h2{margin-bottom:5px!important}.import-panel .button-row form{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.import-panel input[type=file]{max-width:330px;padding:8px;border:1px solid #cbd5e1;border-radius:8px;background:#fff}.link-button{border:0;background:transparent;color:#b42318;font-weight:700;cursor:pointer;padding:4px 7px}.action-link{margin-right:6px}@media(max-width:900px){.import-panel{align-items:stretch;flex-direction:column}.management-toolbar input,.management-toolbar select{width:100%;min-width:0}}

/* V2.7 병원 자동등록·사진·컬럼설정 */
.hospital-thumb{width:64px;height:44px;object-fit:cover;border-radius:7px;border:1px solid #cbd5e1}.photo-empty{color:#94a3b8;font-size:12px}.column-manager{display:grid;gap:7px;max-height:55vh;overflow:auto}.column-manager-row{display:flex;align-items:center;justify-content:space-between;padding:9px 11px;border:1px solid #dbe3ec;border-radius:8px;background:#f8fafc}.column-manager-row button{border:1px solid #cbd5e1;background:#fff;border-radius:6px;margin-left:4px;cursor:pointer}.hospital-full-info{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-json{margin-top:18px}.settings-json summary{cursor:pointer;font-weight:800;color:#193b65}.settings-json pre{white-space:pre-wrap;word-break:break-word;background:#0f172a;color:#e2e8f0;padding:16px;border-radius:10px;max-height:520px;overflow:auto}.card-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.photo-drop-zone{min-height:150px;border:2px dashed #9fb2c8;border-radius:14px;background:#f8fbff;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;text-align:center;padding:22px;transition:.2s}.photo-drop-zone.dragover{border-color:#1e5b9b;background:#eaf3fd;transform:scale(1.005)}.photo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px;margin-top:18px}.photo-gallery figure{margin:0;border:1px solid #dbe3ec;border-radius:12px;overflow:hidden;background:#fff}.photo-gallery img{width:100%;height:145px;object-fit:cover;display:block}.photo-gallery figcaption{padding:9px;font-size:12px;display:flex;justify-content:space-between;gap:7px;align-items:center}.photo-gallery form{margin:0}.photo-gallery button{border:0;background:#fee2e2;color:#991b1b;border-radius:6px;padding:5px 8px;cursor:pointer}.col-sequence,.row-sequence{text-align:center!important;font-weight:800;color:#475569}@media(max-width:700px){.hospital-full-info{grid-template-columns:1fr}}

/* V2.8 병원 상세·서비스관리 */
.detail-tabs{position:sticky;top:0;z-index:20;display:flex;gap:7px;flex-wrap:wrap;padding:10px;background:#f3f6fa;border:1px solid var(--line);border-radius:10px}.detail-tabs a{padding:9px 13px;border-radius:8px;background:#fff;border:1px solid #cbd5e1;color:#193b65;text-decoration:none;font-weight:800}.card-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.photo-drop-zone{border:2px dashed #9fb2c8;border-radius:13px;padding:28px;text-align:center;background:#f8fbff;margin:14px 0;display:flex;flex-direction:column;align-items:center;gap:9px}.photo-drop-zone[hidden]{display:none}.photo-drop-zone.dragover{background:#e8f1fb;border-color:#193b65}.photo-gallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px}.photo-gallery figure{margin:0;border:1px solid #dbe3ec;border-radius:10px;overflow:hidden;background:#fff}.photo-open{border:0;padding:0;width:100%;height:155px;background:#eef3f8;cursor:zoom-in}.photo-open img{width:100%;height:100%;object-fit:cover}.photo-gallery figcaption{padding:9px;display:grid;gap:5px;font-size:12px}.photo-gallery figcaption time{font-weight:800;color:#193b65}.photo-gallery figcaption form{justify-self:end}.photo-lightbox{position:fixed;inset:0;background:rgba(0,0,0,.9);z-index:200;display:flex;align-items:center;justify-content:center}.photo-lightbox[hidden]{display:none}.lb-stage{max-width:82vw;max-height:88vh;text-align:center;color:#fff;overflow:hidden}.lb-stage img{max-width:80vw;max-height:82vh;object-fit:contain;transition:transform .12s}.lb-close,.lb-prev,.lb-next{position:absolute;border:0;background:rgba(255,255,255,.16);color:#fff;cursor:pointer;border-radius:50%;font-size:42px;width:56px;height:56px}.lb-close{right:24px;top:20px}.lb-prev{left:24px}.lb-next{right:24px}.service-status{display:inline-flex;padding:5px 10px;border-radius:999px;font-weight:800}.status-미처리{background:#fee2e2;color:#b42318}.status-보류{background:#ffedd5;color:#c2410c}.status-완료{background:#dcfce7;color:#15803d}.service-search select{min-width:135px}.service-detail-cell{max-width:350px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hospital-preview{padding:14px;background:#f8fbff;border:1px solid #dbe3ec;border-radius:9px;line-height:1.7}.contact-btn{min-width:92px}@media(max-width:700px){.detail-tabs{position:static}.photo-gallery{grid-template-columns:1fr 1fr}.lb-prev{left:5px}.lb-next{right:5px}.service-search{flex-direction:column}.service-search>*{width:100%!important}}

/* SmartCare V2.9 */
.hospital-hero{display:flex;justify-content:space-between;gap:22px;align-items:center;margin-bottom:14px}.hospital-hero h1{margin:0 0 5px}.dashboard-action-grid{display:grid;grid-template-columns:repeat(5,minmax(105px,1fr));gap:9px}.dashboard-action{border:1px solid #d7e2ef;background:#fff;border-radius:12px;padding:11px 12px;min-height:70px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;color:#193b65;text-decoration:none;cursor:pointer;box-shadow:0 3px 10px rgba(20,55,90,.06)}.dashboard-action:hover{transform:translateY(-1px);border-color:#7aa7d8;background:#f4f9ff}.dashboard-action span{font-size:21px}.dashboard-action b{font-size:13px}.service-search-v29{display:grid!important;grid-template-columns:minmax(360px,1fr) 165px 125px auto auto;gap:9px;align-items:center}.service-keyword{min-width:0;width:100%!important}.service-small-select{width:100%!important}.title-actions,.report-send-buttons{display:flex;gap:7px;align-items:center}.sort-link{color:inherit;text-decoration:none;white-space:nowrap}.mini-action{border:1px solid #b9cbe0;border-radius:7px;padding:4px 7px;background:#fff;color:#193b65;cursor:pointer;font-size:11px}.send-state,.stage-badge{display:inline-flex;margin-top:4px;padding:3px 7px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap;background:#e5e7eb;color:#4b5563}.state-성공,.state-발송완료,.state-연결완료,.stage-완료{background:#dcfce7;color:#15803d}.state-발송대기,.state-대기,.state-연결요청,.stage-배정,.stage-방문\ 예정{background:#dbeafe;color:#1d4ed8}.state-실패,.state-수신정보없음,.state-리포트없음{background:#fee2e2;color:#b91c1c}.stage-작업\ 중{background:#fef3c7;color:#92400e}.photo-select{display:flex;gap:5px;align-items:center;font-size:12px;margin:0 0 5px}.column-panel{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:1000;display:flex;align-items:center;justify-content:center}.column-panel[hidden]{display:none}.column-panel-card{width:min(520px,92vw);max-height:82vh;overflow:auto;background:#fff;border-radius:16px;padding:18px;box-shadow:0 25px 70px rgba(0,0,0,.25)}.column-config-row{display:flex;justify-content:space-between;align-items:center;padding:9px 4px;border-bottom:1px solid #edf2f7}.column-config-row button{border:1px solid #d5dfeb;background:#fff;border-radius:6px;margin-left:4px}.service-detail-cell{min-width:220px;max-width:360px}.service-filter-card{padding:12px!important}@media(max-width:980px){.hospital-hero{align-items:flex-start;flex-direction:column}.dashboard-action-grid{width:100%;grid-template-columns:repeat(3,1fr)}.service-search-v29{grid-template-columns:1fr 1fr}.service-keyword{grid-column:1/-1}}@media(max-width:600px){.dashboard-action-grid{grid-template-columns:repeat(2,1fr)}.service-search-v29{grid-template-columns:1fr}.service-keyword{grid-column:auto}}


/* V3.0 공통 관리 테이블 */
.management-page{width:100%}.management-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;margin-bottom:16px}.management-head h1{margin:0;color:#102d50}.management-head p{margin:7px 0 0;color:#64748b}.management-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.management-search{display:grid;grid-template-columns:minmax(280px,1fr) minmax(140px,220px) auto auto;gap:8px;align-items:center}.management-search input,.management-search select{width:100%;min-height:42px;border:1px solid #cbd5e1;border-radius:8px;padding:9px 11px;background:#fff}.management-table-wrap{overflow:auto;padding:0}.management-table-wrap table{table-layout:fixed;width:max-content;min-width:100%;border-collapse:collapse}.management-table-wrap thead th{position:sticky;top:0;z-index:3;background:#eaf0f7;min-width:80px}.admin-sort-btn{width:100%;height:100%;border:0;background:transparent;text-align:left;padding:0;color:inherit;font-weight:800;cursor:pointer;white-space:nowrap}.sort-indicator{font-size:11px;margin-left:4px;color:#64748b}.admin-resizer{position:absolute;right:-3px;top:0;width:7px;height:100%;cursor:col-resize;z-index:5}.admin-resizer:after{content:"";position:absolute;left:3px;top:18%;bottom:18%;width:1px;background:transparent}.management-table-wrap th:hover .admin-resizer:after{background:#2563eb}.column-resize-active,.column-resize-active *{cursor:col-resize!important;user-select:none!important}.management-thumb{width:58px;height:44px;object-fit:cover;border-radius:7px;border:1px solid #dbe3ec;background:#f8fafc}.equipment-photo-cell{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.mini-upload{display:inline-flex;padding:5px 8px;border:1px solid #cbd5e1;border-radius:6px;background:#fff;cursor:pointer;font-size:12px;font-weight:700}.mini-upload input{display:none}.inline-form{display:inline}.link-button{border:0;background:transparent;color:#b42318;cursor:pointer;font-weight:700;padding:3px}.column-manager{display:grid;gap:8px}.column-manager-row{display:flex;justify-content:space-between;align-items:center;border:1px solid #e2e8f0;border-radius:8px;padding:9px 11px}.column-manager-row button{border:1px solid #cbd5e1;background:#fff;border-radius:5px;cursor:pointer;margin-left:4px}.photo-empty{color:#94a3b8;font-size:12px}@media(max-width:900px){.management-head{flex-direction:column}.management-actions{justify-content:flex-start}.management-search{grid-template-columns:1fr 1fr}.management-search input{grid-column:1/-1}}@media(max-width:560px){.management-search{grid-template-columns:1fr}.management-search input{grid-column:auto}}

/* V3.1 장비 사진 등록 · CONFIG · 통계 */
.equipment-drop-section{border-top:1px solid var(--line);padding-top:18px}.equipment-drop-zone{min-height:180px;border:2px dashed #94a3b8;border-radius:14px;background:#f8fafc;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;margin-top:10px;padding:20px;text-align:center}.equipment-drop-zone.dragover{border-color:#2563eb;background:#eff6ff}.equipment-preview-grid{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}.equipment-preview{width:110px;height:90px;object-fit:cover;border-radius:9px;border:1px solid #cbd5e1}.config-center-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.config-center-card{display:flex;flex-direction:column;gap:8px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:24px;text-decoration:none;box-shadow:0 4px 15px rgba(15,23,42,.05)}.config-center-card:hover{border-color:#2563eb;transform:translateY(-1px)}.config-center-card b{font-size:19px;color:var(--navy)}.config-center-card span{color:var(--muted)}.statistics-cards{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:12px}.statistics-card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:18px}.statistics-card span{color:var(--muted);font-weight:700}.statistics-card strong{display:block;font-size:28px;color:var(--navy);margin-top:8px}.statistics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.statistics-panel{margin:0}.statistics-bars{display:flex;flex-direction:column;gap:11px}.statistics-row{display:grid;grid-template-columns:130px 1fr 70px;gap:10px;align-items:center}.statistics-row>div{height:18px;background:#e2e8f0;border-radius:999px;overflow:hidden}.statistics-row i{display:block;height:100%;background:#1e5b9b;border-radius:999px}.statistics-row b{text-align:right}.admin-sort-btn{white-space:nowrap}@media(max-width:1000px){.statistics-cards{grid-template-columns:repeat(3,1fr)}.statistics-grid{grid-template-columns:1fr}}@media(max-width:650px){.config-center-grid,.statistics-cards{grid-template-columns:1fr}.statistics-row{grid-template-columns:90px 1fr 55px}}

/* V3.2 장비 다중 사진 갤러리 및 사진관리 */
.equipment-representative{display:inline-flex;align-items:center;gap:6px;position:relative}.photo-preview-button{border:0;background:transparent;padding:0;cursor:zoom-in}.photo-count-badge{display:inline-flex;align-items:center;justify-content:center;min-width:31px;padding:3px 7px;border-radius:999px;background:#e8f1fb;color:#174f83;font-size:11px;font-weight:800}.management-inline-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.equipment-gallery-modal{background:rgba(2,6,23,.88);z-index:1200}.equipment-gallery-box{position:relative;width:min(1200px,96vw);height:min(850px,92vh);display:grid;grid-template-columns:64px 1fr 64px;grid-template-rows:1fr auto;align-items:center}.gallery-image-stage{height:100%;min-height:320px;display:flex;align-items:center;justify-content:center;overflow:hidden}.gallery-image-stage img{max-width:92%;max-height:82vh;object-fit:contain;transition:transform .12s ease;transform-origin:center}.gallery-close{position:absolute;right:8px;top:4px;z-index:3;width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.15);color:#fff;font-size:30px;cursor:pointer}.gallery-nav{border:0;background:rgba(255,255,255,.12);color:#fff;width:52px;height:70px;border-radius:12px;font-size:50px;cursor:pointer}.gallery-caption{grid-column:1/-1;display:flex;justify-content:center;gap:16px;align-items:center;color:#fff;padding:12px;flex-wrap:wrap}.gallery-caption span{color:#cbd5e1}.equipment-photo-manager-card{width:min(980px,96vw);max-height:92vh;overflow:auto}.equipment-manager-toolbar{display:flex;justify-content:space-between;align-items:center;margin:16px 0 10px;padding:10px 12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:9px}.equipment-manager-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px;max-height:390px;overflow:auto;padding:4px}.equipment-manager-item{position:relative;display:grid;grid-template-columns:22px 72px 1fr;gap:8px;align-items:center;border:1px solid #dbe3ef;border-radius:10px;padding:9px;background:#fff;cursor:pointer}.equipment-manager-item>input{width:17px;height:17px}.equipment-manager-item img{width:72px;height:58px;object-fit:cover;border-radius:7px;cursor:zoom-in}.equipment-manager-item span{min-width:0}.equipment-manager-item b,.equipment-manager-item small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.equipment-manager-item small{margin-top:5px;color:#64748b;font-size:11px}.btn.danger{background:#b91c1c;border-color:#b91c1c}.btn.danger:hover{background:#991b1b}.modal[hidden]{display:none!important}@media(max-width:700px){.equipment-gallery-box{grid-template-columns:44px 1fr 44px}.gallery-nav{width:38px;height:58px;font-size:38px}.equipment-manager-list{grid-template-columns:1fr}.equipment-photo-manager-card{padding:14px}}

/* V3.3 공통 페이지네이션 */
.sc-page-hidden{display:none!important}.smart-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-top:0;padding:12px 14px;border-radius:0 0 12px 12px;margin-top:-1px}.smart-page-controls{display:flex;gap:5px;align-items:center}.smart-page-controls button{min-width:34px;height:34px;padding:0 10px;border:1px solid #cbd5e1;border-radius:7px;background:#fff;color:#334155;cursor:pointer;font-weight:700}.smart-page-controls button.active{background:var(--navy);border-color:var(--navy);color:#fff}.smart-page-controls button:disabled{opacity:.45;cursor:not-allowed}.smart-page-info,.smart-page-size{color:var(--muted);font-size:13px}.smart-page-size select{margin:0 5px;padding:6px 8px;border:1px solid #cbd5e1;border-radius:7px;background:#fff}@media(max-width:700px){.smart-pagination{justify-content:center}.smart-page-info{width:100%;text-align:center}}


/* V3.5 CONFIG security, dark mode and gallery refinements */
.config-login-card .login-footer a{color:var(--blue);text-decoration:none;font-weight:700}
.gallery-image-stage img{max-width:100%;max-height:86vh;min-width:min(900px,80vw);cursor:zoom-in}
@media(max-width:900px){.gallery-image-stage img{min-width:0;max-width:100%}}

body[data-theme="dark"]{
    --navy:#102a46;--navy-dark:#07192b;--blue:#5da7e8;--light:#0f1720;
    --line:#334155;--text:#e5edf6;--muted:#9fb0c3;
    background:#0f1720;color:#e5edf6;
}
body[data-theme="dark"] .card,
body[data-theme="dark"] .table-card,
body[data-theme="dark"] .toolbar,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .config-center-card,
body[data-theme="dark"] .modal-card,
body[data-theme="dark"] .equipment-manager-item{
    background:#172231;color:#e5edf6;border-color:#334155;
}
body[data-theme="dark"] th,
body[data-theme="dark"] .management-table-wrap thead th{background:#1d2b3d;color:#e5edf6}
body[data-theme="dark"] td{border-color:#334155}
body[data-theme="dark"] tbody tr:hover{background:#1c2a3b}
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .btn.secondary,
body[data-theme="dark"] .date-quick-buttons button{
    background:#0f1a28;color:#e5edf6;border-color:#475569;
}
body[data-theme="dark"] .management-head h1,
body[data-theme="dark"] .page-title-row h1,
body[data-theme="dark"] h1,
body[data-theme="dark"] .card h2,
body[data-theme="dark"] .config-center-card b{color:#d7e9fa}
body[data-theme="dark"] .management-head p,
body[data-theme="dark"] .help,
body[data-theme="dark"] .config-center-card span{color:#9fb0c3}
body[data-theme="dark"] .equipment-drop-zone,
body[data-theme="dark"] .check-row,
body[data-theme="dark"] .equipment-manager-toolbar{background:#111d2b;border-color:#475569}


/* ============================================================
   V3.6 다크모드 전면 점검 및 블랙 계열 통일
   ============================================================ */
body[data-theme="dark"]{
    --navy:#080a0d;
    --navy-dark:#030405;
    --blue:#70baff;
    --light:#080a0d;
    --line:#30343b;
    --text:#f7f8fa;
    --muted:#b8c0cb;
    color-scheme:dark;
    background:#080a0d !important;
    color:#f7f8fa !important;
}
body[data-theme="dark"] .top-header,
body[data-theme="dark"] .smartcare-common-header{
    background:#030405 !important;
    border-bottom:1px solid #292d33;
}
body[data-theme="dark"] .dashboard-wrap,
body[data-theme="dark"] .enterprise-content-wrap,
body[data-theme="dark"] .management-page,
body[data-theme="dark"] .v2-wrap{
    background:#080a0d !important;
}
body[data-theme="dark"] .card,
body[data-theme="dark"] .toolbar,
body[data-theme="dark"] .table-card,
body[data-theme="dark"] .modal-card,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .config-section,
body[data-theme="dark"] .config-center-card,
body[data-theme="dark"] .equipment-manager-item,
body[data-theme="dark"] .hospital-preview,
body[data-theme="dark"] .info-grid > div,
body[data-theme="dark"] .login-card{
    background:#12151a !important;
    color:#f7f8fa !important;
    border-color:#30343b !important;
    box-shadow:0 4px 18px rgba(0,0,0,.42) !important;
}
body[data-theme="dark"] table,
body[data-theme="dark"] .management-table-wrap{
    background:#0e1115 !important;
    color:#f7f8fa !important;
}
body[data-theme="dark"] th,
body[data-theme="dark"] .management-table-wrap thead th{
    background:#191d23 !important;
    color:#fff !important;
    border-color:#343941 !important;
}
body[data-theme="dark"] td{
    color:#f1f3f5 !important;
    border-color:#2a2f36 !important;
}
body[data-theme="dark"] tbody tr:nth-child(even){background:#0b0e12 !important}
body[data-theme="dark"] tbody tr:hover{background:#20252c !important}
body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea{
    background:#07090c !important;
    color:#fff !important;
    border-color:#474e58 !important;
}
body[data-theme="dark"] input::placeholder,
body[data-theme="dark"] textarea::placeholder{color:#929ba7 !important}
body[data-theme="dark"] input:focus,
body[data-theme="dark"] select:focus,
body[data-theme="dark"] textarea:focus{
    border-color:#70baff !important;
    box-shadow:0 0 0 3px rgba(112,186,255,.18) !important;
}
body[data-theme="dark"] .btn.secondary,
body[data-theme="dark"] .btn-secondary,
body[data-theme="dark"] .update-tab,
body[data-theme="dark"] .date-quick-buttons button,
body[data-theme="dark"] .pagination button,
body[data-theme="dark"] .pagination a{
    background:#171b21 !important;
    color:#fff !important;
    border-color:#454c56 !important;
}
body[data-theme="dark"] .btn.secondary:hover,
body[data-theme="dark"] .btn-secondary:hover{background:#252b33 !important}
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] h4,
body[data-theme="dark"] label,
body[data-theme="dark"] b,
body[data-theme="dark"] strong{color:#fff !important}
body[data-theme="dark"] p,
body[data-theme="dark"] small,
body[data-theme="dark"] .help,
body[data-theme="dark"] .result-count,
body[data-theme="dark"] .management-head p,
body[data-theme="dark"] .config-center-card span{color:#b8c0cb !important}
body[data-theme="dark"] a,
body[data-theme="dark"] .hospital-link,
body[data-theme="dark"] .action-link{color:#8dcbff}
body[data-theme="dark"] .check-row,
body[data-theme="dark"] .custom-date-area,
body[data-theme="dark"] .equipment-drop-zone,
body[data-theme="dark"] .equipment-manager-toolbar{
    background:#0b0e12 !important;
    border-color:#383e47 !important;
    color:#fff !important;
}
body[data-theme="dark"] .modal{background:rgba(0,0,0,.84) !important}
body[data-theme="dark"] .gallery-modal,
body[data-theme="dark"] .photo-lightbox{background:rgba(0,0,0,.96) !important}
body[data-theme="dark"] .pagination .active{background:#357fc0 !important}
body[data-theme="dark"] .status-unknown{background:#343a42 !important;color:#fff !important}
body[data-theme="dark"] .empty,
body[data-theme="dark"] .photo-empty{color:#aeb6c1 !important}

/* V3.6.1 병원 연락정보 배열 정리 */
.contact-section-title{
    margin-top:8px;
    padding:11px 13px;
    border-radius:8px;
    background:#edf4fb;
    color:#193b65;
    font-weight:800;
    border-left:4px solid #1e5b9b;
}
body[data-theme="dark"] .contact-section-title{
    background:#171b21!important;
    color:#fff!important;
    border-left-color:#70baff;
}
.message-center h3{margin:20px 0 4px;padding-top:12px;border-top:1px solid #e5edf5;color:#193b65}.message-center select[multiple]{min-height:150px}.message-center code{background:#eef3f8;padding:2px 5px;border-radius:4px}.template-editor{border:1px solid #dbe3ec;border-radius:9px;margin:9px 0;padding:10px}.template-editor summary{cursor:pointer;font-weight:800;color:#193b65}.inline{display:inline-block;margin-right:4px}.message-center small{color:#64748b}

/* V4.0.2 statistics drill-down */
.statistics-card.statistics-click{font:inherit;width:100%;cursor:pointer;border:1px solid #d9e2ec;text-align:left;color:inherit;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.statistics-card.statistics-click:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(15,23,42,.12);border-color:#2563eb}
.statistics-card.statistics-click small{display:block;margin-top:6px;color:#64748b;font-size:12px}
.statistics-table-row{cursor:pointer}.statistics-table-row:hover{background:#eff6ff}.stat-text-link{border:0;background:none;color:#1d4ed8;font:inherit;font-weight:700;padding:0;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.statistics-row.statistics-click-row{display:grid;width:100%;grid-template-columns:minmax(120px,1fr) minmax(160px,3fr) 55px;align-items:center;gap:10px;border:0;background:transparent;padding:7px 0;cursor:pointer;text-align:left;color:inherit;font:inherit}
.statistics-row.statistics-click-row:hover{background:#f8fafc}.statistics-row.statistics-click-row>div{height:12px;background:#e2e8f0;border-radius:999px;overflow:hidden}.statistics-row.statistics-click-row i{display:block;height:100%;background:#2563eb;border-radius:999px}
.statistics-modal[hidden]{display:none}.statistics-modal{position:fixed;inset:0;z-index:3000;display:flex;align-items:center;justify-content:center;padding:24px}.statistics-modal-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.68)}.statistics-modal-panel{position:relative;width:min(1280px,96vw);max-height:90vh;background:#fff;border-radius:16px;box-shadow:0 24px 80px rgba(0,0,0,.3);overflow:hidden;display:flex;flex-direction:column}.statistics-modal-panel>header{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid #e2e8f0}.statistics-modal-panel h2{margin:0}.statistics-modal-panel header p{margin:4px 0 0;color:#64748b}.statistics-modal-close{border:0;background:#f1f5f9;border-radius:50%;width:38px;height:38px;font-size:26px;cursor:pointer}.statistics-modal-body{padding:16px 20px 22px;overflow:auto}.statistics-modal-body .table-scroll{overflow:auto;max-height:68vh}.statistics-modal-open{overflow:hidden}.stat-detail-link{cursor:pointer}.stat-detail-link:hover{background:#eff6ff}
.smart-line-chart{width:100%;overflow-x:auto;background:#fff;border:1px solid #e3eaf3;border-radius:10px;padding:8px}.smart-line-chart svg{display:block;min-width:850px;width:100%;height:auto}.chart-head{display:flex;justify-content:space-between;align-items:center}.chart-head p{margin:2px 0 8px;color:#64748b}.statistics-modal-footer{display:flex;gap:6px;justify-content:center;align-items:center;padding:12px;border-top:1px solid #e5eaf1;flex-wrap:wrap}.statistics-modal-footer select{height:36px;border:1px solid #cbd5e1;border-radius:7px;padding:0 8px}.statistics-modal-footer button[disabled]{opacity:.4;cursor:not-allowed}

/* V4.0.4 태블릿 서비스 서명 */
.signature-section{border-top:1px solid #dbe3ef;padding-top:14px}.signature-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.signature-box{border:1px solid #cbd5e1;border-radius:10px;padding:12px;background:#f8fafc}.signature-canvas{display:block;width:100%;height:180px;background:#fff;border:1px dashed #94a3b8;border-radius:8px;touch-action:none;margin-top:8px}.signature-actions{display:flex;justify-content:flex-end;margin-top:8px}.saved-signature{display:block;max-width:220px;max-height:80px;margin:10px auto 0;background:#fff;border:1px solid #e2e8f0}.hospital-preview{line-height:1.7}@media(max-width:800px){.signature-grid{grid-template-columns:1fr}.signature-canvas{height:210px}}
