﻿/* ============================================================
   Content Review â€” Enterprise Application Styles
   Global Risk Clinic
   ============================================================ */

:root {
  --bg: #F6F6F3;
  --sidebar: #30363A;
  --sidebar-text: #C8CBCD;
  --sidebar-text-active: #FFFFFF;
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(46, 94, 78, 0.35);
  --card: #FFFFFF;
  --primary: #2E5E4E;
  --primary-hover: #254C40;
  --primary-soft: #E8F0EC;
  --secondary: #7A7F82;
  --success: #2F6B3A;
  --success-soft: #E6F0E8;
  --warning: #D79A22;
  --warning-soft: #F8F0DF;
  --danger: #A83C3C;
  --danger-soft: #F5E6E6;
  --border: #E2E3DF;
  --border-strong: #D0D2CC;
  --text: #1F2426;
  --text-muted: #6B7073;
  --shadow: 0 1px 2px rgba(31, 36, 38, 0.04), 0 4px 12px rgba(31, 36, 38, 0.04);
  --shadow-sm: 0 1px 2px rgba(31, 36, 38, 0.05);
  --radius: 6px;
  --radius-sm: 4px;
  --sidebar-width: 248px;
  --topbar-height: 60px;
  --font: "Manrope", system-ui, "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  color: var(--primary-hover);
}

