﻿/* OneHealth common compact workspace helpers
   Page-specific css should keep only domain-specific colors/details. */
.oh-workspace-root {
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
}

.oh-page-filter-strip {
    display: grid;
    align-items: end;
    gap: 8px;
    flex: 0 0 auto;
    border: 1px solid #cfe0f6;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(9, 70, 96, 0.05);
}

.oh-page-three-pane {
    display: grid;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    overflow: hidden;
}

.oh-pane-scroll {
    min-height: 0;
    overflow: auto;
}

.oh-fixed-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex: 0 0 auto;
}

/* hotfix_020: shared action button system and clearer search/select fields.
   Keep public navigation actions light, but make admin and modal actions unmistakable. */
:root {
    --oh-action-primary: #0a2a62;
    --oh-action-primary-hover: #06183f;
    --oh-action-secondary: #334155;
    --oh-action-secondary-hover: #1e293b;
    --oh-action-create: #0f766e;
    --oh-action-create-hover: #115e59;
    --oh-action-edit: #1d4ed8;
    --oh-action-edit-hover: #1e40af;
    --oh-action-danger: #dc2626;
    --oh-action-danger-hover: #991b1b;
    --oh-field-search-bg: #ffffff;
    --oh-field-select-bg: #f8fbff;
    --oh-field-search-border: #7dd3fc;
    --oh-field-select-border: #bfdbfe;
}

.oh-action-primary,
.oh-modal-actions .oh-action-primary,
.oh-modal-actions .btn-primary,
.oh-modal-actions button.btn-primary,
.bat-editor-actions .oh-action-primary,
.bat-editor-actions .bat-btn-primary,
.bat-btn.bat-btn-primary,
.btn.btn-primary.oh-action-primary {
    background: var(--oh-action-primary) !important;
    border: 1px solid var(--oh-action-primary-hover) !important;
    color: #ffffff !important;
    font-weight: 950 !important;
    box-shadow: 0 10px 22px rgba(10, 42, 98, .22) !important;
}

.oh-action-primary:hover:not(:disabled),
.oh-modal-actions .oh-action-primary:hover:not(:disabled),
.oh-modal-actions .btn-primary:hover:not(:disabled),
.bat-editor-actions .oh-action-primary:hover:not(:disabled),
.bat-editor-actions .bat-btn-primary:hover:not(:disabled),
.bat-btn.bat-btn-primary:hover:not(:disabled),
.btn.btn-primary.oh-action-primary:hover:not(:disabled) {
    background: var(--oh-action-primary-hover) !important;
    border-color: var(--oh-action-primary-hover) !important;
    color: #ffffff !important;
}

.oh-action-secondary,
.oh-modal-close,
.oh-modal-actions .oh-action-secondary,
.oh-modal-actions .btn-outline-secondary,
.oh-modal-actions .btn-secondary,
.oh-modal-actions button.btn-outline-secondary,
.bat-editor-actions .oh-action-secondary,
.bat-editor-actions .bat-btn-secondary,
.bat-editor-actions .bat-btn-ghost,
.btn.btn-outline-secondary.oh-action-secondary {
    background: var(--oh-action-secondary) !important;
    border: 1px solid var(--oh-action-secondary-hover) !important;
    color: #ffffff !important;
    font-weight: 950 !important;
    box-shadow: 0 9px 18px rgba(15, 23, 42, .18) !important;
}

.oh-action-secondary:hover:not(:disabled),
.oh-modal-close:hover:not(:disabled),
.oh-modal-actions .oh-action-secondary:hover:not(:disabled),
.oh-modal-actions .btn-outline-secondary:hover:not(:disabled),
.bat-editor-actions .oh-action-secondary:hover:not(:disabled),
.bat-editor-actions .bat-btn-secondary:hover:not(:disabled),
.bat-editor-actions .bat-btn-ghost:hover:not(:disabled),
.btn.btn-outline-secondary.oh-action-secondary:hover:not(:disabled) {
    background: var(--oh-action-secondary-hover) !important;
    border-color: #0f172a !important;
    color: #ffffff !important;
}

