*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #5B6AF5;
  --primary-hover: #4556e0;
  --primary-light: #eef0ff;
  --bg: #f8f9fb;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text: #1a1b2e;
  --text-sub: #6b7280;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-hover: 0 8px 24px rgba(0,0,0,0.12);
  --gold: #f59e0b;
  --gold-light: #fef3c7;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.logo { font-size: 17px; font-weight: 700; color: var(--text); text-decoration: none; flex-shrink: 0; }
.header-right { display: flex; align-items: center; gap: 10px; }

.header-search {
  width: 200px;
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  background: var(--bg);
  transition: border-color 0.15s, width 0.2s;
}
.header-search:focus { border-color: var(--primary); width: 260px; }

.btn-admin {
  font-size: 13px;
  color: var(--text-sub);
  text-decoration: none;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-admin:hover { background: var(--bg); color: var(--text); }

/* ── Breadcrumb bar ── */
.breadcrumb-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.breadcrumb { font-size: 13px; color: var(--text-sub); }
.breadcrumb a { color: var(--text-sub); text-decoration: none; }
.breadcrumb a:last-child { color: var(--text); font-weight: 600; }
.breadcrumb a:hover { color: var(--primary); }

.btn-share {
  font-size: 13px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-sub);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn-share:hover { border-color: var(--primary); color: var(--primary); }

/* ── Main ── */
main { max-width: 1200px; margin: 0 auto; padding: 32px 24px; }

/* ── Sections ── */
.section { margin-bottom: 48px; }
.section-sm { margin-bottom: 28px; }
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.section-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; }

