/*
Theme Name: Maison Afflatus
Theme URI: https://masionafflatus.com
Author: Maison Afflatus
Description: B&W monochrome project management dashboard theme for Maison Afflatus
Version: 2.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: maison-afflatus
*/

/* ═══════════════════════════════════════════
   GLOBAL RESET
   ═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { font-family: var(--font); color: var(--black); line-height: 1.6; font-size: 15px; -webkit-font-smoothing: antialiased; background: var(--white); }
::selection { background: var(--black); color: var(--white); }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea { font-family: inherit; }
img { display: block; max-width: 100%; }

/* ═══════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════ */
:root {
  --white: #FFFFFF;
  --off-white: #FAFAFA;
  --gray-50: #F5F5F5;
  --gray-100: #EEEEEE;
  --gray-200: #E0E0E0;
  --gray-300: #CCCCCC;
  --gray-400: #AAAAAA;
  --gray-500: #888888;
  --gray-600: #666666;
  --gray-700: #444444;
  --gray-800: #2A2A2A;
  --gray-900: #1A1A1A;
  --black: #000000;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10);
  --radius: 0px;
  --sidebar-w: 240px;
  --header-h: 56px;
  --font: 'Times New Roman', Times, serif;
  --transition: 0.2s ease;
}

/* ═══════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════ */
.app {
  display: flex;
  min-height: 100vh;
  background: var(--white);
}

/* ═══════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════ */
.sidebar {
  width: var(--sidebar-w);
  background: var(--black);
  color: var(--white);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-brand {
  padding: 32px 24px 28px;
  border-bottom: 1px solid var(--gray-800);
}

.sidebar-brand-eyebrow {
  font-size: 9px;
  font-weight: normal;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.sidebar-brand-name {
  font-size: 20px;
  font-weight: normal;
  color: var(--white);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-brand-line {
  width: 32px;
  height: 1px;
  background: var(--gray-600);
  margin-top: 14px;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 16px;
  overflow-y: auto;
}

.sidebar-section-label {
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-600);
  padding: 16px 8px 8px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 8px;
  font-size: 13px;
  color: var(--gray-400);
  transition: color var(--transition);
  border-left: 2px solid transparent;
  letter-spacing: 0.01em;
}

.sidebar-link:hover { color: var(--white); }

.sidebar-link.active {
  color: var(--white);
  border-left-color: var(--white);
}

.sidebar-link-icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.6;
}

.sidebar-link.active .sidebar-link-icon { opacity: 1; }

.sidebar-link-badge {
  margin-left: auto;
  font-size: 10px;
  color: var(--gray-500);
}

.sidebar-projects-list { padding: 4px 0; }

.sidebar-project-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 20px;
  font-size: 12px;
  color: var(--gray-500);
  transition: color var(--transition);
  letter-spacing: 0.01em;
}

.sidebar-project-item:hover { color: var(--gray-300); }
.sidebar-project-item.active { color: var(--white); }

.sidebar-project-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gray-700);
  flex-shrink: 0;
}

.sidebar-project-item.active .sidebar-project-dot { background: var(--white); }

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--gray-800);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white);
  color: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; }

.sidebar-user-name {
  font-size: 12px;
  color: var(--white);
  letter-spacing: 0.02em;
}

.sidebar-user-role {
  font-size: 10px;
  color: var(--gray-600);
  letter-spacing: 0.02em;
}

/* ═══════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════ */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  background: var(--white);
}

/* ═══════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════ */
.topbar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  z-index: 50;
}

.topbar-breadcrumb {
  font-size: 12px;
  color: var(--gray-500);
  letter-spacing: 0.02em;
}

.topbar-breadcrumb a {
  color: var(--gray-500);
  text-decoration: none;
  transition: color var(--transition);
}

.topbar-breadcrumb a:hover { color: var(--black); }

.topbar-breadcrumb-current { color: var(--black); }

.topbar-breadcrumb-sep {
  margin: 0 6px;
  color: var(--gray-300);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: color var(--transition);
  position: relative;
}

.topbar-btn:hover { color: var(--black); }

.topbar-btn .notif-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 5px;
  height: 5px;
  background: var(--black);
  border-radius: 50%;
  border: 1.5px solid var(--white);
}

.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--gray-200);
  padding: 6px 12px;
  font-size: 12px;
  color: var(--gray-400);
  min-width: 180px;
  transition: border-color var(--transition);
}