.oh-action-danger,
.oh-admin-action-delete,
.oh-modal-actions .btn-danger,
.bat-btn-danger,
.bat-mini-btn.danger,
.bat-row-action.danger,
.btn.btn-danger {
    background: var(--oh-action-danger) !important;
    border: 1px solid var(--oh-action-danger-hover) !important;
    color: #ffffff !important;
    font-weight: 950 !important;
    box-shadow: 0 9px 18px rgba(220, 38, 38, .18) !important;
}

.oh-action-danger:hover:not(:disabled),
.oh-admin-action-delete:hover:not(:disabled),
.oh-modal-actions .btn-danger:hover:not(:disabled),
.bat-btn-danger:hover:not(:disabled),
.bat-mini-btn.danger:hover:not(:disabled),
.bat-row-action.danger:hover:not(:disabled),
.btn.btn-danger:hover:not(:disabled) {
    background: var(--oh-action-danger-hover) !important;
    border-color: var(--oh-action-danger-hover) !important;
    color: #ffffff !important;
}

.oh-admin-action-create {
    background: var(--oh-action-create) !important;
    border: 1px solid var(--oh-action-create-hover) !important;
    color: #ffffff !important;
    font-weight: 950 !important;
    box-shadow: 0 8px 16px rgba(15, 118, 110, .16) !important;
}

.oh-admin-action-create:hover:not(:disabled) {
    background: var(--oh-action-create-hover) !important;
    border-color: var(--oh-action-create-hover) !important;
    color: #ffffff !important;
}

.oh-admin-action-edit {
    background: var(--oh-action-edit) !important;
    border: 1px solid var(--oh-action-edit-hover) !important;
    color: #ffffff !important;
    font-weight: 950 !important;
    box-shadow: 0 8px 16px rgba(29, 78, 216, .16) !important;
}

.oh-admin-action-edit:hover:not(:disabled) {
    background: var(--oh-action-edit-hover) !important;
    border-color: var(--oh-action-edit-hover) !important;
    color: #ffffff !important;
}

.oh-user-action,
.btn.btn-outline-primary.oh-user-action,
.bat-row-action:not(.oh-admin-action):not(.danger) {
    background: #ffffff !important;
    border: 1px solid #bfdbfe !important;
    color: #0a2a62 !important;
    font-weight: 900 !important;
    box-shadow: none !important;
}

.oh-user-action:hover:not(:disabled),
.btn.btn-outline-primary.oh-user-action:hover:not(:disabled),
.bat-row-action:not(.oh-admin-action):not(.danger):hover:not(:disabled) {
    background: #eff6ff !important;
    border-color: #60a5fa !important;
    color: #06183f !important;
}

.oh-admin-action:disabled,
.oh-action-primary:disabled,
.oh-action-secondary:disabled,
.oh-action-danger:disabled,
.bat-btn:disabled,
.bat-mini-btn:disabled,
.bat-row-action:disabled,
.btn:disabled {
    opacity: .48 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.oh-field {
    position: relative;
}

.oh-field input,
.oh-field select,
.bat-center-search-panel input,
.bat-center-search-panel select,
.bat-editor-form input,
.bat-editor-form select,
.bat-editor-form textarea {
    border-width: 1.5px !important;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

.oh-field-search input,
.bat-center-search-panel .oh-field-search input,
.oh-field:not(.oh-field-select) > input {
    padding-left: 34px !important;
    border-color: var(--oh-field-search-border) !important;
    background: var(--oh-field-search-bg) !important;
}

.oh-field-search::after,
.bat-center-search-panel .oh-field-search::after {
    content: "검색";
    position: absolute;
    left: 9px;
    bottom: 9px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 16px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 9px;
    font-weight: 950;
    pointer-events: none;
}

.oh-field-select select,
.bat-center-search-panel .oh-field-select select,
.oh-field > select {
    padding-right: 34px !important;
    border-color: var(--oh-field-select-border) !important;
    background-color: var(--oh-field-select-bg) !important;
    box-shadow: inset 3px 0 0 #93c5fd !important;
}

.oh-field-select::after,
.bat-center-search-panel .oh-field-select::after {
    content: "선택";
    position: absolute;
    right: 9px;
    bottom: 9px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 16px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 9px;
    font-weight: 950;
    pointer-events: none;
}

.oh-field input:focus,
.oh-field select:focus,
.bat-center-search-panel input:focus,
.bat-center-search-panel select:focus,
.bat-editor-form input:focus,
.bat-editor-form select:focus,
.bat-editor-form textarea:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .16) !important;
}