/* 스토리지 바 */
.storage-bar-wrap { padding: 14px 0 20px; display: flex; flex-direction: column; gap: 8px; }
.storage-row { display: flex; align-items: center; gap: 10px; }
.storage-label { font-size: 12px; color: var(--text-sub); width: 80px; flex-shrink: 0; }
.storage-bar-bg { flex: 1; height: 8px; background: var(--border); border-radius: 99px; overflow: hidden; }
.storage-bar-fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width 0.4s; }
.storage-bar-fill.warn { background: #f59e0b; }
.storage-bar-fill.r2 { background: #f97316; width: auto !important; }
.storage-pct { font-size: 12px; color: var(--text-sub); white-space: nowrap; }
.section-sub { font-size: 14px; font-weight: 600; color: var(--text-sub); margin-bottom: 14px; }
.section-link { font-size: 13px; color: var(--primary); text-decoration: none; }
.section-link:hover { text-decoration: underline; }
.section-meta { font-size: 13px; color: var(--text-sub); }

/* ── Folder Grid ── */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.folder-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: all 0.18s;
  position: relative;
}
.folder-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: #d0d5ff; }
.folder-icon { font-size: 28px; flex-shrink: 0; }
.brand-icon {
  width: 42px; height: 42px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
}
.folder-info { flex: 1; min-width: 0; }
.folder-name { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.folder-meta { font-size: 12px; color: var(--text-sub); }

.file-count-badge {
  position: absolute;
  top: 12px; right: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
}

/* ── File Grid ── */
.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.file-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}
.file-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.file-card.is-best { border-color: var(--gold); }

.card-thumb {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.card-thumb.clickable { cursor: pointer; }
.card-thumb.clickable:hover img,
.card-thumb.clickable:hover video { opacity: 0.88; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.15s; }

.best-badge {
  position: absolute;
  top: 8px; left: 8px;
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
  z-index: 1;
}

.thumb-video {
  width: 100%; height: 100%;
  background: #1a1b2e;
  display: flex; align-items: center; justify-content: center;
}
.thumb-video svg { width: 36px; height: 36px; fill: rgba(255,255,255,0.65); }
.thumb-file {
  width: 100%; height: 100%;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
}
.thumb-file span { font-size: 22px; font-weight: 800; color: var(--primary); letter-spacing: 1px; }

.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-name { font-size: 13px; font-weight: 600; word-break: break-all; }
.card-brand { font-size: 11px; color: var(--primary); font-weight: 600; }
.card-desc { font-size: 12px; color: var(--text-sub); }
.card-note {
  font-size: 12px; color: #92400e;
  background: var(--gold-light);
  border-radius: 6px;
  padding: 6px 8px;
  margin-top: 4px;
  line-height: 1.5;
}
.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 8px;
}
.meta-size { font-size: 11px; color: var(--text-sub); }
.btn-dl {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  background: var(--primary);
  color: #fff;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s;
}
.btn-dl:hover { background: var(--primary-hover); }

/* ── Modal ── */
.modal { display: none; position: fixed; inset: 0; z-index: 1000; align-items: center; justify-content: center; }
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(4px); }
.modal-content {
  position: relative; z-index: 1;
  background: var(--surface);
  border-radius: 16px;
  padding: 24px;
  max-width: 920px;
  width: calc(100vw - 40px);
  max-height: calc(100vh - 60px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: var(--bg); border: none;
  width: 30px; height: 30px; border-radius: 50%;
  font-size: 13px; cursor: pointer; color: var(--text-sub);
}
.modal-preview img, .modal-preview video {
  width: 100%; max-height: 65vh; object-fit: contain; border-radius: 8px;
}
.modal-info { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.modal-info h3 { font-size: 15px; font-weight: 600; flex: 1; min-width: 180px; }
.modal-info p { font-size: 13px; color: var(--text-sub); }
.modal-note { font-size: 13px; color: #92400e; background: var(--gold-light); border-radius: 8px; padding: 8px 12px; margin-top: 6px; }
a.btn-download {
  padding: 10px 22px; background: var(--primary); color: #fff;
  border-radius: 8px; font-size: 14px; font-weight: 700;
  text-decoration: none; flex-shrink: 0;
}
a.btn-download:hover { background: var(--primary-hover); }

/* ── Toast ── */
.toast {
  position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(10px);
  background: #1a1b2e; color: #fff;
  padding: 12px 24px; border-radius: 100px;
  font-size: 14px; font-weight: 600;
  opacity: 0; transition: all 0.25s;
  pointer-events: none; z-index: 9999;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Status ── */
.loading, .empty, .error {
  text-align: center; padding: 60px 0;
  color: var(--text-sub); font-size: 15px;
  grid-column: 1/-1;
}
.error { color: #e53935; }

/* ── Admin ── */
#loginSection {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
}
.login-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px; width: 380px;
  box-shadow: var(--shadow);
}
.login-card h2 { font-size: 20px; margin-bottom: 4px; }
.login-card .sub { font-size: 13px; color: var(--text-sub); margin-bottom: 28px; }

.form-group { margin-bottom: 14px; }
.form-group label, .form-group > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.form-group input {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; outline: none; transition: border-color 0.15s;
}
.form-group input:focus { border-color: var(--primary); }

.toggle-label { display: flex !important; align-items: center; gap: 8px; cursor: pointer; }
.toggle-label input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); }
.toggle-text { font-size: 14px; font-weight: 600; color: var(--text); }

.btn-primary {
  width: 100%; padding: 12px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 8px;
  font-size: 15px; font-weight: 700;
  cursor: pointer; margin-top: 8px;
  transition: background 0.15s;
}
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.req { color: #e53935; }
.login-error { color: #e53935; font-size: 13px; margin-top: 10px; min-height: 18px; }

.admin-wrap { max-width: 960px; margin: 0 auto; padding: 32px 24px; }
.admin-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  margin-bottom: 24px; box-shadow: var(--shadow);
}
.admin-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 20px; }
.admin-user { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--text-sub); }
.btn-logout {
  padding: 6px 14px; background: none;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; cursor: pointer; color: var(--text-sub);
}
.btn-logout:hover { color: #e53935; border-color: #fecaca; }

.upload-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

#dropzone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 44px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  background: var(--bg);
}
#dropzone:hover, #dropzone.drag-over {
  border-color: var(--primary); background: var(--primary-light);
}
.dz-icon { font-size: 32px; margin-bottom: 10px; }
#dropzone p { font-size: 15px; color: var(--text-sub); }
#dropzone span { font-size: 12px; color: var(--text-sub); margin-top: 4px; display: block; }

.progress-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; background: var(--bg); border-radius: 8px; margin-top: 8px;
  font-size: 13px;
}
.progress-status { font-weight: 700; color: var(--primary); }
.progress-status.ok { color: #16a34a; }
.progress-status.fail { color: #e53935; }

.admin-list-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; flex-wrap: wrap; gap: 10px;
}
.filter-select {
  padding: 7px 12px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 13px; background: var(--bg);
  outline: none; cursor: pointer;
}
.filter-select:focus { border-color: var(--primary); }

.admin-group { margin-bottom: 24px; }
.admin-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 2px solid var(--border); margin-bottom: 4px;
}
.admin-group-title { font-size: 14px; font-weight: 700; }
.admin-group-count {
  font-size: 12px; font-weight: 700;
  background: var(--primary); color: #fff;
  padding: 2px 10px; border-radius: 20px;
}

