* { box-sizing: border-box; }
/* ===== 기본 리셋 & 폰트 (모든 컴포넌트/문서 공유) ===== */
:root {
    --bg: #f9f9f9;
    --card: #fff;
    --line: #e8e8e8;
    --line-2: #ddd;
    --line-3: #e0e0e0;
    --soft: #f5f5f5;
    --text: #333;
    --muted: #888;
    --primary: #2f6f4f;
    --primary-dark: #275e43;
    --primary-soft: #eaf3ee;
    --danger: #c0392b;
    --warn: #e0a800;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    -webkit-font-smoothing: antialiased;

  }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 14px;
  color: #222;
  background: #fff;
  line-height: 1.5;
}
.layout {
  display: flex;
  flex:1;
  gap: 20px;
  padding: 20px;
  height: 100vh; /* 화면 전체 높이 사용 기준 */
  align-items: flex-start;
}

.main {
  flex: 7;
  height: 100%;
  display:flex;
  flex-direction: column; /* 내부 요소 수직 배치 */
  border: 1px solid #ccc;
  background: #f1f1f1;
  padding: 18px;
}

iframe.frame {
  display: block;
  width: 100%;
  border: 0;
  overflow: hidden;
}
iframe.sidebar-frame {
  width: 380px;
  flex-shrink: 0;
}
.main .tab-frame {
  margin-top: 18px;
}

.frame-box { width: 100%; overflow: hidden; }
.frame-box > iframe { display: block; width: 100%; height: 100%; border: 0; }

.sidebar-box {
  width: 700px;
  flex-shrink: 0;
  height: 640px;
  flex:3;
}
/* 기본정보 카드 */
.info-box { 
  flex:6;
  width:100%;
  overflow:hidden;
 }
.tab-box {
  flex:4;
  width: 100%;
  overflow-y: hidden;
}
.tab-box-lg {
  height: 250px;
  margin-top: 18px;
}


/* ===== 공통 UI 요소 (여러 컴포넌트 공유) ===== */

/* 섹션 제목 줄 */
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-weight: bold;
}

/* 수정 버튼 */
.edit-btn {
  border: 1px solid #888;
  background: #f7f7f7;
  border-radius: 4px;
  padding: 6px 14px;
  cursor: pointer;
  font-weight: normal;
}

/* 작은 버튼 (갱신/설정/조회/출력 등) */
.small-btn {
  border: 1px solid #888;
  background: #f3f3f3;
  border-radius: 4px;
  padding: 3px 10px;
  cursor: pointer;
  font-size: 13px;
  margin-left: 6px;
}

/* 테이블 기본 */
table {
  border-collapse: collapse;
  width: 100%;
}

.container {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #333;
  background: #f9f9f9;
  padding: 20px;
  min-height: calc(100vh - 40px);
}

/* 카드 기본 스타일 */
.card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-bottom: 1px solid #ddd;
  padding: 15px 20px;
}

.card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #333;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
  border-bottom: 1px solid #ddd;
  padding: 12px 15px;
}

.card-content {
  padding: 20px;
}

.card-body {
  padding: 0;
}

.card-actions {
  display: flex;
  gap: 10px;
  padding: 15px 0 0 0;
  border-top: 1px solid #e0e0e0;
  margin-top: 15px;
}

