@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #F4F6FA;
  --card: #FFFFFF;
  --border: #E6EAF2;
  --input-border: #DDE3EE;
  --text: #0F172A;
  --text-secondary: #64748B;
  --primary: #4F46E5;
  --primary-hover: #4338CA;
  --primary-soft: #EEF2FF;
  --primary-soft-text: #4338CA;
  --status-draft: #94A3B8;
  --status-review: #F59E0B;
  --status-approved: #10B981;
  --status-approved-text: #047857;
  --status-approved-bg: #ECFDF5;
  --status-scheduled: #3B82F6;
  --status-published: #8B5CF6;
  --status-rejected: #EF4444;
  --linkedin: #0A66C2;
  --linkedin-bg: #E8F1FB;
  --facebook: #1877F2;
  --instagram: #E4405F;
  --radius: 16px;
  --radius-sm: 10px;
  --pill: 999px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font); -webkit-font-smoothing: antialiased; }
body { background: var(--bg); color: var(--text); min-height: 100vh; font-size: 14px; line-height: 1.5; }

/* ── Layout ─────────────────────────────────── */
.app { max-width: 1200px; margin: 0 auto; padding: 24px 20px 40px; }

/* ── Login ──────────────────────────────────── */
.login-screen { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { background: var(--card); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow-md); width: 380px; max-width: 90vw; border: 1px solid var(--border); }
.login-card h1 { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 4px; }
.login-card p { color: var(--text-secondary); margin-bottom: 28px; font-size: 15px; }
.login-card input { width: 100%; padding: 12px 14px; border: 1.5px solid var(--input-border); border-radius: var(--radius-sm); font-size: 16px; background: var(--card); color: var(--text); outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.login-card input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.15); }
.login-card .error { color: var(--status-rejected); font-size: 13px; margin-top: 8px; }
.login-card .btn { width: 100%; margin-top: 8px; }

/* ── Buttons ────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 20px; border: none; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.2s, opacity 0.2s, box-shadow 0.2s; text-decoration: none; line-height: 1; user-select: none; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--card); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-success { background: var(--status-approved); color: #fff; }
.btn-success:hover { opacity: 0.85; }
.btn-danger { background: var(--status-rejected); color: #fff; }
.btn-danger:hover { opacity: 0.85; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; }
.btn-icon { width: 40px; height: 40px; padding: 0; justify-content: center; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── Header ─────────────────────────────────── */
.header { display: flex; justify-content: space-between; align-items: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 20px; box-shadow: var(--shadow); }
.header-left { display: flex; align-items: center; gap: 12px; }
.header-left h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.header-right { display: flex; align-items: center; gap: 8px; }
.clock-badge { font-size: 13px; padding: 4px 14px; background: var(--bg); border-radius: var(--pill); border: 1px solid var(--border); white-space: nowrap; }
.clock-badge.test-mode { border-color: var(--status-review); color: var(--status-review); }
.header-actions { display: flex; align-items: center; gap: 4px; }

/* ── More Menu ──────────────────────────────── */
.more-btn { width: 40px; height: 40px; border: none; background: transparent; border-radius: var(--radius-sm); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: background 0.2s; }
.more-btn:hover { background: var(--bg); }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 4px); background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); min-width: 180px; z-index: 100; display: none; overflow: hidden; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu button { width: 100%; text-align: left; padding: 10px 16px; border: none; background: transparent; font-size: 14px; color: var(--text); cursor: pointer; display: flex; align-items: center; gap: 8px; transition: background 0.15s; }
.dropdown-menu button:hover { background: var(--bg); }
.dropdown-menu button.danger { color: var(--status-rejected); }

/* ── Pipeline ───────────────────────────────── */
.pipeline { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 16px; }
.pipeline-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 12px; cursor: pointer; text-align: center; transition: box-shadow 0.2s, transform 0.2s; box-shadow: var(--shadow); }
.pipeline-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.pipeline-card .status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-bottom: 6px; }
.pipeline-card .count { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }
.pipeline-card .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-secondary); margin-top: 2px; }
.pipeline-card.active { background: var(--primary-soft); border-color: var(--primary); }
.pipeline-card.active .count, .pipeline-card.active .label { color: var(--primary-soft-text); }
.pipeline-card.approved-highlight { background: var(--status-approved-bg); }
.pipeline-card.approved-highlight .count { color: var(--status-approved-text); }

