/* ─── Dashboard layout ────────────────────────────────────────────────────── */
.dash-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ─── Hero bar ────────────────────────────────────────────────────────────── */
.dash-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 48px;
  gap: 24px;
}

.dash-hero h1 {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.5px;
  margin: 0 0 4px;
}

.dash-hero .sub {
  font-size: 14px;
  color: var(--fg-muted);
  font-family: var(--font-body);
}

.dash-plan-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
}

.dp-tier {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.dp-renew {
  font-size: 12px;
  color: var(--fg-muted);
  font-family: var(--font-display);
}

/* ─── Stat row ─────────────────────────────────────────────────────────────── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

.ds-stat {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 20px;
}

.ds-label {
  font-size: 11px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ds-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
}

.ds-sub {
  font-size: 11px;
  color: var(--fg-muted);
  margin-top: 4px;
  font-family: var(--font-display);
}

/* ─── Content groups ──────────────────────────────────────────────────────── */
.section-label {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.content-group + .content-group {
  margin-top: 48px;
}

.cg-heading {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 16px;
  letter-spacing: -0.2px;
}

/* ─── Content cards ───────────────────────────────────────────────────────── */
.content-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.content-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  transition: border-color 0.2s;
}

.content-card:hover {
  border-color: rgba(240, 78, 26, 0.2);
}

.cc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  gap: 12px;
}

.cc-type {
  display: flex;
  align-items: center;
  gap: 8px;
}

