:root{
  --brand:#c2004b;
  --brand-strong:#8a0035;
  --brand-soft:rgba(194,0,75,.12);
  --sand:#d9d5d4;
  --bg:#f6f3f1;
  --bg-2:#efe9e6;
  --panel:#ffffff;
  --panel-2:#fcfaf8;
  --text:#1f1a1c;
  --muted:#6f6a70;
  --border:#e6dfdc;
  --shadow: 0 24px 60px rgba(23, 18, 16, .12);
  --shadow-soft: 0 14px 28px rgba(23, 18, 16, .08);
  --radius:20px;
  --radius-sm:14px;
  --font-body:"DM Sans","Segoe UI",Tahoma,sans-serif;
  --font-display:"DM Sans","Segoe UI",Tahoma,sans-serif;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--text);
  background:
    radial-gradient(900px 520px at 8% -10%, rgba(194,0,75,.18), transparent 60%),
    radial-gradient(900px 520px at 92% 8%, rgba(217,213,212,.95), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg-2));
}

h1,h2,h3,h4,.brand-title,.hello,.tab,.btn,.side-nav-item,.post-caption,.day-post-caption{
  font-family:var(--font-display);
}

button,input,select,textarea{ font-family:inherit; }

:focus-visible{
  outline: 3px solid rgba(194,0,75,.28);
  outline-offset: 2px;
}

/* Layout */
.layout{
  display:flex;
  min-height:100vh;
}

/* Sidebar */
.sidebar{
  width:290px;
  background: rgba(255,255,255,.92);
  color:var(--text);
  padding:22px 18px;
  display:flex;
  flex-direction:column;
  gap:18px;
  position:sticky;
  top:0;
  height:100vh;
  border-right: 1px solid var(--border);
  box-shadow: 8px 0 26px rgba(23,18,16,.08);
  backdrop-filter: blur(14px);
}
.sidebar::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width:6px;
  background: linear-gradient(180deg, var(--brand), #ff5a7a);
  border-radius: 0 10px 10px 0;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:4px 4px 6px;
  position:relative;
  z-index:1;
}

.brand-logo-wrap{
  width:54px;
  height:54px;
  border-radius:18px;
  background: linear-gradient(180deg, #fff, #f6f2f0);
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 12px 24px rgba(23,18,16,.14);
  overflow:hidden;
  border: 1px solid rgba(194,0,75,.18);
}

.brand-logo{
  width:42px;
  height:42px;
  object-fit:contain;
  display:block;
}

.brand-title{
  font-weight:800;
  font-size:16px;
  letter-spacing:.2px;
}
.brand-sub{
  font-size:12px;
  color: var(--muted);
}

.side-nav{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:2px;
  position:relative;
  z-index:1;
}

.side-nav-item{
  border:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding:12px 14px;
  border-radius:14px;
  background: var(--panel);
  color: var(--text);
  font-weight:700;
  border: 1px solid var(--border);
  transition: all .18s ease;
}
.side-nav-item:hover{
  border-color: rgba(194,0,75,.28);
  transform: translateY(-1px);
  box-shadow: var(--shadow-soft);
}
.side-nav-item.is-active{
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 18px 34px rgba(194,0,75,.28);
}
.nav-ic{ width:18px; height:18px; display:inline-flex; }
.nav-ic svg{ width:18px; height:18px; }

.profiles{
  margin-top:2px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  position:relative;
  z-index:1;
}

.profiles-head{
  display:flex;
  flex-direction:column;
  gap:10px;
  margin-bottom:10px;
}
.profiles-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.profiles-hint{
  font-size:11px;
  color: var(--muted);
  line-height:1.35;
}
.profiles-title{
  font-weight:800;
  font-size:13px;
  letter-spacing:.2px;
}

.chk{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 10px;
  border-radius:12px;
  cursor:pointer;
  user-select:none;
  border: 1px solid transparent;
}
.chk:hover{ background: rgba(194,0,75,.05); border-color: rgba(194,0,75,.14); }
.chk input{ transform: scale(1.05); }
.chk span{ font-size:13px; font-weight:700; }

.all-profiles{
  margin-bottom:8px;
  background: rgba(194,0,75,.06);
  border: 1px solid rgba(194,0,75,.14);
}

.profiles-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:8px;
  max-height: 250px;
  overflow:auto;
  padding-right:4px;
}