.topbar-search:hover { border-color: var(--gray-400); }

.topbar-search kbd {
  font-family: var(--font);
  font-size: 10px;
  border: 1px solid var(--gray-200);
  padding: 0 4px;
  color: var(--gray-400);
  margin-left: auto;
}

/* ═══════════════════════════════════════════
   PAGE CONTENT
   ═══════════════════════════════════════════ */
.page-content { padding: 40px; }
.page { display: none; }
.page.active { display: block; }

/* ═══════════════════════════════════════════
   PAGE HEADER
   ═══════════════════════════════════════════ */
.page-header { margin-bottom: 40px; }

.page-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.page-eyebrow {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.page-title {
  font-size: 32px;
  font-weight: normal;
  color: var(--black);
  letter-spacing: -0.01em;
  line-height: 1.2;
  font-style: italic;
}

.page-subtitle {
  font-size: 14px;
  color: var(--gray-500);
  margin-top: 8px;
  max-width: 480px;
  line-height: 1.7;
}

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--black);
  color: var(--white);
  border: 1px solid var(--black);
}

.btn-primary:hover { background: var(--gray-800); }

.btn-secondary {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--black);
}

.btn-secondary:hover {
  background: var(--black);
  color: var(--white);
}

/* ═══════════════════════════════════════════
   STATS ROW
   ═══════════════════════════════════════════ */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--gray-200);
  border: 1px solid var(--gray-200);
  margin-bottom: 48px;
}

.stat-card {
  background: var(--white);
  padding: 24px;
}

.stat-label {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 10px;
}

.stat-value {
  font-size: 40px;
  font-weight: normal;
  color: var(--black);
  line-height: 1;
  font-style: italic;
}

.stat-change {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 8px;
}

/* ═══════════════════════════════════════════
   PROJECTS GRID
   ═══════════════════════════════════════════ */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-200);
}

.section-title {
  font-size: 11px;
  font-weight: normal;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--black);
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.view-toggle { display: flex; gap: 2px; }

.view-toggle-btn {
  padding: 4px 8px;
  color: var(--gray-400);
  transition: color var(--transition);
}

.view-toggle-btn.active { color: var(--black); }
.view-toggle-btn:hover { color: var(--black); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.project-card:hover { border-color: var(--black); }

.project-card-cover {
  height: 200px;
  background: var(--gray-100);
  position: relative;
  overflow: hidden;
}

.project-card-cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-50);
}

.project-card-cover-icon {
  font-size: 32px;
  opacity: 0.15;
  filter: grayscale(1);
}

.project-card-status {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.project-card-status.active {
  background: var(--black);
  color: var(--white);
}

.project-card-status.review {
  background: var(--white);
  color: var(--black);
  border: 1px solid var(--black);
}

.project-card-body { padding: 24px; }

.project-card-title {
  font-size: 20px;
  font-weight: normal;
  color: var(--black);
  margin-bottom: 6px;
  line-height: 1.3;
  font-style: italic;
}

.project-card-desc {
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: 20px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}

.project-card-date {
  font-size: 11px;
  color: var(--gray-500);
  letter-spacing: 0.05em;
}

.project-card-avatars { display: flex; }

.project-card-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--white);
  margin-left: -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: bold;
  color: var(--white);
  background: var(--black);
}

.project-card-avatar:first-child { margin-left: 0; }
.project-card-avatar:nth-child(2) { background: var(--gray-600); }
.project-card-avatar:nth-child(3) { background: var(--gray-400); }

.project-card-progress {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.progress-bar {
  flex: 1;
  height: 1px;
  background: var(--gray-200);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--black);
  transition: width 0.6s ease;
}

.progress-text {
  font-size: 10px;
  color: var(--gray-500);
  min-width: 30px;
  text-align: right;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════
   PROJECT DETAIL
   ═══════════════════════════════════════════ */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--gray-500);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 24px;
  transition: color var(--transition);
}

.detail-back:hover { color: var(--black); }

.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 40px;
}

.detail-title-area { flex: 1; }

.detail-actions {
  display: flex;
  gap: 8px;
}

/* TABS */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--gray-200);
  margin-bottom: 32px;
}

.tab {
  padding: 12px 24px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  position: relative;
  transition: color var(--transition);
}

.tab:hover { color: var(--gray-600); }
.tab.active { color: var(--black); }

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--black);
}

