/* ========== CSS 변수 (Color Palette & Typography) ========== */
:root {
  /* 주색상 - 블랙 테마 */
  --primary-color: #000000;
  --primary-light: #1a1a1a;
  --primary-dark: #000000;
  --concept-color-start: #000000;
  --concept-color-end: #3d3d3d;

  /* 배경색 */
  --bg-primary: #fafafa;
  --bg-white: #ffffff;
  --bg-overlay: rgba(0, 0, 0, 0.7);

  /* 텍스트 색상 */
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --text-white: #ffffff;

  /* 상태 색상 */
  --success: #10b981;
  --error: #dc3545;
  --warning: #f59e0b;

  /* 테두리 */
  --border-light: #e5e7eb;
  --border-dashed: #a1a1a1;

  /* 폰트 크기 */
  --font-xs: 10px;
  --font-sm: 12px;
  --font-md: 14px;
  --font-lg: 16px;
  --font-xl: 20px;
  --font-2xl: 28px;
}

/* ========== 전역 리셋 및 기본 스타일 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "돋움",
    "dotum", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-size: var(--font-sm);
  line-height: 1.6;
}

/* ========== 레이아웃 ========== */
.container {
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 10px;
}

.content {
  min-height: calc(100vh - 60px);
}

.maincontent {
  margin-left: 200px;
  transition: margin-left 0.3s;
}

/* ========== 컨텐츠 타이틀 ========== */
.contentTitle {
  font-size: 13px;
  font-weight: 700;
  padding: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  background-color: #000000;
  color: #fff;
  margin: 10px;
  border-radius: 5px;
  gap: 10px;
}

.contentTitle .title-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
  color: inherit;
}

.mainBox {
  display: flex;
  flex-direction: column;
}

.settingBox {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ========== 타이포그래피 ========== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: var(--font-2xl);
}
h2 {
  font-size: var(--font-xl);
}
h3 {
  font-size: var(--font-lg);
}
h4 {
  font-size: var(--font-md);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-light);
}

/* ========== 버튼 스타일 ========== */
.btn {
  padding: 0 10px;
  height: 30px;
  font-size: 11px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  font-weight: 600;
  border: none;
  transition: all 0.3s;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--text-white);
}

.btn-primary:hover {
  background-color: var(--primary-light);
}

.btn-secondary {
  background-color: #6b7280;
  color: var(--text-white);
}

.btn-secondary:hover {
  background-color: #4b5563;
}

.btn-success {
  background-color: var(--success);
  color: var(--text-white);
}

.btn-success:hover {
  background-color: #059669;
}

.btn-danger {
  background-color: var(--error);
  color: var(--text-white);
}

.btn-danger:hover {
  background-color: #b91c1c;
}

.btn-sm {
  padding: 6px 12px;
  font-size: var(--font-sm);
}

.btn-lg {
  padding: 14px 28px;
  font-size: var(--font-lg);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ========== 카드 스타일 ========== */

.card-header {
  font-size: var(--font-lg);
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-light);
}

.card-body {
  font-size: var(--font-sm);
}

/* ========== 폼 스타일 ========== */

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  font-size: var(--font-sm);
  color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 4px;
  font-size: var(--font-sm);
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-checkbox {
  margin-right: 8px;
}

/* ========== 테이블 스타일 ========== */
.table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--bg-white);
  overflow: hidden;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
}

.table th {
  background-color: var(--primary-color);
  color: var(--text-white);
  font-weight: 600;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover {
  background-color: #f9fafb;
}

/* ========== 모달 스타일 ========== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.65);
  animation: fadeIn 0.3s;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.show {
  display: flex;
}

body.modal-open {
  overflow: hidden;
}

.modal-content {
  background-color: var(--bg-white);
  padding: 30px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s;
  position: relative;
}

.modal-header {
  font-size: var(--font-xl);
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--text-muted);
  transition: all 0.2s;
  border-radius: 4px;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-primary);
  background-color: rgba(0, 0, 0, 0.05);
}

.modal-close .material-symbols-outlined {
  font-size: 24px;
  line-height: 1;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 15px;
}

.modal-body .form-group label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  display: inline-block;
}

.modal-body .form-control,
.modal-body textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: 3px;
  font-size: 12px;
  background-color: #f9fafb;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-body .form-control:focus,
.modal-body textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(15, 32, 39, 0.1);
  background-color: #fff;
}

.modal-body textarea {
  resize: vertical;
}

/* ========== Date Input 스타일 ========== */
/* date input 전체 영역 클릭 가능하게 */
input[type="date"],
.form-control[type="date"] {
  cursor: pointer;
  position: relative;
}

/* 캘린더 아이콘을 투명하게 만들어 전체 영역 클릭 가능하게 */
input[type="date"]::-webkit-calendar-picker-indicator,
.form-control[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  color: transparent;
  background: transparent;
  cursor: pointer;
  opacity: 0;
}

/* Firefox용 캘린더 아이콘 숨김 */
input[type="date"]::-moz-calendar-picker,
.form-control[type="date"]::-moz-calendar-picker {
  display: none;
}

/* ========== 애니메이션 ========== */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ========== 유틸리티 클래스 ========== */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--text-muted);
}

.mt-10 {
  margin-top: 10px;
}

.mt-20 {
  margin-top: 20px;
}

.mb-10 {
  margin-bottom: 10px;
}

.mb-20 {
  margin-bottom: 20px;
}

.flex {
  display: flex;
}

.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flex-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

.gap-10 {
  gap: 10px;
}

.gap-20 {
  gap: 20px;
}

/* ========== 반응형 ========== */
@media (max-width: 1024px) {
  .maincontent {
    margin-left: 0 !important;
    padding-top: 46px; /* 모바일 헤더 높이만큼 상단 여백 */
  }
}

/* 상태 뱃지 스타일 */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
}

.status-request {
  background-color: #3498db;
  color: #fff;
}

.status-progress {
  background-color: #f39c12;
  color: #fff;
}

.status-review {
  background-color: #9b59b6;
  color: #fff;
}

.status-complete {
  background-color: #27ae60;
  color: #fff;
}

/* 데이터 테이블 스타일 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table thead {
  background-color: #f8f9fa;
  border-bottom: 2px solid var(--border-color);
}

.data-table th {
  padding: 12px 8px;
  text-align: left;
  font-weight: 600;
  color: var(--text-color);
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.2s;
}

.data-table tbody tr:hover {
  background-color: var(--hover-color);
}

.data-table td {
  padding: 12px 8px;
}

.data-table th.actions-col,
.data-table td.actions-col {
  min-width: 190px;
  text-align: center;
}

.data-table td.actions-col {
  white-space: nowrap;
}

.actions-col .btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.actions-col .btn + .btn {
  margin-left: 6px;
}

/* 버튼 크기 변형 */
.btn-sm {
  padding: 5px 10px;
  font-size: 12px;
}

@media (max-width: 768px) {
  .table {
    font-size: var(--font-sm);
  }

  .table th,
  .table td {
    padding: 8px;
  }

  .modal-content {
    padding: 20px;
  }
}
