/* ===========================================================
   SO Digital PM — Design tokens
   Navy sidebar (#0F172A) / White content / Indigo accent (#6366F1)
   =========================================================== */
:root {
	--sodpm-navy: #0F172A;
	--sodpm-navy-soft: #1E293B;
	--sodpm-navy-border: #334155;
	--sodpm-white: #FFFFFF;
	--sodpm-bg: #F8FAFC;
	--sodpm-indigo: #6366F1;
	--sodpm-indigo-dark: #4F46E5;
	--sodpm-indigo-soft: #EEF2FF;
	--sodpm-text: #0F172A;
	--sodpm-text-soft: #64748B;
	--sodpm-border: #E2E8F0;
	--sodpm-green: #10B981;
	--sodpm-amber: #F59E0B;
	--sodpm-red: #EF4444;
	--sodpm-radius: 10px;
	--sodpm-shadow: 0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.04);
	--sodpm-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

#sodpm-root, #sodpm-root * {
	box-sizing: border-box;
}

.sodpm-app {
	font-family: var(--sodpm-font);
	color: var(--sodpm-text);
	display: flex;
	min-height: 100vh;
	background: var(--sodpm-bg);
	margin: -1px 0 0 0; /* nudge against theme container padding quirks */
	font-size: 14px;
	line-height: 1.5;
}

.sodpm-boot {
	padding: 60px;
	color: var(--sodpm-text-soft);
}

/* ---------- Sidebar ---------- */
.sodpm-sidebar {
	width: 240px;
	flex: 0 0 240px;
	background: var(--sodpm-navy);
	color: #E2E8F0;
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
	z-index: 10;
}

.sodpm-brand {
	padding: 22px 20px;
	font-weight: 700;
	font-size: 16px;
	color: #fff;
	border-bottom: 1px solid var(--sodpm-navy-border);
	letter-spacing: -0.01em;
}
.sodpm-brand span { color: var(--sodpm-indigo); }

.sodpm-nav {
	flex: 1;
	padding: 12px;
}