.oh-field label,
.oh-field > span,
.bat-center-search-panel .oh-field > span {
    color: #0a2a62 !important;
    font-weight: 950 !important;
}

/* hotfix_021: compact filter strip restoration.
   Keep filters in one row when possible and at most two rows on normal desktop widths.
   Search/select distinction is kept subtle without pill badges that inflate height. */
.oh-page-filter-strip,
.bat-center-search-panel.oh-page-filter-strip,
.ac-filter-grid.oh-page-filter-strip,
.pa-filter-grid.oh-page-filter-strip {
    display: grid !important;
    grid-template-columns: minmax(260px, 1.65fr) repeat(4, minmax(130px, .9fr)) auto !important;
    gap: 8px !important;
    align-items: end !important;
    padding: 10px 12px !important;
    min-height: 0 !important;
}

.oh-page-filter-strip > .wide,
.bat-center-search-panel.oh-page-filter-strip > .wide {
    grid-column: auto !important;
}

.oh-page-filter-strip .oh-field,
.bat-center-search-panel.oh-page-filter-strip .oh-field {
    min-width: 0 !important;
    display: grid !important;
    gap: 4px !important;
}

.oh-page-filter-strip .oh-field > span,
.bat-center-search-panel.oh-page-filter-strip .oh-field > span {
    font-size: 11px !important;
    line-height: 1.15 !important;
    color: #0a2a62 !important;
    font-weight: 900 !important;
}

.oh-page-filter-strip input,
.oh-page-filter-strip select,
.bat-center-search-panel.oh-page-filter-strip input,
.bat-center-search-panel.oh-page-filter-strip select {
    height: 34px !important;
    min-height: 34px !important;
    width: 100% !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    font-weight: 750 !important;
}

.oh-page-filter-strip .oh-field-search input,
.bat-center-search-panel.oh-page-filter-strip .oh-field-search input,
.oh-field-search input {
    padding-left: 12px !important;
    border: 1px solid #8ec5ff !important;
    background: #ffffff !important;
    box-shadow: inset 3px 0 0 #38bdf8 !important;
}

.oh-page-filter-strip .oh-field-select select,
.bat-center-search-panel.oh-page-filter-strip .oh-field-select select,
.oh-field-select select {
    padding-left: 12px !important;
    padding-right: 28px !important;
    border: 1px solid #c7d7ee !important;
    background-color: #f8fbff !important;
    box-shadow: inset 3px 0 0 #cbd5e1 !important;
}

.oh-page-filter-strip .oh-field-search::after,
.oh-page-filter-strip .oh-field-select::after,
.bat-center-search-panel.oh-page-filter-strip .oh-field-search::after,
.bat-center-search-panel.oh-page-filter-strip .oh-field-select::after,
.oh-field-search::after,
.oh-field-select::after {
    content: none !important;
    display: none !important;
}

.oh-page-filter-strip .bat-center-search-actions,
.bat-center-search-panel.oh-page-filter-strip .bat-center-search-actions,
.oh-page-filter-strip .filter-actions,
.oh-page-filter-strip .ac-filter-actions,
.oh-page-filter-strip .pa-filter-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: end !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    white-space: nowrap !important;
    grid-column: auto !important;
}

.oh-page-filter-strip .bat-center-search-actions .bat-btn,
.bat-center-search-panel.oh-page-filter-strip .bat-center-search-actions .bat-btn {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 14px !important;
}

@media (max-width: 1500px) {
    .oh-page-filter-strip,
    .bat-center-search-panel.oh-page-filter-strip,
    .ac-filter-grid.oh-page-filter-strip,
    .pa-filter-grid.oh-page-filter-strip {
        grid-template-columns: minmax(220px, 1.35fr) repeat(2, minmax(140px, 1fr)) auto !important;
    }
}