/* ── Week Navigation ────────────────────────── */
.week-nav { display: flex; align-items: center; justify-content: space-between; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow); flex-wrap: wrap; gap: 8px; }
.week-nav .nav-group { display: flex; align-items: center; gap: 8px; }
.week-nav .week-label { font-weight: 600; font-size: 15px; letter-spacing: -0.02em; }
.week-nav .week-num { color: var(--text-secondary); font-size: 12px; }
.week-nav select { height: 34px; padding: 0 28px 0 12px; border-radius: var(--pill); border: 1px solid var(--border); background: var(--card); color: var(--text); font-size: 13px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394A3B8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; cursor: pointer; outline: none; transition: border-color 0.2s; }
.week-nav select:focus { border-color: var(--primary); }

/* ── Week Days ──────────────────────────────── */
.week-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 12px; }
.week-day { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; min-height: 110px; cursor: pointer; transition: box-shadow 0.2s, transform 0.2s; box-shadow: var(--shadow); }
.week-day:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.week-day.today { border-color: var(--primary); border-width: 2px; }
.week-day .day-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.week-day .day-name { font-size: 11px; text-transform: uppercase; color: var(--text-secondary); font-weight: 600; letter-spacing: 0.04em; }
.week-day .day-num { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.week-day .day-label-today { font-size: 10px; background: var(--primary); color: #fff; border-radius: var(--pill); padding: 1px 6px; font-weight: 600; line-height: 1.4; }
.week-day.weekend { background: #FAFBFC; }

/* ── Mini Posts ─────────────────────────────── */
.day-posts { display: flex; flex-direction: column; gap: 3px; }
.day-mini-post { font-size: 11px; padding: 3px 6px; border-radius: 6px; background: var(--bg); display: flex; gap: 4px; align-items: center; line-height: 1.3; transition: background 0.15s; }
.day-mini-post:hover { background: var(--primary-soft); }
.day-mini-post .mini-time { color: var(--text-secondary); font-size: 10px; white-space: nowrap; }
.day-mini-post .mini-network { font-weight: 500; font-size: 10px; white-space: nowrap; }
.day-mini-post .mini-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.day-more { font-size: 10px; color: var(--text-secondary); text-align: center; padding: 2px 0; }

/* ── Legend ─────────────────────────────────── */
.legend { display: flex; gap: 16px; margin-bottom: 16px; font-size: 11px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 4px; color: var(--text-secondary); }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }

/* ── Filters ────────────────────────────────── */
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.filter-chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: var(--pill); border: 1px solid var(--border); background: var(--card); font-size: 13px; cursor: pointer; transition: all 0.2s; color: var(--text); white-space: nowrap; }
.filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.filter-chip.active { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-soft-text); }
.filter-chip .chip-count { font-size: 11px; background: var(--bg); border-radius: var(--pill); padding: 0 6px; line-height: 1.6; }
.filter-chip.active .chip-count { background: rgba(79,70,229,0.1); }
.filter-search { position: relative; }
.filter-search input { height: 34px; padding: 0 12px 0 36px; border: 1.5px solid var(--input-border); border-radius: var(--pill); font-size: 13px; background: var(--card); color: var(--text); outline: none; min-width: 200px; transition: border-color 0.2s, box-shadow 0.2s; }
.filter-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.15); }
.filter-search .search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-secondary); font-size: 14px; pointer-events: none; }

