/* OneHealth blue theme + compact containers
   핵심: 전체 페이지를 강제 고정하지 않고, 화면별 주요 컨테이너만 압축한다. */

:root {
    --color-primary: #0a2a62;
    --color-primary-dark: #06183f;
    --color-secondary: #2563eb;
    --color-accent: #38bdf8;
    --color-border: #cfe0f6;
    --color-muted: #5d708d;
    --color-text: #0b1f38;
    --focus-ring: 0 0 0 3px rgba(37, 99, 235, .16);
}

html,
body {
    min-height: 100%;
    background: #eef5ff;
    color: var(--color-text);
    font-family: "Segoe UI", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
}

body { margin: 0; }

a { text-decoration-thickness: .06em; }

.oh-page-header {
    min-height: 38px;
    align-items: center;
    margin-bottom: .5rem;
}

.oh-page-header h1,
.oh-page-header h2 {
    color: var(--color-primary-dark);
    font-size: 1.28rem;
    font-weight: 950;
    letter-spacing: -.035em;
}

.oh-subtitle {
    margin-top: .05rem;
    color: var(--color-muted);
    font-size: .78rem;
    font-weight: 700;
}

.oh-grid { gap: .55rem; }
.oh-mb { margin-bottom: .55rem; }

.oh-card {
    border-color: var(--color-border);
    border-radius: 16px;
    padding: .68rem;
    box-shadow: 0 8px 20px rgba(6, 24, 63, .055);
}

.oh-card h2,
.oh-card h3 {
    color: var(--color-primary-dark);
    font-size: .92rem;
    font-weight: 950;
    margin-bottom: .42rem;
}

.oh-stat-card {
    min-height: 64px;
    padding: .62rem .75rem;
    border-color: var(--color-border);
    border-radius: 15px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}

.oh-stat-card span {
    margin-bottom: .12rem;
    color: var(--color-muted);
    font-size: .7rem;
    font-weight: 850;
}

.oh-stat-card strong {
    color: var(--color-primary-dark);
    font-size: 1.36rem;
    line-height: 1.05;
}

.oh-stat-card small {
    display: block;
    overflow: hidden;
    margin-top: .12rem;
    font-size: .67rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.oh-form-grid {
    gap: .5rem !important;
}

.oh-field label {
    color: var(--color-primary);
    font-size: .7rem;
    font-weight: 900;
    margin-bottom: .15rem;
}

.oh-field input,
.oh-field select,
.oh-field textarea {
    min-height: 32px;
    border-color: var(--color-border);
    border-radius: 10px;
    padding: .36rem .52rem;
    font-size: .8rem;
}

.oh-field textarea { min-height: 54px; }

.oh-actions { gap: .35rem; }

.btn,
.oh-actions .btn {
    border-radius: 10px;
    font-size: .78rem;
    font-weight: 850;
}

.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline-primary {
    color: var(--color-primary);
    border-color: #9bb8e7;
}

.btn-outline-primary:hover,
.btn-primary:hover {
    background-color: #123a8c;
    border-color: #123a8c;
}

.oh-table-wrap {
    overflow: auto;
    border: 1px solid var(--color-border);
    border-radius: 14px;
}

.oh-table {
    font-size: .78rem;
}

.oh-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f2f7ff;
    color: var(--color-primary);
    font-size: .7rem;
    font-weight: 950;
}

.oh-table th,
.oh-table td {
    padding: .36rem .44rem;
}

.oh-badge {
    background: #edf5ff;
    border-color: #cfe0f6;
    color: var(--color-primary);
    font-size: .66rem;
    font-weight: 850;
    padding: .14rem .42rem;
}

.oh-message {
    margin-bottom: .55rem;
    padding: .5rem .65rem;
    border-color: var(--color-border);
    border-radius: 12px;
    font-size: .8rem;
}

/* 차트/빈 데이터 카드가 페이지를 길게 밀지 않도록 공통 높이 축소 */
.ac-visual-grid,
.pa-visual-grid,
.map-filter-grid {
    gap: .55rem !important;
}

.ac-visual-grid .oh-card,
.pa-visual-grid .oh-card {
    min-height: 98px;
    max-height: 160px;
    overflow: auto;
}

.ac-card-title,
.pa-card-title {
    margin-bottom: .38rem !important;
}

.ac-rate-list { gap: .38rem !important; }
.ac-rate-track { height: .38rem !important; }
.ac-rate-head { font-size: .76rem !important; }
.ac-rate-meta { font-size: .66rem !important; }

.pa-tab-actions {
    gap: .3rem !important;
    overflow-x: auto;
    flex-wrap: nowrap !important;
}

.pa-tab-actions .btn { white-space: nowrap; }

.oh-card-half { min-width: 0; }

/* 1440px 이상에서는 목록/상세형 화면만 적당한 내부 높이를 부여한다. 전체 페이지 고정은 하지 않는다. */
@media (min-width: 1200px) {
    .oh-table-wrap {
        max-height: 360px;
    }

    .oh-grid > .oh-card-half .oh-table-wrap {
        max-height: 430px;
    }

    .ac-visual-grid .oh-card,
    .pa-visual-grid .oh-card {
        max-height: 145px;
    }
}

@media (min-width: 1600px) {
    .oh-table-wrap {
        max-height: 430px;
    }

    .oh-grid > .oh-card-half .oh-table-wrap {
        max-height: 520px;
    }
}

@media (max-width: 960px) {
    .oh-table-wrap,
    .ac-visual-grid .oh-card,
    .pa-visual-grid .oh-card {
        max-height: none;
    }
}