.sodpm-nav-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	color: #CBD5E1;
	cursor: pointer;
	font-weight: 500;
	margin-bottom: 2px;
	transition: background 0.15s, color 0.15s;
	user-select: none;
}
.sodpm-nav-item:hover { background: var(--sodpm-navy-soft); color: #fff; }
.sodpm-nav-item.active { background: var(--sodpm-indigo); color: #fff; }
.sodpm-nav-icon { width: 18px; text-align: center; opacity: 0.9; }

.sodpm-sidebar-footer {
	padding: 14px 20px;
	border-top: 1px solid var(--sodpm-navy-border);
	font-size: 12px;
	color: #94A3B8;
}

/* ---------- Mobile sidebar ---------- */
.sodpm-mobile-bar {
	display: none;
	background: var(--sodpm-navy);
	color: #fff;
	padding: 14px 16px;
	align-items: center;
	justify-content: space-between;
	position: sticky;
	top: 0;
	z-index: 20;
}
.sodpm-mobile-toggle {
	background: none;
	border: none;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
}

@media (max-width: 880px) {
	.sodpm-app { flex-direction: column; }
	.sodpm-mobile-bar { display: flex; }
	.sodpm-sidebar {
		position: fixed;
		left: -260px;
		top: 0;
		height: 100vh;
		transition: left 0.2s ease;
		width: 240px;
	}
	.sodpm-sidebar.open { left: 0; }
	.sodpm-overlay {
		display: none;
		position: fixed;
		inset: 0;
		background: rgba(15,23,42,0.5);
		z-index: 9;
	}
	.sodpm-overlay.open { display: block; }
}

/* ---------- Main content ---------- */
.sodpm-main {
	flex: 1;
	min-width: 0;
	background: var(--sodpm-bg);
}

.sodpm-topbar {
	background: var(--sodpm-white);
	border-bottom: 1px solid var(--sodpm-border);
	padding: 18px 28px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.sodpm-topbar h1 {
	font-size: 19px;
	font-weight: 700;
	margin: 0;
	letter-spacing: -0.01em;
}
.sodpm-topbar-sub { color: var(--sodpm-text-soft); font-size: 13px; margin-top: 2px; }

.sodpm-content {
	padding: 24px 28px 60px;
}

@media (max-width: 600px) {
	.sodpm-content { padding: 16px; }
	.sodpm-topbar { padding: 14px 16px; }
}

/* ---------- Cards / grid ---------- */
.sodpm-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}

.sodpm-card {
	background: var(--sodpm-white);
	border: 1px solid var(--sodpm-border);
	border-radius: var(--sodpm-radius);
	padding: 18px;
	box-shadow: var(--sodpm-shadow);
}

.sodpm-kpi-label {
	color: var(--sodpm-text-soft);
	font-size: 12.5px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: 8px;
}
.sodpm-kpi-value {
	font-size: 30px;
	font-weight: 700;
	letter-spacing: -0.02em;
}
.sodpm-kpi-accent { color: var(--sodpm-indigo); }

.sodpm-panel {
	background: var(--sodpm-white);
	border: 1px solid var(--sodpm-border);
	border-radius: var(--sodpm-radius);
	box-shadow: var(--sodpm-shadow);
	margin-bottom: 20px;
}
.sodpm-panel-header {
	padding: 16px 20px;
	border-bottom: 1px solid var(--sodpm-border);
	font-weight: 700;
	font-size: 14.5px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.sodpm-panel-body { padding: 16px 20px; }

/* ---------- Two-column dashboard layout ---------- */
.sodpm-dash-cols {
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 20px;
}
@media (max-width: 980px) {
	.sodpm-dash-cols { grid-template-columns: 1fr; }
}

/* ---------- Lists ---------- */
.sodpm-list-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 0;
	border-bottom: 1px solid var(--sodpm-border);
	gap: 10px;
}
.sodpm-list-row:last-child { border-bottom: none; }
.sodpm-list-main { font-weight: 600; font-size: 13.5px; }
.sodpm-list-sub { color: var(--sodpm-text-soft); font-size: 12.5px; }

/* ---------- Badges / pills ---------- */
.sodpm-pill {
	display: inline-flex;
	align-items: center;
	padding: 3px 10px;
	border-radius: 100px;
	font-size: 11.5px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	white-space: nowrap;
}
.sodpm-pill-planning, .sodpm-pill-todo, .sodpm-pill-draft { background: #F1F5F9; color: #475569; }
.sodpm-pill-active, .sodpm-pill-in_progress, .sodpm-pill-approved, .sodpm-pill-scheduled { background: var(--sodpm-indigo-soft); color: var(--sodpm-indigo-dark); }
.sodpm-pill-review { background: #FEF3C7; color: #92400E; }
.sodpm-pill-completed, .sodpm-pill-done, .sodpm-pill-published, .sodpm-pill-paused { background: #D1FAE5; color: #065F46; }
.sodpm-pill-paused { background: #FEE2E2; color: #991B1B; }

.sodpm-priority-low { background: #F1F5F9; color: #475569; }
.sodpm-priority-medium { background: #DBEAFE; color: #1E40AF; }
.sodpm-priority-high { background: #FEF3C7; color: #92400E; }
.sodpm-priority-urgent { background: #FEE2E2; color: #991B1B; }

.sodpm-load-underloaded { background: #DBEAFE; color: #1E40AF; }
.sodpm-load-balanced { background: #D1FAE5; color: #065F46; }
.sodpm-load-overloaded { background: #FEE2E2; color: #991B1B; }

/* ---------- Progress bar ---------- */
.sodpm-progress-track {
	height: 7px;
	background: #E2E8F0;
	border-radius: 100px;
	overflow: hidden;
	width: 100%;
}
.sodpm-progress-fill {
	height: 100%;
	background: var(--sodpm-indigo);
	border-radius: 100px;
}

/* ---------- Buttons ---------- */
.sodpm-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--sodpm-indigo);
	color: #fff;
	border: none;
	padding: 9px 16px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 13.5px;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s;
}
.sodpm-btn:hover { background: var(--sodpm-indigo-dark); color: #fff; }
.sodpm-btn-ghost {
	background: transparent;
	color: var(--sodpm-text);
	border: 1px solid var(--sodpm-border);
}
.sodpm-btn-ghost:hover { background: var(--sodpm-bg); }
.sodpm-btn-sm { padding: 5px 10px; font-size: 12.5px; }
.sodpm-btn-danger { background: var(--sodpm-red); }
.sodpm-btn-danger:hover { background: #DC2626; }

/* ---------- Tables ---------- */
.sodpm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sodpm-table th {
	text-align: left;
	color: var(--sodpm-text-soft);
	font-weight: 600;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	padding: 0 12px 10px;
	border-bottom: 1px solid var(--sodpm-border);
}
.sodpm-table td {
	padding: 12px;
	border-bottom: 1px solid var(--sodpm-border);
	vertical-align: middle;
}
.sodpm-table tr:last-child td { border-bottom: none; }
.sodpm-table-wrap { overflow-x: auto; }

/* ---------- Forms / modal ---------- */
.sodpm-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15,23,42,0.45);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	padding: 16px;
}
.sodpm-modal {
	background: #fff;
	border-radius: 14px;
	width: 100%;
	max-width: 520px;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(15,23,42,0.3);
}
.sodpm-modal-header {
	padding: 18px 22px;
	border-bottom: 1px solid var(--sodpm-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.sodpm-modal-header h3 { margin: 0; font-size: 16px; }
.sodpm-modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--sodpm-text-soft); }
.sodpm-modal-body { padding: 20px 22px; }
.sodpm-modal-footer { padding: 16px 22px; border-top: 1px solid var(--sodpm-border); display: flex; justify-content: flex-end; gap: 10px; }

.sodpm-field { margin-bottom: 14px; }
.sodpm-field label {
	display: block;
	font-weight: 600;
	font-size: 12.5px;
	margin-bottom: 6px;
	color: var(--sodpm-text);
}
.sodpm-field input, .sodpm-field select, .sodpm-field textarea {
	width: 100%;
	padding: 9px 11px;
	border: 1px solid var(--sodpm-border);
	border-radius: 8px;
	font-size: 13.5px;
	font-family: inherit;
	background: #fff;
	color: var(--sodpm-text);
}
.sodpm-field input:focus, .sodpm-field select:focus, .sodpm-field textarea:focus {
	outline: none;
	border-color: var(--sodpm-indigo);
	box-shadow: 0 0 0 3px var(--sodpm-indigo-soft);
}
.sodpm-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 500px) { .sodpm-field-row { grid-template-columns: 1fr; } }

.sodpm-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
	gap: 12px;
	flex-wrap: wrap;
}
.sodpm-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.sodpm-filters select {
	padding: 7px 10px;
	border: 1px solid var(--sodpm-border);
	border-radius: 8px;
	font-size: 12.5px;
	background: #fff;
}

/* ---------- Kanban ---------- */
.sodpm-kanban {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	align-items: start;
}
@media (max-width: 980px) {
	.sodpm-kanban { grid-template-columns: 1fr; }
}
.sodpm-kanban-col {
	background: #F1F5F9;
	border-radius: var(--sodpm-radius);
	padding: 12px;
	min-height: 80px;
}
.sodpm-kanban-col-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 700;
	font-size: 12.5px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: var(--sodpm-text-soft);
	margin-bottom: 10px;
	padding: 0 4px;
}
.sodpm-kanban-count {
	background: #E2E8F0;
	border-radius: 100px;
	padding: 1px 8px;
	font-size: 11.5px;
}
.sodpm-kanban-card {
	background: #fff;
	border: 1px solid var(--sodpm-border);
	border-radius: 9px;
	padding: 12px;
	margin-bottom: 8px;
	box-shadow: var(--sodpm-shadow);
	cursor: pointer;
	transition: transform 0.1s, box-shadow 0.1s;
}
.sodpm-kanban-card:hover { box-shadow: 0 4px 12px rgba(15,23,42,0.12); }
.sodpm-kanban-card.dragging { opacity: 0.4; }
.sodpm-kanban-col.drag-over { background: var(--sodpm-indigo-soft); }
.sodpm-kanban-card-title { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.sodpm-kanban-card-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.sodpm-kanban-card-due { font-size: 11.5px; color: var(--sodpm-text-soft); }

/* ---------- Empty states ---------- */
.sodpm-empty {
	text-align: center;
	padding: 50px 20px;
	color: var(--sodpm-text-soft);
}
.sodpm-empty-icon { font-size: 32px; margin-bottom: 10px; opacity: 0.5; }

/* ---------- Misc ---------- */
.sodpm-avatar-stack { display: flex; }
.sodpm-avatar {
	width: 26px; height: 26px;
	border-radius: 50%;
	background: var(--sodpm-indigo);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
	margin-left: -8px;
}
.sodpm-avatar:first-child { margin-left: 0; }

.sodpm-notice, .sodpm-login-notice {
	max-width: 480px;
	margin: 60px auto;
	text-align: center;
	background: #fff;
	border: 1px solid var(--sodpm-border);
	border-radius: var(--sodpm-radius);
	padding: 32px;
	box-shadow: var(--sodpm-shadow);
	font-family: var(--sodpm-font);
}

.sodpm-loading-row { color: var(--sodpm-text-soft); padding: 20px; text-align: center; }

.sodpm-toast {
	position: fixed;
	bottom: 24px;
	right: 24px;
	background: var(--sodpm-navy);
	color: #fff;
	padding: 12px 18px;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 600;
	box-shadow: 0 8px 24px rgba(15,23,42,0.3);
	z-index: 200;
	animation: sodpm-toast-in 0.2s ease;
}
@keyframes sodpm-toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.sodpm-text-soft { color: var(--sodpm-text-soft); }
.sodpm-mb-0 { margin-bottom: 0; }

/* ---------- Notification bell ---------- */
.sodpm-bell-btn {
	position: relative;
	background: none;
	border: 1px solid var(--sodpm-border);
	border-radius: 8px;
	width: 38px;
	height: 38px;
	font-size: 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}
.sodpm-bell-btn:hover { background: var(--sodpm-bg); }
.sodpm-bell-dot {
	position: absolute;
	top: 6px;
	right: 7px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--sodpm-red);
	border: 2px solid #fff;
}
.sodpm-bell-panel {
	position: absolute;
	top: 46px;
	right: 0;
	width: 320px;
	max-height: 420px;
	overflow-y: auto;
	background: #fff;
	border: 1px solid var(--sodpm-border);
	border-radius: 12px;
	box-shadow: 0 16px 40px rgba(15,23,42,0.18);
	z-index: 50;
}
.sodpm-bell-header {
	padding: 14px 16px;
	border-bottom: 1px solid var(--sodpm-border);
	font-weight: 700;
	font-size: 13.5px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.sodpm-bell-mark-read {
	background: none;
	border: none;
	color: var(--sodpm-indigo);
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
}
.sodpm-bell-list { padding: 4px 0; }
.sodpm-bell-item {
	padding: 10px 16px;
	border-bottom: 1px solid var(--sodpm-border);
}
.sodpm-bell-item:last-child { border-bottom: none; }
.sodpm-bell-item.unread { background: var(--sodpm-indigo-soft); }
.sodpm-bell-item-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.sodpm-bell-item-msg { font-size: 12.5px; color: var(--sodpm-text-soft); margin-bottom: 4px; }
.sodpm-bell-item-time { font-size: 11px; color: #94A3B8; }
.sodpm-bell-empty { padding: 30px 16px; text-align: center; color: var(--sodpm-text-soft); font-size: 13px; }

@media (max-width: 600px) {
	.sodpm-bell-panel { width: 260px; right: -10px; }
}

/* ---------- View toggle (List/Calendar) ---------- */
.sodpm-view-toggle {
	display: flex;
	background: #F1F5F9;
	border-radius: 8px;
	padding: 3px;
}
.sodpm-view-toggle-btn {
	background: none;
	border: none;
	padding: 6px 14px;
	border-radius: 6px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--sodpm-text-soft);
	cursor: pointer;
}
.sodpm-view-toggle-btn.active {
	background: #fff;
	color: var(--sodpm-text);
	box-shadow: var(--sodpm-shadow);
}

/* ---------- Month calendar grid ---------- */
.sodpm-cal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}
.sodpm-cal-month-label { font-weight: 700; font-size: 15px; }
.sodpm-cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 6px;
}
.sodpm-cal-grid-head {
	margin-bottom: 6px;
	font-size: 11.5px;
	font-weight: 700;
	color: var(--sodpm-text-soft);
	text-transform: uppercase;
	text-align: center;
}
.sodpm-cal-cell {
	background: #fff;
	border: 1px solid var(--sodpm-border);
	border-radius: 8px;
	min-height: 92px;
	padding: 6px;
	font-size: 11.5px;
}
.sodpm-cal-cell-empty { background: transparent; border: none; }
.sodpm-cal-today { border-color: var(--sodpm-indigo); box-shadow: 0 0 0 1px var(--sodpm-indigo); }
.sodpm-cal-daynum { font-weight: 700; font-size: 11.5px; color: var(--sodpm-text-soft); margin-bottom: 4px; }
.sodpm-cal-item {
	background: var(--sodpm-indigo-soft);
	color: var(--sodpm-indigo-dark);
	border-radius: 4px;
	padding: 2px 5px;
	margin-bottom: 3px;
	font-weight: 600;
	font-size: 10.5px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 4px;
}
.sodpm-cal-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; background: var(--sodpm-indigo); }
.sodpm-cal-dot-instagram { background: #E1306C; }
.sodpm-cal-dot-facebook { background: #1877F2; }
.sodpm-cal-dot-linkedin { background: #0A66C2; }
.sodpm-cal-dot-google { background: #EA4335; }
.sodpm-cal-dot-email { background: #64748B; }
.sodpm-cal-more { font-size: 10px; color: var(--sodpm-text-soft); padding-left: 5px; }

@media (max-width: 700px) {
	.sodpm-cal-grid { grid-template-columns: repeat(7, minmax(34px, 1fr)); gap: 3px; }
	.sodpm-cal-cell { min-height: 64px; padding: 3px; font-size: 9.5px; }
	.sodpm-cal-item { font-size: 9px; }
}
