:root {
    --navy: #182845;
    --navy-2: #213455;
    --primary: #356de5;
    --primary-dark: #2859c7;
    --primary-soft: #eff6ff;
    --surface: #ffffff;
    --background: #f4f6f9;
    --line: #e3e8ef;
    --text: #172033;
    --muted: #687386;
    --success: #17845b;
    --success-soft: #eaf8f2;
    --danger: #c63f47;
    --danger-soft: #fff0f1;
    --warning: #946200;
    --warning-soft: #fff7df;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .04);
    --radius: 14px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--background); }
body { margin: 0; min-height: 100vh; color: var(--text); background: var(--background); font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Inter, Arial, sans-serif; font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
code, .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
code { padding: 2px 5px; border-radius: 5px; background: #f0f3f7; color: #465266; font-size: 12px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; display: flex; width: 268px; flex-direction: column; color: #d9e2f0; background: var(--navy); }
.brand { display: flex; height: 82px; flex-direction: column; justify-content: center; padding: 0 25px; color: white; border-bottom: 1px solid rgba(255,255,255,.1); }
.brand strong { display: block; font-size: 22px; line-height: 1.15; letter-spacing: -.5px; }
.brand small { display: block; margin-top: 4px; color: #98a9c3; font-size: 11px; font-weight: 600; letter-spacing: .3px; }
.nav { flex: 1; overflow-y: auto; padding: 15px 12px 25px; scrollbar-width: thin; scrollbar-color: #435572 transparent; }
.nav-home, .nav-group-button { display: flex; width: 100%; min-height: 43px; align-items: center; justify-content: space-between; padding: 9px 13px; border: 0; border-radius: 5px; color: #e1e8f3; background: transparent; font-weight: 700; text-align: left; cursor: pointer; transition: background .15s, color .15s; }
.nav-home:hover, .nav-group-button:hover { color: white; background: rgba(255,255,255,.07); }
.nav-home.active { color: white; background: var(--primary); }
.nav-section-title { margin: 20px 13px 8px; color: #7286a6; font-size: 10px; font-weight: 800; letter-spacing: 1.2px; }
.nav-group { margin: 1px 0; }
.nav-group-button::after { color: #8495b0; font-size: 16px; font-weight: 400; content: "+"; }
.nav-group.open .nav-group-button { color: white; background: rgba(255,255,255,.055); }
.nav-group.open .nav-group-button::after { content: "−"; }
.nav-children { display: none; margin: 2px 0 6px; padding: 4px 0 6px; }
.nav-group.open .nav-children { display: block; }
.nav-child { display: flex; min-height: 34px; align-items: center; justify-content: space-between; margin: 1px 4px; padding: 7px 12px 7px 25px; border-left: 2px solid transparent; color: #9fadc2; font-size: 12px; transition: color .15s, background .15s, border-color .15s; }
.nav-child:hover { color: white; background: rgba(255,255,255,.045); }
.nav-child.active { color: white; border-left-color: #6f9afa; background: rgba(53,109,229,.2); font-weight: 700; }
.nav-child small { color: #6f829e; font-size: 9px; }
.nav-child-disabled, .nav-child-empty { cursor: default; opacity: .68; }
.nav-child-disabled:hover, .nav-child-empty:hover { color: #9fadc2; background: transparent; }
.sidebar-footer { display: flex; min-height: 74px; align-items: center; gap: 12px; padding: 13px 20px; border-top: 1px solid rgba(255,255,255,.1); background: rgba(8,18,35,.18); }
.sidebar-user { min-width: 0; flex: 1; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { color: white; font-size: 12px; }.sidebar-user small { color: #8294b0; font-size: 10px; }
.sidebar-footer > a { color: #aebbd0; font-size: 11px; font-weight: 700; }
.sidebar-backdrop { display: none; }

.main { min-height: 100vh; margin-left: 268px; }
.topbar { position: sticky; z-index: 30; top: 0; display: flex; height: 64px; align-items: center; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); backdrop-filter: blur(8px); }
.topbar-title { display: flex; min-width: 0; flex: 1; align-items: center; gap: 13px; }
.topbar-title strong { font-size: 15px; }.topbar-title span { color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 13px; }
.topbar-actions form { margin: 0; }
.sales-site-link { color: var(--primary); font-weight: 700; }
.menu-button { display: none; margin-right: 10px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; color: #465266; background: white; font-size: 11px; font-weight: 700; cursor: pointer; }
.page { max-width: 1600px; margin: 0 auto; padding: 26px 28px 40px; }
.page-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.page-heading.compact { align-items: center; }
.page-heading h1 { margin-bottom: 5px; font-size: 26px; line-height: 1.25; letter-spacing: -.7px; }
.page-heading p { margin-bottom: 0; color: var(--muted); }
.eyebrow { margin-bottom: 5px !important; color: var(--primary) !important; font-size: 10px !important; font-weight: 800; letter-spacing: 1.3px; }
.heading-actions { display: flex; gap: 8px; }
.date-chip { padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: white; font-size: 12px; }

.button { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; gap: 6px; padding: 8px 15px; border: 1px solid transparent; border-radius: 8px; font-weight: 700; font-size: 13px; line-height: 1.2; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s, transform .05s; }
.button:active { transform: translateY(1px); }
.button-primary { color: white; background: var(--primary); border-color: var(--primary); box-shadow: 0 4px 10px rgba(37,99,235,.15); }
.button-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.button-secondary { color: #244e9a; background: var(--primary-soft); border-color: #cfe0ff; }
.button-secondary:hover { background: #e2ecff; }
.button-ghost { color: #465266; background: white; border-color: var(--line); }
.button-ghost:hover { border-color: #b9c3d1; background: #f8fafc; }
.button-danger { color: white; background: var(--danger); border-color: var(--danger); }
.button-small { min-height: 31px; padding: 5px 10px; font-size: 12px; }
.button-large { min-height: 48px; font-size: 14px; }
.button-block { width: 100%; }
.danger-text { color: var(--danger); }
.text-link { color: var(--primary); font-size: 12px; font-weight: 700; }

.alert { margin-bottom: 18px; padding: 12px 15px; border: 1px solid; border-radius: 9px; font-size: 13px; }
.alert-success { color: #146447; background: var(--success-soft); border-color: #bdebd9; }
.alert-error { color: #9f2f36; background: var(--danger-soft); border-color: #fac9cc; }
.alert-warning { color: #7b5504; background: var(--warning-soft); border-color: #f0dda4; }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-header { display: flex; min-height: 69px; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.card-header h2 { margin-bottom: 2px; font-size: 16px; letter-spacing: -.2px; }
.card-header p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.compact-card { margin-bottom: 20px; }
.form-section, .form-card-medium, .form-card-large { padding: 22px; }
.form-card-medium { max-width: 900px; }
.form-card-large { max-width: 1050px; }
.form-section .card-header, .form-card-medium .card-header, .form-card-large .card-header { margin: -22px -22px 22px; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 17px; margin-bottom: 20px; }
.stat-card { display: flex; min-height: 105px; align-items: center; gap: 16px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: var(--shadow); }
.stat-icon { display: inline-flex; width: 50px; height: 50px; align-items: center; justify-content: center; border-radius: 13px; font-size: 11px; font-weight: 800; }
.stat-icon.blue { color: #2458bd; background: #eaf1ff; }.stat-icon.green { color: #127250; background: #e6f7f0; }.stat-icon.violet { color: #6d3ec5; background: #f2ebff; }.stat-icon.amber { color: #99650b; background: #fff4da; }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { margin-bottom: 2px; color: var(--muted); font-size: 12px; }
.stat-card strong { font-size: 27px; line-height: 1.1; }
.content-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
.quick-links { padding: 8px; }
.quick-links a { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 9px; }
.quick-links a:hover { background: #f5f7fa; }
.quick-links > a > span { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 9px; color: #315ea9; background: #eef4ff; font-size: 9px; font-weight: 800; }
.quick-links strong, .quick-links small { display: block; }
.quick-links strong { font-size: 13px; }.quick-links small { color: var(--muted); font-size: 11px; }
.market-api-grid { align-items: start; }
.market-api-info { overflow: hidden; }
.market-api-info dl { margin: 0; padding: 6px 20px; }
.market-api-info dl > div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding: 13px 0; border-bottom: 1px solid #edf0f4; }
.market-api-info dl > div:last-child { border-bottom: 0; }
.market-api-info dt { color: var(--muted); font-size: 11px; font-weight: 700; }
.market-api-info dd { min-width: 0; margin: 0; overflow-wrap: anywhere; color: #465266; font-size: 12px; }
.market-api-info > p { margin: 0; padding: 15px 20px; border-top: 1px solid var(--line); color: var(--muted); background: #fafbfc; font-size: 11px; }

.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.dashboard-heading h1 { margin-bottom: 4px; font-size: 26px; line-height: 1.25; letter-spacing: -.7px; }
.dashboard-heading p { margin-bottom: 0; color: var(--muted); }
.dashboard-heading-actions { display: flex; align-items: center; gap: 10px; }
.integration-badge { padding: 7px 10px; border: 1px solid #f0dda4; border-radius: 6px; color: #7b5504; background: var(--warning-soft); font-size: 11px; font-weight: 700; }
.dashboard-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 18px 9px; }
.dashboard-section-heading > div { display: flex; align-items: baseline; gap: 9px; }
.dashboard-section-heading h2 { margin: 0; font-size: 16px; }.dashboard-section-heading p, .dashboard-section-heading small { margin: 0; color: var(--muted); font-size: 11px; }
.today-work-card { margin-bottom: 18px; overflow: hidden; }
.today-task-grid { display: grid; grid-template-columns: repeat(10, minmax(85px, 1fr)); gap: 7px; padding: 8px 17px 17px; }
.today-task-item { display: flex; min-height: 78px; flex-direction: column; justify-content: space-between; padding: 12px 11px 9px; border: 1px solid #e6ebf2; border-radius: 7px; background: #f8fafc; }
.today-task-item span { color: #47546a; font-size: 11px; font-weight: 700; white-space: nowrap; }
.today-task-item strong { font-size: 17px; text-decoration: underline; text-underline-offset: 3px; }
.today-task-item.tone-blue { border-color: #dceafb; background: #f1f7fd; }.today-task-item.tone-blue strong { color: #1970c5; }
.today-task-item.tone-red { border-color: #f7e4e8; background: #fff6f8; }.today-task-item.tone-red strong { color: #df2852; }
.today-task-item.tone-neutral strong { color: #344158; }

.sales-overview-card { margin-bottom: 24px; overflow: hidden; }
.dashboard-tabs { display: grid; grid-template-columns: repeat(5, 1fr); padding: 0 16px; border-bottom: 1px solid var(--line); }
.dashboard-tabs button { position: relative; min-height: 57px; border: 0; color: #69768a; background: transparent; font-weight: 700; cursor: default; }
.dashboard-tabs button.active { color: var(--primary); }
.dashboard-tabs button.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; background: var(--primary); content: ""; }
.dashboard-tabs button:disabled { opacity: .75; }
.sales-overview-grid { display: grid; grid-template-columns: minmax(420px, .9fr) minmax(520px, 1.1fr); }
.sales-chart-panel { min-width: 0; padding: 20px 20px 17px; border-right: 1px solid var(--line); }
.chart-meta { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 10px; }
.sales-chart { position: relative; display: grid; height: 285px; grid-template-columns: repeat(7, 1fr); align-items: end; gap: 10px; padding: 20px 16px 31px 45px; border-bottom: 1px solid #bfc8d6; }
.chart-grid-line { position: absolute; right: 0; left: 0; height: 1px; background: #e8ecf1; }.chart-grid-line.line-1 { top: 20%; }.chart-grid-line.line-2 { top: 40%; }.chart-grid-line.line-3 { top: 60%; }.chart-grid-line.line-4 { top: 80%; }
.chart-day { position: relative; z-index: 2; display: flex; height: 100%; align-items: center; flex-direction: column; justify-content: flex-end; gap: 8px; }
.chart-bars { display: flex; width: 100%; height: calc(100% - 25px); align-items: end; justify-content: center; gap: 3px; }
.chart-bars span { display: block; width: min(18px, 35%); height: var(--value); min-height: 3px; border-radius: 3px 3px 0 0; }.order-bar { background: #65b3f2; }.payment-bar { background: #ef63c4; }
.chart-day small { color: var(--muted); font-size: 10px; }.chart-day.today small { color: var(--primary); font-weight: 800; }
.chart-empty-note { position: absolute; z-index: 5; top: 45%; left: 50%; display: flex; flex-direction: column; padding: 12px 18px; border: 1px solid var(--line); border-radius: 7px; background: rgba(255,255,255,.93); text-align: center; transform: translate(-50%, -50%); }
.chart-empty-note strong { font-size: 12px; }.chart-empty-note span { margin-top: 2px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.chart-legend { display: flex; justify-content: center; gap: 22px; padding-top: 13px; color: #566277; font-size: 10px; font-weight: 700; }
.chart-legend span::before { display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 2px; content: ""; vertical-align: -1px; }.legend-order::before { background: #65b3f2; }.legend-payment::before { background: #ef63c4; }.legend-refund::before { border: 2px solid #8064df; background: white; }
.sales-table-panel { min-width: 0; padding: 18px 14px 14px; }
.sales-table-head { display: flex; align-items: center; justify-content: space-between; padding: 0 3px 10px; }.sales-table-head strong { font-size: 13px; }.sales-table-head span { color: var(--muted); font-size: 10px; }
.compact-sales-table th, .compact-sales-table td { padding: 8px 10px; text-align: right; }.compact-sales-table th:first-child, .compact-sales-table td:first-child { text-align: left; }
.compact-sales-table td { font-size: 11px; }.compact-sales-table td small { display: block; margin-top: 1px; color: #627087; font-size: 9px; }
.compact-sales-table td em { display: inline-flex; margin-left: 5px; padding: 1px 4px; border-radius: 3px; color: white; background: #2284df; font-size: 8px; font-style: normal; }
.compact-sales-table .today-row td { background: #f2f8fd; }.compact-sales-table .today-row td:first-child { border-left: 3px solid #3aa2e7; }
.compact-sales-table .summary-row td { background: #eef7fc; }

.dashboard-section-title { display: flex; align-items: center; justify-content: space-between; margin: 0 2px 11px; }.dashboard-section-title > div { display: flex; align-items: baseline; gap: 10px; }.dashboard-section-title h2 { margin: 0; font-size: 19px; }.dashboard-section-title p, .dashboard-section-title > span { margin: 0; color: var(--muted); font-size: 11px; }
.product-summary-card { margin-bottom: 20px; padding: 17px; }
.product-summary-head { display: flex; justify-content: space-between; margin-bottom: 11px; }.product-summary-head h3 { margin: 0; font-size: 14px; }.product-summary-head span { color: var(--muted); font-size: 10px; }
.product-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.product-summary-grid article { min-height: 72px; padding: 12px; border-radius: 6px; background: #f5f8fc; }.product-summary-grid article span, .product-summary-grid article strong { display: block; }.product-summary-grid article span { color: #526075; font-size: 11px; }.product-summary-grid article strong { margin-top: 5px; color: #1c7ac3; font-size: 20px; }.product-summary-grid article strong small { margin-left: 3px; color: var(--muted); font-size: 10px; }.product-summary-grid article.warning strong { color: #dc2f57; }
.operations-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.system-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); }.system-summary-grid article { min-height: 90px; padding: 17px; background: white; }.system-summary-grid span, .system-summary-grid strong { display: block; }.system-summary-grid span { color: var(--muted); font-size: 10px; }.system-summary-grid strong { margin-top: 5px; font-size: 22px; }
.recent-login-list { padding: 5px 17px; }.recent-login-list > div { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 2px; border-bottom: 1px solid #eef1f5; }.recent-login-list > div:last-child { border-bottom: 0; }.recent-login-list strong, .recent-login-list small { display: block; }.recent-login-list strong { font-size: 11px; }.recent-login-list small, .recent-login-list time { color: var(--muted); font-size: 9px; }

.menu-count { color: var(--muted); font-size: 11px; }
.menu-parent-row td { background: #f8faff; }.menu-parent-row td strong { color: #274a86; }.menu-child-row .menu-name-cell { padding-left: 8px; font-weight: 600; }
.menu-admin-table .mono { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-strip { display: flex; gap: 12px; margin-top: 14px; padding: 12px 15px; border: 1px solid #dce6f5; border-radius: 8px; color: #51647f; background: #f4f8fd; font-size: 11px; }.info-strip strong { flex: 0 0 auto; color: #2e4f84; }
.segmented-control { display: inline-flex; overflow: hidden; border: 1px solid #d7dde6; border-radius: 8px; }.segmented-control label { margin: 0; cursor: pointer; }.segmented-control input { position: absolute; width: 1px; height: 1px; opacity: 0; }.segmented-control span { display: inline-flex; min-width: 110px; height: 40px; align-items: center; justify-content: center; color: #5a6678; background: white; font-size: 12px; font-weight: 700; }.segmented-control label + label span { border-left: 1px solid #d7dde6; }.segmented-control input:checked + span { color: white; background: var(--primary); }

.table-summary { padding: 14px 18px 8px; color: var(--muted); font-size: 12px; }
.table-summary strong { color: var(--text); }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 16px; border-bottom: 1px solid #edf0f4; text-align: left; vertical-align: middle; }
th { color: #69768a; background: #fafbfc; font-size: 11px; font-weight: 700; white-space: nowrap; }
td { color: #465266; font-size: 12px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fcfdff; }
td strong { color: var(--text); }
.align-right { text-align: right; }
.nowrap { white-space: nowrap; }
.empty-cell { height: 110px; color: var(--muted); text-align: center; }
.block-muted { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.identity { display: flex; min-width: 190px; align-items: center; gap: 10px; }
.identity > span { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 50%; color: #315ea9; background: #edf3ff; font-weight: 800; }
.identity strong, .identity small { display: block; }
.identity small { color: var(--muted); font-size: 11px; }
.inline-form { display: inline-block; margin: 0 0 0 3px; }
.badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px; font-size: 10px; font-style: normal; font-weight: 700; white-space: nowrap; }
.badge-green { color: #14714f; background: #e7f7f0; }.badge-gray { color: #657084; background: #eef1f4; }.badge-violet { color: #6a3fb0; background: #f1eaff; }
details summary { color: var(--primary); font-size: 11px; font-weight: 700; cursor: pointer; }
details pre { width: 360px; max-height: 250px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fb; color: #364154; font-size: 10px; white-space: pre-wrap; }

.filter-bar { display: flex; align-items: center; gap: 8px; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.filter-bar input, .filter-bar select { min-height: 39px; }
.search-field { min-width: 270px; flex: 1; }
.audit-filter > input:first-child { min-width: 190px; flex: 1; }
.audit-filter > span { color: var(--muted); }

.field { min-width: 0; }
.field label { display: block; margin-bottom: 6px; color: #3b4658; font-size: 12px; font-weight: 700; }
.field label b { color: var(--danger); }
.field > small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.field .field-error, .field-error { color: var(--danger); }
input, select, textarea { width: 100%; min-height: 41px; padding: 9px 11px; border: 1px solid #d7dde6; border-radius: 8px; outline: none; color: var(--text); background: white; transition: border-color .15s, box-shadow .15s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #6797ee; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
input:disabled, input:read-only { color: #687386; background: #f3f5f7; }
input[type="checkbox"] { width: 17px; min-height: 17px; accent-color: var(--primary); }
.form-stack { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-row.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid { display: grid; gap: 20px; }
.form-grid.two-columns { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.wide-left { grid-template-columns: minmax(0, 1.65fr) minmax(320px, .75fr); }
.form-grid > .card > .form-stack { padding: 20px; }
.form-side-stack { display: grid; align-content: start; gap: 20px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 3px; }
.sticky-actions { position: sticky; z-index: 10; bottom: 16px; display: flex; justify-content: flex-end; gap: 8px; max-width: 560px; margin: 20px 0 20px auto; padding: 10px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.94); box-shadow: 0 8px 26px rgba(19,32,53,.1); backdrop-filter: blur(6px); }
.check-list { display: grid; gap: 7px; padding: 12px; }
.check-card { display: flex; align-items: flex-start; gap: 10px; padding: 10px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; }
.check-card:hover { border-color: #dbe4f1; background: #f8faff; }
.check-card input { margin-top: 2px; flex: 0 0 auto; }
.check-card span { min-width: 0; }
.check-card strong, .check-card small, .check-card code { display: block; }
.check-card strong { font-size: 12px; }.check-card small { margin: 2px 0 4px; color: var(--muted); font-size: 10px; }
.switch-row { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.switch-row:last-child { border-bottom: 0; }
.switch-row strong, .switch-row small { display: block; }.switch-row strong { font-size: 12px; }.switch-row small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.switch-row input { width: 18px; flex: 0 0 auto; }
.switch-field .switch-row { min-height: 41px; padding: 0 11px; border: 1px solid #d7dde6; border-radius: 8px; }
.permissions-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.permission-card { align-self: start; }
.empty-text { padding: 15px; color: var(--muted); text-align: center; }
.security-note { padding: 12px 14px; border-radius: 9px; color: #35517f; background: #f1f6ff; }
.security-note strong { display: block; font-size: 12px; }.security-note p { margin: 2px 0 0; font-size: 11px; }
.danger-section { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 30px; padding: 20px; border-color: #f0d7d9; }
.danger-section h2 { margin-bottom: 3px; font-size: 15px; }.danger-section p { margin: 0; color: var(--muted); font-size: 11px; }
.reset-password-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; min-width: 610px; }
.inline-editor { display: grid; grid-template-columns: 1fr 1fr 1.5fr 90px auto auto; align-items: end; gap: 10px; padding: 17px 20px; }
.mini-check { display: flex; height: 41px; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.mini-check input { width: 17px; }

.ownerclan-sync-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; padding: 19px 20px 21px; }
.ownerclan-sync-action { display: flex; align-items: end; justify-content: flex-end; }
.ownerclan-sync-action .button { width: 100%; }
.ownerclan-important { padding: 10px; border: 1px solid #f0d38a; border-radius: 9px; background: #fffaf0; }
.range-fields { display: flex; align-items: center; gap: 7px; }
.range-fields > input, .range-fields > select { min-width: 0; flex: 1; }
.range-fields > span { color: var(--muted); font-size: 11px; }
.ownerclan-search-card { overflow: hidden; }
.ownerclan-saved-filter-bar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #f7f9fc; }
.ownerclan-saved-filter-load, .ownerclan-saved-filter-save { display: flex; min-width: 0; align-items: end; gap: 8px; }
.ownerclan-saved-filter-load .field { width: 250px; }
.ownerclan-saved-filter-save { flex: 1 1 390px; }
.ownerclan-saved-filter-save .field { flex: 1; }
.ownerclan-saved-filter-delete { display: flex; align-items: end; }
.ownerclan-saved-filter-bar .button { min-height: 41px; }
.ownerclan-filter-section { padding: 18px 20px 20px; border-bottom: 1px solid var(--line); }
.ownerclan-filter-section h3 { margin-bottom: 13px; color: #344158; font-size: 13px; }
.ownerclan-filter-section h3 b { margin-left: 5px; color: var(--danger); font-size: 10px; }
.product-search-stats .stat-icon { width: 44px; font-size: 10px; }
.product-search-stats .stat-card strong { font-size: 21px; }
.product-search-filter-card form { padding: 18px 20px 20px; }
.product-search-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 14px; }
.product-search-filter-grid .span-2 { grid-column: span 2; }
.product-search-actions { display: flex; justify-content: flex-end; gap: 8px; }
.product-search-results > .card-header > strong { color: var(--primary); font-size: 18px; }
.legacy-product-table { min-width: 1580px; }
.legacy-product-main { display: flex; min-width: 330px; align-items: center; gap: 11px; }
.legacy-product-main img { width: 64px; height: 64px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 8px; background: #f3f5f7; object-fit: cover; }
.legacy-product-main > div { min-width: 0; }
.legacy-product-main > div > strong { display: block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legacy-stock-cell { min-width: 260px; max-width: 350px; line-height: 1.55; }
.legacy-action-links { display: grid; min-width: 230px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.legacy-action-links .button { justify-content: center; }
.legacy-product-check { width: 42px; text-align: center; }
.legacy-product-check input { width: 18px; min-height: 18px; }
.legacy-product-batch-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f7f9fc; }
.legacy-product-batch-summary { display: flex; align-items: center; gap: 10px; padding-right: 10px; }
.legacy-product-batch-summary > b { font-size: 12px; }.legacy-product-batch-summary > span { color: var(--primary); font-size: 11px; }
.legacy-product-batch-group { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 8px; background: white; }
.legacy-product-batch-group > span { padding: 0 3px; color: var(--muted); font-size: 10px; font-weight: 800; }
.legacy-product-batch-group select { width: auto; min-width: 78px; min-height: 31px; padding: 5px 7px; font-size: 10px; }
.bunchset-stats .stat-icon, .bunchset-detail-stats .stat-icon { width: 44px; font-size: 9px; }
.bunchset-detail-stats .stat-card strong { max-width: 210px; overflow: hidden; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.bunchset-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 14px; padding: 18px 20px 20px; }
.bunchset-filter-grid .span-2 { grid-column: span 2; }
.bunchset-filter-actions { display: flex; justify-content: flex-end; gap: 8px; }
.bunchset-keyword-toolbar, .bunchset-composition-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 11px; background: #f7f9fc; }
.bunchset-keyword-toolbar > strong, .bunchset-composition-toolbar > strong { margin-right: 8px; font-size: 12px; }.bunchset-keyword-toolbar > strong span, .bunchset-composition-toolbar > strong span { color: var(--primary); }
.bunchset-composition-toolbar small { color: var(--muted); }
.bunchset-table { min-width: 1540px; }.bunchset-component-table { min-width: 1580px; }
.bunchset-check-cell { width: 42px; text-align: center; }.bunchset-check-cell input { width: 18px; min-height: 18px; }
.bunchset-table tr.has-bunchset { background: #f7fff9; }
.bunchset-word-cell, .bunchset-product-cell { display: flex; min-width: 290px; align-items: center; gap: 10px; }
.bunchset-word-cell img, .bunchset-product-cell img { width: 58px; height: 58px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 7px; background: #f3f5f7; object-fit: cover; }
.bunchset-word-cell > div, .bunchset-product-cell > div { min-width: 0; }.bunchset-word-cell strong, .bunchset-product-cell strong { display: block; max-width: 350px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bunchset-pa-states { max-width: 250px; line-height: 1.5; white-space: normal; }
.bunchset-secondary-list { display: grid; min-width: 430px; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.bunchset-secondary-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: white; font-size: 10px; }
.bunchset-secondary-item > a { display: contents; color: inherit; text-decoration: none; }.bunchset-secondary-item > input { width: 15px; min-height: 15px; }
.bunchset-secondary-item.linked { border-color: #b7dfc4; background: #f2fbf5; }.bunchset-secondary-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.bunchset-secondary-item b { color: var(--primary); }.bunchset-secondary-item em { color: var(--violet); font-size: 9px; font-style: normal; font-weight: 800; }
.bunchset-meta-fields { display: grid; min-width: 255px; grid-template-columns: 90px 80px auto; gap: 6px; }.bunchset-meta-fields select, .bunchset-meta-fields input { min-height: 34px; padding: 6px 8px; font-size: 10px; }
.bunchset-name-fields { display: grid; min-width: 330px; grid-template-columns: minmax(0, 1fr) auto; gap: 6px; }.bunchset-name-fields input { min-height: 34px; padding: 6px 8px; font-size: 10px; }
.bunchset-batch-progress { color: var(--primary); font-size: 10px; font-weight: 800; }
.stored-component { background: #fbfffc; }.candidate-component { background: #fffdf8; }
.text-button { margin-top: 5px; padding: 0; border: 0; color: var(--danger); background: transparent; font-size: 9px; cursor: pointer; }
.ownerclan-filter-section.important-section { background: #fffdf7; box-shadow: inset 4px 0 #e5af37; }
.ownerclan-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 14px; }
.ownerclan-filter-grid .span-2 { grid-column: span 2; }
.inline-checks { display: flex; min-height: 41px; align-items: center; flex-wrap: wrap; gap: 8px 16px; padding: 8px 10px; border: 1px solid #d7dde6; border-radius: 8px; background: white; }
.inline-checks label { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-weight: 500; }
.ownerclan-search-actions { display: flex; align-items: end; justify-content: flex-end; gap: 8px; }
.filter-link-field .button { width: 100%; }
.ownerclan-items-table { min-width: 1260px; }
.ownerclan-api-stats { margin-bottom: 20px; }
.ownerclan-api-search-card { margin-bottom: 20px; overflow: hidden; }
.ownerclan-api-search-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; gap: 14px; padding: 18px 20px 20px; }
.ownerclan-api-search-form .span-2 { grid-column: span 2; }
.ownerclan-category-filter { display: grid; grid-column: 1 / -1; gap: 10px; min-width: 0; margin: 0; padding: 12px 14px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdfc; }
.ownerclan-category-filter legend { padding: 0 6px; color: var(--text); font-size: 11px; font-weight: 800; }
.ownerclan-category-modes { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 20px; }
.ownerclan-category-modes label, .ownerclan-category-checks label { display: inline-flex; align-items: center; gap: 6px; margin: 0; cursor: pointer; }
.ownerclan-category-panel { padding-top: 2px; }
.ownerclan-category-panel[hidden] { display: none; }
.ownerclan-category-panel > strong, .ownerclan-category-panel > label { display: block; margin-bottom: 8px; color: var(--primary); font-size: 11px; font-weight: 800; }
.ownerclan-category-checks { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px 14px; }
.ownerclan-category-checks label { min-height: 28px; padding: 4px 7px; border: 1px solid #dce6e1; border-radius: 6px; background: #fff; }
.ownerclan-category-checks label:has(input:checked) { border-color: var(--primary); background: #eff8f4; }
.ownerclan-category-checks span { font-weight: 700; }
.ownerclan-category-checks small { margin-left: auto; color: var(--muted); font-size: 9px; }
.ownerclan-category-help { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; }
.ownerclan-api-search-actions { display: flex; justify-content: flex-end; gap: 8px; }
.ownerclan-api-result-card { overflow: hidden; }
.ownerclan-api-bulk-bar { display: flex; min-height: 62px; align-items: center; gap: 18px; padding: 10px 18px; border-bottom: 1px solid var(--line); background: #f7f9fc; }
.ownerclan-api-bulk-bar > span { color: var(--muted); font-size: 12px; }
.ownerclan-api-bulk-bar .button { margin-left: auto; }
.ownerclan-api-select-all { display: inline-flex; align-items: center; gap: 7px; margin: 0; font-weight: 700; }
.ownerclan-api-table { min-width: 1380px; }
.ownerclan-api-table .check-cell { width: 48px; text-align: center; }
.ownerclan-api-pager { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 17px; border-top: 1px solid var(--line); }
.ownerclan-api-pager > span:not(.button) { color: var(--muted); font-size: 12px; font-weight: 700; }
.ownerclan-product { display: flex; min-width: 330px; align-items: center; gap: 11px; }
.ownerclan-product img, .ownerclan-no-image { width: 58px; height: 58px; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 7px; background: #f3f5f7; object-fit: cover; }
.ownerclan-no-image { display: inline-flex; align-items: center; justify-content: center; color: #98a2b3; font-size: 9px; font-weight: 800; }
.ownerclan-product > div { min-width: 0; }
.ownerclan-product > div > strong { display: block; max-width: 330px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ownerclan-mapping-guide { border-color: #d7e4f7; background: #f7faff; }
.ownerclan-supplier-table { min-width: 1220px; }
.ownerclan-supplier-table select, .ownerclan-supplier-table input { min-width: 140px; min-height: 35px; padding: 7px 9px; font-size: 11px; }
.ownerclan-map-fields { display: grid; min-width: 430px; grid-template-columns: .7fr 1fr 1fr 1.45fr; gap: 7px; }

.pagination { display: flex; justify-content: center; gap: 5px; padding: 18px; border-top: 1px solid var(--line); }
.page-link { display: inline-flex; min-width: 32px; height: 32px; align-items: center; justify-content: center; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: white; font-size: 11px; }
.page-link.active { color: white; background: var(--primary); border-color: var(--primary); }.page-link.disabled { pointer-events: none; opacity: .45; }

.login-body { background: #edf2f8; }
.login-shell { display: grid; width: 100%; min-height: 100vh; grid-template-columns: minmax(360px, .92fr) minmax(520px, 1.08fr); }
.login-intro { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 50px 8vw 45px 5.5vw; color: white; background: radial-gradient(circle at 20% 20%, rgba(59,130,246,.28), transparent 38%), linear-gradient(145deg, #101d31 0%, #1b304e 100%); }
.login-intro::after { position: absolute; right: -170px; bottom: -250px; width: 520px; height: 520px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 75px rgba(255,255,255,.025), 0 0 0 150px rgba(255,255,255,.018); content: ""; }
.login-brand { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.login-intro h1 { margin-bottom: 18px; font-size: clamp(36px, 4vw, 54px); line-height: 1.22; letter-spacing: -2px; }
.login-intro p:not(.eyebrow) { max-width: 480px; color: #b8c6da; font-size: 15px; line-height: 1.8; }
.login-intro small { position: relative; z-index: 1; color: #7e91ae; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: #f5f7fa; }
.login-card { width: 100%; max-width: 430px; padding: 42px; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 24px 60px rgba(30,48,75,.08); }
.login-heading { margin-bottom: 28px; }.login-heading h2 { margin-bottom: 6px; font-size: 27px; }.login-heading > p:last-child { margin-bottom: 0; color: var(--muted); }
.login-card .field { margin-bottom: 18px; }
.login-card .button-block { margin-top: 8px; }
.login-help { margin: 18px 0 0; color: var(--muted); font-size: 11px; text-align: center; }

.error-body { display: grid; min-height: 100vh; place-items: center; }
.error-page { max-width: 620px; margin: 8vh auto; padding: 55px 30px; text-align: center; }
.error-code { display: block; margin-bottom: 5px; color: var(--primary); font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -4px; }
.error-page h1 { margin-bottom: 8px; font-size: 25px; }.error-page p { margin-bottom: 24px; color: var(--muted); }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(1px,1px,1px,1px) !important; white-space: nowrap !important; }

@media (max-width: 1400px) {
    .today-task-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 1180px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .permissions-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid.wide-left { grid-template-columns: 1fr; }
    .danger-section { align-items: stretch; flex-direction: column; }.reset-password-form { min-width: 0; }
    .inline-editor { grid-template-columns: repeat(2, 1fr); }.inline-editor .button { align-self: end; }
    .sales-overview-grid { grid-template-columns: 1fr; }.sales-chart-panel { border-right: 0; border-bottom: 1px solid var(--line); }
    .operations-grid { grid-template-columns: 1fr; }
    .ownerclan-sync-form, .ownerclan-filter-grid, .ownerclan-api-search-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ownerclan-category-checks { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .product-search-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bunchset-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .2s ease; }
    .main { margin-left: 0; }
    .menu-open .sidebar { transform: translateX(0); }
    .menu-open .sidebar-backdrop { position: fixed; z-index: 40; inset: 0; display: block; background: rgba(8,15,28,.5); }
    .menu-button { display: inline-block; margin-right: 10px; }
    .topbar { padding: 0 18px; }.page { padding: 24px 18px; }
    .content-grid, .form-grid.two-columns { grid-template-columns: 1fr; }
    .login-shell { grid-template-columns: 1fr; }.login-intro { display: none; }.login-panel { min-height: 100vh; }
    .filter-bar { align-items: stretch; flex-wrap: wrap; }.search-field { min-width: 100%; }
    .filter-bar input, .filter-bar select { width: auto; flex: 1; }
    .dashboard-heading { align-items: stretch; flex-direction: column; }.dashboard-heading-actions { justify-content: space-between; }
    .product-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .topbar-title span { display: none; }
}

@media (max-width: 640px) {
    .topbar-actions > a { display: none; }.topbar-title { font-size: 14px; }
    .page-heading { align-items: stretch !important; flex-direction: column; }.heading-actions { flex-wrap: wrap; }
    .stats-grid { grid-template-columns: 1fr; }.stat-card { min-height: 88px; }
    .field-row, .field-row.three { grid-template-columns: 1fr; }
    .permissions-grid { grid-template-columns: 1fr; }
    .reset-password-form { grid-template-columns: 1fr; }
    .inline-editor { grid-template-columns: 1fr; }
    .login-panel { padding: 18px; }.login-card { padding: 28px 22px; }
    .filter-bar > * { width: 100% !important; flex: auto !important; }.audit-filter > span { display: none; }
    .danger-section { margin-top: 20px; }.sticky-actions { bottom: 8px; width: 100%; }
    .today-task-grid { grid-template-columns: repeat(2, 1fr); }.today-task-item { min-height: 70px; }
    .dashboard-tabs { display: flex; overflow-x: auto; padding: 0 10px; }.dashboard-tabs button { min-width: 140px; }
    .sales-chart-panel { padding: 15px 10px; }.sales-chart { height: 245px; padding-left: 20px; gap: 4px; }.chart-empty-note { width: 85%; }.chart-empty-note span { white-space: normal; }
    .sales-table-panel { padding: 12px 6px; }.compact-sales-table th, .compact-sales-table td { padding: 7px 6px; }
    .product-summary-grid { grid-template-columns: 1fr 1fr; }
    .system-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-heading-actions { align-items: stretch; flex-direction: column; }.dashboard-heading-actions .button { width: 100%; }
    .info-strip { flex-direction: column; gap: 4px; }
    .ownerclan-sync-form, .ownerclan-filter-grid, .ownerclan-api-search-form { grid-template-columns: 1fr; }
    .ownerclan-category-checks { grid-template-columns: 1fr; }
    .ownerclan-category-modes { align-items: flex-start; flex-direction: column; gap: 7px; }
    .ownerclan-filter-grid .span-2 { grid-column: auto; }
    .ownerclan-api-search-form .span-2 { grid-column: auto; }
    .ownerclan-api-bulk-bar { align-items: stretch; flex-direction: column; gap: 9px; }
    .ownerclan-api-bulk-bar .button { width: 100%; margin-left: 0; }
    .ownerclan-search-actions { justify-content: stretch; }.ownerclan-search-actions .button { flex: 1; }
    .ownerclan-saved-filter-load, .ownerclan-saved-filter-save { width: 100%; flex: 1 1 100%; }
    .ownerclan-saved-filter-load .field { width: auto; flex: 1; }
    .product-search-filter-grid { grid-template-columns: 1fr; }
    .product-search-filter-grid .span-2 { grid-column: auto; }
    .product-search-actions { justify-content: stretch; }
    .product-search-actions .button { flex: 1; }
    .legacy-product-batch-bar { align-items: stretch; flex-direction: column; }
    .legacy-product-batch-group { flex-wrap: wrap; }
    .bunchset-filter-grid { grid-template-columns: 1fr; }
    .bunchset-filter-grid .span-2 { grid-column: auto; }
    .bunchset-filter-actions { justify-content: stretch; }.bunchset-filter-actions .button { flex: 1; }
}

/* 구 ERP 상품검색 화면을 PHP 8.2 신규 ERP 안에서 동일 구조로 재현 */
.page:has(.legacy-prod-search) { max-width: none; padding: 12px 16px 40px; }
.legacy-prod-search { color: #111; font-family: Arial, "Noto Sans KR", sans-serif; }
.legacy-prod-search [hidden] { display: none !important; }
.legacy-prod-search .search-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 10px; }
.legacy-prod-search .btn { display: inline-block; min-height: 0; padding: 6px 10px; border: 1px solid #222; border-radius: 4px; color: #fff; background: #333; font-size: 12px; font-weight: 400; line-height: 1; cursor: pointer; }
.legacy-prod-search .btn.gray { background: #555; }
.legacy-prod-search .btn.white { color: #111; background: #fff; border-color: #bbb; }
.legacy-prod-search .btn.batch { background: #1f2937; border-color: #1f2937; }
.legacy-prod-search .btn.black { color: #fff; background: #2f2f2f; border-color: #2f2f2f; }
.legacy-prod-search .btn.sky { color: #fff; background: #0ea5e9; border-color: #0284c7; }
.legacy-prod-search .btn.pink { color: #fff; background: #eb888b; border-color: #eb888b; }
.legacy-prod-search .inp { min-height: 0; padding: 6px 8px; border: 1px solid #bbb; border-radius: 4px; background: #fff; font-size: 12px; line-height: 1; }
.legacy-prod-search .inp.date { min-width: 150px; }
.legacy-prod-search .inp.keyword { min-width: 220px; }
.legacy-prod-search .inp.select { width: auto; min-width: 120px; }
.legacy-prod-search .inp.select.cate-select { background: #eaf4ff; border-color: #9cc9ff; }
.legacy-prod-search .tilde { color: #666; font-size: 12px; }
.legacy-prod-search .count-box { display: flex; align-items: center; gap: 8px; margin-left: auto; color: #333; font-size: 12px; }
.legacy-prod-search .product-table-scroll { width: 100%; overflow-x: auto; }
.legacy-prod-search .table { width: 100%; min-width: 1600px; border-collapse: collapse; background: #fff; }
.legacy-prod-search .table th,
.legacy-prod-search .table td { padding: 10px 9px; border: 1px solid #e5e5e5; vertical-align: top; font-size: 12px; }
.legacy-prod-search .table th { background: #fafafa; font-weight: 700; text-align: left; white-space: nowrap; }
.legacy-prod-search .loading { padding: 22px; color: #666; text-align: center; }
.legacy-prod-search .col-check { width: 40px; text-align: center; }
.legacy-prod-search .col-check input { width: 18px; height: 18px; min-height: 18px; }
.legacy-prod-search .col-no { width: 90px; }
.legacy-prod-search .col-img { width: 450px; }
.legacy-prod-search .col-stock { width: 620px; }
.legacy-prod-search .col-func { width: 80px; }
.legacy-prod-search .col-price { width: 100px; }
.legacy-prod-search .col-status { width: 10px; white-space: nowrap; }
.legacy-prod-search .col-coop { width: 60px; }
.legacy-prod-search .col-reg { width: 90px; white-space: nowrap; }
.legacy-prod-search .chk-no { margin-top: 6px; color: #777; font-size: 11px; }
.legacy-prod-search .row-flex { display: flex; gap: 10px; }
.legacy-prod-search .product-description { min-width: 0; flex: 1; }
.legacy-prod-search .small { color: #666; font-size: 11px; }
.legacy-prod-search .name { margin-top: 4px; font-size: 13px; }
.legacy-prod-search .name a:hover { text-decoration: underline; }
.legacy-prod-search .thumb { display: block; width: 70px; height: 70px; border: 1px solid #dcdcdc; border-radius: 8px; background: #fff; object-fit: cover; }
.legacy-prod-search .thumb.no-image { display: flex; align-items: center; justify-content: center; color: #888; font-size: 10px; }
.legacy-prod-search .goods-code { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 5px; color: #666; font-size: 11px; }
.legacy-prod-search .goods-code .code { appearance: none; padding: 0; border: 0; color: #2d6cdf; background: none; font-size: 11px; text-decoration: underline; cursor: pointer; }
.legacy-prod-search .icon-links { display: inline-flex; align-items: center; gap: 5px; }
.legacy-prod-search .icon-links img { display: block; width: 16px; height: 16px; border: 0; }
.legacy-prod-search .outside-code { flex-basis: 100%; margin-top: 2px; color: #999; }
.legacy-prod-search .product-code-break { flex-basis: 100%; margin-top: 4px; }
.legacy-prod-search .func-wrap { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 5px; }
.legacy-prod-search .func-wrap .break { height: 0; flex-basis: 100%; }
.legacy-prod-search .badge { display: inline-flex; height: 18px; min-height: 0; align-items: center; justify-content: center; padding: 0 5px; border: 1px solid transparent; border-radius: 4px; color: #fff !important; font-size: 10px; font-weight: 500; line-height: 1; text-decoration: none !important; }
.legacy-prod-search .badge.blue { background: #5891fa; border-color: #2d6cdf; }
.legacy-prod-search .badge.gray { background: #9c9c9c; border-color: #666; }
.legacy-prod-search .badge.pink { background: #eb888b; border-color: #eb888b; }
.legacy-prod-search .badge.black { background: #2f2f2f; border-color: #2f2f2f; }
.legacy-prod-search .badge.light { background: #9c9c9c; border-color: #9c9c9c; }
.legacy-prod-search .badge:hover { filter: brightness(.95); }
.legacy-prod-search .price-action { margin-top: 4px; }
.legacy-prod-search .pa-badge { display: flex; width: 26px; height: 18px; align-items: center; justify-content: center; margin: 6px auto 0; border-radius: 4px; font-size: 11px; font-weight: 800; user-select: none; }
.legacy-prod-search .pa-none { color: #222; background: #ccfce8; }
.legacy-prod-search .pa-ready { color: #81a5cc; background: #dddfdd; }
.legacy-prod-search .pa-connect { color: #5c5b5b; background: #8aebeb; }
.legacy-prod-search .cf-badge { display: inline-flex; min-width: 58px; height: 20px; align-items: center; justify-content: center; margin: 6px 0 0; padding: 0 8px; border-radius: 4px; font-size: 11px; font-weight: 800; user-select: none; }
.legacy-prod-search .cf-none,
.legacy-prod-search .cf-ready { color: #444; background: #e6e6e6; }
.legacy-prod-search .cf-connect { color: #123a66; background: #87ceeb; }
.legacy-prod-search .angle-badge { display: inline; height: auto; margin-left: 6px; padding: 0; border: 0; color: #666; background: none; font-size: 11px; font-weight: 700; line-height: 1.2; vertical-align: middle; }
.legacy-prod-search .stock-box { line-height: 1.55; }
.legacy-prod-search .stock-line { margin-bottom: 4px; word-break: break-all; }
.legacy-prod-search .stock-line + .stock-line { margin-top: 5px; padding-top: 5px; border-top: 1px solid #dcdcdc; }
.legacy-prod-search .stock-label { display: inline-block; min-width: 48px; color: #666; font-size: 11px; font-weight: 700; }
.legacy-prod-search .stock-values { color: #111; font-size: 12px; }
.legacy-prod-search .stock-values.out { color: #4f7cfa; }
.legacy-prod-search .stock-toggle-btn { margin-left: 6px; padding: 1px 5px; border: 1px solid #bfcdfc; border-radius: 4px; color: #3f67d9; background: #eef3ff; font-size: 11px; vertical-align: middle; cursor: pointer; }
.legacy-prod-search .stock-toggle-btn:hover { background: #dfe9ff; }
.legacy-prod-search .pagination { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 14px 0 0; }
.legacy-prod-search .page-link { padding: 4px 6px; border: 1px solid #ddd; border-radius: 4px; color: #111; background: #fff; font-size: 11px; text-decoration: none; }
.legacy-prod-search .page-link.on { color: #fff; background: #333; border-color: #333; }
.legacy-prod-search .img-preview { position: fixed; z-index: 9999; padding: 7px; border: 1px solid #ccc; border-radius: 8px; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.15); pointer-events: none; }

/* 재사용 가능한 고밀도 화면 규칙: 관리 화면은 같은 공간에 더 많은 정보를 배치한다. */
.dense-page .page-heading { margin-bottom: 10px; }
.dense-page .page-heading h1 { margin-bottom: 2px; font-size: 21px; }
.dense-page .page-heading p { font-size: 11px; }
.dense-page .heading-actions { gap: 5px; }
.dense-page .button { min-height: 33px; padding: 6px 10px; border-radius: 6px; font-size: 11px; }
.dense-page .card-header { min-height: 46px; gap: 10px; padding: 8px 12px; }
.dense-page .card-header h2 { margin-bottom: 0; font-size: 14px; }
.dense-page .card-header p { font-size: 10px; }
.dense-page .field label { margin-bottom: 3px; font-size: 10px; }
.dense-page .field > small { margin-top: 2px; font-size: 9px; }
.dense-page input, .dense-page select, .dense-page textarea { min-height: 33px; padding: 6px 8px; border-radius: 6px; font-size: 11px; }
.dense-page .range-fields { gap: 4px; }

.ownerclan-api-page .ownerclan-api-stats { gap: 8px; margin-bottom: 10px; }
.ownerclan-api-page .stat-card { min-height: 58px; gap: 9px; padding: 8px 11px; border-radius: 8px; }
.ownerclan-api-page .stat-icon { width: 34px; height: 34px; border-radius: 8px; font-size: 9px; }
.ownerclan-api-page .stat-card small { font-size: 9px; }
.ownerclan-api-page .stat-card strong { font-size: 18px; }
.ownerclan-api-page .ownerclan-api-search-card { margin-bottom: 10px; }
.ownerclan-api-page .ownerclan-api-search-form { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; padding: 9px 11px 10px; }
.ownerclan-api-page .ownerclan-important { padding: 5px 7px; border-radius: 6px; }
.ownerclan-api-page .ownerclan-api-search-actions { align-items: end; gap: 5px; }
.ownerclan-api-page .ownerclan-api-search-actions .button { flex: 1; }
.ownerclan-api-page .ownerclan-api-bulk-bar { min-height: 43px; gap: 12px; padding: 5px 10px; }
.ownerclan-api-page .ownerclan-api-table { min-width: 1220px; }
.ownerclan-api-page .ownerclan-api-table th, .ownerclan-api-page .ownerclan-api-table td { padding: 7px 8px; }
.ownerclan-api-page .ownerclan-product { min-width: 275px; gap: 8px; }
.ownerclan-api-page .ownerclan-product img, .ownerclan-api-page .ownerclan-no-image { width: 46px; height: 46px; }
.ownerclan-api-page .block-muted { margin-top: 1px; font-size: 10px; }
.ownerclan-api-pager { gap: 4px; padding: 8px 10px; }
.ownerclan-api-pager .page-link { min-width: 29px; height: 29px; padding: 0 7px; border-radius: 6px; }
.ownerclan-pager-ellipsis { padding: 0 2px; color: var(--muted); }
.ownerclan-pager-note { margin-left: 6px; color: var(--muted); font-size: 9px; }

.ownerclan-product-name { display: block; max-width: none; padding: 0; border: 0; color: var(--text); background: transparent; font-size: 12px; font-weight: 700; line-height: 1.45; text-align: left; white-space: normal; overflow: visible; text-overflow: clip; cursor: pointer; }
.ownerclan-product-name:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.ownerclan-source-link { display: inline-flex; width: max-content; align-items: center; margin-top: 3px; padding: 2px 5px; border: 1px solid #cbd8ee; border-radius: 4px; color: #315b9b; background: #f5f8ff; font-size: 9px; font-weight: 700; line-height: 1.2; text-decoration: none; white-space: nowrap; }
.ownerclan-source-link:hover { border-color: #8eacd9; color: #19498f; background: #eaf1ff; }
.ownerclan-items-table .ownerclan-product { min-width: 390px; align-items: flex-start; }
.ownerclan-items-table .ownerclan-product-name { width: 100%; max-width: none; }
.ownerclan-hover-image { cursor: zoom-in; }
.ownerclan-image-hover-preview { position: fixed; z-index: 10020; border: 2px solid white; border-radius: 8px; background: #f3f5f7; box-shadow: 0 10px 30px rgba(22,34,54,.28); object-fit: contain; pointer-events: none; }

.ownerclan-modal-open { overflow: hidden; }
.ownerclan-detail-modal { position: fixed; inset: 0; z-index: 10000; display: grid; padding: 24px; place-items: center; }
.ownerclan-detail-modal[hidden] { display: none; }
.ownerclan-detail-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(18,27,43,.6); cursor: default; }
.ownerclan-detail-panel { position: relative; width: min(1080px, 96vw); max-height: 92vh; overflow: auto; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 24px 70px rgba(16,24,40,.28); }
.ownerclan-detail-header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); }
.ownerclan-detail-header small { color: var(--primary); font-size: 9px; font-weight: 800; letter-spacing: 1px; }
.ownerclan-detail-header h2 { margin: 1px 0 0; font-size: 18px; }
.ownerclan-detail-header p { margin: 1px 0 0; color: var(--muted); font-size: 10px; }
.ownerclan-detail-close { width: 34px; height: 34px; padding: 0; border: 1px solid var(--line); border-radius: 7px; color: #596579; background: white; font-size: 23px; line-height: 1; cursor: pointer; }
.ownerclan-detail-loading { padding: 45px 16px; color: var(--muted); text-align: center; }
.ownerclan-detail-panel > .alert { margin: 14px; }
.ownerclan-detail-content { padding: 14px; }
.ownerclan-detail-content > section { margin-top: 12px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ownerclan-detail-content > section > h3 { display: flex; align-items: center; gap: 7px; margin: 0; padding: 8px 11px; border-bottom: 1px solid var(--line); background: #f8fafc; font-size: 12px; }
.ownerclan-detail-top { display: grid; grid-template-columns: 245px minmax(0, 1fr); gap: 14px; }
.ownerclan-detail-gallery { min-width: 0; }
.ownerclan-detail-gallery > img { display: block; width: 245px; height: 245px; border: 1px solid var(--line); border-radius: 8px; background: #f4f6f8; object-fit: contain; }
.ownerclan-detail-gallery > div { display: flex; gap: 5px; margin-top: 6px; overflow-x: auto; }
.ownerclan-detail-gallery button { flex: 0 0 auto; width: 42px; height: 42px; padding: 1px; border: 1px solid var(--line); border-radius: 5px; background: white; cursor: pointer; }
.ownerclan-detail-gallery button.active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.ownerclan-detail-gallery button img { width: 100%; height: 100%; object-fit: cover; }
.ownerclan-detail-summary, .ownerclan-detail-fields { display: grid; margin: 0; grid-template-columns: 105px minmax(0, 1fr); align-content: start; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ownerclan-detail-summary dt, .ownerclan-detail-summary dd, .ownerclan-detail-fields dt, .ownerclan-detail-fields dd { min-width: 0; margin: 0; padding: 7px 9px; border-bottom: 1px solid #edf0f4; font-size: 11px; }
.ownerclan-detail-summary dt, .ownerclan-detail-fields dt { color: #657187; background: #fafbfc; font-weight: 700; }
.ownerclan-detail-summary dd, .ownerclan-detail-fields dd { color: var(--text); word-break: break-word; }
.ownerclan-detail-summary > :nth-last-child(-n+2), .ownerclan-detail-fields > :nth-last-child(-n+2) { border-bottom: 0; }
.ownerclan-detail-fields { grid-template-columns: 105px minmax(120px, 1fr) 105px minmax(120px, 1fr); border: 0; border-radius: 0; }
.ownerclan-detail-option-table th, .ownerclan-detail-option-table td { padding: 7px 9px; }
.ownerclan-detail-option-table th:first-child { width: 55px; }
.ownerclan-detail-option-table th:nth-last-child(-n+2) { width: 120px; }
.ownerclan-detail-text { max-height: 150px; margin: 0; overflow: auto; padding: 9px 11px; color: #465266; font-size: 11px; line-height: 1.65; white-space: pre-wrap; word-break: break-word; }

@media (max-width: 1450px) {
    .ownerclan-api-page .ownerclan-api-search-form { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .ownerclan-detail-modal { padding: 8px; }
    .ownerclan-detail-panel { width: 100%; max-height: 96vh; }
    .ownerclan-detail-top { grid-template-columns: 1fr; }
    .ownerclan-detail-gallery > img { width: 100%; height: min(70vw, 300px); }
    .ownerclan-detail-fields { grid-template-columns: 92px minmax(0, 1fr); }
    .ownerclan-api-pager { flex-wrap: wrap; }
    .ownerclan-pager-note { width: 100%; margin-left: 0; text-align: center; }
}
.legacy-prod-search .img-preview img { display: block; width: 480px; max-height: calc(100vh - 40px); object-fit: contain; }
.legacy-prod-search .batch-overlay { position: fixed; z-index: 9998; inset: 0; background: rgba(0,0,0,.18); }
.legacy-prod-search .batch-layer { position: fixed; z-index: 9999; top: 76px; right: 18px; width: 350px; height: 450px; overflow: hidden; border: 1px solid #cfcfcf; border-radius: 10px; background: #fff; box-shadow: 0 8px 26px rgba(0,0,0,.18); }
.legacy-prod-search .batch-head { display: flex; align-items: center; justify-content: space-between; padding: 10px; border-bottom: 1px solid #eee; background: #fafafa; font-size: 13px; }
.legacy-prod-search .batch-close { width: 28px; height: 22px; padding: 0; border: 1px solid #ddd; border-radius: 6px; background: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.legacy-prod-search .batch-body { display: flex; height: calc(100% - 43px); flex-direction: column; gap: 8px; overflow-y: auto; padding: 10px; }
.legacy-prod-search .batch-btn { width: 100%; justify-content: center; }
.legacy-prod-search .batch-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.legacy-prod-search .batch-label { color: #333; font-size: 12px; white-space: nowrap; }
.legacy-prod-search .batch-row .batch-btn { width: auto; padding: 6px 9px; }
.legacy-prod-search .batch-note { margin-top: auto; }
.legacy-prod-search .price-row { align-items: stretch; }
.legacy-prod-search .price-select { min-width: 0; flex: 1; }

@media (max-width: 800px) {
    .page:has(.legacy-prod-search) { padding: 10px; }
    .legacy-prod-search .count-box { width: 100%; margin-left: 0; }
    .legacy-prod-search .batch-layer { top: 70px; right: 10px; width: min(350px, calc(100vw - 20px)); }
}

/* 오너클랜 임시상품·수집내역·수동 품절 관리 */
.badge-blue { color: #2458bd; background: #eaf1ff; }
.ownerclan-temp-page .stats-grid, .ownerclan-runs-page .stats-grid { gap: 8px; margin-bottom: 10px; }
.ownerclan-temp-page .stat-card, .ownerclan-runs-page .stat-card { min-height: 58px; gap: 9px; padding: 8px 11px; border-radius: 8px; }
.ownerclan-temp-page .stat-icon, .ownerclan-runs-page .stat-icon { width: 34px; height: 34px; border-radius: 8px; font-size: 9px; }
.ownerclan-temp-page .stat-card small, .ownerclan-runs-page .stat-card small { font-size: 9px; }
.ownerclan-temp-page .stat-card strong, .ownerclan-runs-page .stat-card strong { font-size: 18px; }
.ownerclan-temp-page .ownerclan-saved-filter-bar { gap: 6px; padding: 7px 10px; }
.ownerclan-temp-page .ownerclan-saved-filter-bar .button { min-height: 33px; }
.ownerclan-temp-page .ownerclan-filter-section { padding: 8px 10px 9px; }
.ownerclan-temp-page .ownerclan-filter-section h3 { margin-bottom: 6px; font-size: 11px; }
.ownerclan-temp-page .ownerclan-filter-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 7px; }
.ownerclan-temp-page .inline-checks { min-height: 33px; gap: 5px 10px; padding: 5px 7px; }
.ownerclan-heading-form { display: inline-flex; margin: 0; }
.ownerclan-compact-check { display: inline-flex; min-height: 20px; align-items: center; gap: 5px; margin-top: 3px; color: var(--text); font-size: 10px; font-weight: 700; cursor: pointer; }
.dense-page .ownerclan-compact-check input { width: 14px; height: 14px; min-height: 0; margin: 0; padding: 0; }
.ownerclan-stock-bulk-bar, .ownerclan-option-stock-bar { display: flex; min-height: 43px; align-items: center; gap: 8px; padding: 5px 10px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #fffaf3; }
.ownerclan-stock-bulk-bar label, .ownerclan-option-stock-bar label { display: inline-flex; align-items: center; gap: 5px; margin: 0; font-size: 11px; font-weight: 700; white-space: nowrap; }
.ownerclan-stock-bulk-bar > span, .ownerclan-option-stock-bar > span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.ownerclan-stock-bulk-bar > input, .ownerclan-option-stock-bar > input { min-width: 150px; min-height: 31px; flex: 1; padding: 5px 7px; font-size: 10px; }
.ownerclan-stock-bulk-bar .button, .ownerclan-option-stock-bar .button { min-height: 31px; white-space: nowrap; }
.ownerclan-items-table .check-cell, .ownerclan-detail-option-table .check-cell { width: 44px; text-align: center; }
.ownerclan-option-soldout-row td { background: #fff8f5; }
.ownerclan-option-soldout-row td:nth-last-child(-n+2) { color: var(--danger); font-weight: 700; }
.ownerclan-runs-card { overflow: hidden; }
.ownerclan-runs-filter { display: grid; grid-template-columns: 180px 150px auto; align-items: end; gap: 7px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.ownerclan-runs-filter-actions { display: flex; justify-content: flex-end; gap: 5px; }
.ownerclan-runs-table { min-width: 1350px; }
.ownerclan-runs-table th, .ownerclan-runs-table td { padding: 8px 9px; }
.ownerclan-run-filter-cell { min-width: 230px; max-width: 360px; font-size: 10px; line-height: 1.5; }
.ownerclan-run-error { min-width: 170px; max-width: 280px; color: var(--danger); font-size: 10px; }
.ownerclan-run-resume { display: flex; min-width: 175px; align-items: center; gap: 5px; }
.ownerclan-run-resume select { min-width: 80px; min-height: 31px; padding: 5px 7px; font-size: 10px; }

/* 오너클랜 변경 감지 로그 */
.ownerclan-change-page .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.ownerclan-change-page .stat-card { min-height: 58px; gap: 9px; padding: 8px 11px; border-radius: 8px; }
.ownerclan-change-page .stat-icon { width: 34px; height: 34px; border-radius: 8px; font-size: 9px; }
.ownerclan-change-page .stat-card small { font-size: 9px; }
.ownerclan-change-page .stat-card strong { font-size: 18px; }
.ownerclan-change-page .ownerclan-change-last { font-size: 12px; }
.ownerclan-change-card { overflow: hidden; }
.ownerclan-change-filter { display: grid; grid-template-columns: minmax(210px, 1.7fr) minmax(150px, 1fr) 135px 135px 80px auto; gap: 7px; align-items: end; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.ownerclan-change-filter .field { margin: 0; }
.ownerclan-change-filter .field label { margin-bottom: 3px; font-size: 10px; }
.ownerclan-change-filter input, .ownerclan-change-filter select { min-height: 32px; padding: 5px 7px; font-size: 11px; }
.ownerclan-change-filter-actions { display: flex; gap: 5px; }
.ownerclan-change-filter-actions .button { min-height: 32px; padding: 6px 10px; }
.ownerclan-change-table { min-width: 1120px; }
.ownerclan-change-table th, .ownerclan-change-table td { padding: 7px 8px; vertical-align: top; font-size: 11px; }
.ownerclan-change-table th:nth-child(1) { width: 128px; }
.ownerclan-change-table th:nth-child(2) { width: 300px; }
.ownerclan-change-table th:nth-child(3) { width: 145px; }
.ownerclan-change-table th:nth-child(5) { width: 132px; }
.ownerclan-change-table th:nth-child(6) { width: 55px; }
.ownerclan-change-table .ownerclan-product { min-width: 270px; }
.ownerclan-change-table .ownerclan-hover-image, .ownerclan-change-table .ownerclan-no-image { width: 42px; height: 42px; }
.ownerclan-change-types { display: flex; flex-wrap: wrap; gap: 3px; }
.ownerclan-change-types .badge { padding: 2px 5px; font-size: 9px; }
.ownerclan-change-status { color: var(--muted); }
.ownerclan-change-arrow { padding: 0 5px; color: var(--muted); }
.ownerclan-change-details { margin-top: 5px; }
.ownerclan-change-details summary { width: max-content; color: var(--primary); font-size: 10px; font-weight: 700; cursor: pointer; }
.ownerclan-change-details pre { max-width: 620px; max-height: 250px; margin: 6px 0 0; overflow: auto; padding: 7px; border: 1px solid var(--line); border-radius: 5px; background: #f8fafc; color: #3d4a5f; font: 10px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; word-break: break-word; }
.ownerclan-change-field-list { display: grid; grid-template-columns: 100px minmax(0, 1fr); max-width: 680px; margin: 6px 0 0; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.ownerclan-change-field-list dt, .ownerclan-change-field-list dd { min-width: 0; margin: 0; padding: 5px 7px; border-bottom: 1px solid #edf0f4; font-size: 10px; }
.ownerclan-change-field-list dt { color: var(--muted); background: #fafbfc; font-weight: 700; }
.ownerclan-change-field-list dd { display: grid; grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1fr); gap: 3px; word-break: break-all; }
.ownerclan-change-field-list dd b { color: var(--muted); text-align: center; }

@media (max-width: 1450px) {
    .ownerclan-temp-page .ownerclan-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    .ownerclan-temp-page .ownerclan-filter-grid { grid-template-columns: 1fr; }
    .ownerclan-temp-page .ownerclan-filter-grid .span-2 { grid-column: auto; }
    .ownerclan-stock-bulk-bar, .ownerclan-option-stock-bar { align-items: stretch; flex-direction: column; }
    .ownerclan-stock-bulk-bar > input, .ownerclan-option-stock-bar > input { width: 100%; }
    .ownerclan-runs-filter { grid-template-columns: 1fr; }
    .ownerclan-runs-filter-actions .button { flex: 1; }
    .ownerclan-change-page .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ownerclan-change-filter { grid-template-columns: 1fr 1fr; }
    .ownerclan-change-search { grid-column: 1 / -1; }
}

@media (min-width: 761px) and (max-width: 1100px) {
    .ownerclan-change-filter { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ownerclan-change-filter-actions { justify-content: flex-end; }
}

/* 구 ERP 모음상품 관리 화면: 원본의 고밀도 표·버튼·상품 레이어를 PHP 8.2 화면에 재현한다. */
.bunchset-legacy-page { color: #222; font: 14px Arial, "맑은 고딕", sans-serif; }
.bunchset-legacy-heading { margin-bottom: 8px; }
.bunchset-legacy-filter-box { margin-bottom: 8px; padding: 10px; border: 1px solid #ccc; background: #f9f9f9; }
.bunchset-legacy-filter-form { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.bunchset-legacy-filter-form > label { display: inline-flex; align-items: center; gap: 5px; color: #222; font-size: 12px; font-weight: 700; white-space: nowrap; }
.bunchset-legacy-filter-form select, .bunchset-legacy-filter-form input { width: auto; min-width: 110px; min-height: 30px; padding: 4px 6px; border: 1px solid #bbb; border-radius: 2px; background: #fff; font-size: 12px; }
.bunchset-legacy-filter-form input[name="keyword"] { width: 210px; }
.bunchset-legacy-tier-row { display: flex; width: 100%; align-items: center; flex-wrap: wrap; gap: 6px 14px; padding-top: 2px; }
.bunchset-legacy-tier-row label { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; }
.bunchset-legacy-tier-row input { width: 15px; min-width: 0; min-height: 15px; }
.bunchset-legacy-tier-row a { margin-left: auto; color: #315fa8; font-size: 11px; }
.bunchset-legacy-button-area { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.bunchset-legacy-button-area .button { min-height: 29px; padding: 4px 8px; border-radius: 2px; font-size: 11px; }
.bunchset-legacy-button-area > strong { margin-left: auto; font-size: 11px; }
.bunchset-tip-button { position: relative; }
.bunchset-tip-button::after { position: absolute; z-index: 9999; top: 31px; left: 0; display: none; min-width: 260px; max-width: 420px; padding: 7px 9px; border-radius: 5px; color: #fff; background: #222; box-shadow: 0 2px 8px rgba(0,0,0,.25); content: attr(data-tip); font-size: 11px; line-height: 1.5; text-align: left; white-space: pre-line; }
.bunchset-tip-button:hover::after { display: block; }
.bunchset-legacy-count { margin: 5px 0; text-align: right; font-size: 11px; }
.bunchset-legacy-table-wrap { border: 0; border-radius: 0; }
.bunchset-legacy-word-table { width: 100%; min-width: 1500px; border-collapse: collapse; table-layout: fixed; }
.bunchset-legacy-word-table th, .bunchset-legacy-word-table > tbody > tr > td { padding: 4px 6px; border: 1px solid #ccc; font-size: 12px; vertical-align: top; }
.bunchset-legacy-word-table th { color: #111; background: #eee; font-weight: 700; text-align: center; }
.bunchset-legacy-word-table th:nth-child(1) { width: 42px; }
.bunchset-legacy-word-table th:nth-child(2) { width: 50px; }
.bunchset-legacy-word-table th:nth-child(3) { width: 88px; }
.bunchset-legacy-word-table th:nth-child(4) { width: 260px; }
.bunchset-legacy-word-table th:nth-child(5) { width: 125px; }
.bunchset-legacy-word-table th:nth-child(6) { width: 150px; }
.bunchset-legacy-word-table > tbody > tr.has-bc > td:nth-child(-n+6) { background: #fbfff9; }
.bunchset-legacy-word-table .check-cell, .bunchset-legacy-word-table .check2-cell { text-align: center; cursor: pointer; }
.bunchset-legacy-word-table .check-cell input, .bunchset-legacy-word-table .check2-cell input { width: 16px; min-height: 16px; cursor: pointer; }
.bunchset-legacy-word-table .number-cell { text-align: center; }
.bunchset-tier-flag, .bunchset-exclude-flag { display: inline-block; padding: 2px 6px; border: 1px solid #ffba66; border-radius: 10px; color: #a65100; background: #ffe0b3; font-size: 10px; white-space: nowrap; }
.bunchset-exclude-flag { margin-left: 3px; border-color: #aaa; color: #333; background: #ddd; }
.bunchset-tier-delete { margin-left: 3px; padding: 0; border: 0; color: #c00; background: transparent; font-weight: 900; cursor: pointer; }
.bunchset-keyword-cell { min-width: 0; }
.bunchset-keyword-cell > strong { display: inline; word-break: break-word; }
.bunchset-keyword-thumb { width: 88px; height: 88px; margin-right: 6px; border: 1px solid #ccc; background: #fff; object-fit: cover; vertical-align: middle; }
.bunchset-bc-code { margin-top: 3px; color: #315fa8; font-size: 10px; font-weight: 700; word-break: break-all; }
.bunchset-bc-name-form { display: flex; max-width: 245px; align-items: center; gap: 4px; margin-top: 4px; }
.bunchset-bc-name-form input[name="goods_name"] { width: 170px; min-height: 24px; padding: 2px 4px; border: 1px solid #bbb; border-radius: 2px; font-size: 10px; }
.bunchset-bc-name-form button { width: 38px; min-height: 24px; padding: 1px 3px; border: 1px solid #aaa; background: #fff; font-size: 10px; cursor: pointer; }
.bunchset-code-actions { min-width: 130px; }
.bunchset-view-button, .bunchset-thumb-button { display: inline-block; margin: 1px 2px; padding: 2px 6px; border: 1px solid #99c; border-radius: 1px; color: #222; background: #eef; font-size: 10px; line-height: 18px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.bunchset-view-button.has-bc { border-color: #000; color: #fff; background: #000; }
.bunchset-thumb-button { border-color: #777; background: #fff; }
.bunchset-thumb-button.disabled { opacity: .35; cursor: default; }
.bunchset-secondary-outer { padding: 0 !important; }
.bunchset-secondary-inner { width: 100%; border-collapse: collapse; table-layout: fixed; }
.bunchset-secondary-inner td { padding: 4px 5px; border: 0; border-bottom: 1px solid #ddd; font-size: 11px; vertical-align: top; }
.bunchset-secondary-inner tr:last-child td { border-bottom: 0; }
.bunchset-secondary-inner tr.has-bc td { background: #fbfff9; font-weight: 700; }
.bunchset-secondary-inner .check2-cell { width: 35px; }
.bunchset-secondary-inner .bunchset-keyword-cell { width: 52%; }
.bunchset-secondary-inner .number-cell { width: 18%; }
.bunchset-secondary-inner .bunchset-code-actions { width: 25%; }
.bunchset-secondary-inner .bunchset-keyword-thumb { width: 58px; height: 58px; }
.bunchset-pa-count { display: block; margin-top: 3px; color: #555; font-size: 10px; font-weight: 700; }
.bunchset-pa-links { display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: 2px; margin-top: 2px; }
.bunchset-pa-link { display: inline-block; max-width: 118px; overflow: hidden; padding: 1px 7px; border: 1px solid #777; border-radius: 4px; color: #000; background: #ccc; font-size: 10px; font-weight: 600; line-height: 17px; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
a.bunchset-pa-link:hover { border-color: #222; filter: brightness(.94); text-decoration: underline; }
.bunchset-pa-link.is-selling { background: #ffff00; }
.bunchset-pa-link.is-edit-wait { background: #94de90; }
.bunchset-pa-link.is-soldout { background: #ffb0b0; }
.bunchset-pa-link.is-ended { background: #e16e72; }
.bunchset-pa-link.is-sale-wait { background: #fffbea; }
.bunchset-pa-link.is-approval-wait { background: #fff8bf; }
.bunchset-pa-link.is-cancel-wait { background: #ffbc3e; }

.bunchset-popup-open { overflow: hidden; }
.bunchset-popup { position: fixed; z-index: 10050; inset: 0; display: grid; padding: 20px; place-items: center; }
.bunchset-popup[hidden] { display: none; }
.bunchset-popup-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(0,0,0,.55); }
.bunchset-popup-panel { position: relative; width: min(1100px, 97vw); max-height: 92vh; overflow: auto; border: 2px solid #333; background: #fff; box-shadow: 0 18px 60px rgba(0,0,0,.32); }
.bunchset-popup-header { position: sticky; z-index: 2; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 11px; border-bottom: 1px solid #bbb; background: #f6f6f6; font-size: 12px; line-height: 1.6; }
.bunchset-popup-bc { margin-left: 8px; font-size: 11px; font-weight: 400; }
.bunchset-popup-bc span { font-weight: 800; text-decoration: underline; }
.bunchset-popup-bc button, .bunchset-popup-bc a, .bunchset-popup-actions button, .bunchset-popup-actions a, .bunchset-popup-controls button, .bunchset-popup-controls a, .bunchset-popup-name-row button { display: inline-block; min-height: 24px; margin-left: 3px; padding: 2px 6px; border: 1px solid #555; border-radius: 1px; color: #222; background: #fff; font-size: 10px; line-height: 18px; text-decoration: none; cursor: pointer; }
.bunchset-popup-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 3px; }
.bunchset-popup-actions .bunchset-popup-close { border: 0; color: #c00; background: transparent; font-weight: 800; }
.bunchset-popup-status { padding: 8px 11px; border-bottom: 1px solid #ddd; color: #315fa8; background: #f7faff; font-size: 11px; }
.bunchset-popup-status.is-error { color: #b42318; background: #fff3f1; }
.bunchset-popup-list { padding: 6px 10px 12px; }
.bunchset-popup-item { display: grid; grid-template-columns: 44px minmax(320px, 1fr) auto; align-items: center; gap: 7px; padding: 5px 0; border-bottom: 1px solid #eee; }
.bunchset-popup-item.is-candidate { background: #fffdf5; }
.bunchset-popup-item.is-hidden { opacity: .38; text-decoration: line-through; }
.bunchset-popup-img { width: 38px; height: 38px; border: 1px solid #ccc; object-fit: cover; }
.bunchset-popup-main { min-width: 0; }
.bunchset-popup-main > strong { display: block; font-size: 11px; }
.bunchset-popup-main > small { display: block; color: #777; font-size: 9px; }
.bunchset-popup-name-row { display: flex; align-items: center; gap: 3px; margin-top: 3px; }
.bunchset-popup-name-row input { width: min(520px, 100%); min-height: 26px; padding: 2px 5px; border: 1px solid #bbb; border-radius: 1px; font-size: 10px; }
.bunchset-popup-controls { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
.bunchset-popup-controls label { display: inline-flex; align-items: center; margin-right: 3px; font-size: 10px; cursor: pointer; }
.bunchset-popup-controls input { width: 14px; min-height: 14px; }
.bunchset-popup-controls button:disabled { opacity: .35; cursor: default; }

@media (max-width: 760px) {
    .bunchset-popup { padding: 5px; }
    .bunchset-popup-panel { width: 100%; max-height: 97vh; }
    .bunchset-popup-header { align-items: flex-start; flex-direction: column; }
    .bunchset-popup-item { grid-template-columns: 38px minmax(0, 1fr); }
    .bunchset-popup-controls { grid-column: 1 / -1; justify-content: flex-start; }
}
