/* 좌측 메뉴 항목 */
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  font-size: 13px;
  color: #cbd5e1;
  transition: background 0.15s;
  border-left: 3px solid transparent;
}
.nav-item:hover { background: #1e293b; color: #fff; }
.nav-item.active {
  background: #1e293b;
  color: #fff;
  border-left-color: #3b82f6;
}

/* 사이트 선택 탭 */
.site-tab {
  padding: 5px 14px;
  font-size: 13px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  color: #4b5563;
  cursor: pointer;
  transition: all 0.15s;
}
.site-tab:hover { background: #f3f4f6; }
.site-tab.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}

/* 광고 테이블 */
.ads-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.ads-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 600;
  padding: 8px 6px;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 5;
}
.ads-table td {
  padding: 5px 6px;
  border-bottom: 1px solid #eef1f5;
  vertical-align: middle;
}
.ads-table tr.row-normal { background: #ffffff; }
.ads-table tr.row-soon3 { background: #fff4e6; }
.ads-table tr.row-tomorrow { background: #ffe3e0; }
.ads-table tr.row-today { background: #ff9d95; }
.ads-table tr.row-expired { background: #f1f2f4; color: #94a3b8; }
.ads-table tr:hover td { filter: brightness(0.97); }

.ads-table input, .ads-table select, .ads-table textarea {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  padding: 3px 4px;
  font-size: 12.5px;
  border-radius: 3px;
}
.ads-table input:hover, .ads-table select:hover, .ads-table textarea:hover {
  border-color: #d1d5db;
  background: #fff;
}
.ads-table input:focus, .ads-table select:focus, .ads-table textarea:focus {
  border-color: #3b82f6;
  background: #fff;
  outline: none;
}

/* 상태 뱃지 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; }
.badge-normal { background: #e0edff; color: #2563eb; }
.badge-soon3 { background: #fef0d8; color: #b45309; }
.badge-tomorrow { background: #ffd9d5; color: #c2410c; }
.badge-today { background: #ff6b60; color: #fff; }
.badge-expired { background: #e2e4e8; color: #6b7280; }

/* 대시보드 통계 카드 */
.stat-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 14px 16px;
}
.stat-card .stat-value { font-size: 22px; font-weight: 700; }
.stat-card .stat-label { font-size: 12px; color: #6b7280; margin-top: 2px; }

/* 메모 카드 */
.memo-card {
  background: #fffbe8;
  border: 1px solid #f0e5b8;
  border-radius: 6px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  height: 180px;
}
.memo-card textarea {
  flex: 1;
  resize: none;
  border: none;
  background: transparent;
  font-size: 12.5px;
  outline: none;
}
.memo-card input.memo-title {
  border: none;
  background: transparent;
  font-weight: 600;
  font-size: 13px;
  outline: none;
  margin-bottom: 4px;
}

.btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 4px; font-size: 12.5px; font-weight: 500; cursor: pointer; transition: all 0.15s; border: none; }
.btn-primary { background: #2563eb; color: #fff; }
.btn-primary:hover { background: #1d4ed8; }
.btn-secondary { background: #f1f5f9; color: #475569; }
.btn-secondary:hover { background: #e2e8f0; }
.btn-danger { background: #fef2f2; color: #dc2626; }
.btn-danger:hover { background: #fee2e2; }
.btn-sm { padding: 3px 8px; font-size: 11.5px; }

.banner-thumb {
  width: 44px; height: 30px; object-fit: cover; border-radius: 3px; border: 1px solid #e5e7eb; cursor: pointer;
}

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-box { background: #fff; border-radius: 8px; padding: 20px; min-width: 380px; max-width: 90vw; }

/* 메모 카드 드래그 중 시각 효과 */
.memo-card[draggable="true"] { transition: opacity 0.15s; }
.memo-drag-handle { user-select: none; }

/* ============ 파일관리(백업/2FA) 뷰 ============ */
.files-subtab-btn {
  padding: 9px 16px;
  font-size: 13px;
  color: #64748b;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  background: none;
}
.files-subtab-btn:hover { color: #1e293b; }
.files-subtab-btn.active { color: #2563eb; border-bottom-color: #2563eb; font-weight: 700; }

.file-thumb { width: 30px; height: 30px; object-fit: cover; border-radius: 4px; border: 1px solid #e5e7eb; }
.file-icon { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 16px; }
.file-row-folder .file-name-cell { cursor: pointer; }
.file-row-folder .file-name-cell:hover { color: #2563eb; text-decoration: underline; }
.file-name-cell { font-size: 12.5px; }

.lock-badge-locked { color: #d97706; }
.lock-badge-open { color: #16a34a; }

.dropzone {
  border: 2px dashed #cbd5e1; border-radius: 6px; padding: 18px; text-align: center;
  color: #94a3b8; font-size: 12.5px; transition: all 0.15s; cursor: pointer;
}
.dropzone.dragover { border-color: #2563eb; background: #eff6ff; color: #2563eb; }

#upload-panel {
  position: fixed; bottom: 20px; right: 20px; width: 320px; max-height: 360px;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.12);
  overflow-y: auto; z-index: 60;
}
#upload-panel .upload-panel-header {
  padding: 8px 12px; font-size: 12.5px; font-weight: 700; color: #475569;
  border-bottom: 1px solid #eef1f5; display: flex; justify-content: space-between; align-items: center;
}
.upload-progress-item { padding: 8px 12px; border-bottom: 1px solid #f4f6f8; font-size: 11.5px; }
.upload-progress-item .upf-name { color: #334155; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-bar-outer { background: #e2e8f0; border-radius: 4px; height: 6px; overflow: hidden; }
.progress-bar-inner { background: #2563eb; height: 100%; transition: width 0.2s; }
.progress-bar-inner.done { background: #16a34a; }
.progress-bar-inner.failed { background: #dc2626; }

.toggle-switch { position: relative; display: inline-block; width: 40px; height: 22px; cursor: pointer; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-switch .slider {
  position: absolute; inset: 0; background: #cbd5e1; border-radius: 22px; transition: 0.2s;
}
.toggle-switch .slider::before {
  content: ""; position: absolute; width: 18px; height: 18px; left: 2px; top: 2px;
  background: #fff; border-radius: 50%; transition: 0.2s;
}
.toggle-switch input:checked + .slider { background: #2563eb; }
.toggle-switch input:checked + .slider::before { transform: translateX(18px); }

.disk-usage-bar { background: #e2e8f0; border-radius: 6px; height: 14px; overflow: hidden; }
.disk-usage-bar-inner { background: linear-gradient(90deg,#2563eb,#3b82f6); height: 100%; }