/* ---------- Layout ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 100;
  transition: transform 0.2s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.brand-name {
  color: #fff;
  font-weight: 650;
  font-size: 14px;
  line-height: 1.2;
}
.brand-sub {
  font-size: 11px;
  color: #9AA0A4;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px 20px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8B9195;
  padding: 14px 12px 6px;
}

.app-sidebar .nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-weight: 500;
  font-size: 13.5px;
  margin-bottom: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}
.app-sidebar .nav-link:hover {
  background: var(--sidebar-hover);
  color: #fff;
}
.app-sidebar .nav-link.active {
  background: var(--sidebar-active);
  color: var(--sidebar-text-active);
}
.nav-icon {
  display: flex;
  opacity: 0.85;
}

.sidebar-footer {
  padding: 14px 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar, .chip-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #4A5358;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  font-size: 13px;
  flex-shrink: 0;
}
.user-name {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
}
.user-role {
  font-size: 11px;
  color: #9AA0A4;
}

.app-main {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.app-topbar {
  height: var(--topbar-height);
  background: rgba(246, 246, 243, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  padding: 6px;
  cursor: pointer;
}

.top-search {
  flex: 1;
  max-width: 420px;
  position: relative;
}
.top-search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--secondary);
}
.top-search input {
  width: 100%;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  padding: 0 12px 0 36px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}
.top-search input:focus {
  border-color: var(--primary);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-btn {
  position: relative;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
}
.icon-btn:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.notif-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 20px;
  padding: 3px 10px 3px 3px;
  cursor: pointer;
  font-family: inherit;
}
.chip-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.app-content {
  flex: 1;
  padding: 28px 32px 40px;
}

.app-footer {
  padding: 16px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 12px;
}

/* ---------- Page header ---------- */
.page-header {
  margin-bottom: 24px;
}
.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.page-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.page-subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}
.breadcrumbs {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.breadcrumbs a { color: var(--text-muted); }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .sep { margin: 0 6px; opacity: 0.5; }
.breadcrumbs .current { color: var(--text); }

.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Cards ---------- */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.panel-title {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  color: var(--text);
}
.panel-body {
  padding: 18px 20px;
}
.panel-body.flush {
  padding: 0;
}

/* ---------- Stat tiles ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat-tile {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
}
.stat-tile:hover {
  border-color: var(--border-strong);
}
.stat-tile a {
  color: inherit;
  display: block;
}
.stat-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}
.stat-value {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-top: 4px;
  color: var(--text);
  line-height: 1.1;
}
.stat-hint {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--secondary);
}
.stat-tile.accent-primary .stat-value { color: var(--primary); }
.stat-tile.accent-warning .stat-value { color: #B88012; }
.stat-tile.accent-success .stat-value { color: var(--success); }
.stat-tile.accent-danger .stat-value { color: var(--danger); }

/* ---------- Buttons ---------- */
.btn-app {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.btn-primary-app {
  background: var(--primary);
  color: #fff;
}
.btn-primary-app:hover {
  background: var(--primary-hover);
  color: #fff;
}
.btn-secondary-app {
  background: var(--card);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-secondary-app:hover {
  background: #F0F0EC;
  color: var(--text);
}
.btn-danger-app {
  background: var(--danger);
  color: #fff;
}
.btn-danger-app:hover {
  background: #912F2F;
  color: #fff;
}
.btn-success-app {
  background: var(--success);
  color: #fff;
}
.btn-success-app:hover {
  background: #255730;
  color: #fff;
}
.btn-warning-app {
  background: var(--warning);
  color: #1F2426;
}
.btn-ghost-app {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
}
.btn-ghost-app:hover {
  background: #ECECE8;
  color: var(--text);
}
.btn-sm-app {
  height: 30px;
  padding: 0 12px;
  font-size: 12.5px;
}
.btn-block {
  width: 100%;
}

/* ---------- Forms ---------- */
.form-label-app {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 6px;
}
.form-control-app,
.form-select-app,
.form-textarea-app {
  width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: #fff;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control-app,
.form-select-app {
  height: 40px;
  padding: 0 12px;
}
.form-textarea-app {
  padding: 10px 12px;
  min-height: 120px;
  resize: vertical;
  line-height: 1.5;
}
.caption-editor-area {
  min-height: 280px;
  font-size: 15px;
  line-height: 1.55;
  white-space: pre-wrap;
}
.form-control-app:focus,
.form-select-app:focus,
.form-textarea-app:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(46, 94, 78, 0.12);
}
.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 5px;
}
.form-row-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 16px;
}

/* ---------- Tables ---------- */
.table-app {
  width: 100%;
  border-collapse: collapse;
}
.table-app th {
  text-align: left;
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #FAFAF8;
  white-space: nowrap;
}
.table-app td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 13.5px;
}
.table-app tr:last-child td {
  border-bottom: none;
}
.table-app tr:hover td {
  background: #FAFBF9;
}
.table-app .title-cell {
  font-weight: 600;
  color: var(--text);
}
.table-app .title-cell a {
  color: var(--text);
}
.table-app .title-cell a:hover {
  color: var(--primary);
}
.meta-line {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Status badges ---------- */
.status-badge {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 4px;
  font-size: 11.5px;
  font-weight: 650;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-draft {
  background: #EEEFEE;
  color: #52575A;
  border-color: #DDDFDC;
}
.badge-pending {
  background: var(--warning-soft);
  color: #8A6210;
  border-color: #EBD7A8;
}
.badge-final {
  background: #F5EADB;
  color: #8C5A18;
  border-color: #E8D0A8;
}
.badge-changes {
  background: #F3E8DF;
  color: #7A4A24;
  border-color: #E5CFB8;
}
.badge-rejected {
  background: var(--danger-soft);
  color: #8A2E2E;
  border-color: #E4BDBD;
}
.badge-ready {
  background: var(--success-soft);
  color: #23532C;
  border-color: #BDD5C2;
}
.badge-published {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #C5D9D0;
}

/* ---------- Alerts ---------- */
.alert-app {
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: 13.5px;
  border: 1px solid transparent;
}
.alert-success-app {
  background: var(--success-soft);
  border-color: #C2D9C7;
  color: #234F2C;
}
.alert-danger-app {
  background: var(--danger-soft);
  border-color: #E2BCBC;
  color: #7A2C2C;
}
.alert-warning-app {
  background: var(--warning-soft);
  border-color: #EBD7A8;
  color: #7A5A10;
}
.alert-info-app {
  background: #EAF0EE;
  border-color: #C8D8D2;
  color: #2A4A40;
}

/* ---------- Filters ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  padding: 16px 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
}
.filter-bar .form-group {
  margin: 0;
  min-width: 140px;
}
.filter-bar .form-control-app,
.filter-bar .form-select-app {
  height: 34px;
  font-size: 13px;
}

/* ---------- Dashboard layouts ---------- */
.dash-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.dash-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.activity-list,
.comment-list,
.notif-list-page {
  list-style: none;
  margin: 0;
  padding: 0;
}
.activity-item,
.comment-item-dash {
  display: flex;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child,
.comment-item-dash:last-child {
  border-bottom: none;
}
.activity-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  margin-top: 6px;
  flex-shrink: 0;
}
.activity-text {
  font-size: 13.5px;
}
.activity-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Timeline ---------- */
.timeline {
  position: relative;
  padding-left: 22px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: var(--border-strong);
}
.timeline-item {
  position: relative;
  padding-bottom: 18px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -20px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--primary);
}
.timeline-head {
  font-weight: 650;
  font-size: 13.5px;
}
.timeline-body {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.timeline-time {
  font-size: 11.5px;
  color: var(--secondary);
  margin-top: 4px;
}

/* ---------- Comments ---------- */
.comment-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.comment-bubble {
  display: flex;
  gap: 12px;
}
.comment-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.comment-body {
  flex: 1;
  background: #FAFAF8;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.comment-author {
  font-weight: 650;
  font-size: 13px;
}
.comment-role {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-left: 6px;
  font-weight: 500;
}
.comment-text {
  margin-top: 6px;
  font-size: 13.5px;
  white-space: pre-wrap;
}
.comment-time {
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--secondary);
}

/* ---------- Media gallery ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
}
.media-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #F3F3F0;
  aspect-ratio: 1;
  cursor: grab;
}
.media-card img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #F3F3F0;
}
.media-card .media-actions {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(31, 36, 38, 0.72);
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}
.media-card:hover .media-actions {
  opacity: 1;
}
.media-card .order-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: rgba(255,255,255,0.92);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.media-card.sortable-ghost {
  opacity: 0.4;
}
.upload-zone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  background: #FAFAF8;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.upload-zone.dragover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}
.upload-zone strong {
  display: block;
  color: var(--text);
  margin-bottom: 4px;
}

/* ---------- Calendar ---------- */
.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.calendar-view-switch {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.calendar-view-switch a,
.calendar-view-switch span {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-right: 1px solid var(--border);
}
.calendar-view-switch a:last-child,
.calendar-view-switch span:last-child {
  border-right: none;
}
.calendar-view-switch .active {
  background: var(--primary);
  color: #fff;
}

.cal-month {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-head {
  background: #FAFAF8;
  padding: 10px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.cal-day {
  background: var(--card);
  min-height: 110px;
  padding: 8px;
  vertical-align: top;
}
.cal-day.outside {
  background: #F3F3F0;
  color: #A0A4A6;
}
.cal-day.today .cal-daynum {
  background: var(--primary);
  color: #fff;
}
.cal-daynum {
  display: inline-flex;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-size: 12.5px;
  font-weight: 650;
  margin-bottom: 6px;
}
.cal-event {
  display: block;
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 3px;
  margin-bottom: 3px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 550;
}
.cal-event:hover {
  filter: brightness(0.95);
  color: #fff;
}
.cal-more {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.cal-week,
.cal-day-view {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cal-day-block {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.cal-day-block-head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 650;
  background: #FAFAF8;
}
.cal-day-post {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.cal-day-post:last-child {
  border-bottom: none;
}
.cal-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ---------- Post detail ---------- */
.post-layout {
  display: grid;
  grid-template-columns: 1.55fr 0.9fr;
  gap: 16px;
  align-items: start;
}
.caption-box {
  background: #FAFAF8;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.6;
}
.meta-dl {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 12px;
  font-size: 13.5px;
}
.meta-dl dt {
  color: var(--text-muted);
  font-weight: 550;
  margin: 0;
}
.meta-dl dd {
  margin: 0;
  font-weight: 550;
}
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag-pill {
  display: inline-flex;
  height: 24px;
  align-items: center;
  padding: 0 10px;
  border-radius: 4px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
}

.action-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ---------- Caption history compare ---------- */
.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.compare-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  background: #FAFAF8;
  font-size: 13px;
  white-space: pre-wrap;
  max-height: 280px;
  overflow: auto;
}
.compare-label {
  font-size: 11.5px;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ---------- Notifications dropdown ---------- */
.notif-menu {
  width: 340px;
  padding: 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  overflow: hidden;
}
.notif-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #FAFAF8;
}
.small-link {
  font-size: 12px;
  font-weight: 600;
}
.notif-menu-body {
  max-height: 360px;
  overflow-y: auto;
}
.notif-item {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  color: inherit;
}
.notif-item:hover {
  background: #F7F7F4;
  color: inherit;
}
.notif-item.unread {
  background: #F3F7F5;
}
.notif-title {
  font-weight: 650;
  font-size: 13px;
}
.notif-msg {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.notif-time {
  font-size: 11px;
  color: var(--secondary);
  margin-top: 4px;
}
.notif-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}
.notif-menu-foot {
  display: block;
  text-align: center;
  padding: 10px;
  font-size: 12.5px;
  font-weight: 650;
  border-top: 1px solid var(--border);
  background: #FAFAF8;
}

/* ---------- Pagination ---------- */
.app-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.page-meta {
  font-size: 12.5px;
  color: var(--text-muted);
}
.pagination-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 4px;
}
.pagination-list a,
.pagination-list span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: #fff;
}
.pagination-list a:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pagination-list .active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.pagination-list .disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--bg);
}
.login-visual {
  background:
    linear-gradient(160deg, rgba(46, 94, 78, 0.92), rgba(48, 54, 58, 0.88)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  color: #fff;
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-visual h1 {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 16px 0 12px;
  max-width: 420px;
  line-height: 1.2;
}
.login-visual p {
  max-width: 400px;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.88;
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-brand .mark {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.login-form-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.login-card h2 {
  margin: 0 0 6px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.login-card .lead {
  color: var(--text-muted);
  margin: 0 0 24px;
  font-size: 14px;
}
.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  font-size: 13px;
}
.remember-row label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-state strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
  font-size: 15px;
}

/* ---------- Modal refinements ---------- */
.modal-content {
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.modal-header {
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
}
.modal-title {
  font-size: 16px;
  font-weight: 700;
}
.modal-body {
  padding: 18px;
}
.modal-footer {
  border-top: 1px solid var(--border);
  padding: 12px 18px;
}

/* ---------- Utilities ---------- */
.text-muted-app { color: var(--text-muted); }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-0 { margin-bottom: 0; }
.gap-8 { gap: 8px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Preview mini calendar on dashboard */
.mini-cal-list .mini-cal-row {
  display: flex;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.mini-cal-list .mini-cal-row:last-child {
  border-bottom: none;
}
.mini-date {
  width: 44px;
  text-align: center;
  flex-shrink: 0;
}
.mini-date .day {
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}
.mini-date .mon {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 650;
  letter-spacing: 0.04em;
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-grid,
  .post-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 992px) {
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-shell.sidebar-open .app-sidebar {
    transform: translateX(0);
  }
  .app-main {
    margin-left: 0;
  }
  .sidebar-toggle {
    display: inline-flex;
  }
  .login-page {
    grid-template-columns: 1fr;
  }
  .login-visual {
    display: none;
  }
  .form-row-grid,
  .compare-grid {
    grid-template-columns: 1fr;
  }
  .cal-day {
    min-height: 80px;
  }
}

@media (max-width: 640px) {
  .app-content {
    padding: 20px 16px 32px;
  }
  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }
  .page-title {
    font-size: 22px;
  }
  .cal-month {
    font-size: 12px;
  }
}

/* ============================================================
   LinkedIn-inspired preview + Review modal + Import
   ============================================================ */

.pending-review-section {
  margin-bottom: 28px;
}
.pending-review-section .section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.pending-review-section .section-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pending-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  background: var(--warning-soft);
  color: #8A6210;
  font-weight: 700;
  font-size: 13px;
  margin-left: 8px;
}
.li-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (max-width: 992px) {
  .li-grid { grid-template-columns: 1fr; }
}

.li-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.li-card-static { box-shadow: none; }
.li-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px 8px;
}
.li-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #0A66C2;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.li-meta { flex: 1; min-width: 0; }
.li-name {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--text);
  line-height: 1.25;
}
.li-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.li-caption {
  padding: 4px 16px 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  white-space: normal;
}
.li-caption p {
  margin: 0 0 0.55em;
}
.li-caption p:last-of-type {
  margin-bottom: 0;
}
.li-read-more {
  display: inline-block;
  margin-top: 6px;
  padding: 0;
  border: none;
  background: none;
  color: var(--primary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
}
.li-read-more:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}
.li-caption-full { white-space: pre-wrap; }

.li-media {
  position: relative;
  background: #F0F0EE;
  min-height: 200px;
  max-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.li-slide, .rm-slide {
  display: none;
  width: 100%;
  text-align: center;
}
.li-slide.is-active, .rm-slide.is-active {
  display: block;
}
.li-slide img, .rm-slide img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
  background: #F0F0EE;
}
.li-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.92);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
.li-prev { left: 10px; }
.li-next { right: 10px; }
.li-count {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(31,36,38,0.72);
  color: #fff;
  font-size: 11px;
  font-weight: 650;
  padding: 3px 8px;
  border-radius: 4px;
  z-index: 2;
}
.li-card-foot {
  padding: 12px 16px 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.li-foot-meta {
  font-size: 12px;
  color: var(--text-muted);
}
.li-foot-meta .dot { margin: 0 4px; opacity: 0.5; }
.li-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dash-section {
  margin-bottom: 22px;
}
.dash-section-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
}

/* Review modal */
.review-modal-dialog {
  max-width: 1100px;
}
.review-modal-body {
  background: var(--bg);
  padding: 18px;
}
.review-loading {
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
}
.rm-layout {
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 900px) {
  .rm-layout { grid-template-columns: 1fr; }
}
.rm-carousel {
  position: relative;
  background: #E8E8E4;
  min-height: 220px;
  max-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rm-media-toolbar { padding: 12px 16px 16px; }
.rm-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rm-thumb {
  position: relative;
  width: 72px;
  height: 72px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  cursor: grab;
  background: #fff;
}
.rm-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.rm-thumb-actions {
  position: absolute;
  inset: auto 0 0 0;
  background: rgba(31,36,38,0.75);
  display: none;
  gap: 2px;
  padding: 2px;
  justify-content: center;
}
.rm-thumb:hover .rm-thumb-actions { display: flex; }
.rm-mini-btn {
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 4px;
  margin: 0;
}
.rm-mini-btn.danger { color: #ffb4b4; }
.rm-upload { margin: 0; padding: 16px; }
.rm-hist-block {
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.review-modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.review-modal-sub {
  margin-top: 4px;
  font-size: 13px;
}

/* Import wizard */
.import-steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.import-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}
.import-step.active {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}
.import-step.done { color: var(--success); }
.import-row-valid { background: #F3F8F4; }
.import-row-warning { background: #FBF7EC; }
.import-row-error { background: #FBF1F1; }
.import-level {
  font-weight: 700;
  font-size: 12px;
}
.import-level.ok { color: var(--success); }
.import-level.warn { color: #8A6210; }
.import-level.err { color: var(--danger); }

.cal-event[data-review-id] { cursor: pointer; }


/* Bulk selection bar */
.bulk-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #EEF3F1;
  border: 1px solid #C5D9D0;
  border-radius: var(--radius);
  margin-bottom: 12px;
}
.bulk-bar.is-visible { display: flex; }
.bulk-bar-count { font-weight: 650; font-size: 13.5px; }
.bulk-bar-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.table-app th.col-check,
.table-app td.col-check {
  width: 40px;
  text-align: center;
  vertical-align: middle;
}
.table-app tr.is-selected td {
  background: #F3F7F5;
}
