/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f0f0f;
  --card: #1a1a1a;
  --border: #2a2a2a;
  --accent: #14EC80;
  --text: #ffffff;
  --text-secondary: #888888;
  --linkedin: #0A66C2;
  --instagram: #E1306C;
  --facebook: #1877F2;
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #22c55e;
  --sidebar-width: 220px;
  --sidebar-collapsed: 64px;
}

html { font-size: 15px; }
body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: 0.85; }

/* ===== LAYOUT ===== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ===== SIDEBAR ===== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width 0.2s ease;
  overflow: hidden;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

.logo-icon { font-size: 1.3rem; }
.sidebar-toggle {
  background: none; border: none; color: var(--text-secondary);
  cursor: pointer; font-size: 1.1rem; padding: 0.25rem;
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  border-radius: 0;
  white-space: nowrap;
}

.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.nav-item.active { color: var(--accent); background: rgba(20,236,128,0.08); }
.nav-item.nav-cta { color: var(--accent); }
.nav-item.nav-logout { color: var(--text-secondary); margin-top: 0.5rem; }

.nav-icon { font-size: 1.1rem; flex-shrink: 0; }
.sidebar-footer { padding: 0.75rem 0; border-top: 1px solid var(--border); }

.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 2rem;
  min-height: 100vh;
}

/* ===== PAGE HEADER ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  gap: 1rem;
}

.page-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
}

.page-actions { display: flex; gap: 0.5rem; align-items: center; }

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary { background: var(--accent); color: #0f0f0f; border-color: var(--accent); }
.btn-primary:hover { background: #0fd472; opacity: 1; color: #0f0f0f; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,0.06); color: var(--text); opacity: 1; }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: white; opacity: 1; }
.btn-accent { background: rgba(20,236,128,0.15); color: var(--accent); border-color: var(--accent); }
.btn-accent:hover { background: rgba(20,236,128,0.25); opacity: 1; }
.btn-full { width: 100%; }
.btn-sm { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ===== CARDS ===== */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 1.25rem;
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.card-header h2, .card-header h3 {
  font-size: 1rem;
  font-weight: 600;
}

.card-body { padding: 1.25rem; }
.card-body.no-pad { padding: 0; }
.card-error { border-color: rgba(239,68,68,0.3); }