/* ── Posts List ─────────────────────────────── */
.posts-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.post-card { display: flex; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; cursor: pointer; transition: box-shadow 0.2s; box-shadow: var(--shadow); }
.post-card:hover { box-shadow: var(--shadow-md); }
.post-card .post-sidebar { width: 4px; flex-shrink: 0; }
.post-card .post-body { flex: 1; padding: 16px; display: flex; align-items: center; gap: 16px; min-width: 0; }
.post-card .post-content { flex: 1; min-width: 0; }
.post-card .post-subject { font-weight: 600; font-size: 14px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-card .post-meta { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post-card .post-status { display: inline-flex; align-items: center; padding: 2px 12px; border-radius: var(--pill); font-size: 11px; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.post-card .post-actions { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.post-card .post-more-btn { width: 32px; height: 32px; border: none; background: transparent; border-radius: 8px; font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-secondary); transition: background 0.15s; }
.post-card .post-more-btn:hover { background: var(--bg); }

/* ── Network Badge ──────────────────────────── */
.network-badge { display: inline-flex; font-size: 11px; padding: 1px 8px; border-radius: 4px; font-weight: 500; line-height: 1.6; }

/* ── Status Classes ─────────────────────────── */
.status-draft { background: #F1F5F9; color: #94A3B8; }
.status-review { background: #FEF3C7; color: #F59E0B; }
.status-approved { background: #ECFDF5; color: #047857; }
.status-scheduled { background: #DBEAFE; color: #3B82F6; }
.status-published { background: #EDE9FE; color: #8B5CF6; }
.status-rejected { background: #FEE2E2; color: #EF4444; }

/* ── Dot Classes (calendar dots, legacy) ────── */
.dot-draft { background: var(--status-draft); }
.dot-review { background: var(--status-review); }
.dot-approved { background: var(--status-approved); }
.dot-scheduled { background: var(--status-scheduled); }
.dot-published { background: var(--status-published); }
.dot-rejected { background: var(--status-rejected); }

/* ── Team Section ───────────────────────────── */
.team-section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 16px; box-shadow: var(--shadow); }
.team-section h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; letter-spacing: -0.01em; }
.team-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); gap: 12px; flex-wrap: wrap; }
.team-item:last-child { border-bottom: none; }
.team-item .team-text { flex: 1; min-width: 200px; }
.team-item .team-text .team-subject { font-weight: 500; font-size: 14px; }
.team-item .team-text .team-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ── Empty State ────────────────────────────── */
.empty-state { padding: 60px 20px; text-align: center; }
.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.4; }
.empty-state .empty-title { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.empty-state .empty-text { color: var(--text-secondary); margin-bottom: 16px; font-size: 14px; }

/* ── Modal ──────────────────────────────────── */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15,23,42,0.35); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: overlayIn 0.2s ease; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: var(--card); border-radius: 20px; padding: 24px; max-width: 640px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(15,23,42,0.15); animation: modalIn 0.25s cubic-bezier(0.22,1,0.36,1); }
@keyframes modalIn { from { opacity: 0; transform: scale(0.95) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); }

/* ── Form Groups ────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; color: var(--text-secondary); }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px 12px; border: 1.5px solid var(--input-border); border-radius: var(--radius-sm); font-size: 14px; background: var(--card); color: var(--text); outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.15); }
.form-group textarea { min-height: 80px; resize: vertical; font-family: inherit; line-height: 1.5; }
.form-group .char-count { text-align: right; font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.form-group .char-count.over { color: var(--status-rejected); font-weight: 600; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394A3B8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }

/* ── Checkbox Labels ────────────────────────── */
.cb-group { display: flex; gap: 12px; padding: 8px 0; flex-wrap: wrap; }
.cb-label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 14px; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--pill); transition: all 0.2s; user-select: none; }
.cb-label:has(input:checked) { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-soft-text); }
.cb-label input { width: auto; accent-color: var(--primary); }

/* ── Tags Input ─────────────────────────────── */
.tags-input { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; border: 1.5px solid var(--input-border); border-radius: var(--radius-sm); background: var(--card); min-height: 38px; cursor: text; transition: border-color 0.2s; }
.tags-input:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,0.15); }
.tags-input .tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; background: var(--primary-soft); color: var(--primary-soft-text); border-radius: var(--pill); font-size: 12px; font-weight: 500; }
.tags-input .tag .remove-tag { cursor: pointer; font-size: 14px; opacity: 0.7; transition: opacity 0.15s; line-height: 1; }
.tags-input .tag .remove-tag:hover { opacity: 1; }
.tags-input input { border: none; outline: none; background: transparent; color: var(--text); font-size: 14px; flex: 1; min-width: 80px; padding: 2px 4px; }