.profiles-list::-webkit-scrollbar{ width:10px; }
.profiles-list::-webkit-scrollbar-thumb{
  background: rgba(31,26,28,.18);
  border-radius:999px;
  border: 3px solid rgba(0,0,0,0);
  background-clip: padding-box;
}

.profile-item{
  display:flex;
  align-items:center;
  gap:10px;
  padding:9px 10px;
  border-radius:14px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.profile-item:hover{ border-color: rgba(194,0,75,.22); }
.profile-name{ font-weight:800; font-size:13px; }
.profile-sub{ font-size:11px; color: var(--muted); margin-top:2px; }
.profile-text{ display:flex; flex-direction:column; line-height:1.1; }
.profile-ic{
  width:30px;
  height:30px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(194,0,75,.08);
  color: var(--brand-strong);
}
.profile-ic svg{ width:18px; height:18px; }

.coming-soon{
  margin-top:12px;
  padding-top:10px;
  border-top: 1px dashed rgba(31,26,28,.12);
}
.coming-soon-title{
  font-size:11px;
  font-weight:800;
  letter-spacing:.12em;
  text-transform:uppercase;
  color: var(--muted);
  margin-bottom:8px;
}
.coming-soon-row{ display:flex; flex-wrap:wrap; gap:8px; }

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  border-radius:999px;
  padding:8px 10px;
  font-size:12px;
  font-weight:700;
  background: #fff;
  border: 1px solid var(--border);
}
.pill-ic{ width:16px; height:16px; display:inline-flex; }
.pill-ic svg{ width:16px; height:16px; }
.pill-disabled{ opacity:.7; cursor:not-allowed; }
.pill-mini{ padding:4px 8px; font-size:11px; }

/* Content */
.content{
  flex:1;
  padding: 22px 24px 28px;
  min-width: 0;
}

.topbar{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin-bottom:16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
}
.hello{
  font-size:22px;
  font-weight:800;
}
.subhello{
  color: var(--muted);
  font-size:13px;
  margin-top:4px;
}

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

.search-wrap{ position:relative; }
.search{
  width: 270px;
  max-width: 54vw;
  padding: 10px 36px 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  outline: none;
  box-shadow: var(--shadow-soft);
  font-size:13px;
}
.search:focus{
  border-color: rgba(194,0,75,.45);
  box-shadow: 0 0 0 4px rgba(194,0,75,.10), var(--shadow-soft);
}
.search-ic{
  position:absolute;
  right:10px;
  top:50%;
  transform: translateY(-50%);
  width:18px; height:18px;
  color: #9a9092;
}
.search-ic svg{ width:18px; height:18px; }

/* Buttons */
.btn{
  border:none;
  cursor:pointer;
  border-radius: 14px;
  padding: 10px 14px;
  font-weight:700;
  font-size:13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  transition: all .18s ease;
  user-select:none;
}
.btn:active{ transform: translateY(1px); }

.btn-primary{
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  color:#fff;
  box-shadow: 0 16px 34px rgba(194,0,75,.28);
}
.btn-primary:hover{
  transform: translateY(-1px);
  box-shadow: 0 22px 44px rgba(194,0,75,.36);
}

.btn-outline{
  background: #fff;
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-soft);
}
.btn-outline:hover{
  border-color: rgba(194,0,75,.35);
  box-shadow: 0 0 0 4px rgba(194,0,75,.08), var(--shadow-soft);
}

.btn-soft{
  background: rgba(194,0,75,.08);
  border: 1px solid rgba(194,0,75,.20);
  color: var(--brand-strong);
}
.btn-soft:hover{ background: rgba(194,0,75,.14); }

.btn-sm{
  padding: 8px 12px;
  border-radius: 12px;
  font-size:12px;
}

