/*
 * MediFlow 전용 규칙. app.css → overrides.css 뒤에 실린다.
 * overrides.css 는 이전 제품에서 가져온 화면 규약이라 그대로 두고,
 * MediFlow 에만 필요한 것만 여기에 둔다.
 */


/* ==========================================================================
 * 병원 색 — 케이병원 홈페이지(khospital.kr)의 파랑 · 남색
 *
 * overrides.css 는 이전 제품의 라임 · 잉크 색으로 짜여 있다. 그 파일은 그대로 두고
 * 같은 선택자로 **값만** 여기서 다시 정한다(뒤에 실리는 파일이 이긴다).
 *
 *   #0089cd  홈페이지 메인 블루. 흰 글자를 얹으면 3.9:1 이라 모자라서,
 *            버튼 면에는 한 단계 진한 #0079b8(4.7:1)을 쓴다.
 *   #004b93  글자로 쓰는 브랜드 색 — 링크 · text-primary · 포커스 선. 흰 바탕 8.7:1.
 *   #1a2f5b  홈페이지 타이틀 남색 — 사이드바 바탕.
 *   바탕 · 선  홈페이지의 푸른 회색(#f8f9fb · #eef2f6 · #e1e7ed).
 * ========================================================================== */
:root {
    /* 상단바 높이 — 템플릿 기본 65px 은 메뉴 글자와 바닥의 파란 줄 사이가 떠 보여서 줄였다. */
    --theme-topbar-height: 58px;
    /* 사이드바 폭 — 템플릿 기본 235px 은 메뉴 글자에 비해 넓었다. 로고 칸도 이 폭을 따른다. */
    --theme-sidenav-width: 210px;

    --hospital-blue: #0089cd;
    --hospital-navy: #004b93;
    --hospital-deep: #1a2f5b;
    /* 차트 두 번째 계열(물품 통계 '사용') — 병원 파랑과 색각 이상에서도 구별된다(밝은 · 어두운 화면 모두 검증). */
    --chart-second: #d9468f;

    --sf-page: #f4f7fa;
    --sf-raised: #eef2f6;
    --sf-hover: #e6edf4;
    --sf-inset: #f8f9fb;
    --ln: #e1e7ed;
    --ln-soft: #eef2f6;
    --tx: #1e2530;
    --tx-strong: #111827;
    --tx-muted: #5b6b80;       /* 표 머리(#eef2f6) 위 4.8:1 */
    --tx-faint: #9aa7b8;
    --scrim: rgba(10, 40, 90, 0.45);

    --brand-ink: #ffffff;             /* 파란 면 위에 얹는 글자 */
    --brand-accent: #0079b8;
    --brand-accent-press: #00679d;
    --brand-emph: #004b93;
    --brand-emph-strong: #1a2f5b;

    --theme-body-bg-rgb: 244, 247, 250;
    --theme-body-color-rgb: 30, 37, 48;
    --theme-secondary-color-rgb: 91, 107, 128;
    --theme-light-rgb: 238, 242, 246;
    --theme-secondary-bg-subtle: rgba(91, 107, 128, 0.12);

    --theme-primary-rgb: 0, 75, 147;
    --theme-primary-bg-subtle: rgba(0, 137, 205, 0.1);
    --theme-primary-border-subtle: rgba(0, 75, 147, 0.3);
    --theme-link-color-rgb: 0, 75, 147;
    --theme-link-hover-color-rgb: 26, 47, 91;
    --theme-focus-ring-color: rgba(0, 137, 205, 0.25);

    --st-primary-row: #e5f3fa;
    --st-primary-row-hover: #d6ecf7;
}
/*
 * 어두운 화면 — 위 :root 가 면 · 선 · 글자 토큰(--sf-* · --ln · --tx*)을 밝은 값으로 다시 정하므로,
 * 같은 무게의 선택자인 overrides.css 의 [data-bs-theme="dark"] 값을 이 파일이 덮어 버린다(뒤 파일이 이김).
 * 그래서 어두운 값도 여기서 다시 정한다 — 병원 파랑에 맞춘 푸른 회색. 글자 대비(카드 #18202b 위, 대략):
 * --tx 13.3:1 · --tx-muted 7.4:1(표 머리 --sf-raised 위 6.6:1) · --tx-faint 3.9:1(자리만 지키는 글자) · 링크 8.2:1.
 */