@media (max-width: 900px) {
    .oh-page-filter-strip,
    .bat-center-search-panel.oh-page-filter-strip,
    .ac-filter-grid.oh-page-filter-strip,
    .pa-filter-grid.oh-page-filter-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .oh-page-filter-strip .bat-center-search-actions,
    .bat-center-search-panel.oh-page-filter-strip .bat-center-search-actions,
    .oh-page-filter-strip .filter-actions,
    .oh-page-filter-strip .ac-filter-actions,
    .oh-page-filter-strip .pa-filter-actions {
        grid-column: 1 / -1 !important;
    }
}

@media (max-width: 640px) {
    .oh-page-filter-strip,
    .bat-center-search-panel.oh-page-filter-strip,
    .ac-filter-grid.oh-page-filter-strip,
    .pa-filter-grid.oh-page-filter-strip {
        grid-template-columns: 1fr !important;
    }
}

/* hotfix_022: compact demo filter/action baseline shared by ecology, alpha-corona, pathogen, acoustic and map pages. */
.oh-page-filter-strip,
.bat-center-search-panel.oh-page-filter-strip,
.ac-filter-grid.oh-page-filter-strip,
.pa-filter-grid.oh-page-filter-strip {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 8px !important;
    padding: 10px 12px !important;
}

.oh-page-filter-strip .oh-field,
.bat-center-search-panel.oh-page-filter-strip .oh-field,
.ac-filter-grid.oh-page-filter-strip .oh-field,
.pa-filter-grid.oh-page-filter-strip .oh-field {
    flex: 1 1 150px !important;
    min-width: 140px !important;
    max-width: 100% !important;
    display: grid !important;
    gap: 4px !important;
}

.oh-page-filter-strip .oh-field.wide,
.oh-page-filter-strip .wide.oh-field,
.bat-center-search-panel.oh-page-filter-strip .wide.oh-field {
    flex: 1.65 1 280px !important;
    min-width: 260px !important;
}

.oh-page-filter-strip .bat-center-search-actions,
.bat-center-search-panel.oh-page-filter-strip .bat-center-search-actions,
.oh-page-filter-strip .filter-actions,
.oh-page-filter-strip .ac-filter-actions,
.oh-page-filter-strip .pa-filter-actions {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    margin-left: auto !important;
}

.oh-page-filter-strip input,
.oh-page-filter-strip select,
.bat-center-search-panel.oh-page-filter-strip input,
.bat-center-search-panel.oh-page-filter-strip select,
.ac-filter-grid.oh-page-filter-strip input,
.ac-filter-grid.oh-page-filter-strip select,
.pa-filter-grid.oh-page-filter-strip input,
.pa-filter-grid.oh-page-filter-strip select {
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    font-weight: 750 !important;
}

.oh-page-filter-strip .oh-field-search input,
.bat-center-search-panel.oh-page-filter-strip .oh-field-search input,
.oh-field-search input {
    border: 1px solid #8ec5ff !important;
    background: #fff !important;
    box-shadow: inset 3px 0 0 #38bdf8 !important;
}

.oh-page-filter-strip .oh-field-select select,
.bat-center-search-panel.oh-page-filter-strip .oh-field-select select,
.oh-field-select select {
    border: 1px solid #c7d7ee !important;
    background-color: #f8fbff !important;
    box-shadow: inset 3px 0 0 #94a3b8 !important;
}

.oh-page-filter-strip .oh-field-search::after,
.oh-page-filter-strip .oh-field-select::after,
.bat-center-search-panel.oh-page-filter-strip .oh-field-search::after,
.bat-center-search-panel.oh-page-filter-strip .oh-field-select::after,
.oh-field-search::after,
.oh-field-select::after {
    content: none !important;
    display: none !important;
}

/* clear administrative action colors: user navigation remains outline/white, admin mutation actions are filled. */
.oh-action-primary,
.bat-btn-primary,
.btn.btn-primary {
    background: #0b2f6b !important;
    border: 1px solid #0b2f6b !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(11, 47, 107, .18) !important;
}

.oh-action-secondary,
.bat-btn-secondary,
.btn.btn-secondary,
.btn.btn-outline-secondary.oh-action-secondary {
    background: #334155 !important;
    border: 1px solid #334155 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(51, 65, 85, .16) !important;
}