.btn {
  border: 1px solid #d9dee6;
  background: #fff;
  border-radius: 6px;
  /*height: 45px;
  width: auto;*/
  padding: 10px 20px;

  font-size: 13px;
  color: #444;
  cursor: pointer;
  white-space: nowrap;
  transition: .15s;
}
.btn:hover {
  border-color: #3b74f2;
  color: #2457d6;
  background: #f6f9ff;
}
.btn.write {
  background: #2f66e8;
  border-color: #2f66e8;
  color: #fff;
}
.btn.write:hover { background: #2457d6; color: #fff; }

.btn.delete {
  background-color: #ef4444;
  color: #ffffff;           
  border: 1px solid #dc2626;
}

.btn.delete:hover {
  background-color: #dc2626; 
  border-color: #b91c1c;
}

.badge.status-wait { background:#fff8e1; color:#a5820f; }
.badge.status-locked { background:#fbe7e5; color:#c0392b; }
.badge.status-none { background:#fff3e0; color:#e07b00; }

/* 뱃지 스타일 */
.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
}
.badge::before {
  content: ""; 
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: .9;
}
.badge.grade {
  background: #e3f2fd;
  color: #1976d2;
}

.badge.status-active {
  background: #e8f5e9;
  color: #388e3c;
}

.badge.status-complete {
  background: #e8f5e9;
  color: #388e3c;
}

.badge.status-ongoing {
  background: #e3f2fd;
  color: #1976d2;
}

.badge.status-completed {
  background: #e0e0e0;
  color: #666;
}

.badge.status-good {
  background: #e8f5e9;
  color: #388e3c;
}
.badge.status-pending {
  background: #ffebee;
  color: #d32f2f;
}

.badge.status-partial {
  background: #fff3e0;
  color: #f57c00;
}

.page-header { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.page-header .title-box h1 { margin:0; font-size:22px; font-weight:700; letter-spacing:-0.3px; color:#333; }
.page-header .title-box p { margin:6px 0 0; color:var(--muted); font-size:13px; }
.header-actions { display:flex; gap:8px; flex-wrap:wrap; }
.topnav {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  background: #e9e9e9;
  /* flex-wrap: wrap; */
  height: 80px;
}
.topnav .btn {
  background: #f3f3f3;
  border: 1px solid #888;
  border-radius: 6px;
  padding: 14px 18px;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  min-width: 70px;
}
.topnav .btn:hover { background: #e2e2e2; }

.nav-item {
  position: relative;
}
.nav-item:hover > .btn {
  background: #4a4a4a;
  color: #fff;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;     
  left: 0;
  min-width: 170px;
  background: #fff;
  border: 1px solid #888;
  border-radius: 0 6px 6px 6px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  padding: 6px 0;
  z-index: 100;
}
.nav-item:hover .submenu {
  display: block;
}

.submenu-item {
  display: block;
  padding: 11px 18px;
  color: #222;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  font-size: 14px;
}
.submenu-item:hover {
  background: #f0f0f0;
}

/* 사용자 메뉴 아이템 css */
/* 우측 정렬 유지 */
.nav-item.member-menu {
  margin-left: auto;
}

.nav-item.member-menu ~ .nav-item.member-menu {
  margin-left: 0;
}

/* member-btn (이미지 디자인 스타일링) */
.topnav .member-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 30px; /* 라운드 처리로 부드러운 느낌 */
  cursor: pointer;
  transition: all 0.2s ease;
  height: 44px;
}

/* 마우스 호버 시 배경 및 테두리 효과 */
.nav-item.member-menu:hover .member-btn {
  background: #f5f5f5;
  border-color: #bbb;
}

/* 프로필 아바타 (원형 아이콘) */
.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e6e9ed;
}

.profile-avatar svg {
  width: 100%;
  height: 100%;
}

/* 회원 이름 */
.member-name {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin-left: 2px;
}

/* 화살표 아이콘 */
.arrow-icon {
  font-size: 9px;
  color: #a0a0a0;
  margin-left: 2px;
  transition: transform 0.2s ease;
}

/* 호버 시 화살표 회전 */
.nav-item.member-menu:hover .arrow-icon {
  transform: rotate(180deg);
}

/* 서브메뉴 (위치 및 디자인 정돈) */
.member-submenu {
  display: none;
  position: absolute;
  top: calc(100% + 4px); /* 버튼 아래 살짝 여백 */
  right: 0; /* 오른쪽 기준으로 정렬 */
  min-width: 130px;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 6px 0;
  z-index: 100;
}

.member-submenu::before {
  content: '';
  position: absolute;
  top: -6px; /* 위쪽 4px 영역을 커버 */
  left: 0;
  width: 100%;
  height: 6px;
}

.nav-item:hover .member-submenu {
  display: block;
}

/* 서브메뉴 아이템 */
.member-item {
  display: block;
  padding: 10px 16px;
  color: #333;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  font-size: 13.5px;
  transition: background 0.15s ease;
}

.member-item:hover {
  background: #f5f7fa;
  color: #2f66e8;
}

.list-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.list-table th {
    background: #f7f9fc;
    border-bottom: 1px solid #e7eaf0;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1;
    height: 40px;
}

.list-table td {
    border-bottom: 1px solid #f0f2f6;
    padding: 10px 2px;
    text-align: center;
    font-size: 12.5px;
    color: #333;
}

.list-table tbody tr { cursor: pointer; }
.list-table tbody tr:hover td { background: #f8fafd; }
.list-table tbody tr.on td { background: #e9f0fe; }
.list-table tbody tr.on td:first-child { box-shadow: inset 2px 0 0 #3b74f2; }

.search-box {
    background: #fff;
    border: 1px solid #e7eaf0;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 1px 3px rgba(20, 30, 60, .04);
    display: flex;
    gap: 8px;
    align-items: center;
}

.search-box input {
    flex: 1;
    min-width: 0;
    border: 1px solid #d9dee6;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13.5px;
    font-family: inherit;
    color: #333;
    outline: none;
    transition: .15s;
}

.search-box input:focus {
    border-color: #3b74f2;
    box-shadow: 0 0 0 3px rgba(59, 116, 242, .12);
}

    .select2-container--default .select2-selection--single {
		height: 40px !important;
		border: 1px solid #ced4da;
		border-radius: 0.375rem;
		display: flex;
		align-items: center;
    }

	/* 내부 텍스트 정렬 */
	.select2-container .select2-selection__rendered {
		line-height: normal !important;
		padding-left: 0.75rem;
	}

	/* 화살표 정렬 */
	.select2-container .select2-selection__arrow {
		height: 100% !important;
	}

	/* form-control이랑 간격 맞추기 */
	.select2-container {
		width: 150px !important;
	}

	.select2-search__field:focus {
		width: 100% !important;
		outline: none;
		border-color: #86b7fe;
	}

	.select2-container--default.select2-container--disabled 
	.select2-selection--single {
		background-color: var(--tblr-bg-surface-secondary);
		border: var(--tblr-border-width) solid var(--tblr-border-color);
	}

  .select2-selection__rendered {
    width: 100%;
    height: 100%;
    text-align: center;

    /* 수직/수평 중앙 정렬 추가 */
    display: flex !important;
    align-items: center;     /* 위아래(수직) 중앙 정렬 */
    justify-content: center; /* 좌우(수평) 중앙 정렬 */
  }

  .ml-chip-list {
    margin: 10 10 0 10;
  }