/* ── Attachments ────────────────────────────── */
.attachments-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.attachment-preview { position: relative; width: 100px; height: 100px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--bg); }
.attachment-preview img, .attachment-preview video { width: 100%; height: 100%; object-fit: cover; }
.attachment-preview .remove-attach { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(15,23,42,0.6); color: #fff; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background 0.15s; }
.attachment-preview .remove-attach:hover { background: rgba(15,23,42,0.8); }
.upload-area { border: 2px dashed var(--input-border); border-radius: 12px; padding: 20px; text-align: center; cursor: pointer; transition: border-color 0.2s, background 0.2s; margin-top: 8px; }
.upload-area:hover { border-color: var(--primary); background: var(--primary-soft); }
.upload-area input { display: none; }
.upload-area span { color: var(--text-secondary); }
.limits-info { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; line-height: 1.4; }
.rejection-box { padding: 8px 12px; background: #FEE2E2; border-radius: 8px; color: var(--status-rejected); font-size: 13px; }
.req-instagram { color: var(--status-rejected); }

/* ── Theme Chips ────────────────────────────── */
.theme-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.theme-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 14px; border-radius: var(--pill); font-size: 13px; cursor: pointer; transition: background 0.2s, border-color 0.2s; border: 1px solid var(--border); background: var(--card); }
.theme-chip:hover { border-color: var(--primary); }
.theme-chip .color-dot { width: 10px; height: 10px; border-radius: 50%; }

/* ── Toast ──────────────────────────────────── */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--text); color: #fff; padding: 12px 20px; border-radius: var(--pill); font-size: 14px; font-weight: 500; z-index: 2000; opacity: 0; transform: translateY(20px); transition: opacity 0.35s cubic-bezier(0.22,1,0.36,1), transform 0.35s cubic-bezier(0.22,1,0.36,1); box-shadow: var(--shadow-md); pointer-events: none; }
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast.error { background: var(--status-rejected); }
.toast.success { background: var(--status-approved); }

/* ── Loading ────────────────────────────────── */
.loading { text-align: center; padding: 40px; color: var(--text-secondary); }

/* ── FAB ────────────────────────────────────── */
.fab { display: none; position: fixed; bottom: 24px; right: 24px; width: 56px; height: 56px; border-radius: 50%; background: var(--primary); color: #fff; border: none; box-shadow: 0 4px 16px rgba(79,70,229,0.35); font-size: 24px; cursor: pointer; z-index: 500; align-items: center; justify-content: center; transition: transform 0.2s, box-shadow 0.2s; }
.fab:hover { transform: scale(1.05); box-shadow: 0 6px 20px rgba(79,70,229,0.4); }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 1024px) {
  .pipeline { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .app { padding: 12px; padding-bottom: 80px; }
  .header { flex-direction: column; gap: 12px; padding: 12px 16px; }
  .header-left { width: 100%; justify-content: space-between; }
  .header-right { width: 100%; justify-content: flex-end; }
  .header-actions .btn-secondary:not(.more-btn) { display: none; }
  .pipeline { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .pipeline-card { flex: 0 0 110px; scroll-snap-align: start; padding: 10px 8px; }
  .week-days { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .week-day { flex: 0 0 120px; scroll-snap-align: start; min-height: 80px; }
  .week-day .day-num { font-size: 16px; }
  .post-card .post-body { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .post-card .post-actions { width: 100%; justify-content: flex-start; }
  .form-row { grid-template-columns: 1fr; }
  .fab { display: flex; }
  .filter-chips { overflow-x: auto; -webkit-overflow-scrolling: touch; flex-wrap: nowrap; padding-bottom: 4px; }
  .filter-chip { flex-shrink: 0; }
  .filter-search { width: 100%; }
  .filter-search input { width: 100%; min-width: 0; }
  .modal { border-radius: 16px; max-height: 85vh; padding: 20px; }
  .modal-actions { flex-wrap: wrap; }
  .week-nav { flex-direction: column; align-items: stretch; }
  .week-nav .nav-group { justify-content: center; }
  .legend { gap: 10px; }
}
@media (max-width: 390px) {
  .pipeline-card { flex: 0 0 90px; }
  .week-day { flex: 0 0 100px; min-height: 70px; padding: 8px; }
  .header-left h1 { font-size: 17px; }
  .post-card .post-subject { font-size: 13px; }
}