/* ===== STATS GRID ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-card-warn { border-color: rgba(245,158,11,0.4); }
.stat-card-info { border-color: rgba(20,236,128,0.3); }
.stat-icon { font-size: 2rem; }
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.25rem; }
.stat-link { color: var(--accent); margin-left: 0.5rem; font-size: 0.75rem; }

/* ===== POSTS LIST ===== */
.posts-list { display: flex; flex-direction: column; gap: 0; }
.post-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.post-row:last-child { border-bottom: none; }
.post-row-content { flex: 1; min-width: 0; }
.post-preview { font-size: 0.875rem; margin-bottom: 0.35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.post-time { font-size: 0.75rem; color: var(--text-secondary); }
.post-row-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* ===== BADGES ===== */
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: capitalize;
}
.badge-linkedin { background: rgba(10,102,194,0.2); color: #4d9fea; border: 1px solid rgba(10,102,194,0.4); }
.badge-instagram { background: rgba(225,48,108,0.2); color: #f06292; border: 1px solid rgba(225,48,108,0.4); }
.badge-facebook { background: rgba(24,119,242,0.2); color: #6da8f7; border: 1px solid rgba(24,119,242,0.4); }
.badge-multi, .badge-accent { background: rgba(20,236,128,0.15); color: var(--accent); border: 1px solid rgba(20,236,128,0.3); }
.media-badge { background: rgba(255,255,255,0.1); color: var(--text-secondary); padding: 0.1rem 0.4rem; border-radius: 4px; font-size: 0.7rem; margin-left: 0.4rem; }

/* ===== STATUS BADGES ===== */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-scheduled { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.3); }
.status-publishing { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.3); animation: pulse 1.5s infinite; }
.status-posted { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.status-failed { background: rgba(239,68,68,0.15); color: #f87171; border: 1px solid rgba(239,68,68,0.3); }
.status-draft { background: rgba(255,255,255,0.08); color: var(--text-secondary); border: 1px solid var(--border); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ===== TABLE ===== */
.table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.table th {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: rgba(255,255,255,0.02); }
.td-content { max-width: 300px; }
.td-content a { color: var(--text); }
.td-date { font-size: 0.8rem; color: var(--text-secondary); white-space: nowrap; }
.td-actions { white-space: nowrap; }

/* ===== FORMS ===== */
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input[type="text"], input[type="email"], input[type="password"], input[type="datetime-local"],
input[type="date"], input[type="number"], textarea, select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 0.6rem 0.875rem;
  transition: border-color 0.15s;
  appearance: none;
  -webkit-appearance: none;
}

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

textarea { resize: vertical; min-height: 100px; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2rem; }

.checkbox-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-size: 0.875rem; color: var(--text); }
.checkbox-label input[type="checkbox"] { width: auto; }

.char-counter { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.35rem; text-align: right; }
.over-limit { color: var(--danger) !important; }

/* ===== PLATFORM CHECKBOXES ===== */
.platform-checkboxes { display: flex; flex-direction: column; gap: 0.5rem; }
.platform-checkbox { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; padding: 0.5rem; border-radius: 6px; border: 1px solid var(--border); transition: background 0.15s; }
.platform-checkbox:hover { background: rgba(255,255,255,0.04); }
.platform-checkbox input[type="checkbox"] { width: auto; accent-color: var(--accent); }
.platform-label { font-size: 0.875rem; font-weight: 600; padding: 0.15rem 0.5rem; border-radius: 4px; }
.platform-linkedin { color: #4d9fea; }
.platform-instagram { color: #f06292; }
.platform-facebook { color: #6da8f7; }

/* ===== COMPOSE LAYOUT ===== */
.compose-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem; align-items: start; }
.compose-sidebar { position: sticky; top: 1rem; }
.compose-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.ai-caption-btn-wrap { flex-shrink: 0; }

/* ===== UPLOAD AREA ===== */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  transition: border-color 0.15s;
  cursor: pointer;
}
.upload-area.drag-over { border-color: var(--accent); background: rgba(20,236,128,0.05); }
.upload-prompt { text-align: center; color: var(--text-secondary); }
.upload-icon { font-size: 2rem; display: block; margin-bottom: 0.5rem; }
.upload-hint { font-size: 0.75rem; margin-top: 0.35rem; }
.media-previews { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.media-preview-item { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }
.video-thumb { display: flex; align-items: center; justify-content: center; width: 80px; height: 80px; background: rgba(255,255,255,0.05); border-radius: 6px; font-size: 0.7rem; text-align: center; padding: 0.25rem; color: var(--text-secondary); }

/* ===== MODALS ===== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-secondary); font-size: 1.3rem; cursor: pointer; line-height: 1; padding: 0; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 1.25rem; }

.ai-result {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(20,236,128,0.05);
  border: 1px solid rgba(20,236,128,0.2);
  border-radius: 8px;
}
.ai-result p { margin-bottom: 0.75rem; font-size: 0.875rem; line-height: 1.6; white-space: pre-wrap; }

/* ===== DETAIL LAYOUT ===== */
.detail-layout { display: grid; grid-template-columns: 1fr 300px; gap: 1.25rem; align-items: start; }
.detail-row { display: flex; flex-direction: column; gap: 0.25rem; margin-bottom: 0.875rem; }
.detail-row:last-child { margin-bottom: 0; }
.detail-label { font-size: 0.75rem; color: var(--text-secondary); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.post-content-full { font-size: 0.9rem; line-height: 1.7; white-space: pre-wrap; }
.post-id-small { font-size: 0.7rem; color: var(--text-secondary); font-family: monospace; }
.error-log { font-size: 0.75rem; color: #f87171; white-space: pre-wrap; font-family: monospace; }

/* ===== MEDIA GRID ===== */
.media-grid { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.media-grid img, .media-grid video { width: 120px; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); }

/* ===== MEDIA LIBRARY ===== */
.media-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
}

.media-library-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.media-library-thumb {
  position: relative;
  aspect-ratio: 1;
  cursor: pointer;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}

.media-library-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}

.media-library-thumb:hover img { transform: scale(1.05); }

.media-library-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity 0.2s;
  font-size: 0.75rem; text-align: center; padding: 0.5rem;
}

.media-library-thumb:hover .media-library-overlay { opacity: 1; }
.video-thumb-icon { font-size: 2.5rem; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.media-library-info { padding: 0.5rem 0.6rem; }
.media-name { font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-meta { font-size: 0.7rem; color: var(--text-secondary); }
.media-delete-btn {
  position: absolute; top: 0.35rem; right: 0.35rem;
  background: rgba(239,68,68,0.8); color: white; border: none;
  border-radius: 50%; width: 22px; height: 22px; cursor: pointer;
  font-size: 0.9rem; line-height: 1; display: none;
  align-items: center; justify-content: center;
}
.media-library-item:hover .media-delete-btn { display: flex; }

/* ===== FILTERS ===== */
.filters-bar { margin-bottom: 1rem; }
.filters-form { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.filters-form select, .filters-form input { width: auto; }

.filter-tabs { display: flex; gap: 0.35rem; margin-bottom: 1rem; }
.tab-btn {
  padding: 0.4rem 0.875rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); background: rgba(255,255,255,0.05); opacity: 1; }
.tab-btn.active { color: var(--accent); border-color: var(--accent); background: rgba(20,236,128,0.08); }

/* ===== COMMENTS ===== */
.comments-list { display: flex; flex-direction: column; }
.comment-row {
  display: flex;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.comment-row:last-child { border-bottom: none; }
.comment-unread { background: rgba(20,236,128,0.03); }
.comment-platform { flex-shrink: 0; }
.comment-body { flex: 1; min-width: 0; }
.comment-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.3rem; flex-wrap: wrap; }
.comment-time { font-size: 0.75rem; color: var(--text-secondary); }
.comment-message { font-size: 0.875rem; margin-bottom: 0.3rem; }
.comment-post-ref { font-size: 0.75rem; color: var(--text-secondary); font-style: italic; }
.reply-preview { font-size: 0.8rem; color: var(--accent); margin-top: 0.4rem; }
.comment-actions { flex-shrink: 0; }
.replied-badge { font-size: 0.75rem; color: var(--success); }

/* ===== TEMPLATES ===== */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.template-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem;
  position: relative;
}

.template-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.6rem; }
.template-header h3 { font-size: 0.95rem; font-weight: 600; }
.template-actions { display: flex; gap: 0.4rem; }
.template-content { font-size: 0.8rem; color: var(--text-secondary); margin-bottom: 0.5rem; line-height: 1.5; }
.template-hashtags { font-size: 0.75rem; color: var(--accent); margin-bottom: 0.4rem; }
.template-meta { font-size: 0.7rem; color: var(--text-secondary); }

/* ===== TOGGLE BUTTON ===== */
.toggle-btn {
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid;
}
.toggle-on { background: rgba(34,197,94,0.15); color: #4ade80; border-color: rgba(34,197,94,0.3); }
.toggle-off { background: rgba(255,255,255,0.05); color: var(--text-secondary); border-color: var(--border); }

/* ===== ANALYTICS ===== */
.heatmap-container { overflow-x: auto; }
.heatmap-grid {
  display: grid;
  grid-template-columns: 40px repeat(24, 1fr);
  gap: 2px;
  min-width: 700px;
}
.heatmap-cell {
  height: 28px;
  border-radius: 3px;
  background: rgba(255,255,255,0.04);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.65rem;
  color: var(--text-secondary);
}
.heatmap-header { background: transparent; font-size: 0.65rem; }
.heatmap-day { background: transparent; font-weight: 600; font-size: 0.7rem; }

/* ===== CALENDAR OVERRIDES ===== */
.fc {
  --fc-border-color: var(--border);
  --fc-button-bg-color: var(--card);
  --fc-button-border-color: var(--border);
  --fc-button-text-color: var(--text);
  --fc-button-hover-bg-color: rgba(255,255,255,0.08);
  --fc-button-active-bg-color: rgba(20,236,128,0.15);
  --fc-today-bg-color: rgba(20,236,128,0.06);
  --fc-page-bg-color: transparent;
  --fc-neutral-bg-color: var(--card);
  --fc-list-event-hover-bg-color: rgba(255,255,255,0.04);
}
.fc-theme-standard .fc-scrollgrid { border-color: var(--border); }
.fc-col-header-cell { background: rgba(255,255,255,0.03); }
.fc-event-draft { border-style: dashed !important; opacity: 0.7; }
.event-platforms { margin-bottom: 0.5rem; }
.event-content { font-size: 0.875rem; margin: 0.75rem 0; line-height: 1.5; }
.event-actions { display: flex; gap: 0.5rem; }
.event-detail {}

/* ===== ALERT ===== */
.alert { padding: 0.75rem 1rem; border-radius: 6px; font-size: 0.875rem; margin-bottom: 1rem; }
.alert-error { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #f87171; }

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary);
}
.empty-state p { margin-bottom: 1rem; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 0.4rem; justify-content: center; margin-top: 1rem; }
.page-btn { padding: 0.4rem 0.75rem; border-radius: 5px; font-size: 0.8rem; border: 1px solid var(--border); color: var(--text-secondary); }
.page-btn:hover { color: var(--text); opacity: 1; }
.page-btn.active { background: rgba(20,236,128,0.15); color: var(--accent); border-color: var(--accent); }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  background: var(--card); border: 1px solid var(--accent);
  color: var(--accent); padding: 0.75rem 1.25rem;
  border-radius: 8px; font-weight: 600; font-size: 0.875rem;
  z-index: 9999;
}

/* ===== LOGIN PAGE ===== */
.login-page {
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 1rem;
}

.login-container { width: 100%; max-width: 380px; }

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 2rem;
}

.login-header { text-align: center; margin-bottom: 2rem; }
.logo-icon-lg { font-size: 2.5rem; display: block; margin-bottom: 0.5rem; }
.login-header h1 { font-size: 1.4rem; font-weight: 700; }
.login-header p { color: var(--text-secondary); font-size: 0.875rem; margin-top: 0.25rem; }
.login-form { display: flex; flex-direction: column; gap: 0; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .sidebar { width: var(--sidebar-collapsed); }
  .nav-label { display: none; }
  .logo-text { display: none; }
  .main-content { margin-left: var(--sidebar-collapsed); padding: 1rem; }
  .compose-layout { grid-template-columns: 1fr; }
  .detail-layout { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .page-header { flex-wrap: wrap; }
  .filters-form { flex-direction: column; align-items: stretch; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); width: var(--sidebar-width); }
  .main-content { margin-left: 0; }
  .nav-label { display: inline; }
  .logo-text { display: inline; }
}