/* Views */
.view{ display:none; }
.view.is-active{ display:block; }

.card{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Dashboard grid */
.dashboard-grid{
  display:grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items:start;
}
@media (max-width: 1100px){
  .dashboard-grid{ grid-template-columns: 1fr; }
  .right-col{ order: 2; }
}

/* Posts card */
.posts-card{ padding: 12px; }
.card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 6px 6px 10px;
}
.tabs{ display:flex; gap:8px; flex-wrap:wrap; }
.tab{
  border:none;
  cursor:pointer;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight:700;
  padding: 9px 12px;
  border-radius: 14px;
  transition: all .15s ease;
}
.tab:hover{ border-color: rgba(194,0,75,.35); }
.tab.is-active{
  background: rgba(194,0,75,.10);
  border-color: rgba(194,0,75,.35);
  color: var(--brand-strong);
}

.link-btn{
  border:none;
  background:none;
  cursor:pointer;
  color: var(--muted);
  font-weight:700;
  font-size:12px;
}
.link-btn:hover{ color: var(--brand-strong); }

.posts-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
  padding: 6px;
}

/* Post card */
.post-card{
  border-radius: 18px;
  border: 1px solid var(--border);
  overflow:hidden;
  background: #fff;
  box-shadow: var(--shadow-soft);
  cursor:pointer;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.post-card:hover{
  transform: translateY(-2px);
  border-color: rgba(194,0,75,.30);
  box-shadow: 0 18px 34px rgba(15, 23, 42, .12);
}
.post-card.is-selected{
  outline: 4px solid rgba(194,0,75,.18);
  border-color: rgba(194,0,75,.45);
}

.post-thumb{
  height: 140px;
  background: #f5f1ef;
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
}
.post-thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.post-thumb .thumb-empty{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#c9c0c2;
  font-size:44px;
  font-weight:700;
}
.post-thumb .thumb-video{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#9a8f92;
  font-weight:700;
  gap:10px;
}
.thumb-chip{
  position:absolute;
  top:10px;
  left:10px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  border: 1px solid var(--border);
  font-weight:700;
  font-size:11px;
  color: var(--text);
}

.net-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  display:inline-block;
}
.net-dot.fb{ background:#1877F2; }
.net-dot.ig{ background: radial-gradient(circle at 30% 30%, #ffd776, #f56040 35%, #bc2a8d 65%, #4c68d7); }
.net-dot.ln{ background:#0A66C2; }

.post-body{ padding: 12px; }
.post-meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  font-size:12px;
  color: var(--muted);
  margin-bottom:6px;
}
.post-caption{
  font-size:13px;
  font-weight:700;
  line-height:1.25;
  min-height: 36px;
  word-break: break-word;
}
.post-foot{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.status-pill{
  border-radius:999px;
  padding: 6px 10px;
  font-size:11px;
  font-weight:700;
  border:1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
}
.status-pill.sent{ background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.25); color: #065f46; }
.status-pill.failed{ background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.20); color: #7f1d1d; }
.status-pill.queued{ background: rgba(59,130,246,.10); border-color: rgba(59,130,246,.18); color:#1e3a8a; }
.status-pill.processing{ background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.22); color:#78350f; }

.post-time{ font-weight:700; color: #1f1a1c; font-size:12px; }

/* Right column */
.right-col{ display:flex; flex-direction:column; gap:12px; }
.mini-card{ padding: 12px; }
.mini-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.mini-head h3{ margin:0; font-size:14px; font-weight:800; }
.mini-badge{
  font-size:11px;
  font-weight:700;
  border-radius:999px;
  padding: 6px 10px;
  background: rgba(194,0,75,.10);
  border: 1px solid rgba(194,0,75,.22);
  color: var(--brand-strong);
}

.muted{ color: var(--muted); }

.analytics-card{
  position:relative;
  overflow:hidden;
}
.analytics-card::after{
  content:"";
  position:absolute;
  inset:auto -30% -40% -30%;
  height:120px;
  background: radial-gradient(220px 120px at 50% 50%, rgba(194,0,75,.10), transparent 70%);
  pointer-events:none;
}
.insights{ font-size:13px; color: var(--text); }
.insights-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:10px;
  margin-bottom:10px;
}
.kpi-card{
  border-radius: 14px;
  border: 1px solid rgba(194,0,75,.16);
  background: linear-gradient(180deg, rgba(194,0,75,.08), rgba(255,255,255,.95));
  padding: 10px;
  display:flex;
  flex-direction:column;
  gap:6px;
  min-height: 76px;
  box-shadow: var(--shadow-soft);
}
.kpi-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.kpi-label{
  font-size:11px;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
  color: var(--brand-strong);
}
.kpi-icon{
  width:26px;
  height:26px;
  border-radius: 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color: #fff;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
  box-shadow: 0 10px 18px rgba(194,0,75,.28);
}
.kpi-icon svg{ width:14px; height:14px; }
.kpi-value{
  font-size:20px;
  font-weight:800;
  color: var(--text);
  letter-spacing:.2px;
}
.insight-meta{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.insight-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-2);
}
.insight-row span:first-child{ color: var(--muted); font-weight:700; }
.insight-row a{
  color: var(--brand-strong);
  font-weight:800;
  text-decoration:none;
}
.insight-row a:hover{ text-decoration:underline; }
.insights-state{
  border-radius: 14px;
  border: 1px dashed rgba(194,0,75,.30);
  background: rgba(194,0,75,.06);
  padding: 12px;
  font-weight:800;
}
.insights-state .muted{ display:block; margin-top:6px; font-weight:700; }

.comments{
  max-height: 220px;
  overflow:auto;
  display:flex;
  flex-direction:column;
  gap:8px;
  padding-right:4px;
}
.comments::-webkit-scrollbar{ width:10px; }
.comments::-webkit-scrollbar-thumb{
  background: rgba(31,26,28,.18);
  border-radius:999px;
  border: 3px solid rgba(0,0,0,0);
  background-clip: padding-box;
}

.comments-card .mini-head{
  margin-bottom:12px;
}
.comment-item{
  border:1px solid var(--border);
  background: #fff;
  border-radius: 16px;
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
}
.comment-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.comment-author{ font-weight:800; color: var(--text); font-size:13px; }
.comment-time{ font-size:12px; color: var(--muted); }
.comment-text{ font-size:13px; color: var(--text); line-height:1.3; }
.comment-reply{
  margin-top:8px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-weight:700;
  font-size:12px;
  color: var(--brand-strong);
  cursor:pointer;
  user-select:none;
}
.comment-reply:hover{ text-decoration: underline; }
.comment-empty{
  border-radius: 14px;
  border: 1px dashed rgba(194,0,75,.25);
  background: rgba(194,0,75,.06);
  padding: 12px;
  font-weight:800;
}
.comment-empty .muted{ display:block; margin-top:6px; font-weight:700; }

.reply-label{
  font-size:12px;
  font-weight:700;
  color: var(--brand-strong);
  max-width: 160px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.comment-form{
  margin-top:10px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.comment-input-wrap{
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px;
  box-shadow: var(--shadow-soft);
}
.comment-hint{
  font-size:11px;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color: var(--brand-strong);
  margin-bottom:6px;
}
.comment-form textarea{
  width:100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px 12px;
  font-family: inherit;
  font-size:13px;
  outline:none;
  resize: vertical;
  min-height: 64px;
}
.comment-form textarea:focus{
  border-color: rgba(194,0,75,.45);
  box-shadow: 0 0 0 4px rgba(194,0,75,.10);
}
.comment-actions{ display:flex; justify-content:flex-end; gap:8px; }

.activity{ display:flex; flex-direction:column; gap:10px; }
.activity-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 10px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-weight:700;
}
.activity-row span:first-child{ color: var(--muted); font-weight:600; }

.help-card{
  padding: 14px;
  background: linear-gradient(160deg, rgba(194,0,75,.10), rgba(255,255,255,.96));
}
.help-card h3{ margin:0 0 6px; font-size:14px; font-weight:800; }
.help-actions{ display:flex; gap:8px; margin-top:10px; }

/* Empty state */
.empty-state{
  margin: 10px 6px 6px;
  padding: 20px;
  border: 1px dashed rgba(194,0,75,.35);
  border-radius: 16px;
  background: rgba(194,0,75,.06);
  text-align:center;
}
.empty-title{ font-size:15px; font-weight:800; }
.empty-sub{ margin-top:6px; color: var(--muted); font-size:13px; }
.hidden{ display:none !important; }

/* Calendar view */
.calendar-wrap{
  display:grid;
  grid-template-columns: 1fr 420px;
  gap: 16px;
}
@media (max-width: 1200px){
  .calendar-wrap{ grid-template-columns: 1fr; }
}
.calendar-top{
  grid-column: 1 / -1;
  padding: 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
}
.cal-title{ margin:0; font-size:18px; font-weight:800; }
.cal-sub{ color: var(--muted); margin-top:4px; font-size:13px; }
.calendar-top-actions{ display:flex; gap:10px; flex-wrap:wrap; }

.calendar-grid-card{ padding: 12px; }
.calendar-weekdays{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}
.week-pill{
  background: rgba(194,0,75,.10);
  border: 1px solid rgba(194,0,75,.20);
  color: var(--brand-strong);
  border-radius: 999px;
  padding: 8px 10px;
  font-weight:700;
  font-size:12px;
  text-align:center;
}

.calendar-grid{
  display:grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  padding: 6px;
}
.day-circle{
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-soft);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight:700;
  font-size:18px;
  color: #1f1a1c;
  position:relative;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.day-circle:hover{
  transform: translateY(-2px);
  border-color: rgba(194,0,75,.30);
  box-shadow: 0 18px 34px rgba(15, 23, 42, .12);
}
.day-circle.is-muted{ opacity:.35; cursor: default; }
.day-circle.is-muted:hover{
  transform:none;
  box-shadow: var(--shadow-soft);
  border-color: var(--border);
}
.day-circle.is-today{
  outline: 4px solid rgba(194,0,75,.12);
  border-color: rgba(194,0,75,.35);
}
.day-circle.is-selected{
  background: linear-gradient(180deg, rgba(194,0,75,.12), rgba(194,0,75,.05));
  border-color: rgba(194,0,75,.45);
  outline: 4px solid rgba(194,0,75,.14);
}
.day-dot{
  position:absolute;
  bottom: 10px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
  box-shadow: 0 8px 18px rgba(194,0,75,.20);
}
.day-dot.multi{
  width: 10px;
  height: 10px;
  background: linear-gradient(180deg, var(--brand), var(--brand-strong));
}

.calendar-day{ padding: 12px; }
.calendar-day-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.calendar-day-head h3{ margin:0; font-size:14px; font-weight:800; }
.calendar-day-list{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-height: 520px;
  overflow:auto;
  padding-right:4px;
}
.calendar-day-list::-webkit-scrollbar{ width:10px; }
.calendar-day-list::-webkit-scrollbar-thumb{
  background: rgba(31,26,28,.18);
  border-radius:999px;
  border: 3px solid rgba(0,0,0,0);
  background-clip: padding-box;
}
.day-post{
  border:1px solid var(--border);
  background: var(--panel-2);
  border-radius: 14px;
  padding: 10px;
  cursor:pointer;
  transition: all .15s ease;
}
.day-post:hover{
  border-color: rgba(194,0,75,.30);
  transform: translateY(-1px);
}
.day-post-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:6px;
}
.day-post-caption{ font-weight:700; font-size:13px; line-height:1.2; }
.day-post-meta{ font-size:12px; color: var(--muted); font-weight:700; }

/* LinkedIn view */
.linkedin-wrap{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.linkedin-banner{
  padding: 14px 16px;
  border: 1px dashed rgba(194,0,75,.35);
  background: rgba(194,0,75,.06);
}
.linkedin-banner-title{
  font-size:15px;
  font-weight:800;
}
.linkedin-banner-sub{
  margin-top:6px;
  font-size:13px;
  color: var(--muted);
  font-weight:600;
}
.linkedin-grid{
  display:grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items:start;
}
.linkedin-connect{ padding: 14px; }
.linkedin-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top: 6px;
}
.linkedin-status{
  padding: 12px;
  background: linear-gradient(180deg, rgba(194,0,75,.08), rgba(255,255,255,.95));
}
.linkedin-status-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 10px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-weight:700;
  margin-bottom:10px;
}
.linkedin-status-label{ color: var(--muted); font-weight:700; }
.linkedin-status-pill{
  border-radius:999px;
  padding: 6px 10px;
  font-size:11px;
  font-weight:800;
  border:1px solid var(--border);
  background: rgba(148,163,184,.20);
  color: #334155;
}
.linkedin-status-pill.is-off{
  background: rgba(239,68,68,.10);
  border-color: rgba(239,68,68,.22);
  color: #7f1d1d;
}
.linkedin-empty{
  padding: 16px;
}
.linkedin-empty h3{ margin:0 0 6px; font-size:15px; font-weight:800; }
.linkedin-empty p{ margin:0 0 12px; }
.linkedin-empty-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap:10px;
}
.linkedin-empty-item{
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel-2);
  padding: 10px;
  font-weight:700;
  color: #1f1a1c;
}

/* Modal */
.modal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 22px;
  z-index: 999;
}
.modal-backdrop{
  position:absolute;
  inset:0;
  background: rgba(25, 16, 18, .55);
  backdrop-filter: blur(10px);
}
.modal-card{
  position:relative;
  width: min(1050px, 96vw);
  max-height: 90vh;
  overflow:auto;
  background: #fff;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 30px 90px rgba(0,0,0,.38);
}
.modal-head{
  padding: 16px 16px 10px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.modal-title h2{ margin:0; font-size:18px; font-weight:800; }
.modal-title p{ margin:4px 0 0; font-size:13px; }
.modal-close{
  border:none;
  cursor:pointer;
  width:40px;
  height:40px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-size:18px;
  font-weight:700;
  line-height:1;
}
.modal-close:hover{
  border-color: rgba(194,0,75,.30);
  box-shadow: 0 0 0 4px rgba(194,0,75,.10);
}
.modal-body{ padding: 14px 16px 18px; }

.platform-tabs{ display:flex; gap:10px; padding-bottom: 12px; }
.plat-tab{
  border:none;
  cursor:pointer;
  width:44px;
  height:44px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:center;
  transition: all .15s ease;
}
.plat-tab:hover{ border-color: rgba(194,0,75,.30); }
.plat-tab.is-active{
  background: rgba(194,0,75,.10);
  border-color: rgba(194,0,75,.35);
  box-shadow: 0 0 0 4px rgba(194,0,75,.10);
}
.plat-tab.is-disabled{ opacity:.45; cursor:not-allowed; }
.plat-ic{ width:22px; height:22px; display:inline-flex; }
.plat-ic svg{ width:22px; height:22px; }
.plat-ic.fb{ color:#1877F2; }
.plat-ic.ig{ color:#bc2a8d; }
.plat-ic.ln{ color:#0A66C2; }

.hidden-select{ display:none; }

.publish-form{ margin-top: 8px; }

.publish-grid{
  display:grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 14px;
  align-items:start;
}
@media (max-width: 980px){
  .publish-grid{ grid-template-columns: 1fr; }
}

.field{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom: 12px;
}
.field label{ font-size:12px; font-weight:800; color: #1f1a1c; }
.field-hint{ font-size:12px; color: var(--muted); }

.publish-left,.publish-right{
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
}

select, input[type="url"], input[type="datetime-local"], textarea{
  width:100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px 12px;
  font-family: inherit;
  font-size:13px;
  outline:none;
  transition: all .15s ease;
}
select:focus, input:focus, textarea:focus{
  border-color: rgba(194,0,75,.45);
  box-shadow: 0 0 0 4px rgba(194,0,75,.10);
}

textarea{ resize: vertical; }

.dt-wrap{ position:relative; }
input[type="datetime-local"]{ padding-right: 44px; }

input[type="datetime-local"]::-webkit-calendar-picker-indicator{
  opacity: .85;
  cursor: pointer;
  filter: invert(12%) sepia(55%) saturate(600%) hue-rotate(315deg);
}
input[type="datetime-local"]:focus::-webkit-calendar-picker-indicator{ opacity: 1; }

.media-row{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.upload-label{ white-space:nowrap; }
.media-dropzone{
  margin-top:10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding: 12px;
  border-radius: 14px;
  border: 1px dashed rgba(194,0,75,.30);
  background: rgba(194,0,75,.04);
  transition: all .15s ease;
}
.media-dropzone.is-dragover{
  border-color: rgba(194,0,75,.55);
  box-shadow: 0 0 0 4px rgba(194,0,75,.10);
  background: rgba(194,0,75,.08);
}
.media-dropzone-info{ display:flex; flex-direction:column; gap:4px; }
.drop-title{ font-weight:800; font-size:13px; }
.drop-sub{ font-size:12px; color: var(--muted); }
.media-preview-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:10px;
}
.media-thumb{
  position:relative;
  width:90px;
  height:70px;
  border-radius: 12px;
  overflow:hidden;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.media-thumb img,
.media-thumb video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.media-thumb-label{
  position:absolute;
  inset:auto 6px 6px 6px;
  padding: 4px 6px;
  border-radius: 999px;
  font-size:10px;
  font-weight:800;
  background: rgba(31,26,28,.78);
  color:#fff;
  text-align:center;
}
.media-thumb-remove{
  position:absolute;
  top:6px;
  right:6px;
  width:22px;
  height:22px;
  border-radius: 999px;
  border:none;
  background: rgba(31,26,28,.80);
  color:#fff;
  font-weight:800;
  cursor:pointer;
}
.media-thumb-remove:hover{ background: rgba(31,26,28,.95); }

.preview{
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  overflow:hidden;
}
.preview-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-weight:700;
}
.preview-box{
  height: 220px;
  background: #f5f1ef;
  display:flex;
  align-items:center;
  justify-content:center;
  color: #9a8f92;
  font-weight:700;
  position:relative;
}
.preview-box img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.preview-box video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.preview-empty{ padding: 18px; text-align:center; line-height:1.3; }

.publish-actions{
  display:flex;
  align-items:center;
  gap:10px;
  margin-top: 10px;
}
.form-status{ font-size:12px; color: var(--muted); font-weight:700; }

/* Toast */
.toast{
  position: fixed;
  right: 18px;
  bottom: 18px;
  min-width: 260px;
  max-width: 420px;
  background: #1f1a1c;
  color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.28);
  z-index: 1000;
  font-weight:700;
}
.toast.good{ background: #0f5c3b; }
.toast.bad{ background: #7f1d1d; }

@media (max-width: 980px){
  .insights-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 720px){
  .insights-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi-card{ min-height: 70px; }
}

/* Responsive */
@media (max-width: 980px){
  .layout{ flex-direction:column; }
  .sidebar{
    position:relative;
    width:100%;
    height:auto;
    border-radius: 0 0 24px 24px;
  }
  .sidebar::before{
    width:100%;
    height:6px;
    inset:0 0 auto 0;
    border-radius: 0 0 10px 10px;
  }
  .content{ padding-top: 14px; }
  .topbar{ align-items:flex-start; }
}

@media (max-width: 720px){
  .topbar{ flex-direction:column; align-items:flex-start; }
  .topbar-actions{ width:100%; }
  .search{ width:100%; }
  .calendar-top-actions{ width:100%; }
  .side-nav{ flex-direction:row; }
  .side-nav-item{ flex:1; justify-content:center; }
  .profiles{ order:3; }
}

@media (max-width: 1100px){
  .linkedin-grid{ grid-template-columns: 1fr; }
}

/* Auth pages */
.auth-body{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.auth-card{
  width: min(420px, 94vw);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.auth-brand{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:12px;
}
.auth-logo{
  width:44px;
  height:44px;
  border-radius:14px;
  border: 1px solid rgba(194,0,75,.18);
  background: #fff;
  padding:6px;
}
.auth-title{ font-weight:800; font-size:14px; }
.auth-sub{ font-size:12px; color: var(--muted); }
.auth-head{ margin: 10px 0 6px; font-size:20px; }
.auth-text{ margin:0 0 14px; }
.auth-form{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.auth-label{
  font-size:12px;
  font-weight:800;
  color:#1f1a1c;
}
.auth-form input{
  border-radius:14px;
  border:1px solid var(--border);
  padding: 10px 12px;
  font-size:13px;
}
.auth-status{
  font-size:12px;
  color:#7f1d1d;
  font-weight:700;
  min-height:18px;
}
.auth-btn{ margin-top:6px; }
.auth-footer{
  margin-top:12px;
  font-size:12px;
  color: var(--muted);
}
.auth-footer a{
  color: var(--brand-strong);
  font-weight:800;
  text-decoration:none;
}
.auth-footer a:hover{ text-decoration:underline; }

/* Small modal */
.modal-card.modal-sm{
  width: min(520px, 94vw);
}

/* Responsive refinements */
@media (max-width: 900px){
  .topbar-actions{ width:100%; }
  .topbar-actions .btn{ flex:1 1 auto; }
  .profiles-actions .btn{ flex:1 1 auto; }
  .calendar-day-list{ max-height: 420px; }
}

@media (max-width: 680px){
  .sidebar{ padding: 18px 14px; }
  .side-nav{ flex-direction:row; flex-wrap:wrap; gap:10px; }
  .side-nav-item{ flex: 1 1 48%; justify-content:center; }
  .profiles-actions{ flex-direction:column; align-items:stretch; }
  .profiles-actions .btn{ width:100%; justify-content:center; }

  .topbar-actions{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:8px;
    width:100%;
  }
  .topbar-actions .search-wrap{ grid-column: 1 / -1; }
  .topbar-actions .btn{ width:100%; justify-content:center; }

  .posts-grid{ grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .post-thumb{ height: 130px; }

  .calendar-grid{ gap: 8px; }
  .calendar-weekdays{ gap: 6px; }
  .week-pill{ padding: 6px 8px; font-size:11px; }
  .day-circle{ border-radius: 14px; font-size:16px; }
  .day-dot{ bottom: 8px; }

  .modal{ padding: 16px; }
  .modal-card{ border-radius: 18px; }
  .platform-tabs{ overflow-x:auto; padding-bottom: 6px; }
}

@media (max-width: 520px){
  .content{ padding: 16px 12px 22px; }
  .topbar{ padding: 12px; }
  .hello{ font-size:20px; }
  .subhello{ font-size:12px; }
  .search{ font-size:12px; }

  .card{ border-radius: 16px; }
  .posts-card{ padding: 10px; }

  .calendar-top-actions{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap:8px;
    width:100%;
  }
  .calendar-top-actions .btn{ width:100%; }
  .calendar-grid{ gap: 6px; }
  .day-circle{ font-size:14px; }

  .media-row{ flex-direction:column; align-items:stretch; }
  .media-row input,
  .media-row .btn{ width:100%; }
  .publish-actions{ flex-direction:column; align-items:stretch; }
  .publish-actions .btn{ width:100%; justify-content:center; }
  .comment-actions{ flex-direction:column; align-items:stretch; }
  .comment-actions .btn{ width:100%; }
}

@media (max-width: 420px){
  .brand-logo-wrap{ width:44px; height:44px; border-radius:14px; }
  .brand-title{ font-size:14px; }
  .brand-sub{ font-size:11px; }
  .side-nav-item{ padding: 10px; font-size:12px; }
  .calendar-day-list{ max-height: 320px; }
  .modal{ padding: 12px; }
  .modal-card{ border-radius: 16px; }
}
