  * { font-family: 'Malgun Gothic', '맑은 고딕', sans-serif; font-size: 13px; }
  body { background: #f0f0f0; margin: 0; padding: 0; min-width: 1880px; }
  
  /* Header */
  #hd { background: #1a4a8a; position: sticky; top: 0; left: 0; right: 0; z-index: 1000; }
  #gnb { background: #1a4a8a; }
  .gnb-inner { width: 100%; padding: 0 20px; box-sizing: border-box; }
  
  /* 메뉴바 */
  .menubar { display: flex; flex-wrap: nowrap; align-items: center; background: #2563a8; padding: 0; min-height: 36px; position: relative; z-index: 200; overflow:visible; }
  /* 최상위 메뉴 아이템 래퍼 */
  .menu-item { position: relative; flex-shrink: 0; }
  .menu-item > a { color: #cce0ff; padding: 8px 14px; border-radius: 3px; text-decoration: none; white-space: nowrap; font-weight: bold; display: flex; align-items: center; gap: 4px; line-height: 36px; }
  .menu-item > a:hover, .menu-item > a.active { background: #4fdfd0; color: #000; }
  .menu-item > a.has-sub::after { content: " ▾"; font-size: 9px; opacity: 0.8; }
  /* 서브메뉴 */
  .submenu { display: none; position: absolute; top: 100%; left: 0; background: #1a3a6a; min-width: 140px; border-radius: 0 0 4px 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.35); z-index: 1001; }
  .menu-item:hover .submenu { display: block; }
  .submenu a { display: block; color: #cce0ff; padding: 8px 16px; text-decoration: none; white-space: nowrap; font-size: 12px; border-bottom: 1px solid rgba(255,255,255,0.07); }
  .submenu a:last-child { border-bottom: none; }
  .submenu a:hover { background: #4fdfd0; color: #000; }
  .menubar-divider { width: 1px; height: 20px; background: #4a7ac0; margin: 0 4px; }
  /* 로그인 정보 (메뉴바 우측) */
  .menubar-login { margin-left: auto; display: flex; align-items: center; gap: 10px; color: #cce0ff; padding: 0 14px; white-space: nowrap; }
  .menubar-login .login-user { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: bold; }
  .menubar-login .login-user i { font-size: 16px; color: #7fb8ff; }
  .menubar-login .login-sep { color: #4a7ac0; font-size: 13px; }
  .menubar-login a { color: #cce0ff; text-decoration: none; font-size: 12px; font-weight: bold; display: flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: 3px; }
  .menubar-login a:hover { background: #4fdfd0; color: #000; }
  .menubar-login .btn-logout { color: #ffaaaa !important; }
  .menubar-login .btn-logout:hover { background: #cc3333 !important; color: #fff !important; }
  
  /* Search Area */
  .search-panel-wrap { overflow-x: auto; margin-bottom: 15px; }
  .search-panel { background: #e8edf5; padding: 6px 8px; border-radius: 4px; display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; border: 1px solid #c0cce0; overflow: visible; min-width: max-content; }
  .search-group { display: flex; flex-wrap: nowrap; gap: 4px; align-items: center; flex-shrink: 0; }
  .search-group + .search-group { margin-left: 40px; padding-left: 40px; border-left: 2px solid #b0c4de; }
  .search-group-label { background: #5b7db8; color: #fff; padding: 4px 10px; font-weight: bold; border-radius: 2px; white-space: nowrap; flex-shrink: 0; font-size: 13px; }
  .search-row { display: flex; gap: 4px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
  .search-label { background: #dde8ff; color: #1a3a6a; padding: 3px 8px; font-weight: bold; white-space: nowrap; border-radius: 2px; border: 1px solid #b0c8ef; }
  .search-input { height: 24px; border: 1px solid #aaa; padding: 0 6px; font-size: 13px; border-radius: 2px; }
  .search-select { height: 24px; border: 1px solid #aaa; padding: 0 2px; font-size: 13px; border-radius: 2px; }
  
  /* Buttons */
  .btn { padding: 3px 10px; border: none; border-radius: 3px; cursor: pointer; font-size: 12px; font-weight: bold; }
  .btn-search { background: #3366cc; color: #fff; }
  .btn-search:hover { background: #2255bb; }
  .btn-reset { background: #ff9900; color: #fff; }
  .btn-reset:hover { background: #ee8800; }
  .btn-blue { background: #4488cc; color: #fff; }
  .btn-blue:hover { background: #3377bb; }
  .btn-red { background: #cc3333; color: #fff; }
  .btn-red:hover { background: #bb2222; }
  .btn-green { background: #33aa66; color: #fff; }
  .btn-green:hover { background: #229955; }
  .btn-sm { padding: 2px 8px; font-size: 11px; }
  .btn-img-del { background: none; border: none; padding: 0; cursor: pointer; display:inline-flex; align-items:center; }
  .btn-img-del:hover { opacity: 0.8; }
  .btn-del-row { background: #c0392b; color: #fff; border: none; border-radius: 3px; cursor: pointer; }
  .btn-del-row:hover { background: #a93226; }
  
  /* Info Panel */
  .info-panel { background: #fff; border: 1px solid #ccc; border-radius: 4px; margin-bottom: 6px; }
  .info-panel-header { background: #eef2fa; padding: 6px 10px; border-bottom: 1px solid #ccc; font-weight: bold; display: flex; justify-content: space-between; align-items: center; color: #2a3a5c; }
  .info-panel-body { padding: 8px; }

  /* ── 블럭 구분 ── */
  .section-block-1 {
    border: 2px solid #3a6bbf;
    border-radius: 5px;
    margin-bottom: 15px;
    background: #f4f8ff;
    padding: 3px 4px 2px 4px;
    box-shadow: 0 1px 4px rgba(58,107,191,0.10);
  }
  .section-block-2 {
    border: 2px solid #3a6bbf;
    border-radius: 5px;
    margin-bottom: 4px;
    background: #f4f8ff;
    padding: 3px 4px 3px 4px;
    box-shadow: 0 1px 4px rgba(58,107,191,0.10);
  }
  .section-block-1 .info-panel,
  .section-block-2 .info-panel { margin-bottom: 3px; }
  .section-block-1 .info-panel:last-child,
  .section-block-2 .info-panel:last-child { margin-bottom: 0; }
  /* 블럭 내부 info-panel 헤더/바디 압축 */
  .section-block-1 .info-panel-header,
  .section-block-2 .info-panel-header { padding: 4px 8px; }
  .section-block-1 .info-panel-body,
  .section-block-2 .info-panel-body { padding: 4px 6px; }
  /* ── 상담이력 블럭 ── */
  .section-block-3 {
    border: 2px solid #3a6bbf;
    border-radius: 5px;
    margin-top: 8px;
    margin-bottom: 4px;
    background: #f4f8ff;
    padding: 0;
    box-shadow: 0 1px 4px rgba(58,107,191,0.10);
    overflow: hidden;
  }
  /* ── 상담이력 폼 (통합상담관리와 공유 cs-* 클래스) ── */
  .cs-form-section { background: #fff; border-bottom: 2px solid #3a6bbf; flex-shrink: 0; }
  .cs-form-header { background: #5b7db8; color: #fff; padding: 5px 12px; font-weight: bold; font-size: 13px; display: flex; align-items: center; gap: 6px; }
  .cs-lbl { font-size: 12px; font-weight: bold; background: #dde8ff; color: #2a3a5c; padding: 2px 6px; border-radius: 2px; white-space: nowrap; border: 1px solid #b0c8ef; }
  .cs-inp { font-size: 13px; border: 1px solid #aaa; border-radius: 2px; padding: 2px 5px; background: #fff; }
  .cs-inp:disabled { background: #f0f0f0; color: #999; cursor: not-allowed; }
  .cs-reg-info { font-size: 10px; color: #888; }
  .cs-btn { padding: 3px 10px; border: none; border-radius: 3px; cursor: pointer; font-size: 13px; font-weight: bold; color: #fff; display: flex; align-items: center; gap: 4px; white-space: nowrap; }
  .cs-btn-new, .cs-btn-save { background: #5b7db8; }
  .cs-btn-new:hover, .cs-btn-save:hover { background: #4a6aa0; }
  .cs-btn-del { background: #cc3333; }
  .cs-btn-del:hover { background: #bb2222; }
  .cs-btn-del:disabled { background: #ccc; cursor: not-allowed; }
  .cs-btn-col { display: flex; flex-direction: column; gap: 4px; flex-shrink: 0; padding: 6px 8px; border-left: 1px solid #dde8ff; border-right: 1px solid #dde8ff; background: #f4f8ff; justify-content: center; }
  .cs-reply-section { flex: 1; min-width: 0; overflow: hidden; }
  .consult-list-table { border-collapse: collapse; font-size: 13px; table-layout: fixed; width: max-content; font-size: 13px; }
  .consult-list-table thead th { background: #5b7db8; color: #fff; padding: 5px 6px; border: 1px solid #4a6aa0; text-align: center; white-space: nowrap; position: relative; overflow: hidden; cursor: pointer; font-size: 12px; }
  .consult-list-table td { padding: 5px 6px; border: 1px solid #dde0e8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 0; }
  .consult-list-table tr:hover td { background: #e8f4ff !important; cursor: pointer; }
  .consult-list-table tr.csl-selected td { background: #ccffcc !important; }

  /* Table */
  table.info-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  table.info-table th { background: #e8edf8; color: #2a3a5c; padding: 4px 8px; border: 1px solid #bbb; text-align: center; white-space: nowrap; font-weight: bold; }
  table.info-table td { padding: 3px 6px; border: 1px solid #ddd; background: #fff; }
  
  /* Service List */
  .list-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .list-table thead { position: sticky; top: 0; z-index: 2; will-change: transform; }
  .list-table th { background: #5b7db8; color: #fff; padding: 4px 6px; border: 1px solid #4a6aa0; text-align: center; white-space: nowrap; position: relative; cursor: pointer; overflow: visible; text-overflow: ellipsis; height: 32px; box-sizing: border-box; font-size: 12px; }
  .list-table th:hover { background: #6e8ec8; }
  .list-table td { padding: 4px 5px; border: 1px solid #ddd; white-space: nowrap; }
  .list-table tr:hover { background: #e8f4ff !important; }
  .list-table tr.selected { background: #ccffcc !important; }
  .list-table tr:nth-child(even) { background: #f8f8ff; }
  .list-table th[data-col="charge"],  .list-table td[data-col="charge"],
  .list-table th[data-col="join"],    .list-table td[data-col="join"],
  .list-table th[data-col="product"], .list-table td[data-col="product"],
  .list-table th[data-col="gear2"],   .list-table td[data-col="gear2"] { padding-left: 2px; padding-right: 2px; }
  /* 컬럼 드래그 리사이저 */
  .col-resizer { position:absolute; right:0; top:0; width:5px; height:100%; cursor:col-resize; user-select:none; z-index:10; }
  .col-resizer:hover, .col-resizer.dragging { background:rgba(255,255,255,0.5); }
  .ji-resize-handle:hover, .ji-resize-handle.dragging { background: linear-gradient(#3366cc,#3366cc) center/2px 80% no-repeat !important; }
  .info-table td, .info-table th { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .list-table td input.ir-f, .list-table td select.ir-f { max-width:100%; width:100%; box-sizing:border-box; }
  .list-table td input[type=date].ir-f { max-width:100%; width:100%; box-sizing:border-box; font-size:10px; }
  /* 필수 필드 표시: 기본은 마킹만, 저장 오류 시 req-error 추가 */
  .ir-f.req-error { border:1.5px solid #e53e3e !important; background:#fff5f5 !important; }
  .ir-f.req-error:focus { border-color:#c53030 !important; outline:none; box-shadow:0 0 0 2px rgba(229,62,62,0.2); }
  
  /* State badges */
  .state-badge { padding: 1px 6px; border-radius: 10px; font-size: 10px; font-weight: bold; }
  .state-open { background: #dff0df; color: #2d6e2d; }
  .state-sub { background: #ffffcc; color: #666600; }
  .state-close { background: #ffcccc; color: #660000; }
  .state-cancel { background: #e0e0e0; color: #444; }
  .state-rent { background: #ffe0cc; color: #884400; }
  .state-reagree { background: #dde8ff; color: #2a3a5c; }
  
  /* Search result modal */
  #search-modal-bg { display:none; position:fixed; inset:0; background:rgba(0,0,0,0.45); z-index:9998; align-items:flex-start; justify-content:center; padding-top:80px; }
  #search-modal-bg.open { display:flex; }
  #search-modal-box { background:#fff; border-radius:8px; box-shadow:0 8px 32px rgba(0,0,0,0.25); width:440px; max-width:92vw; max-height:65vh; display:flex; flex-direction:column; overflow:hidden; }
  #search-modal-header { background:#4fdfd0; padding:10px 16px; font-weight:bold; font-size:14px; display:flex; align-items:center; justify-content:space-between; flex-shrink:0; }
  #search-modal-header .smh-title { display:flex; align-items:center; gap:8px; }
  #search-modal-close { background:none; border:none; font-size:20px; cursor:pointer; color:#1a4a8a; line-height:1; padding:0 4px; font-weight:bold; }
  #search-modal-close:hover { color:#e53e3e; }
  #search-modal-list { overflow-y:auto; flex:1; }
  .sidebar-item { padding:10px 16px; border-bottom:1px solid #eee; cursor:pointer; display:flex; align-items:center; gap:8px; font-size:13px; transition:background .1s; }
  .sidebar-item:hover { background:#e8f8f8; }
  .sidebar-item .si-name { color:#1a4a8a; font-weight:bold; }
  .sidebar-item .si-biz { color:#999; font-size:11px; margin-left:auto; }

  /* Main content */
  #main-content { margin-top: 0; padding: 6px 12px; }
  
  /* Scrollable list */
  .scroll-list { overflow-y: auto; overflow-x: auto; }
  
  /* Loading */
  #loading { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,0.6); color: #fff; padding: 20px 30px; border-radius: 8px; z-index: 99999; font-size: 14px; }
  
  /* Product count */
  .product-count-badge { display: inline-block; background: #5b7db8; color: #fff; padding: 2px 8px; border-radius: 3px; margin: 2px; font-size: 12px; }
  .product-count-badge.state-close { background: #cc3333; }
  .product-count-badge.state-sub { background: #999900; }
  .cnt-section { display: inline-flex; align-items: center; gap: 2px; padding: 1px 6px 1px 0; border-right: 1px solid #ccc; margin-right: 6px; }
  .cnt-section:last-child { border-right: none; margin-right: 0; }
  .cnt-section-label { font-size: 12px; font-weight: bold; color: #2a3a5c; background: #eef2fa; border: 1px solid #b0c8ef; border-radius: 3px; padding: 1px 7px; margin-right: 3px; white-space: nowrap; }

  .scrollbar-thin::-webkit-scrollbar { width: 6px; height: 6px; }
  .scrollbar-thin::-webkit-scrollbar-track { background: #f1f1f1; }
  .scrollbar-thin::-webkit-scrollbar-thumb { background: #999; border-radius: 3px; }
  

  
  input:focus, select:focus, textarea:focus { outline: 2px solid #3366cc; }
  textarea { resize: vertical; }
  /* ── 파트너 검색 드롭다운 ── */
  .ptn-wrap{position:relative;width:100%;}
  .ptn-display{display:flex;align-items:center;background:#fff;border:1px solid #ccc;border-radius:3px;padding:1px 4px;cursor:pointer;min-height:22px;font-size:11px;gap:3px;}
  .ptn-display:hover{border-color:#3366cc;}
  .ptn-display .ptn-label{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#333;}
  .ptn-display .ptn-label.empty{color:#aaa;}

  .ptn-display .ptn-arrow{flex-shrink:0;color:#888;font-size:9px;}
  .ptn-dropdown{display:none;position:absolute;top:calc(100% + 2px);left:0;min-width:160px;max-width:260px;background:#fff;border:1px solid #aaa;border-radius:4px;box-shadow:0 4px 12px rgba(0,0,0,0.18);z-index:3000;padding:4px 0;}
  .ptn-dropdown.open{display:block;}
  .ptn-search-wrap{padding:4px 6px 3px;}
  .ptn-search-input{width:100%;box-sizing:border-box;border:1px solid #bbb;border-radius:3px;padding:3px 6px;font-size:11px;}
  .ptn-search-input:focus{outline:1px solid #3366cc;border-color:#3366cc;}
  .ptn-list{max-height:160px;overflow-y:auto;}
  .ptn-item{padding:4px 10px;font-size:11px;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .ptn-item:hover,.ptn-item.focused{background:#e8f0fe;}
  .ptn-item.selected{background:#ddeeff;font-weight:bold;}
  .ptn-empty{padding:6px 10px;font-size:11px;color:#aaa;text-align:center;}
  .ptn-group-header{padding:4px 8px 2px;font-size:10px;font-weight:bold;color:#555;background:#f4f4f4;border-top:1px solid #e0e0e0;border-bottom:1px solid #e8e8e8;cursor:pointer;user-select:none;display:flex;align-items:center;gap:4px;}
  .ptn-group-header:first-child{border-top:none;}
  .ptn-group-header:hover{background:#eaeaea;}
  .ptn-group-body{}
  .ptn-group-body.collapsed{display:none;}
  .ptn-unreg-badge{display:inline-block;font-size:9px;background:#e0e0e0;color:#666;border-radius:2px;padding:0 4px;margin-left:4px;vertical-align:middle;}