.oh-action-danger,
.bat-btn-danger,
.btn.btn-danger,
.bat-row-action.danger {
    background: #dc2626 !important;
    border: 1px solid #dc2626 !important;
    color: #fff !important;
    box-shadow: 0 8px 18px rgba(220, 38, 38, .18) !important;
}

.oh-admin-action-create {
    background: #0f766e !important;
    border: 1px solid #0f766e !important;
    color: #fff !important;
}

.oh-admin-action-edit {
    background: #1d4ed8 !important;
    border: 1px solid #1d4ed8 !important;
    color: #fff !important;
}

.oh-admin-action-delete {
    background: #dc2626 !important;
    border: 1px solid #dc2626 !important;
    color: #fff !important;
}

.oh-user-action,
.btn.btn-outline-primary.oh-user-action,
.btn.btn-outline-secondary.oh-user-action {
    background: #fff !important;
    border: 1px solid #bfdbfe !important;
    color: #0b2f6b !important;
    box-shadow: none !important;
}

/* quick demo compacting for pages that still use the older vertical card layout. */
.oh-page-header {
    margin-bottom: 8px !important;
}

.oh-grid.oh-mb,
.oh-grid {
    gap: 10px !important;
}

.oh-card.oh-mb {
    margin-bottom: 10px !important;
}

.oh-form-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-end !important;
    gap: 8px !important;
}

.oh-form-grid > .oh-field,
.oh-form-grid > .oh-field-full,
.oh-form-grid > div {
    flex: 1 1 180px !important;
    min-width: 160px !important;
}

.oh-form-grid > .oh-actions-end,
.oh-form-grid > .oh-actions,
.oh-form-grid > .oh-field.oh-actions-end {
    flex: 0 0 auto !important;
    margin-left: auto !important;
}

@media (max-width: 1360px) {
    .oh-page-filter-strip .oh-field,
    .bat-center-search-panel.oh-page-filter-strip .oh-field,
    .ac-filter-grid.oh-page-filter-strip .oh-field,
    .pa-filter-grid.oh-page-filter-strip .oh-field {
        flex-basis: 190px !important;
    }
}


/* patch_07: shared OneHealth workspace visual normalization.
   Keep page-specific class names, but make ecology/pathogen/alpha/acoustic render with one sizing system. */
:root {
    --oh-blue-900: #06204b;
    --oh-blue-800: #0a2a62;
    --oh-blue-700: #0b3b82;
    --oh-blue-100: #dbeafe;
    --oh-surface: #ffffff;
    --oh-surface-soft: #f8fbff;
    --oh-border: #cfe0f6;
    --oh-text: #0f172a;
    --oh-muted: #64748b;
    --oh-radius-lg: 18px;
    --oh-radius-md: 14px;
    --oh-shadow-card: 0 12px 28px rgba(9, 70, 96, 0.06);
    --oh-control-height: 34px;
    --oh-control-height-sm: 28px;
}

.bat-hero,
.pathogen-hero,
.alpha-hero,
.oh-page-header {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--oh-border) !important;
    border-radius: var(--oh-radius-lg) !important;
    background: linear-gradient(135deg, #ffffff, #eff6ff) !important;
    box-shadow: var(--oh-shadow-card) !important;
    padding: 14px 18px !important;
    margin: 0 0 10px !important;
}

.bat-hero h1,
.pathogen-hero h1,
.alpha-hero h1,
.oh-page-header h1 {
    margin: 0;
    color: var(--oh-blue-900) !important;
    font-size: 24px !important;
    font-weight: 950 !important;
    letter-spacing: -0.04em;
}

.bat-hero p,
.pathogen-hero p,
.alpha-hero p,
.oh-subtitle {
    margin: 4px 0 0 !important;
    color: var(--oh-muted) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
}

.bat-kpi-strip,
.pathogen-kpi-strip,
.alpha-kpi-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    flex: 0 0 auto;
    margin-bottom: 8px;
}

.bat-kpi-strip article,
.pathogen-kpi-strip article,
.alpha-kpi-strip article {
    min-width: 0;
    border: 1px solid var(--oh-border) !important;
    border-radius: var(--oh-radius-lg) !important;
    background: var(--oh-surface) !important;
    box-shadow: var(--oh-shadow-card) !important;
    padding: 11px 13px !important;
}