.tab-badge {
  font-size: 10px;
  margin-left: 6px;
  color: var(--gray-400);
}

.tab.active .tab-badge { color: var(--black); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* PHOTOBOOKS LIST */
.photobooks-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1px;
  background: var(--gray-200);
  border: 1px solid var(--gray-200);
}

.photobook-card {
  background: var(--white);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: background var(--transition);
  cursor: pointer;
}

.photobook-card:hover { background: var(--gray-50); }

.photobook-icon {
  width: 44px;
  height: 56px;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  filter: grayscale(1);
  color: var(--white);
}

.photobook-info { flex: 1; min-width: 0; }

.photobook-title {
  font-size: 16px;
  font-weight: normal;
  color: var(--black);
  margin-bottom: 4px;
  font-style: italic;
}

.photobook-meta {
  font-size: 11px;
  color: var(--gray-500);
  letter-spacing: 0.02em;
}

.photobook-comments-count {
  display: inline;
  font-size: 11px;
  color: var(--gray-500);
  margin-left: 8px;
}

/* KANBAN BOARD */
.kanban {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--gray-200);
  border: 1px solid var(--gray-200);
  min-height: 400px;
}

.kanban-col {
  background: var(--gray-50);
  padding: 20px;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--gray-200);
}

.kanban-col-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray-400);
}

.kanban-col[data-status="progress"] .kanban-col-dot { background: var(--gray-600); }
.kanban-col[data-status="done"] .kanban-col-dot { background: var(--black); }

.kanban-col-title {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-600);
}

.kanban-col-count {
  font-size: 10px;
  color: var(--gray-400);
  margin-left: auto;
}

.kanban-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kanban-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  padding: 16px;
  cursor: grab;
  transition: border-color var(--transition);
}

.kanban-card:hover { border-color: var(--black); }

.kanban-card-title {
  font-size: 13px;
  color: var(--black);
  margin-bottom: 10px;
  line-height: 1.5;
}

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

.kanban-card-tag {
  font-size: 9px;
  padding: 2px 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--gray-300);
  color: var(--gray-600);
}

.kanban-card-assignee {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 7px;
  font-weight: bold;
  color: var(--white);
  background: var(--black);
}

.kanban-card-due {
  font-size: 10px;
  color: var(--gray-500);
  margin-top: 10px;
}

.kanban-add-btn {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--gray-300);
  font-size: 11px;
  color: var(--gray-400);
  letter-spacing: 0.05em;
  transition: all var(--transition);
  margin-top: 8px;
  text-align: center;
}

.kanban-add-btn:hover {
  border-color: var(--black);
  color: var(--black);
}

/* FILES */
.files-upload {
  border: 1px dashed var(--gray-300);
  padding: 48px;
  text-align: center;
  transition: border-color var(--transition);
  margin-bottom: 24px;
}

.files-upload:hover { border-color: var(--black); }

.files-upload-icon {
  color: var(--gray-400);
  margin-bottom: 12px;
}

.files-upload-text {
  font-size: 13px;
  color: var(--gray-500);
}

.files-upload-link {
  color: var(--black);
  text-decoration: underline;
  cursor: pointer;
}

.files-list {
  display: flex;
  flex-direction: column;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}

.file-item:first-child { border-top: 1px solid var(--gray-100); }

.file-icon {
  width: 36px;
  height: 36px;
  border: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  filter: grayscale(1);
}

.file-info { flex: 1; min-width: 0; }

.file-name {
  font-size: 13px;
  color: var(--black);
}

.file-meta {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
}

.file-actions {
  display: flex;
  gap: 4px;
}

.file-action-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: color var(--transition);
  font-size: 13px;
}

.file-action-btn:hover { color: var(--black); }

/* ═══════════════════════════════════════════
   BOOK VIEWER
   ═══════════════════════════════════════════ */
.viewer-layout {
  display: flex;
  margin: -40px;
  height: calc(100vh - var(--header-h));
}

.viewer-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--gray-100);
  position: relative;
}

.viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  z-index: 10;
}

.viewer-toolbar-left,
.viewer-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.viewer-toolbar-center {
  display: flex;
  align-items: center;
  gap: 12px;
}

.viewer-ctrl-btn {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  transition: color var(--transition);
}

.viewer-ctrl-btn:hover { color: var(--black); }
.viewer-ctrl-btn.active { color: var(--black); }

