:root{color-scheme:light;--bg:#f3f5f9;--panel:#fff;--ink:#172033;--muted:#667085;--line:#e3e8ef;--blue:#2458d3;--navy:#12213d;--green:#067647;--red:#b42318}
*{box-sizing:border-box}
body{margin:0;background:var(--bg);color:var(--ink);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Malgun Gothic",sans-serif;font-size:14px}
a{color:var(--blue);text-decoration:none}
.site-header{background:var(--navy);color:#fff;padding:22px max(18px,calc((100% - 1420px)/2));display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand-head h1{font-size:24px;margin:5px 0}.brand-head p{font-size:12px;color:#c4ccda;margin:0}.eyebrow{font-size:10px;letter-spacing:2px;color:#a8c0ff;font-weight:800}
.top-nav{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.top-nav>a,.nav-logout{color:#fff;border:1px solid #51627f;border-radius:8px;padding:9px 11px;font-size:12px;background:transparent}.top-nav>a.active{background:#fff;color:var(--navy);border-color:#fff}.top-nav form{margin:0}.nav-user{color:#d4dced;font-size:12px;padding:0 6px}
.page-wrap{max-width:1420px;margin:22px auto 60px;padding:0 20px}.panel{background:var(--panel);border:1px solid var(--line);border-radius:14px;padding:20px;margin-bottom:16px;box-shadow:0 2px 8px rgba(16,24,40,.025)}
.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}.section-title h2{font-size:17px;margin:0 0 5px}.section-title p{font-size:12px;color:var(--muted);margin:0}.result-title{margin-bottom:15px}.count-badge{font-size:12px;color:#344054;background:#f2f4f7;padding:7px 10px;border-radius:20px;white-space:nowrap}
.search-form,.admin-settings-form,.user-add-form,.manual-run-form{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.search-form label,.admin-settings-form label,.user-add-form label,.manual-run-form label,.stack-form label{display:flex;flex-direction:column;gap:7px;color:#475467;font-size:12px;flex:1;min-width:190px}
input,select{width:100%;border:1px solid #cfd6e1;border-radius:8px;padding:11px 12px;font-size:14px;background:#fff;color:var(--ink);min-height:42px}
button,.button-light{border:0;border-radius:8px;background:var(--blue);color:#fff;font-weight:700;padding:11px 17px;cursor:pointer;font-size:13px;min-height:40px}
.button-light{display:inline-flex;align-items:center;justify-content:center;background:#eef2ff;color:#2449a5;border:1px solid #d9e2ff}
.table-scroll{width:100%;overflow-x:auto}table.parts-table{width:100%;border-collapse:collapse;min-width:900px;font-size:12px}table.parts-table th{text-align:left;background:#f8fafc;color:#667085;border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:12px 10px;white-space:nowrap}table.parts-table td{border-bottom:1px solid #edf0f4;padding:11px 10px;vertical-align:middle}table.parts-table tr:last-child td{border-bottom:0}.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.price{font-weight:800;color:#172033}.part-no{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-weight:700;white-space:nowrap}.english,.muted{color:var(--muted)}.brand-pill{display:inline-block;border-radius:20px;padding:5px 8px;background:#eef2f6;color:#344054;white-space:nowrap;font-weight:700}.brand-pill.h{background:#eaf1ff;color:#2458b8}.brand-pill.k{background:#fff3e8;color:#a34c00}.brand-pill.hk{background:#e9f8ef;color:#067647}.inline-add-form{display:flex;gap:5px;min-width:155px}.inline-add-form select{min-width:90px;min-height:34px;padding:6px;font-size:11px}.small-button{min-height:34px;padding:6px 10px;font-size:11px;white-space:nowrap}.empty-row{text-align:center!important;color:var(--muted);padding:30px!important}
.pagination{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;margin-top:18px}.pagination a,.pagination strong,.pagination span{min-width:34px;text-align:center;padding:8px 10px;border-radius:7px;font-size:12px}.pagination a{border:1px solid var(--line);background:#fff;color:#344054}.pagination strong{background:var(--blue);color:#fff}.pagination span{color:#98a2b3}.pagination .disabled{border:1px solid #edf0f4}
.auth-body{min-height:100vh;display:grid;place-items:center;background:linear-gradient(140deg,#edf2fa,#f8fafc)}.auth-wrap{width:min(440px,calc(100% - 28px))}.auth-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:30px;box-shadow:0 12px 38px rgba(16,24,40,.08)}.auth-card h1{font-size:24px;margin:9px 0}.auth-card>.muted,.muted{color:var(--muted)}.stack-form{display:grid;gap:15px;margin-top:22px}.full-button{width:100%;margin-top:4px}.auth-foot{font-size:11px;color:var(--muted);text-align:center;margin:18px 0 0}
.alert,.notice{padding:12px 14px;border-radius:9px;margin-bottom:15px;font-size:13px}.error{background:#fff1f0;color:#912018;border:1px solid #ffd5d2}.notice{background:#eff8ff;border:1px solid #b2ddff;color:#175cd3}
.create-group-form{display:flex;gap:9px;max-width:540px}.create-group-form input{flex:1}.group-tabs{display:flex;gap:8px;flex-wrap:wrap;margin-top:16px}.group-tabs a{padding:9px 13px;border-radius:9px;border:1px solid var(--line);background:#fff;color:#344054}.group-tabs a.selected{background:#eaf1ff;color:#2449a5;border-color:#c8d8ff;font-weight:700}.title-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.title-actions form{margin:0}.danger-button,.small-danger{background:#fff1f0;color:var(--red);border:1px solid #ffd5d2}.small-danger{padding:7px 10px;min-height:32px;font-size:11px}.admin-settings-form{align-items:end}.admin-settings-form label{min-width:180px}.check-label{display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important;min-width:190px!important}.check-label input{width:18px;min-height:18px;height:18px}.status-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:20px}.status-grid>div{background:#f8fafc;border:1px solid var(--line);padding:13px;border-radius:9px}.status-grid span{display:block;color:var(--muted);font-size:11px;margin-bottom:6px}.status-grid strong{font-size:14px}.nav-logout{cursor:pointer}
@media(max-width:850px){.site-header{align-items:flex-start;flex-direction:column;padding:18px}.top-nav{width:100%}.page-wrap{padding:0 12px;margin-top:14px}.status-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:640px){.brand-head h1{font-size:21px}.top-nav{gap:6px}.top-nav>a,.nav-logout{padding:8px 9px;font-size:11px}.nav-user{margin-left:auto}.panel{padding:14px;border-radius:11px}.search-form{display:grid;grid-template-columns:1fr}.search-form label{min-width:0}.search-form button,.search-form .button-light{width:100%}.table-scroll{overflow:visible}table.parts-table{min-width:0;display:block}table.parts-table thead{display:none}table.parts-table tbody{display:grid;gap:10px}table.parts-table tr{display:grid;grid-template-columns:1fr 1fr;gap:0;background:#fff;border:1px solid var(--line);border-radius:10px;padding:8px 10px}table.parts-table td{display:flex;flex-direction:column;gap:5px;border:0!important;padding:7px 5px;min-width:0;overflow-wrap:anywhere}table.parts-table td:before{content:attr(data-label);font-size:10px;color:#98a2b3;font-weight:700}table.parts-table td:nth-child(3),table.parts-table td:nth-child(4){grid-column:1/-1}table.parts-table td:last-child{grid-column:1/-1}.inline-add-form{min-width:0}.inline-add-form select{flex:1}.pagination{gap:3px}.pagination a,.pagination strong,.pagination span{padding:7px 8px;min-width:30px}.create-group-form{flex-direction:column}.create-group-form button{width:100%}.title-actions{width:100%}.title-actions>*{flex:1}.status-grid{grid-template-columns:1fr 1fr}.auth-card{padding:22px}}


/* Readability, fixed table columns, copy action and distinct result sections */
body{font-size:16px}
.brand-head h1{font-size:26px}
.brand-head p{font-size:14px}
.section-title h2{font-size:20px}
.section-title p{font-size:14px}
.search-form label{font-size:14px}
.search-form input{font-size:16px}
table.parts-table.fixed-parts-table{width:100%;min-width:1030px;table-layout:fixed;font-size:14px}
table.fixed-parts-table col.col-brand{width:100px}
table.fixed-parts-table col.col-partno{width:230px}
table.fixed-parts-table col.col-kr{width:190px}
table.fixed-parts-table col.col-en{width:250px}
table.fixed-parts-table col.col-price{width:135px}
table.fixed-parts-table col.col-updated{width:125px}
table.fixed-parts-table th{font-size:13px;padding:14px 12px}
table.fixed-parts-table td{font-size:14px;padding:13px 12px}
table.fixed-parts-table td.fixed-text-cell{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.part-no-cell{white-space:nowrap}
.part-no{font-size:14px;letter-spacing:.015em}
.copy-part-number{display:inline-flex;align-items:center;justify-content:center;min-height:28px;margin-left:7px;padding:4px 8px;border:1px solid #d4dce8;border-radius:6px;background:#f7f9fc;color:#40516b;font-size:12px;font-weight:700;vertical-align:middle}
.copy-part-number:hover{background:#edf2fa}
.copy-part-number.copied{background:#e8f5ed;border-color:#c5e5d0;color:#287447}
.brand-pill{font-size:13px}
.search-results-section{background:#f9fbff;border-color:#dce7f6}
.search-results-section .section-title h2{color:#355b91}
.search-results-section .parts-table th{background:#edf4ff;color:#4b6382;border-color:#dce7f6}
.search-results-section .count-badge{background:#e8f0fb;color:#355b91}
.recent-history-section{background:#fffdf9;border-color:#eee5d7}
.recent-history-section .section-title h2{color:#82633b}
.recent-history-section .parts-table th{background:#f7f1e7;color:#79684f;border-color:#eee5d7}
.recent-history-section .count-badge{background:#f3ecdf;color:#79684f}
.history-pagination a,.search-pagination a{font-size:14px}
.history-pagination strong,.search-pagination strong{font-size:14px}
.recent-history-section.is-loading{opacity:.58;pointer-events:none;transition:opacity .12s ease}
@media(max-width:640px){
  body{font-size:16px}
  .brand-head h1{font-size:23px}
  .brand-head p{font-size:13px}
  .section-title h2{font-size:19px}
  .section-title p{font-size:13px}
  table.parts-table.fixed-parts-table{min-width:0;font-size:14px}
  table.fixed-parts-table colgroup{display:none}
  table.fixed-parts-table td{font-size:14px;padding:8px 6px}
  table.fixed-parts-table td.part-no-cell{display:flex;flex-direction:row;align-items:center;gap:5px;flex-wrap:wrap}
  table.fixed-parts-table td.part-no-cell:before{width:100%}
  .part-no{font-size:14px}
  .copy-part-number{margin-left:3px;min-height:28px}
  table.fixed-parts-table td:nth-child(3),table.fixed-parts-table td:nth-child(4){grid-column:1/-1}
  table.fixed-parts-table td:last-child{grid-column:1/-1}
}


/* Browser-local recent history, readable shared typography and balanced columns */
body{font-size:15px}
table.parts-table.fixed-parts-table{
  width:100%;min-width:1120px;table-layout:fixed;font-size:15px
}
table.fixed-parts-table th{
  font-size:14px;padding:14px 11px;white-space:normal
}
table.fixed-parts-table td{
  font-size:15px;padding:13px 11px;vertical-align:middle
}
table.fixed-parts-table .part-no{
  font-family:inherit;font-size:15px;font-weight:400;letter-spacing:0
}
table.fixed-parts-table .price{
  text-align:left;font-size:15px;font-weight:400;color:var(--ink);
  font-variant-numeric:tabular-nums;white-space:nowrap
}
table.fixed-parts-table .update-cell{
  white-space:nowrap;font-size:13px;font-weight:400
}
table.fixed-parts-table .fixed-text-cell{
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
table.search-parts-table col.col-brand{width:8%}
table.search-parts-table col.col-partno{width:15%}
table.search-parts-table col.col-kr{width:22%}
table.search-parts-table col.col-en{width:25%}
table.search-parts-table col.col-price{width:10%}
table.search-parts-table col.col-updated{width:20%}
table.history-parts-table col.col-select{width:4%}
table.history-parts-table col.col-brand{width:7%}
table.history-parts-table col.col-partno{width:14%}
table.history-parts-table col.col-kr{width:19%}
table.history-parts-table col.col-en{width:21%}
table.history-parts-table col.col-price{width:9%}
table.history-parts-table col.col-updated{width:17%}
table.history-parts-table col.col-registration{width:8%}
.history-toolbar{
  display:flex;align-items:end;justify-content:flex-end;gap:8px;flex-wrap:wrap
}
.history-size-control{
  display:flex;align-items:center;gap:7px;color:#475467;font-size:13px;white-space:nowrap
}
.history-size-control select{width:100px;min-height:36px;padding:6px 9px;font-size:13px}
.history-action{
  min-height:36px;padding:7px 11px;font-size:12px;white-space:nowrap
}
.history-clear{background:#fff4f2;color:#a43c32;border:1px solid #f0d0ca}
.history-select-col,.history-row-select-cell{text-align:center!important}
.history-select-col input,.history-row-select-cell input{
  width:17px;height:17px;min-height:17px;accent-color:var(--blue);cursor:pointer
}
.history-row-select-cell{vertical-align:middle!important}
.history-storage-note{margin:12px 0 0;color:#8a8175;font-size:12px}
.history-pagination{min-height:34px}
.history-page-button{
  min-width:34px;min-height:34px;padding:6px 10px;border:1px solid var(--line);
  border-radius:7px;background:#fff;color:#344054;font-size:13px;font-weight:500
}
.history-page-button.current{background:var(--blue);border-color:var(--blue);color:#fff;font-weight:700}
.history-page-button:disabled{opacity:.45;cursor:default}
.history-action:disabled{opacity:.55;cursor:wait}
.search-results-section .parts-table th{background:#edf4ff}
.recent-history-section .parts-table th{background:#f7f1e7}
@media(max-width:850px){
  .section-title.result-title{align-items:flex-start;flex-direction:column}
  .history-toolbar{justify-content:flex-start;width:100%}
}
@media(max-width:640px){
  table.parts-table.fixed-parts-table{min-width:0;display:block}
  table.fixed-parts-table colgroup{display:none}
  table.fixed-parts-table thead{display:none}
  table.fixed-parts-table tbody{display:grid;gap:10px}
  table.fixed-parts-table tr{
    display:grid;grid-template-columns:1fr 1fr;gap:0;background:#fff;
    border:1px solid var(--line);border-radius:10px;padding:8px 10px
  }
  table.fixed-parts-table td{
    display:flex;flex-direction:column;gap:5px;border:0!important;
    padding:7px 5px;min-width:0;overflow-wrap:anywhere;font-size:14px
  }
  table.fixed-parts-table .part-no{font-family:inherit;font-size:14px;font-weight:400}
  table.fixed-parts-table td:before{
    content:attr(data-label);font-size:11px;color:#98a2b3;font-weight:700
  }
  table.search-parts-table td:nth-child(3),
  table.search-parts-table td:nth-child(4),
  table.search-parts-table td:last-child{grid-column:1/-1}
  table.history-parts-table td.history-row-select-cell{
    grid-column:1/-1;display:flex;flex-direction:row;align-items:center;
    justify-content:flex-start;padding:5px
  }
  table.history-parts-table td.history-row-select-cell:before{content:"선택"}
  table.history-parts-table td:nth-child(3),
  table.history-parts-table td:nth-child(4),
  table.history-parts-table td:nth-child(5),
  table.history-parts-table td:nth-child(7),
  table.history-parts-table td:nth-child(8){grid-column:1/-1}
  table.history-parts-table td:nth-child(6){grid-column:1/-1}
  .history-toolbar{display:grid;grid-template-columns:1fr 1fr}
  .history-size-control{grid-column:1/-1}
  .history-size-control select{width:100%}
  .history-action{width:100%}
}


/* Odoo-style per-table column chooser */
.result-tools{display:flex;align-items:center;gap:10px;flex-shrink:0}
.column-visibility{position:relative;display:inline-flex;z-index:20}
.column-visibility>summary{
  list-style:none;display:flex;align-items:center;justify-content:center;
  width:36px;height:36px;border:1px solid var(--line);border-radius:8px;
  background:#fff;color:#53657d;cursor:pointer
}
.column-visibility>summary::-webkit-details-marker{display:none}
.column-visibility>summary:hover,.column-visibility[open]>summary{
  background:#f2f5fa;border-color:#cbd5e1;color:#253b59
}
.column-visibility>summary svg{
  width:19px;height:19px;fill:none;stroke:currentColor;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round
}
.column-visibility-menu{
  position:absolute;top:calc(100% + 7px);right:0;min-width:176px;
  padding:11px 12px;background:#fff;border:1px solid #dfe4ec;
  border-radius:10px;box-shadow:0 10px 28px rgba(16,24,40,.13);
  display:grid;gap:9px
}
.column-visibility-menu strong{
  padding:0 2px 7px;border-bottom:1px solid #edf0f4;
  color:#344054;font-size:13px;font-weight:700
}
.column-visibility-menu label{
  display:flex;align-items:center;gap:9px;color:#344054;
  font-size:13px;line-height:1.35;white-space:nowrap;cursor:pointer
}
.column-visibility-menu input{
  width:16px;height:16px;min-height:16px;margin:0;
  accent-color:var(--blue);cursor:pointer
}
.column-hidden{display:none!important}
.search-results-section .result-title{align-items:center}
table.search-parts-table col.col-brand{width:7%}
table.search-parts-table col.col-partno{width:14%}
table.search-parts-table col.col-kr{width:20%}
table.search-parts-table col.col-en{width:23%}
table.search-parts-table col.col-price{width:10%}
table.search-parts-table col.col-updated{width:16%}
table.search-parts-table col.col-registration{width:10%}
table.history-parts-table col.col-select{width:4%}
table.history-parts-table col.col-brand{width:7%}
table.history-parts-table col.col-partno{width:13%}
table.history-parts-table col.col-kr{width:19%}
table.history-parts-table col.col-en{width:21%}
table.history-parts-table col.col-price{width:9%}
table.history-parts-table col.col-updated{width:18%}
table.history-parts-table col.col-registration{width:9%}
table.fixed-parts-table tr.empty-slot td{
  height:43px;padding-top:0;padding-bottom:0
}
@media(max-width:640px){
  .search-results-section .result-title{align-items:flex-start}
  .result-tools{align-self:flex-end;margin-top:4px}
  .column-visibility-menu{position:fixed;top:auto;right:16px;min-width:190px}
  table.fixed-parts-table tr.empty-slot{
    min-height:35px;height:35px;padding:0 10px
  }
  table.fixed-parts-table tr.empty-slot td{
    display:block;height:35px;min-height:35px;padding:0
  }
  table.fixed-parts-table tr.empty-slot td:before{content:none}
}


/* Admin schedule frequency controls */
.admin-settings-form [hidden]{display:none!important}
.admin-settings-form #collect-weekday-field,
.admin-settings-form #collect-monthday-field{min-width:160px}


/* Clearly display the active automatic collection schedule in admin. */
.schedule-summary{
  display:flex;align-items:center;gap:12px;flex-wrap:wrap;
  margin:0 0 16px;padding:12px 14px;border:1px solid #dce7f6;
  border-radius:9px;background:#f5f8fd;color:#344b6b;font-size:14px
}
.schedule-summary strong{font-size:13px;color:#53657d}
.schedule-summary span{font-weight:700;color:#1f3f70}
.admin-settings-form .schedule-frequency-label{min-width:220px}
.admin-settings-form [hidden]{display:none!important}