.bat-kpi-strip span,
.pathogen-kpi-strip span,
.alpha-kpi-strip span,
.bat-kpi-strip small,
.pathogen-kpi-strip small,
.alpha-kpi-strip small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--oh-muted) !important;
    font-size: 11px !important;
    font-weight: 850 !important;
}

.bat-kpi-strip strong,
.pathogen-kpi-strip strong,
.alpha-kpi-strip strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin: 2px 0;
    color: var(--oh-blue-900) !important;
    font-size: 22px !important;
    font-weight: 950 !important;
}

.bat-panel,
.pathogen-panel,
.alpha-panel,
.oh-card {
    border: 1px solid var(--oh-border) !important;
    border-radius: var(--oh-radius-lg) !important;
    background: var(--oh-surface) !important;
    box-shadow: var(--oh-shadow-card) !important;
}

.bat-panel-head,
.pathogen-panel-head,
.alpha-panel-head {
    min-height: 62px;
    border-bottom: 1px solid #e5edf7;
    padding: 12px 14px !important;
}

.bat-panel-head h2,
.pathogen-panel-head h2,
.alpha-panel-head h2,
.oh-card h3 {
    margin: 0;
    color: var(--oh-blue-900) !important;
    font-size: 16px !important;
    font-weight: 950 !important;
    letter-spacing: -0.03em;
}

.bat-panel-head p,
.pathogen-panel-head p,
.alpha-panel-head p,
.oh-muted {
    color: var(--oh-muted) !important;
    font-size: 12px !important;
    font-weight: 800 !important;
}

.bat-btn,
.pathogen-btn,
.alpha-btn,
.btn,
.oh-action-btn,
.oh-modal-btn,
.bat-mini-btn,
.pathogen-row-action,
.alpha-row-action,
.alpha-row-map-btn,
.bat-row-action {
    min-height: var(--oh-control-height-sm) !important;
    border-radius: 10px !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    padding: 0 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 5px !important;
}

.bat-btn,
.pathogen-btn,
.alpha-btn,
.btn {
    min-height: var(--oh-control-height) !important;
}

.bat-tabs,
.pathogen-tabs,
.alpha-tabs,
.pathogen-side-tabs {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.bat-tab,
.pathogen-tab,
.alpha-tab,
.bat-tabs button,
.pathogen-tabs button,
.alpha-tabs button,
.pathogen-side-tabs button {
    min-height: 30px !important;
    border: 1px solid #bfdbfe !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: var(--oh-blue-800) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    padding: 0 12px !important;
}

.bat-tab.active,
.pathogen-tab.active,
.alpha-tab.active,
.bat-tabs button.active,
.pathogen-tabs button.active,
.alpha-tabs button.active,
.pathogen-side-tabs button.active {
    background: var(--oh-blue-800) !important;
    border-color: var(--oh-blue-800) !important;
    color: #ffffff !important;
}

.bat-table,
.pathogen-table,
.alpha-table,
.oh-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-size: 12px !important;
}

.bat-table th,
.pathogen-table th,
.alpha-table th,
.oh-table th {
    height: 34px;
    background: #eef6ff !important;
    color: var(--oh-blue-900) !important;
    font-size: 11px !important;
    font-weight: 950 !important;
    white-space: nowrap;
}

.bat-table td,
.pathogen-table td,
.alpha-table td,
.oh-table td {
    height: 38px;
    border-bottom: 1px solid #edf2f7 !important;
    color: var(--oh-text) !important;
    vertical-align: middle;
}

.oh-page-three-pane {
    gap: 10px !important;
}

.bat-one-screen,
.pathogen-one-screen,
.alpha-one-screen {
    grid-template-columns: minmax(230px, 23%) minmax(520px, 1fr) minmax(280px, 28%) !important;
}

.oh-record-create-strip,
.oh-record-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

@media (max-width: 1380px) {
    .bat-kpi-strip,
    .pathogen-kpi-strip,
    .alpha-kpi-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .bat-one-screen,
    .pathogen-one-screen,
    .alpha-one-screen {
        grid-template-columns: minmax(220px, 24%) minmax(460px, 1fr) minmax(260px, 27%) !important;
    }
}