.admin-file-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 12px 4px; border-bottom: 1px solid var(--border); gap: 12px;
}
.admin-file-row:last-child { border-bottom: none; }
.admin-file-info { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.admin-file-name { font-size: 13px; font-weight: 600; word-break: break-all; }
.admin-meta { font-size: 12px; color: var(--text-sub); }
.admin-desc { font-size: 12px; color: var(--text-sub); }
.admin-note { font-size: 12px; color: #92400e; background: var(--gold-light); padding: 2px 8px; border-radius: 4px; }
.best-badge-sm { font-size: 12px; line-height: 1; }

.admin-file-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: flex-start; flex-wrap: wrap; }
.btn-sm {
  padding: 5px 11px; border-radius: 6px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  text-decoration: none; border: 1px solid var(--border);
  background: var(--surface); color: var(--text);
  transition: all 0.15s; white-space: nowrap;
}
.btn-sm:hover { background: var(--bg); }
.btn-best-active { border-color: var(--gold); color: #92400e; background: var(--gold-light); }
.btn-ai-active { border-color: #8b5cf6; color: #5b21b6; background: #f5f3ff; }
.btn-delete { color: #e53935; border-color: #fecaca; }
.btn-delete:hover { background: #fff1f1; }

/* ── 빈 폴더 상태 ── */
.empty-folder {
  text-align: center; padding: 80px 0;
  grid-column: 1/-1;
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-text { font-size: 17px; font-weight: 600; color: var(--text-sub); margin-bottom: 6px; }
.empty-sub { font-size: 13px; color: var(--text-sub); }

.count-chip {
  display: inline-block;
  background: var(--border); color: var(--text-sub);
  font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 20px;
  margin-left: 4px;
}

.folder-arrow { font-size: 20px; color: var(--text-sub); margin-left: auto; }
.folder-empty { opacity: 0.55; }
.empty-badge { background: var(--border) !important; color: var(--text-sub) !important; }

/* ── 노트 섹션 ── */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}

.note-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}
.note-card.note-gold  { border-left: 4px solid var(--gold); }
.note-card.note-blue  { border-left: 4px solid #3b82f6; }
.note-card.note-purple { border-left: 4px solid #8b5cf6; }

.note-card-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.note-label { font-size: 13px; font-weight: 700; }
.note-edit-btn {
  font-size: 12px; padding: 3px 10px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--bg); cursor: pointer; color: var(--text-sub);
  transition: all 0.15s;
}
.note-edit-btn:hover { border-color: var(--primary); color: var(--primary); }

.note-text {
  font-size: 13px; color: var(--text); line-height: 1.65;
  white-space: pre-wrap;
}
.note-empty { font-size: 12px; color: var(--text-sub); font-style: italic; }

.note-textarea {
  width: 100%; min-height: 90px;
  padding: 10px 12px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; line-height: 1.65;
  resize: vertical; outline: none;
  font-family: inherit;
  transition: border-color 0.15s;
}
.note-textarea:focus { border-color: var(--primary); }

.note-editor-foot {
  display: flex; gap: 8px; margin-top: 8px; align-items: center;
}
.btn-note-save {
  padding: 6px 16px; background: var(--primary); color: #fff;
  border: none; border-radius: 7px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: background 0.15s;
}
.btn-note-save:hover { background: var(--primary-hover); }
.btn-note-save:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-note-cancel {
  padding: 6px 14px; background: var(--bg);
  border: 1px solid var(--border); border-radius: 7px;
  font-size: 13px; cursor: pointer; color: var(--text-sub);
}
.btn-note-delete {
  padding: 6px 10px; margin-left: auto;
  background: none; border: none;
  font-size: 12px; color: #e53935; cursor: pointer;
}
.btn-note-delete:hover { text-decoration: underline; }

/* ── Admin 탭 ── */
.admin-tabs {
  background: var(--surface); border-bottom: 1px solid var(--border);
  display: flex; gap: 0; padding: 0 24px;
  max-width: 960px; margin: 0 auto;
}
.admin-tab {
  padding: 14px 20px;
  border: none; border-bottom: 2px solid transparent;
  background: none; font-size: 14px; font-weight: 600;
  color: var(--text-sub); cursor: pointer; transition: all 0.15s;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── 폴더 관리 ── */
.folder-group { margin-bottom: 28px; }
.folder-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 2px solid var(--border); margin-bottom: 12px;
}
.folder-group-title { font-size: 15px; font-weight: 700; }
.folder-group-meta { font-size: 12px; color: var(--text-sub); }

.brand-folder-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.brand-folder-tag {
  display: flex; align-items: center; gap: 0;
  background: var(--primary-light); border: 1px solid #c7d0ff;
  border-radius: 8px; overflow: hidden;
}
.brand-tag-link {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; text-decoration: none; color: var(--primary);
  font-size: 13px; font-weight: 600;
  transition: background 0.12s;
}
.brand-tag-link:hover { background: #dde0ff; }
.brand-tag-count {
  background: var(--primary); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 1px 7px; border-radius: 10px;
}
.brand-tag-del {
  padding: 0 10px; height: 100%;
  border: none; border-left: 1px solid #c7d0ff;
  background: none; color: #a0a7d4; cursor: pointer;
  font-size: 14px; line-height: 1;
  transition: all 0.12s;
}
.brand-tag-del:hover { background: #fecaca; color: #e53935; }

.add-brand-row { display: flex; gap: 8px; margin-top: 8px; }
.add-brand-input {
  flex: 1; max-width: 240px;
  padding: 7px 12px; border: 1px dashed var(--border);
  border-radius: 8px; font-size: 13px; outline: none;
  background: var(--bg);
}
.add-brand-input:focus { border-color: var(--primary); border-style: solid; }

.btn-primary-sm {
  padding: 7px 16px; background: var(--primary); color: #fff;
  border: none; border-radius: 8px; font-size: 13px;
  font-weight: 700; cursor: pointer;
}
.btn-primary-sm:hover { background: var(--primary-hover); }

/* ── 분기 내보내기 ── */
.export-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.export-row:last-child { border-bottom: none; }
.export-info { display: flex; flex-direction: column; gap: 4px; }
.export-quarter { font-size: 15px; font-weight: 700; color: var(--text); }
.export-meta { font-size: 13px; color: var(--text-sub); }

.btn-export {
  padding: 10px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}
.btn-export:hover { background: var(--primary-hover); }
.btn-export:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── 갤러리 업로드 버튼 & 모달 ── */
.gallery-upload-bar {
  display: flex; justify-content: flex-end;
  margin-bottom: 16px;
}
.btn-gallery-upload {
  padding: 9px 20px;
  background: var(--primary); color: #fff;
  border: none; border-radius: 8px;
  font-size: 14px; font-weight: 700;
  cursor: pointer; transition: background 0.15s;
}
.btn-gallery-upload:hover { background: var(--primary-hover); }

.gallery-upload-panel {
  position: relative; z-index: 501;
  background: var(--surface);
  border-radius: 16px; padding: 28px;
  width: min(520px, 92vw);
  max-height: 85vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.gallery-upload-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.gallery-upload-head span { font-size: 16px; font-weight: 700; }
.gallery-upload-head button {
  background: none; border: none; font-size: 20px;
  cursor: pointer; color: var(--text-sub); line-height: 1;
}
/* ── 업로드 버튼 (파일/폴더 선택) ── */
.upload-pick-btns {
  display: flex; gap: 10px; margin: 16px 0 8px;
}
.btn-pick-files, .btn-pick-folder {
  flex: 1; padding: 14px 10px; border-radius: 10px;
  font-size: 14px; font-weight: 600; cursor: pointer;
  border: 2px solid var(--border); background: var(--surface);
  color: var(--text); transition: all 0.15s; text-align: center;
}
.btn-pick-files:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.btn-pick-folder:hover { border-color: #8b5cf6; background: #f5f3ff; color: #6d28d9; }
.upload-pick-hint { font-size: 12px; color: var(--text-sub); margin-bottom: 8px; text-align: center; }

/* ── 분기 카드 ── */
.quarter-card { background: linear-gradient(135deg, var(--primary-light), #f5f3ff); }
.quarter-card:hover { background: linear-gradient(135deg, #dde1fd, #ede9fe); }
.quarter-card .folder-icon { font-size: 28px; }

/* ── 파일 태그 버튼 ── */
.card-tags {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin: 6px 0 2px;
}
.file-tag-btn {
  padding: 3px 9px; border-radius: 20px;
  font-size: 11px; font-weight: 700;
  cursor: pointer; border: 1.5px solid;
  transition: all 0.15s; line-height: 1.4;
  opacity: 0.45;
}
.file-tag-btn.active { opacity: 1; }
.file-tag-btn:disabled { cursor: default; }

.file-tag-btn.tag-gold {
  border-color: #f59e0b; color: #92400e; background: transparent;
}
.file-tag-btn.tag-gold.active {
  background: var(--gold-light); color: #92400e;
}
.file-tag-btn.tag-purple {
  border-color: #8b5cf6; color: #5b21b6; background: transparent;
}
.file-tag-btn.tag-purple.active {
  background: #f5f3ff; color: #5b21b6;
}
.file-tag-btn:not(:disabled):hover { opacity: 1; }


/* ── 서브폴더 카드 ── */
.subfolder-card:not(.sf-bookmarked) {
  border-style: dashed !important;
  background: var(--bg) !important;
}
.subfolder-card:not(.sf-bookmarked):hover {
  background: var(--primary-light) !important;
  border-color: var(--primary) !important;
  border-style: dashed !important;
}
.subfolder-card.sf-bookmarked {
  border-style: dashed !important;
}

/* ── 파일 카드 삭제 버튼 ── */
.card-actions {
  display: flex; align-items: center; gap: 6px;
}
.btn-del-card {
  padding: 4px 8px; border-radius: 6px;
  font-size: 13px; cursor: pointer;
  border: 1px solid #fecaca;
  background: #fff1f1; color: #e53935;
  transition: all 0.15s; line-height: 1;
}
.btn-del-card:hover { background: #fee2e2; }
.btn-del-card:disabled { opacity: 0.5; cursor: not-allowed; }

/* 페이지 수 */
.card-page-count { padding: 2px 0 4px; }
.page-count-badge {
  display: inline-block; font-size: 11px; color: var(--primary);
  background: #eff6ff; border-radius: 4px; padding: 2px 6px;
  cursor: pointer; border: 1px solid #bfdbfe;
}
.page-count-badge:hover { background: #dbeafe; }
.btn-page-input {
  font-size: 11px; color: var(--text-sub); background: none;
  border: 1px dashed #cbd5e1; border-radius: 4px; padding: 2px 6px;
  cursor: pointer;
}
.btn-page-input:hover { border-color: var(--primary); color: var(--primary); }
.page-count-input {
  font-size: 12px; border: 1px solid var(--border); border-radius: 4px;
  padding: 2px 4px; margin-right: 4px;
}
.card-page-count button {
  font-size: 11px; padding: 2px 6px; border-radius: 4px; cursor: pointer;
  border: 1px solid var(--border); background: #f8fafc; margin-right: 2px;
}

/* ── 브랜드 뷰 성과 우수 사례 갤러리 ── */
.brand-best-section {
  border-top: 2px solid var(--gold-light);
  padding-top: 20px;
  margin-top: 8px;
}
.brand-best-section .section-sub { color: #b45309; }

/* ── 성과 우수 사례 브랜드 그룹 ── */
.best-brand-group { margin-bottom: 32px; }
.best-brand-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 12px;
  padding: 4px 10px 4px 0;
  border-bottom: 2px solid var(--gold);
}
.best-brand-link:hover { color: var(--primary); border-color: var(--primary); }
.best-brand-group .file-grid { margin-top: 0; }

/* ── 브랜드 분석 섹션 ── */
.analysis-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.btn-ai-analyze {
  padding: 8px 18px;
  background: linear-gradient(135deg, #5B6AF5 0%, #8b5cf6 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-ai-analyze:hover { opacity: 0.88; transform: translateY(-1px); }
.btn-ai-analyze:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.analysis-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.btn-analysis-export, .btn-analysis-zip {
  padding: 7px 14px; border-radius: 8px; font-size: 13px; font-weight: 500;
  cursor: pointer; border: 1px solid var(--border); transition: background 0.15s;
}
.btn-analysis-export { background: #f0fdf4; color: #16a34a; border-color: #bbf7d0; }
.btn-analysis-export:hover { background: #dcfce7; }
.btn-analysis-zip { background: #eff6ff; color: #2563eb; border-color: #bfdbfe; }
.btn-analysis-zip:hover { background: #dbeafe; }
.btn-analysis-zip:disabled { opacity: 0.5; cursor: not-allowed; }
.note-teal   { border-left-color: #0d9488 !important; }
.note-indigo { border-left-color: #6366f1 !important; }
.note-teal   .note-label { color: #0d9488; }
.note-indigo .note-label { color: #6366f1; }

/* ── 전체 다운로드 버튼 ── */
.btn-dl-all {
  padding: 8px 16px;
  background: var(--surface);
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.btn-dl-all:hover { background: var(--primary-light); }
.btn-dl-all:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── 서브폴더 카드 액션 버튼 ── */
/* 다중 선택 체크박스 */
.sf-bulk-check {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  display: flex;
  align-items: center;
  cursor: pointer;
}
.sf-bulk-check input[type=checkbox] {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: var(--primary);
}
.subfolder-card { position: relative; }
.subfolder-card.sf-bulk-selected {
  outline: 2px solid var(--primary);
  background: var(--primary-light);
}

/* 하위 폴더 섹션 헤더 */
.sf-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.sf-section-head .section-sub { margin-bottom: 0; }
.sf-select-all-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.sf-select-all-wrap input[type=checkbox] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: var(--primary);
}
.sf-select-all-wrap:hover { color: var(--text); }

/* 회의 버튼 */
.sf-mtg-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  padding: 2px 7px;
  cursor: pointer;
  z-index: 2;
  transition: all 0.15s;
  white-space: nowrap;
}
.subfolder-card:hover .sf-mtg-btn { color: #64748b; border-color: #cbd5e1; }
.sf-mtg-btn.mtg-assigned { background: #dbeafe; border-color: #93c5fd; color: #2563eb; }

/* 회의록 날짜 선택 팝업 */
.meeting-picker-popup {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12);
  z-index: 800;
  min-width: 140px;
  overflow: hidden;
}
.mpp-item {
  padding: 9px 14px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  transition: background 0.1s;
}
.mpp-item:hover { background: var(--primary-light); }
.mpp-item.mpp-active { color: var(--primary); font-weight: 600; }
.mpp-item.mpp-remove { color: #ef4444; border-top: 1px solid var(--border); font-size: 12px; }

/* 북마크된 카드 배경 */
.folder-card.subfolder-card.sf-bookmarked {
  background: #dbeafe !important;
}

/* 하단 일괄 적용 바 */
.bulk-action-bar {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #1e1e2e;
  color: #fff;
  border-radius: 12px;
  padding: 10px 16px;
  gap: 12px;
  align-items: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.35);
  z-index: 400;
  font-size: 13px;
  white-space: nowrap;
}
.bulk-action-bar.bulk-bar-visible { display: flex; }
#bulkCount { font-weight: 600; }
.bulk-btn-apply {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.bulk-btn-apply:hover { opacity: 0.85; }
.bulk-btn-delete {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.bulk-btn-delete:hover { opacity: 0.85; }
.bulk-btn-clear {
  background: transparent;
  color: #aaa;
  border: 1px solid #555;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.bulk-btn-clear:hover { color: #fff; border-color: #999; }

.sf-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.btn-sf-act {
  flex: 1;
  padding: 5px 0;
  font-size: 12px;
  font-weight: 600;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-sub);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn-sf-act:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.btn-sf-del:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.btn-sf-act:disabled { opacity: 0.5; cursor: not-allowed; }


/* ── Upload dropzone ── */
.upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: var(--text-sub);
  font-size: 14px;
  margin: 12px 0 4px;
  transition: border-color 0.15s, background 0.15s;
  cursor: default;
}
.upload-dropzone p { margin: 0; }
.upload-dropzone p:first-child { font-size: 15px; margin-bottom: 4px; }
.upload-dropzone.drag-over { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }

/* ── Upload queue ── */
#uploadQueueArea { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; }
.queue-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.queue-count-label { font-size: 13px; font-weight: 600; color: var(--text); }
.btn-queue-clear { font-size: 12px; color: var(--text-sub); background: none; border: 1px solid var(--border); border-radius: 6px; padding: 3px 10px; cursor: pointer; }
.btn-queue-clear:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.queue-list { max-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.queue-item { display: flex; align-items: center; justify-content: space-between; background: var(--bg); border-radius: 6px; padding: 5px 10px; font-size: 12px; }
.queue-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.queue-item-del { background: none; border: none; color: var(--text-sub); cursor: pointer; font-size: 11px; padding: 0 2px; flex-shrink: 0; }
.queue-item-del:hover { color: #dc2626; }
.queue-more { font-size: 12px; color: var(--text-sub); text-align: center; padding: 4px 0; }
.btn-upload-start { width: 100%; padding: 10px; background: var(--primary); color: white; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.15s; }
.btn-upload-start:hover { background: var(--primary-hover); }
.btn-upload-start:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── Picker panel ── */
.picker-panel { background: white; border-radius: 14px; width: 360px; max-width: 92vw; box-shadow: 0 20px 60px rgba(0,0,0,0.2); overflow: hidden; }
.picker-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px 12px; border-bottom: 1px solid var(--border); }
.picker-head span { font-size: 15px; font-weight: 700; }
.picker-close { background: none; border: none; font-size: 16px; color: var(--text-sub); cursor: pointer; line-height: 1; }
.picker-body { max-height: 70vh; overflow-y: auto; }
.picker-section { padding: 12px 16px 8px; }
.picker-section-title { font-size: 12px; font-weight: 700; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.picker-section-hint { font-weight: 400; text-transform: none; letter-spacing: 0; }
.picker-divider { height: 1px; background: var(--border); margin: 0 16px; }
.picker-list { display: flex; flex-direction: column; gap: 1px; min-height: 36px; }
.picker-item { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; cursor: pointer; transition: background 0.1s; font-size: 14px; }
.picker-item:hover { background: var(--bg); }
.picker-item.selected { background: var(--primary-light); }
.picker-check { width: 16px; text-align: center; color: var(--primary); font-weight: 700; font-size: 13px; flex-shrink: 0; }
.picker-name { flex: 1; }
.picker-empty { font-size: 12px; color: var(--text-sub); padding: 6px 0 4px; }
.picker-footer { display: flex; gap: 6px; padding: 6px 0 10px; }
.picker-input { flex: 1; padding: 6px 10px; border: 1px solid var(--border); border-radius: 7px; font-size: 13px; outline: none; }
.picker-input:focus { border-color: var(--primary); }
.picker-add-btn { padding: 6px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 7px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.picker-add-btn:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }
.picker-actions { display: flex; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--border); }
.picker-cancel { flex: 1; padding: 9px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; font-size: 14px; cursor: pointer; }
.picker-confirm { flex: 2; padding: 9px; background: var(--primary); color: white; border: none; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.picker-confirm:hover { background: var(--primary-hover); }
.tag-chip { background: #f3f4f6; color: var(--text); border: 1px solid var(--border); cursor: pointer; }
.tag-chip:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* ── Home tabs ── */
.home-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 28px;
}
.home-tab {
  padding: 10px 22px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-sub);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.home-tab:hover { color: var(--text); }
.home-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }

/* ── 주간 회의록 탭 ── */
.meeting-layout {
  display: flex;
  min-height: 520px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 4px;
}
.meeting-sidebar {
  width: 170px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--bg);
  padding: 8px 0;
}
.meeting-backup-wrap { padding: 12px 10px 8px; border-top: 1px solid var(--border); margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.btn-data-export, .btn-data-import {
  display: block; text-align: center; padding: 6px 0; font-size: 11px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border); background: var(--surface); color: var(--text-sub); transition: all 0.15s;
}
.btn-data-export:hover, .btn-data-import:hover { border-color: var(--primary); color: var(--primary); }

.meeting-week-item {
  padding: 11px 16px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background 0.12s;
}
.meeting-week-item:hover { background: var(--primary-light); }
.meeting-week-item.active { background: var(--primary-light); border-left-color: var(--primary); }
.meeting-week-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.meeting-week-count { display: block; font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.meeting-content {
  flex: 1;
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow-y: auto;
}
.meeting-block-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--text); }
.meeting-notice-textarea {
  width: 100%;
  min-height: 100px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  resize: vertical;
  box-sizing: border-box;
  font-family: inherit;
}
.meeting-notice-textarea:focus { outline: none; border-color: var(--primary); }
.meeting-bookmark-list { display: flex; flex-direction: column; gap: 10px; }
.meeting-brand-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.meeting-brand-name {
  flex-shrink: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  min-width: 72px;
  padding-top: 3px;
}
.meeting-designer-list { display: flex; flex-direction: column; gap: 16px; }
.meeting-designer-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.meeting-designer-name {
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  letter-spacing: 0.01em;
}
.meeting-designer-folders { padding: 10px 14px; display: flex; flex-direction: column; gap: 7px; }
.meeting-folder-row { display: flex; align-items: center; gap: 8px; }
.meeting-folder-brand {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 64px;
  flex-shrink: 0;
}
.meeting-folder-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.meeting-folder-chip {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s;
}
.meeting-folder-chip:hover { background: #dbeafe; }
.meeting-empty {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.8;
  padding: 16px 0;
}

/* ── Line chart ── */
.line-chart-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px 16px;
  overflow-x: auto;
}

/* ── Stats table ── */
.stats-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.stats-table th, .stats-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); text-align: left; }
.stats-table thead tr { background: var(--bg); }
.stats-table th { font-size: 12px; font-weight: 600; color: var(--text-sub); text-transform: uppercase; letter-spacing: 0.05em; }
.stats-table tbody tr:last-child td { border-bottom: none; }
.stats-diff { font-size: 13px; font-weight: 600; }
.stats-diff-up { color: #10b981; }
.stats-diff-down { color: #ef4444; }
.stats-diff-none { color: var(--text-sub); font-weight: 400; }
.btn-manual-count { background: none; border: none; cursor: pointer; font-size: 12px; opacity: 0.4; padding: 0 4px; vertical-align: middle; }
.btn-manual-count:hover { opacity: 1; }
.stats-memo-col { width: 240px; vertical-align: top; }
.btn-stats-memo { background: none; border: none; cursor: pointer; font-size: 13px; opacity: 0.25; padding: 2px; line-height: 1; transition: opacity 0.15s; }
.btn-stats-memo:hover, .btn-stats-memo.has-memo { opacity: 1; }
.stats-memo-view { font-size: 12px; color: var(--text-sub); line-height: 1.6; white-space: pre-wrap; word-break: break-all; margin-top: 4px; }
.stats-memo-edit { margin-top: 4px; }
.stats-memo-input { width: 100%; min-height: 60px; padding: 8px 10px; font-size: 12px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; resize: vertical; font-family: inherit; line-height: 1.5; box-sizing: border-box; }
.stats-memo-input:focus { outline: none; border-color: var(--primary); }
.stats-memo-actions { display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.btn-memo-save { background: var(--primary); color: #fff; border: none; border-radius: 6px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.btn-memo-save:hover { background: var(--primary-hover); }
.btn-memo-delete { background: none; border: 1px solid var(--border); border-radius: 6px; padding: 4px 12px; font-size: 12px; color: var(--text-sub); cursor: pointer; }
.btn-memo-delete:hover { color: #ef4444; border-color: #ef4444; }

/* ── Mini charts (bar + proportion) ── */
.mini-charts-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.mini-chart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.mini-chart-title { font-size: 13px; font-weight: 600; color: var(--text-sub); margin-bottom: 14px; }
.mini-chart-total { font-size: 12px; color: var(--text-sub); text-align: right; margin-top: 10px; }

.bar-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bar-label { width: 72px; text-align: right; color: var(--text-sub); font-size: 12px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; background: var(--bg); border-radius: 4px; height: 22px; position: relative; display: flex; align-items: center; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 4px; opacity: 0.85; transition: width 0.4s ease; min-width: 2px; }
.bar-count { position: absolute; right: 8px; font-size: 11px; font-weight: 600; color: var(--text); }

.prop-bar { display: flex; height: 30px; border-radius: 6px; overflow: hidden; gap: 1px; margin-bottom: 14px; }
.prop-seg { height: 100%; transition: width 0.4s ease; }
.prop-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.prop-legend-item { display: flex; align-items: center; gap: 5px; font-size: 12px; }
.prop-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.prop-pct { color: var(--text-sub); font-size: 11px; margin-left: 2px; }

/* ── Meta chips (담당자·협업팀) ── */
.meta-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.meta-chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  line-height: 1.6;
  white-space: nowrap;
  display: inline-block;
}
.designer-chip { background: #eef0ff; color: var(--primary); border: 1px solid #c7ccff; cursor: pointer; }
.designer-chip:hover, .designer-chip.filled:hover { background: #dde1ff; }
.designer-chip.filled { cursor: default; }
.team-chip { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }
.team-chip-add { background: transparent; color: var(--text-sub); border: 1px dashed var(--border); cursor: pointer; }
.team-chip-add:hover { background: var(--bg); color: var(--text); border-color: #9ca3af; }

@media (max-width: 768px) {
  .notes-grid { grid-template-columns: 1fr; }
  .export-row { flex-direction: column; align-items: flex-start; }
  .mini-charts-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .file-grid, .folder-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .upload-meta { grid-template-columns: 1fr; }
  .header-search { width: 140px; }
  .header-search:focus { width: 180px; }
  .admin-tabs { padding: 0 12px; }
  .admin-tab { padding: 12px 14px; font-size: 13px; }
}