a.viewer-ctrl-btn {
  display: flex;
  color: inherit;
  text-decoration: none;
}

.viewer-toolbar-sep {
  width: 1px;
  height: 16px;
  background: var(--gray-200);
  margin: 0 4px;
}

.viewer-toolbar-title {
  font-size: 13px;
  color: var(--black);
  font-style: italic;
}

.viewer-page-info {
  font-size: 12px;
  color: var(--gray-500);
}

.viewer-page-current { color: var(--black); }

.viewer-book-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 40px;
}

.viewer-nav-btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gray-300);
  color: var(--gray-500);
  font-size: 20px;
  transition: all var(--transition);
  flex-shrink: 0;
  background: var(--white);
}

.viewer-nav-btn:hover {
  border-color: var(--black);
  color: var(--black);
}

.viewer-book {
  width: 80%;
  max-width: 900px;
  aspect-ratio: 2 / 1.414;
  background: var(--white);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
}

.viewer-book::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--gray-200);
  z-index: 2;
}

.viewer-page {
  width: 50%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  position: relative;
}

.viewer-page-left { background: var(--off-white); }
.viewer-page-right { background: var(--white); }

.viewer-page-mockup {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0.35;
}

.viewer-page-mockup-block { background: var(--gray-300); }

.viewer-page-number {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 12px;
  font-style: italic;
}

.viewer-slider {
  padding: 10px 20px;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  gap: 12px;
}

.viewer-slider input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 1px;
  background: var(--gray-300);
  outline: none;
}

.viewer-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--black);
  cursor: pointer;
}

.viewer-slider-label {
  font-size: 10px;
  color: var(--gray-500);
  min-width: 50px;
  letter-spacing: 0.05em;
}

/* COMMENT SIDEBAR */
.viewer-comments {
  width: 320px;
  background: var(--white);
  border-left: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.viewer-comments-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.viewer-comments-title {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--black);
}

.viewer-comments-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  transition: color var(--transition);
  font-size: 14px;
}

.viewer-comments-close:hover { color: var(--black); }

.viewer-comments-filters {
  display: flex;
  gap: 0;
  padding: 12px 20px;
  border-bottom: 1px solid var(--gray-200);
}

.viewer-comment-filter {
  padding: 4px 12px;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-400);
  transition: all var(--transition);
}

.viewer-comment-filter:hover { color: var(--gray-600); }

.viewer-comment-filter.active {
  background: var(--black);
  color: var(--white);
}

.viewer-comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.comment-item {
  padding: 20px;
  border-bottom: 1px solid var(--gray-100);
  transition: background var(--transition);
}

.comment-item:hover { background: var(--gray-50); }

.comment-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.comment-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  font-weight: bold;
  color: var(--white);
  background: var(--black);
  flex-shrink: 0;
}

.comment-avatar:nth-of-type(2) { background: var(--gray-600); }

.comment-author {
  font-size: 12px;
  color: var(--black);
}

.comment-page-badge {
  font-size: 10px;
  border: 1px solid var(--gray-200);
  padding: 1px 6px;
  color: var(--gray-500);
  margin-left: auto;
}

.comment-text {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.7;
}

.comment-time {
  font-size: 10px;
  color: var(--gray-400);
  margin-top: 8px;
}

.comment-resolve {
  font-size: 10px;
  color: var(--black);
  text-decoration: underline;
  margin-top: 8px;
  margin-left: 12px;
  cursor: pointer;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.viewer-comment-form {
  padding: 16px 20px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  gap: 8px;
}

.viewer-comment-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  font-size: 12px;
  color: var(--black);
  outline: none;
  transition: border-color var(--transition);
  background: var(--white);
}

.viewer-comment-input:focus { border-color: var(--black); }
.viewer-comment-input::placeholder { color: var(--gray-400); }

.viewer-comment-send {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--black);
  color: var(--white);
  font-size: 14px;
  transition: background var(--transition);
  flex-shrink: 0;
}

.viewer-comment-send:hover { background: var(--gray-800); }

/* ═══════════════════════════════════════════
   PROJECT FOLDERS
   ═══════════════════════════════════════════ */
.folders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.folder-card {
  border: 1px solid var(--gray-200);
  padding: 24px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
}

.folder-card:hover { border-color: var(--black); }

.folder-card-icon {
  margin-bottom: 16px;
  color: var(--gray-400);
}