@media (max-width: 1100px) {
    .bat-kpi-strip,
    .pathogen-kpi-strip,
    .alpha-kpi-strip,
    .bat-one-screen,
    .pathogen-one-screen,
    .alpha-one-screen {
        grid-template-columns: 1fr !important;
    }
}


/* PATCH 08: popup-only CRUD common style. */
.oh-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2400;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(2px);
}

.oh-modal {
    width: min(780px, calc(100vw - 32px));
    max-height: calc(100vh - 48px);
    overflow: auto;
    border: 1px solid #bfdbfe;
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .28);
}

.oh-modal-sm {
    width: min(720px, calc(100vw - 32px));
}

.oh-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px 14px;
}

.oh-modal-header h3 {
    margin: 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
}

.oh-modal-header p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.oh-modal-close {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.oh-modal .oh-field,
.oh-data-popup .oh-field {
    display: grid;
    gap: 6px;
    padding: 0 20px;
    margin: 10px 0;
}

.oh-modal .oh-field label,
.oh-data-popup .oh-field label {
    color: #334155;
    font-size: 12px;
    font-weight: 950;
}

.oh-modal .oh-field input,
.oh-modal .oh-field select,
.oh-modal .oh-field textarea,
.oh-data-popup .oh-field input,
.oh-data-popup .oh-field select,
.oh-data-popup .oh-field textarea {
    width: 100%;
    border: 1.5px solid #bfdbfe;
    border-radius: 12px;
    background: #ffffff;
    padding: 9px 11px;
    color: #0f172a;
    font-size: 13px;
    font-weight: 800;
}

.oh-field-full {
    grid-column: 1 / -1;
}

.oh-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px 18px;
}

.oh-modal-btn {
    min-height: 34px;
    min-width: 76px;
    border-radius: 999px;
    padding: 7px 14px;
    font-size: 12px;
    font-weight: 950;
    cursor: pointer;
}

.oh-modal-btn-outline {
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #334155;
}

.oh-modal-btn-primary {
    border: 1px solid var(--oh-action-primary-hover, #06183f);
    background: var(--oh-action-primary, #0a2a62);
    color: #ffffff;
}

.oh-modal-btn-danger {
    border: 1px solid var(--oh-action-danger-hover, #991b1b);
    background: var(--oh-action-danger, #dc2626);
    color: #ffffff;
}

.oh-action-hint {
    display: block;
    margin: 8px 20px 0;
    border: 1px solid #fde68a;
    border-radius: 12px;
    background: #fffbeb;
    padding: 9px 11px;
    color: #92400e;
    font-size: 12px;
    font-weight: 850;
}

.oh-message {
    margin: 12px 20px 0;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 900;
}

.oh-success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.oh-error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.oh-record-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.oh-action-btn {
    border-radius: 999px;
    border: 1px solid #bfdbfe;
    background: #ffffff;
    color: #0a2a62;
    font-size: 12px;
    font-weight: 950;
    line-height: 1;
    padding: 8px 12px;
    min-height: 32px;
    cursor: pointer;
}

.oh-action-btn-sm {
    min-height: 28px;
    padding: 6px 10px;
    font-size: 11px;
}

.oh-action-btn-edit {
    border-color: var(--oh-action-edit-hover, #1e40af);
    background: var(--oh-action-edit, #1d4ed8);
    color: #ffffff;
}

.oh-action-btn-danger {
    border-color: var(--oh-action-danger-hover, #991b1b);
    background: var(--oh-action-danger, #dc2626);
    color: #ffffff;
}

@media (max-width: 760px) {
    .oh-modal,
    .oh-modal-sm,
    .oh-data-popup {
        width: calc(100vw - 18px);
        max-height: calc(100vh - 18px);
        border-radius: 18px;
    }

    .oh-modal-actions {
        flex-wrap: wrap;
    }
}

.oh-current-value-box {
  display: grid;
  gap: 6px;
  margin: 10px 0 12px;
}

.oh-current-value-box label {
  font-size: 12px;
  font-weight: 800;
  color: #5d6b82;
}

.oh-current-value-box pre {
  margin: 0;
  min-height: 38px;
  max-height: 120px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  background: #f7fbff;
  padding: 10px 12px;
  color: #0f2647;
  font: 700 13px/1.45 inherit;
}
