/* ============================================================
   BWAR Social — Global Stylesheet
   /assets/css/style.css
   ============================================================ */

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #f0f2f5;
  color: #1e293b;
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; }

/* ── Navigation ───────────────────────────────────────────── */
.nav {
  background: linear-gradient(135deg, #f97316 0%, #ec4899 40%, #a855f7 70%, #3b82f6 100%);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 58px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(0,0,0,0.15);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  max-width: 1300px;
}
.nav-brand {
  font-weight: 800;
  font-size: 1.05rem;
  color: white;
  text-decoration: none;
  margin-right: 16px;
  white-space: nowrap;
  letter-spacing: -0.3px;
}
.nav-link {
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  transition: background 0.15s;
  white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,0.15); color: white; }
.nav-link.active { background: rgba(255,255,255,0.25); color: white; font-weight: 600; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-user { color: rgba(255,255,255,0.9); font-size: 0.85rem; font-weight: 500; }
.btn-logout {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  padding: 6px 14px;
  border-radius: 7px;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  transition: background 0.2s;
}
.btn-logout:hover { background: rgba(255,255,255,0.25); }

/* ── Layout ───────────────────────────────────────────────── */
.main { max-width: 1300px; margin: 0 auto; padding: 32px 24px; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.page-title { font-size: 1.6rem; font-weight: 800; color: #f97316; }
.page-subtitle { color: #64748b; font-size: 0.875rem; margin-top: 3px; }

/* ── Shared Buttons ───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 7px;
  border: none;
  font-size: 0.775rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
  white-space: nowrap;
  font-family: inherit;
}
.btn:hover { opacity: 0.85; transform: translateY(-1px); }

.btn-primary    { background: linear-gradient(135deg, #f97316, #a855f7); color: white; box-shadow: 0 3px 10px rgba(249,115,22,0.25); }
.btn-add        { background: linear-gradient(135deg, #f97316, #a855f7); color: white; border: none; padding: 10px 22px; border-radius: 9px; font-size: 0.875rem; font-weight: 700; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 3px 10px rgba(249,115,22,0.3); transition: opacity 0.2s; font-family: inherit; }
.btn-add:hover  { opacity: 0.9; transform: none; }
.btn-save       { background: linear-gradient(135deg, #f97316, #a855f7); color: white; border: none; padding: 10px 24px; border-radius: 8px; font-size: 0.875rem; font-weight: 700; cursor: pointer; font-family: inherit; }
.btn-cancel     { background: #f1f5f9; color: #64748b; border: none; padding: 10px 20px; border-radius: 8px; font-size: 0.875rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-search     { background: linear-gradient(135deg, #f97316, #a855f7); color: white; border: none; padding: 9px 22px; border-radius: 9px; font-size: 0.875rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.btn-manage     { width: 100%; padding: 12px; background: linear-gradient(135deg, #f97316, #a855f7); border: none; border-radius: 10px; color: white; font-size: 0.9rem; font-weight: 700; cursor: pointer; text-decoration: none; display: block; text-align: center; transition: opacity 0.2s; font-family: inherit; }
.btn-manage:hover { opacity: 0.9; }

.btn-calendar   { background: #1e293b; color: white; }
.btn-meta-conn  { background: #1877f2; color: white; }
.btn-generate   { background: #f97316; color: white; }
.btn-edit       { background: #f59e0b; color: white; }
.btn-disconnect { background: #64748b; color: white; }
.btn-delete     { background: #ef4444; color: white; }
.btn-approve    { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #16a34a; padding: 8px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.85rem; transition: all 0.2s; font-family: inherit; }
.btn-approve:hover { background: rgba(34,197,94,0.2); }
.btn-deny       { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); color: #ef4444; padding: 8px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.85rem; font-family: inherit; }
.btn-del        { background: none; border: none; color: #ef4444; font-size: 0.8rem; cursor: pointer; padding: 4px 8px; border-radius: 6px; font-weight: 600; font-family: inherit; }
.btn-del:hover  { background: rgba(239,68,68,0.08); }

/* ── Badges ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
}
.badge-success    { background: #dcfce7; color: #16a34a; }
.badge-warning    { background: #fef9c3; color: #ca8a04; }
.badge-info       { background: #dbeafe; color: #2563eb; }
.badge-danger     { background: #fee2e2; color: #dc2626; }
.badge-purple     { background: #ede9fe; color: #7c3aed; }
.badge-generated  { background: #dcfce7; color: #16a34a; }
.badge-queued     { background: #fef9c3; color: #ca8a04; }
.badge-generating { background: #dbeafe; color: #2563eb; animation: pulse 1.5s infinite; }
.badge-fb         { background: rgba(24,119,242,0.1); color: #1877f2; border: 1px solid rgba(24,119,242,0.2); }
.badge-ig         { background: rgba(225,48,108,0.1); color: #e1306c; border: 1px solid rgba(225,48,108,0.2); }

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

/* ── Flash Messages ───────────────────────────────────────── */
.flash { padding: 12px 18px; border-radius: 9px; margin-bottom: 20px; font-size: 0.875rem; font-weight: 500; }
.flash-success { background: #dcfce7; border: 1px solid #bbf7d0; color: #15803d; }
.flash-error   { background: #fee2e2; border: 1px solid #fecaca; color: #dc2626; }
.flash-warning { background: #fef9c3; border: 1px solid #fde68a; color: #ca8a04; }

/* ── Modal ────────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal { background: white; border-radius: 16px; padding: 32px; width: 100%; max-width: 600px; max-height: 92vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.2); }
.modal h2 { font-size: 1.2rem; font-weight: 800; margin-bottom: 24px; color: #0f172a; }
.modal-footer { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; padding-top: 20px; border-top: 1px solid #f1f5f9; }
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: #94a3b8; }
.modal-close:hover { color: #1e293b; }
.modal-image { width: 100%; border-radius: 10px; margin-bottom: 16px; max-height: 250px; object-fit: cover; }
.modal-image-placeholder { width: 100%; height: 160px; background: #f1f5f9; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 3rem; margin-bottom: 16px; }
.modal-caption { font-size: 0.9rem; line-height: 1.6; color: #334155; white-space: pre-wrap; margin-bottom: 12px; background: #f8fafc; padding: 14px; border-radius: 10px; }
.modal-hashtags { font-size: 0.82rem; color: #3b82f6; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; }
.btn-approve-modal { background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.3); color: #16a34a; padding: 9px 18px; border-radius: 8px; border: none; font-weight: 600; cursor: pointer; font-size: 0.85rem; font-family: inherit; }
.btn-deny-modal    { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.3); color: #dc2626; padding: 9px 18px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.85rem; font-family: inherit; }
.btn-del-modal     { background: rgba(239,68,68,0.05); border: 1px solid rgba(239,68,68,0.2); color: #ef4444; padding: 9px 18px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 0.85rem; margin-left: auto; font-family: inherit; }

/* ── Forms ────────────────────────────────────────────────── */
label { display: block; color: #475569; font-size: 0.8rem; font-weight: 600; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.3px; }
input, textarea, select { width: 100%; padding: 9px 12px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; color: #1e293b; font-size: 0.875rem; resize: vertical; transition: border-color 0.2s, background 0.2s; font-family: inherit; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #f97316; background: white; box-shadow: 0 0 0 3px rgba(249,115,22,0.08); }
select { resize: none; cursor: pointer; }
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 0.875rem; color: #475569; cursor: pointer; }
.form-check input[type=checkbox] { width: auto; cursor: pointer; accent-color: #f97316; margin-bottom: 0; }
.form-divider { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; color: #94a3b8; margin: 20px 0 14px; padding-top: 16px; border-top: 1px solid #f1f5f9; }

/* ── Search Bar ───────────────────────────────────────────── */
.search-bar { display: flex; gap: 10px; margin-bottom: 16px; }
.search-input-wrap { position: relative; flex: 1; max-width: 480px; }
.search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #94a3b8; pointer-events: none; }
.search-input { padding: 9px 14px 9px 38px; }

/* ── Filter Tabs ──────────────────────────────────────────── */
.filter-tabs { display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-tab { padding: 7px 16px; border-radius: 20px; text-decoration: none; font-size: 0.82rem; font-weight: 600; border: 2px solid transparent; transition: all 0.15s; cursor: pointer; }
.filter-tab.all                    { background: linear-gradient(135deg, #f97316, #a855f7); color: white; }
.filter-tab.all.inactive           { background: white; color: #64748b; border-color: #e2e8f0; }
.filter-tab.connected              { background: #dcfce7; color: #16a34a; border-color: #bbf7d0; }
.filter-tab.connected.inactive     { background: white; color: #64748b; border-color: #e2e8f0; }
.filter-tab.notconnected           { background: #fef9c3; color: #ca8a04; border-color: #fde68a; }
.filter-tab.notconnected.inactive  { background: white; color: #64748b; border-color: #e2e8f0; }

/* client portal filter links */
.filters { display: flex; gap: 10px; margin-bottom: 24px; flex-wrap: wrap; align-items: center; }
.filters a { padding: 7px 16px; border-radius: 8px; text-decoration: none; font-size: 0.82rem; font-weight: 500; border: 1px solid #e2e8f0; color: #64748b; background: white; transition: all 0.2s; }
.filters a:hover, .filters a.active { border-color: #f97316; color: #f97316; background: #fffbf5; }
.filters-label { color: #64748b; font-size: 0.8rem; }

/* ── Empty State ──────────────────────────────────────────── */
.empty-state { text-align: center; padding: 80px 24px; color: #94a3b8; background: white; border-radius: 14px; border: 1px solid #e8ecf0; }
.empty-state h3 { font-size: 1.1rem; color: #64748b; margin-bottom: 8px; }

/* ── Info Box ─────────────────────────────────────────────── */
.info-box { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px; padding: 13px 18px; margin-bottom: 20px; font-size: 0.85rem; color: #1d4ed8; display: flex; gap: 10px; align-items: flex-start; }

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #64748b; margin-bottom: 20px; }
.breadcrumb a { color: #f97316; text-decoration: none; font-weight: 500; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── Login Page ───────────────────────────────────────────── */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { background: white; border-radius: 16px; padding: 48px 40px; width: 100%; max-width: 420px; border: 1px solid #e8ecf0; box-shadow: 0 4px 24px rgba(0,0,0,0.08); }
.login-logo h1 { font-size: 2rem; font-weight: 800; background: linear-gradient(135deg, #f97316, #ec4899, #a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-align: center; }
.login-logo p { color: #64748b; font-size: 0.9rem; text-align: center; margin-top: 6px; margin-bottom: 32px; }
.platforms { display: flex; justify-content: center; gap: 12px; margin-top: 28px; font-size: 1.5rem; opacity: 0.3; }

/* ── Client Cards (clients.php) ───────────────────────────── */
.clients-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 20px; }
.client-card { background: white; border-radius: 14px; border: 1px solid #e8ecf0; box-shadow: 0 1px 4px rgba(0,0,0,0.05); overflow: hidden; transition: box-shadow 0.2s; }
.client-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.09); }
.card-top { padding: 18px 20px 14px; display: flex; align-items: flex-start; gap: 14px; border-bottom: 1px solid #f1f5f9; }
.card-body { padding: 14px 20px; font-size: 0.82rem; color: #475569; line-height: 1.6; }
.card-body .field { margin-bottom: 4px; }
.card-body .field strong { color: #334155; }
.card-body .field.about { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.card-actions { padding: 12px 20px 16px; display: flex; flex-wrap: wrap; gap: 7px; border-top: 1px solid #f1f5f9; }
.client-logo    { width: 54px; height: 54px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
.client-logo-ph { width: 54px; height: 54px; border-radius: 10px; background: linear-gradient(135deg, #f97316, #a855f7); display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 800; color: white; flex-shrink: 0; }
.client-main h3       { font-size: 1rem; font-weight: 700; color: #0f172a; margin-bottom: 2px; }
.client-main .industry { font-size: 0.78rem; color: #64748b; margin-bottom: 4px; }
.client-main .website  { font-size: 0.78rem; color: #3b82f6; text-decoration: none; }
.client-main .website:hover { text-decoration: underline; }
.field        { margin-bottom: 4px; font-size: 0.82rem; color: #475569; }
.field strong { color: #334155; }
.field.about  { -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.meta-connected    { color: #16a34a; font-weight: 600; }
.meta-disconnected { color: #94a3b8; }

/* ── Calendar (calendar.php) ──────────────────────────────── */
.calendar { background: white; border-radius: 16px; border: 1px solid #e2e8f0; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,0.04); }
.controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav a { background: white; border: 1px solid #e2e8f0; color: #1e293b; padding: 8px 14px; border-radius: 8px; text-decoration: none; font-size: 0.9rem; font-weight: 500; transition: all 0.2s; }
.month-nav a:hover { border-color: #f97316; color: #f97316; }
.month-label { font-size: 1.1rem; font-weight: 700; min-width: 160px; text-align: center; }
.cal-header { display: grid; grid-template-columns: repeat(7, 1fr); background: #f8fafc; border-bottom: 1px solid #e2e8f0; }
.cal-day-label { text-align: center; padding: 12px 8px; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #64748b; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { border-right: 1px solid #f1f5f9; border-bottom: 1px solid #f1f5f9; min-height: 120px; padding: 8px; }
.cal-cell:nth-child(7n) { border-right: none; }
.cal-cell.empty { background: #fafafa; }
.cal-cell.today { background: #fffbf5; }
.cal-cell.today .day-num { background: linear-gradient(135deg, #f97316, #a855f7); color: white; border-radius: 50%; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.day-num { font-size: 0.85rem; font-weight: 600; color: #64748b; margin-bottom: 6px; width: 26px; height: 26px; display: flex; align-items: center; justify-content: center; }
.post-pill { border-radius: 6px; padding: 3px 7px; margin-bottom: 3px; font-size: 0.72rem; cursor: pointer; transition: opacity 0.2s; display: flex; align-items: center; gap: 4px; line-height: 1.3; }
.post-pill:hover { opacity: 0.8; }
.post-pill-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.more-posts { font-size: 0.7rem; color: #94a3b8; padding: 2px 4px; cursor: pointer; }
.more-posts:hover { color: #f97316; }

/* ── Photos Page (photos.php) ─────────────────────────────── */
.client-card-top { display: flex; align-items: center; gap: 14px; }
.client-name { font-size: 1rem; font-weight: 700; color: #0f172a; }
.client-photo-count { font-size: 0.82rem; color: #64748b; margin-top: 3px; }
.photo-count-badge { display: inline-flex; align-items: center; gap: 5px; }
.photo-count-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; }
.photo-count-badge.zero .dot { background: #94a3b8; }
.section-header { background: white; border-radius: 16px; border: 1px solid #e2e8f0; padding: 24px 28px; margin-bottom: 24px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.section-header-left { display: flex; align-items: center; gap: 16px; }
.section-header h2 { font-size: 1.3rem; font-weight: 800; color: #0f172a; }
.section-header p { color: #64748b; font-size: 0.85rem; margin-top: 3px; }
.upload-zone { background: white; border: 2px dashed #e2e8f0; border-radius: 16px; padding: 48px 32px; text-align: center; margin-bottom: 28px; cursor: pointer; transition: all 0.2s; }
.upload-zone:hover, .upload-zone.dragover { border-color: #f97316; background: #fffbf5; }
.upload-zone h3 { font-size: 1.05rem; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.upload-zone p { color: #64748b; font-size: 0.85rem; margin-bottom: 20px; text-transform: none; letter-spacing: 0; font-weight: 400; }
.preview-strip { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 20px; }
.preview-img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; border: 2px solid #e2e8f0; }
.upload-submit { text-align: center; margin-top: -12px; margin-bottom: 28px; display: none; }
.photos-section-title { font-size: 1rem; font-weight: 700; color: #0f172a; margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.photos-count { font-size: 0.82rem; color: #64748b; font-weight: 400; }
.photos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.photo-card { background: white; border-radius: 12px; border: 1px solid #e2e8f0; overflow: hidden; transition: all 0.2s; }
.photo-card:hover { border-color: #cbd5e1; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.photo-img { width: 100%; height: 140px; object-fit: cover; display: block; }
.photo-footer { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; }
.photo-date { font-size: 0.73rem; color: #94a3b8; }

/* ── Client Portal (client/index.php) ─────────────────────── */
.biz-header { background: white; border-radius: 16px; padding: 24px 28px; margin-bottom: 28px; border: 1px solid #e2e8f0; display: flex; align-items: center; gap: 20px; }
.biz-name { font-size: 1.4rem; font-weight: 700; }
.biz-meta { color: #64748b; font-size: 0.9rem; margin-top: 4px; }
.platform-badges { display: flex; gap: 8px; margin-top: 8px; }
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.post-card { background: white; border-radius: 16px; border: 1px solid #e2e8f0; overflow: hidden; transition: border-color 0.2s; }
.post-card.pending { border-color: rgba(249,115,22,0.3); }
.post-image { width: 100%; height: 200px; object-fit: cover; }
.post-image-placeholder { width: 100%; height: 200px; background: #f8fafc; display: flex; align-items: center; justify-content: center; font-size: 3rem; }
.post-body { padding: 16px 18px; }
.post-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.post-date { font-size: 0.8rem; color: #64748b; }
.status-badge { padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.status-pending   { background: rgba(245,158,11,0.12); color: #d97706; }
.status-approved  { background: rgba(34,197,94,0.12);  color: #16a34a; }
.status-published { background: rgba(59,130,246,0.12); color: #2563eb; }
.status-denied    { background: rgba(239,68,68,0.12);  color: #dc2626; }
.status-failed    { background: rgba(239,68,68,0.12);  color: #dc2626; }
.post-title    { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.post-caption  { font-size: 0.85rem; color: #475569; line-height: 1.5; margin-bottom: 8px; white-space: pre-wrap; }
.post-hashtags { font-size: 0.78rem; color: #3b82f6; margin-bottom: 12px; }
.post-actions  { display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid #f1f5f9; }
.edit-toggle { font-size: 0.78rem; color: #f97316; cursor: pointer; text-decoration: underline; margin-bottom: 8px; display: inline-block; }
.edit-area { width: 100%; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px; color: #1e293b; font-size: 0.85rem; resize: vertical; margin-bottom: 10px; display: none; font-family: inherit; }
.edit-area.visible { display: block; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav { padding: 0 16px; }
  .main { padding: 20px 16px; }
  .clients-grid { grid-template-columns: 1fr; }
  .posts-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: column; align-items: flex-start; }
  .login-card { padding: 32px 24px; }
}

/* ── Calendar stat cards ─────────────────────────── */
.stats-cards {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.stat-card {
  flex: 1;
  min-width: 110px;
  border: 1.5px solid;
  border-radius: 12px;
  padding: 16px 14px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.stat-card-icon {
  font-size: 1.4rem;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card-num {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1;
}
.stat-card-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}