[data-bs-theme="dark"] {
    --sf-page: #10161e;
    --sf-card: #18202b;
    --sf-sunken: #131a23;
    --sf-raised: #1f2935;
    --sf-float: #212c39;
    --sf-hover: #273342;
    --sf-inset: #1b2430;
    --ln: #2e3a4a;
    --ln-soft: #232e3b;
    --tx: #e2e8f0;
    --tx-strong: #f8fafc;
    --tx-muted: #9fb0c4;
    --tx-faint: #6b7d92;
    --scrim: rgba(0, 0, 0, 0.6);

    --theme-body-bg-rgb: 16, 22, 30;
    --theme-body-color-rgb: 226, 232, 240;
    --theme-secondary-color-rgb: 159, 176, 196;
    --theme-secondary-bg-rgb: 24, 32, 43;
    --theme-tertiary-bg-rgb: 31, 41, 53;
    --theme-light-rgb: 35, 46, 59;
    --theme-secondary-bg-subtle: rgba(159, 176, 196, 0.16);

    --brand-ink: #ffffff;
    --brand-accent: #0079b8;
    --brand-accent-press: #0089cd;
    --brand-emph: #5cc3f2;
    --brand-emph-strong: #8ad5f7;
    --theme-primary-rgb: 92, 195, 242;
    --theme-primary-bg-subtle: rgba(0, 137, 205, 0.18);
    --theme-primary-border-subtle: rgba(92, 195, 242, 0.35);
    --theme-link-color-rgb: 92, 195, 242;
    --theme-link-hover-color-rgb: 138, 213, 247;
    --theme-focus-ring-color: rgba(92, 195, 242, 0.3);
    --st-primary-row: #13314a;
    --st-primary-row-hover: #1a3d5a;
}

/* 잉크(짙은 색)로 칠하던 '고른 상태' — 잉크가 흰색이 됐으므로 남색으로 옮긴다. */
.btn-primary {
    --theme-btn-focus-shadow-rgb: 0, 121, 184;
}
.btn-outline-primary {
    --theme-btn-focus-shadow-rgb: 0, 121, 184;
}
.page-item.active .page-link,
.form-check-input:checked {
    background-color: var(--hospital-navy);
    border-color: var(--hospital-navy);
    color: #fff;
}
.form-check-input:focus {
    border-color: var(--hospital-navy);
    box-shadow: 0 0 0 3px rgba(0, 75, 147, 0.15);
}
[data-bs-theme="dark"] .page-item.active .page-link,
[data-bs-theme="dark"] .form-check-input:checked {
    background-color: var(--brand-accent);
    border-color: var(--brand-accent);
    color: #fff;
}
.progress-bar,
.chart-bar.is-in,
.chart-key.is-in {
    background: var(--hospital-blue);
}
.table {
    --theme-table-hover-bg: rgba(0, 137, 205, 0.06);
}
.list-group-item-action:hover,
.list-group-item-action:focus {
    background-color: rgba(0, 137, 205, 0.07);
}
/* 어두운 바탕에서는 옅은 파랑이 거의 안 보여 조금 진하게. */
[data-bs-theme="dark"] .table {
    --theme-table-hover-bg: rgba(92, 195, 242, 0.08);
}
[data-bs-theme="dark"] .list-group-item-action:hover,
[data-bs-theme="dark"] .list-group-item-action:focus {
    background-color: rgba(92, 195, 242, 0.1);
}
[data-bs-theme="dark"] .notification-row.is-unread {
    background: rgba(92, 195, 242, 0.08);
}