.folder-card:hover .folder-card-icon { color: var(--black); }

.folder-card-name {
  font-size: 15px;
  font-style: italic;
  color: var(--black);
  margin-bottom: 6px;
}

.folder-card-count {
  font-size: 11px;
  color: var(--gray-500);
  letter-spacing: 0.02em;
}

.folder-card-type {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-400);
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
}

.folder-card-date {
  font-size: 10px;
  color: var(--gray-400);
  margin-top: 4px;
}

.folder-add-card {
  border: 1px dashed var(--gray-300);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--gray-400);
}

.folder-add-card:hover {
  border-color: var(--black);
  color: var(--black);
}

.folder-add-card-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.folder-add-card-text {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ═══════════════════════════════════════════
   DELIVERABLES GRID
   ═══════════════════════════════════════════ */
.deliverables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}

.deliverable-card {
  border: 1px solid var(--gray-200);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
}

.deliverable-card:hover { border-color: var(--black); }

.deliverable-card-preview {
  height: 180px;
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.deliverable-card-preview-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Photobook preview */
.preview-photobook {
  display: flex;
  gap: 2px;
  padding: 20px;
}

.preview-photobook-page {
  width: 60px;
  height: 80px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  position: relative;
}

.preview-photobook-page::after {
  content: '';
  position: absolute;
  inset: 8px;
  background: var(--gray-200);
}

.deliverable-card-body { padding: 16px 20px; }

.deliverable-card-type-badge {
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.deliverable-card-title {
  font-size: 15px;
  font-style: italic;
  color: var(--black);
  margin-bottom: 4px;
}

.deliverable-card-meta {
  font-size: 11px;
  color: var(--gray-500);
}

.deliverable-card-status-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gray-400);
  margin-right: 4px;
  vertical-align: middle;
}

.deliverable-card-status-dot.active { background: var(--black); }

/* ═══════════════════════════════════════════
   LINK STYLES
   ═══════════════════════════════════════════ */
a.project-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.deliverable-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.folder-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

a.photobook-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.project-card {
  animation: fadeIn 0.4s ease forwards;
  opacity: 0;
}
.project-card:nth-child(1) { animation-delay: 0.05s; }
.project-card:nth-child(2) { animation-delay: 0.1s; }
.project-card:nth-child(3) { animation-delay: 0.15s; }
.project-card:nth-child(4) { animation-delay: 0.2s; }

.folder-card, .folder-add-card {
  animation: fadeIn 0.4s ease forwards;
  opacity: 0;
}
.folder-card:nth-child(1) { animation-delay: 0.05s; }
.folder-card:nth-child(2) { animation-delay: 0.1s; }
.folder-card:nth-child(3) { animation-delay: 0.15s; }
.folder-card:nth-child(4) { animation-delay: 0.2s; }
.folder-add-card { animation-delay: 0.25s; }

.deliverable-card {
  animation: fadeIn 0.4s ease forwards;
  opacity: 0;
}
.deliverable-card:nth-child(1) { animation-delay: 0.05s; }
.deliverable-card:nth-child(2) { animation-delay: 0.1s; }
.deliverable-card:nth-child(3) { animation-delay: 0.15s; }
.deliverable-card:nth-child(4) { animation-delay: 0.2s; }
.deliverable-card:nth-child(5) { animation-delay: 0.25s; }
.deliverable-card:nth-child(6) { animation-delay: 0.3s; }

.stat-card {
  animation: fadeIn 0.3s ease forwards;
  opacity: 0;
}
.stat-card:nth-child(1) { animation-delay: 0.05s; }
.stat-card:nth-child(2) { animation-delay: 0.1s; }
.stat-card:nth-child(3) { animation-delay: 0.15s; }
.stat-card:nth-child(4) { animation-delay: 0.2s; }

/* ═══════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════ */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

/* ═══════════════════════════════════════════
   WordPress admin bar fix
   ═══════════════════════════════════════════ */
body.admin-bar .sidebar { top: 32px; }
body.admin-bar .topbar { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .sidebar { top: 46px; }
  body.admin-bar .topbar { top: 46px; }
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1200px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .kanban { grid-template-columns: 1fr; }
  .viewer-book { width: 480px; height: 340px; }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; }
  .projects-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .viewer-comments { display: none; }
  .viewer-book { width: 100%; height: 300px; }
}