.type-chip {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.platform-chip {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 600;
  background: var(--bg-3);
  color: var(--fg-muted);
  padding: 3px 8px;
  border-radius: 100px;
}

.status-badge {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 100px;
}

.badge-pending   { background: rgba(240,78,26,0.15); color: #F04E1A; }
.badge-ready     { background: rgba(40,202,65,0.15); color: #28CA41; }
.badge-scheduled { background: rgba(58,134,255,0.15); color: #3A86FF; }
.badge-rejected  { background: rgba(255,80,80,0.15); color: #FF5050; }

/* ─── Content body ────────────────────────────────────────────────────────── */
.cc-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
  white-space: pre-wrap;
  margin-bottom: 16px;
  padding: 14px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.cc-subject {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 8px;
}

/* ─── Content actions ──────────────────────────────────────────────────────── */
.cc-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover  { opacity: 0.85; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-secondary {
  background: var(--bg-3);
  color: var(--fg-muted);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  color: var(--fg);
}

/* ─── Edit inline ──────────────────────────────────────────────────────────── */
.edit-area {
  width: 100%;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid rgba(240,78,26,0.3);
  border-radius: 8px;
  padding: 12px;
  resize: vertical;
  min-height: 100px;
  margin-bottom: 10px;
  line-height: 1.6;
}

.edit-area:focus {
  outline: none;
  border-color: var(--accent);
}

.edit-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

/* ─── Schedule form ────────────────────────────────────────────────────────── */
.schedule-form {
  margin-top: 12px;
  padding: 16px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.sf-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.sf-label {
  font-size: 12px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--fg-muted);
}

.sf-input {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--fg);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}

.sf-input:focus {
  outline: none;
  border-color: var(--accent);
}

.sf-platform {
  padding: 8px 12px;
  font-size: 13px;
  font-family: var(--font-body);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
}

/* ─── Empty state ──────────────────────────────────────────────────────────── */
.dash-empty {
  text-align: center;
  padding: 80px 24px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.de-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: 0.4;
}

.de-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 10px;
}

.de-sub {
  font-size: 14px;
  color: var(--fg-muted);
  max-width: 360px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

.de-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 8px;
  transition: opacity 0.2s;
}

.de-link:hover { opacity: 0.85; }

/* ─── Login page ──────────────────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px 36px;
}

.login-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--fg);
  margin-bottom: 32px;
}

.login-heading {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}

.login-sub {
  font-size: 14px;
  color: var(--fg-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

.form-field {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--fg);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: rgba(240,78,26,0.5);
}

.btn-login {
  width: 100%;
  background: var(--accent);
  color: white;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  padding: 14px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 8px;
}

.btn-login:hover { opacity: 0.85; }

.form-error {
  font-size: 13px;
  color: #FF5050;
  margin: 12px 0;
  padding: 12px;
  background: rgba(255,80,80,0.1);
  border-radius: 8px;
  border: 1px solid rgba(255,80,80,0.2);
}

.success-banner {
  padding: 16px 20px;
  background: rgba(40,202,65,0.1);
  border: 1px solid rgba(40,202,65,0.25);
  border-radius: 10px;
  margin-bottom: 20px;
}

.sb-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: #28CA41;
  margin-bottom: 4px;
}

.sb-sub {
  font-size: 13px;
  color: var(--fg-muted);
}

.login-note {
  margin-top: 20px;
  font-size: 12px;
  color: var(--fg-muted);
  text-align: center;
  line-height: 1.6;
}

/* ─── Dashboard nav actions ────────────────────────────────────────────────── */
.dash-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logout-btn {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 14px;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.logout-btn:hover {
  color: var(--fg);
  border-color: rgba(245,243,238,0.2);
}

/* ─── Scheduled date display ────────────────────────────────────────────────── */
.scheduled-meta {
  font-size: 12px;
  color: #3A86FF;
  font-family: var(--font-display);
  font-weight: 500;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ─── Edit mode toggle ─────────────────────────────────────────────────────── */
.edit-toggle {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.edit-toggle:hover {
  color: var(--fg);
  border-color: rgba(245,243,238,0.2);
}

/* ─── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .dash-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .sf-row {
    flex-direction: column;
    align-items: stretch;
  }

  .sf-input, .sf-platform {
    width: 100%;
  }
}

/* ─── Calendar ───────────────────────────────────────────────────────────── */
.cal-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.cal-header {
  margin-bottom: 32px;
}

.cal-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.cal-month-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-arrow {
  font-size: 24px;
  color: var(--fg-muted);
  text-decoration: none;
  line-height: 1;
  transition: color 0.2s;
}
.nav-arrow:hover { color: var(--accent); }

.cal-month-label {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.5px;
  min-width: 220px;
  text-align: center;
}

.cal-actions { display: flex; gap: 10px; align-items: center; }

.export-btn { font-size: 12px; font-weight: 600; padding: 8px 16px; }

.posting-limits {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-muted);
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 16px;
  width: fit-content;
}

.pl-label {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 11px;
}
.pl-sep { color: var(--border); }
.pl-value { font-family: var(--font-display); font-weight: 500; }
.pl-platforms { font-family: var(--font-display); opacity: 0.7; }

/* Stats */
.cal-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

.cs-stat {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
}

.cs-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1;
  margin-bottom: 4px;
}

.cs-label {
  font-size: 11px;
  font-family: var(--font-display);
  color: var(--fg-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Calendar grid */
.cal-grid-wrap {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
}

.cal-dow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
  background: var(--bg-3);
}

.dow-cell {
  padding: 10px 8px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border);
}
.cal-week:last-child { border-bottom: none; }

.cal-day {
  min-height: 72px;
  padding: 8px;
  border-right: 1px solid var(--border);
  vertical-align: top;
}
.cal-day:last-child { border-right: none; }
.cal-day--empty { background: var(--bg); }

.cal-day--today { background: rgba(240,78,26,0.06); }

.day-num {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 6px;
}
.day-num--today {
  color: var(--accent);
  background: rgba(240,78,26,0.15);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.day-items {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.di-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s;
}
.di-dot:hover { transform: scale(1.4); }

/* Unscheduled items */
.unwritten-section {
  margin-bottom: 40px;
}

.uw-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.uw-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}

.uw-count {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 12px;
}

.uw-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.uw-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.uw-card-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.uw-type {
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.uw-platform {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
}

.uw-body {
  font-size: 12px;
  color: var(--fg-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.uw-actions { display: flex; flex-direction: column; gap: 8px; }

.uw-inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 11px;
}

/* Legend */
.cal-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--fg-muted);
  font-family: var(--font-display);
}

.leg-label { font-weight: 600; color: var(--fg); }

.leg-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.leg-name { text-transform: capitalize; }
.leg-sep { color: var(--border); }
.leg-note { opacity: 0.7; }

/* Overlay */
.item-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.io-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
}

.io-panel {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  max-width: 520px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.io-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.io-type {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--fg-muted);
  margin-right: 10px;
}

.io-platform {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
}

.io-close {
  background: none;
  border: none;
  color: var(--fg-muted);
  cursor: pointer;
  font-size: 18px;
}

.io-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--fg-muted);
  white-space: pre-wrap;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 20px;
}

.io-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* nav back link */
.nav-back-link {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  text-decoration: none;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: color 0.2s, border-color 0.2s;
}
.nav-back-link:hover { color: var(--fg); border-color: rgba(240,78,26,0.3); }

/* Responsive */
@media (max-width: 768px) {
  .cal-stats { flex-wrap: wrap; }
  .cal-title-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .posting-limits { flex-wrap: wrap; }
  .uw-grid { grid-template-columns: 1fr; }
}