  :root {
    --bg: #ffffff;
    --surface:#F0ECE4;
    --surface1:#E6E1D6;
    --surface2: #22263a;
    --border: #CBC8C2;
    --accent: #A50034;
    --accent2: #106cd4;
    --text: #333;
    --text-dim: #4c4c4d;
    --text-light: #cacee0;
    --gp1: #c8ff00;
    --v50: #ff6b35;
    --sidebar-w: 260px;
    --header-h: 56px;
  }
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  html { scroll-behavior: smooth; }
  body {
    background: var(--bg);
    color: var(--text);
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    display: flex;
    min-height: 100vh;
  }

  /* ── SIDEBAR ── */
  .sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
  }
  .sidebar-logo {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .sidebar-logo .logo-mark {
    width: 32px; height: 32px;
    background: var(--accent);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 13px; color: #ffffff;
    letter-spacing: -0.5px;
  }
  .sidebar-logo .logo-text {
    font-size: 14px; 
    font-weight: 700; color: var(--text);
    letter-spacing: 0.3px;
    flex: 1;
  }
  .sidebar-logo .logo-sub {
    font-size: 10px; color: var(--text-dim);
    display: block; margin-top: 1px;
  }
 .sidebar-logo .btn{
  width: auto;
  padding: 5px 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background-color: #ffffff;
  text-decoration: none;

 }
  /* stats */
  .sidebar-stats {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
  }
  .stat-row {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 6px;
  }
  .stat-label { font-size: 11px; color: var(--text-dim); }
  .stat-val { font-size: 13px; font-weight: 700; color: var(--accent); }
  .progress-bar {
    height: 3px; background: var(--border); border-radius: 2px; overflow: hidden;
  }
  .progress-fill {
    height: 100%; background: var(--accent); border-radius: 2px;
    width: 0%; transition: width 0.4s ease;
  }

  /* nav list */
  .sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
    background-color: var(--surface1);
  }
  .sidebar-nav::-webkit-scrollbar { width: 4px; }
  .sidebar-nav::-webkit-scrollbar-track { background: transparent; }
  .sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
  .sidebar-group-link {
    display: flex; align-items: center; justify-content: space-between;
    padding: 7px 20px;
    color: var(--text-dim);
    font-size: 11px; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.8px;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none;
  }
  .sidebar-group-link:hover { color: var(--accent); }
  .sidebar-group-link .cnt {
    font-size: 11px; color: var(--text-light);
    background: var(--surface2);
    border-radius: 10px; padding: 1px 6px;
  }

  /* action btns */
  .sidebar-actions {
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    display: flex; flex-direction: column; gap: 8px;
  }
  .btn {
    display: flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 14px; border-radius: 8px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    border: none; transition: all 0.2s; width: 100%;
  }
  .btn-primary {
    background: var(--accent); color: #fff;
  }
  .btn-primary:hover { background: #7e0128; transform: translateY(-1px); }
  .btn-secondary {
    background: var(--surface2); color: var(--text-light);
    border: 1px solid var(--border);
  }
  .btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
  .btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

  /* check-wrap */
  .check-wrap {
    display: none;
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    max-height: 160px;
    overflow-y: auto;
  }
  .check-wrap-title {
    font-size: 10px; font-weight: 700; color: var(--text-dim);
    text-transform: uppercase; letter-spacing: 0.8px;
    margin-bottom: 6px;
  }
  .check-list {
    list-style: none;
  }
  .check-list li {
    display: flex; align-items: center; justify-content: space-between;
    padding: 3px 0;
  }
  .check-list .check-name {
    font-size: 11px; color: var(--text);
  }
  .check-list .remove-check {
    background: none; border: none; color: var(--text-dim);
    cursor: pointer; font-size: 10px; padding: 2px 4px;
  }
  .check-list .remove-check:hover { color: var(--v50); }
  .clear-all button {
    background: none; border: none; color: var(--text-dim);
    font-size: 10px; cursor: pointer; width: 100%;
    text-align: right; padding-top: 4px;
  }
  .clear-all button:hover { color: var(--v50); }

  /* ── MAIN ── */
  .main {
    margin-left: var(--sidebar-w);
    flex: 1;
    padding: 24px;
    min-width: 0;
  }

  /* header */
  .main-header {
    margin-bottom: 24px;
  }
  .main-header h1 {
    font-size: 22px; font-weight: 800; color: var(--text);
    letter-spacing: -0.5px;
  }
  .main-header h1 span { color: var(--accent); }
  .main-header p {
    font-size: 12px; color: var(--text-dim); margin-top: 4px;
  }

  /* counter bar */
  .counter-bar {
    display: flex; align-items: center; gap: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 18px;
    margin-bottom: 20px;
  }
  .counter-item { display: flex; align-items: center; gap: 6px; }
  .counter-dot {
    width: 8px; height: 8px; border-radius: 50%;
  }
  .counter-item .label { font-size: 11px; color: var(--text-dim); }
  .counter-item .val { font-size: 13px; font-weight: 700; }
  .counter-sep { color: var(--border); }
  .total-bar {
    flex: 1;
    display: flex; align-items: center; gap: 8px;
    margin-left: auto;
  }
  .total-bar .label { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
  .total-bar-track {
    flex: 1; height: 4px; background: var(--border); border-radius: 2px; overflow: hidden;
  }
  .total-bar-fill {
    height: 100%; background: var(--accent); border-radius: 2px;
    width: 0%; transition: width 0.4s ease;
  }
  .total-bar .frac {
    font-size: 11px; color: var(--text-dim); white-space: nowrap;
  }
  .status-num { color: var(--accent); font-weight: 700; }
  .total-num { color: var(--text-dim); }

  /* group card */
  .group {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 16px;
    overflow: hidden;
  }
  .g-title {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 20px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
  }
  .g-title.on {
    border-bottom-color: var(--border);
  }
  .g-title h3 {
    font-size: 15px; font-weight: 700;
    color: var(--text); letter-spacing: 0.2px;
    flex: 1;
  }
  .g-title .g-check {
    width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer;
  }
  .g-title .get-list {
    display: flex; align-items: center; gap: 5px;
    background: var(--surface2); border: 1px solid var(--border);
    color: var(--text-light); border-radius: 6px;
    padding: 8px; font-size: 11px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
  }
  .g-title .get-list:hover { border-color: var(--accent2); color: var(--accent2); }
  .g-title .g-arrow {
    color: var(--text-dim); font-size: 12px;
    transition: transform 0.25s;
  }
  .g-title.on .g-arrow { transform: rotate(180deg); }

  /* gnb-wrap */
  .gnb-wrap {
    display: none;
    list-style: none;
  }
  .gnb-wrap.on { display: block; }
  .gnb-wrap > li {
    border-bottom: 1px solid var(--border);
  }
  .gnb-wrap > li:last-child { border-bottom: none; }

  /* region-wrap */
  .region-wrap {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 20px;
  }
  .region-checkbox { accent-color: var(--accent); cursor: pointer; width: 14px; height: 14px; }
  .label-box {
    display: flex; align-items: center; justify-content: center;
    width: 18px; height: 18px;
    border: 1.5px solid var(--border); border-radius: 4px;
    cursor: pointer; flex-shrink: 0; display: none;
  }
  .region-name {
    display: flex; align-items: center; 
    justify-content: space-between;
    gap: 10px;
    flex: 1;
    background: none; border: none; color: var(--text);
    cursor: pointer; text-align: left; padding: 0;
  }
  .region-name > div{
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .region-name .region {
    font-size: 13px; font-weight: 500;
  }
  .region-name .status {
    font-size: 11px; 
    color: var(--text);
    font-family: monospace;
  }
  .region-name i { color: var(--text-dim); font-size: 11px; margin-left: auto; transition: transform 0.2s; }
  .region-name.on i { transform: rotate(180deg); }

  /* type badge */
  .type-badge {
    font-size: 10px; font-weight: 700; border-radius: 4px;
    padding: 2px 6px; letter-spacing: 0.3px;
  }
  .type-gp1 { background: #fff; color: rgb(11, 124, 216); border: 1px solid rgb(11, 124, 216); }
  .type-50 { background: #fff; color: rgb(216, 140, 0); border: 1px solid rgb(216, 140, 0);}

  /* code tag */
  .code-tag {
    font-size: 10px; color: var(--text-dim);
    font-family: monospace; background: var(--surface2);
    border-radius: 4px; padding: 1px 6px;
  }

  /* url link */
  .url-link {
    font-size: 10px; color: var(--accent2); text-decoration: none; font-family: monospace;
  }
  .url-link:hover { text-decoration: underline; }

  /* gnb-list */
  .gnb-list {
    display: none;
    padding: 0 20px;
    background: var(--bg);
    border-top: 1px solid var(--border);
     overflow-x: auto;
  }
  .gnb-list.on { display: block; }
  .gnb-list > div {
    display: flex; gap: 0;
  }

  /* menu-group = column */
  .menu-group {
    min-width: 160px;
    padding: 14px 16px 10px 0;
    border-right: 1px solid var(--border);
    margin-right: 16px;
  }
  .menu-group:last-child { border-right: none; }

  /* indent levels */
  .indent-1 {
    font-size: 14px; font-weight: 700;
    color: #000;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
  }
  .indent-2 {
    font-size: 13px; font-weight: 600;
    color: var(--text);
    margin: 15px 0 3px 0;
    padding-left: 0;
  }
  .menu-group .indent-2:first-of-type{margin-top: 0;}
  .indent-3 {
    font-size: 13px; color: var(--text-dim);
    margin: 2px 0; padding-left: 10px;
    /* white-space: nowrap; overflow: hidden; text-overflow: ellipsis; */
    margin-bottom: 4px;
  }
  .indent-1 a.link, .indent-2 a.link, .indent-3 a.link {
    color: inherit; text-decoration: none;
    transition: color 0.15s;
  }
  .indent-1 a.link:hover { color: var(--accent); }
  .indent-2 a.link:hover { color: var(--accent2); }
  .indent-3 a.link:hover { color: var(--text); }

  /* disabled */
  li.disabled .region-name { opacity: 0.4; }

  /* global always open */
  .global .gnb-list { display: block;}
  .global .region-name i { display: none; }

  /* dim overlay */
  .dim {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9000;
    align-items: center; justify-content: center;
    flex-direction: column; gap: 14px;
  }
  .dim.active { display: flex; }
  .dim-text { color: #ffffff; font-size: 14px; font-weight: 600; }
  .dim-sub { color: var(--text-light); font-size: 16px; }
  .spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
  @keyframes spin { to { transform: rotate(360deg); } }

  /* top btn */
  .top {
    position: fixed; bottom: 24px; right: 24px;
    width: 40px; height: 40px;
    background: rgba(0,0,0,0.5);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light); cursor: pointer;
    transition: all 0.2s; font-size: 14px;
    z-index: 50;
  }
  .top:hover {color: #fff;}
