/* ==========================================================================
   Profile Dashboard — Page Styles  (v2.0 — compact blue)
   ========================================================================== */

/* Blue-only palette */
:root {
	--um-pd-primary: #1a2340;
	--um-pd-accent: #0071E3;
	--um-pd-accent-light: #4da3ff;
	--um-pd-text: #2c3350;
	--um-pd-grey: #6b7294;
	--um-pd-border: #d0d5e2;
	--um-pd-shade: #f2f4f8;
	--um-pd-white: #ffffff;
	--um-pd-radius: 6px;

	/* Differentiated blue shades for badges/icons */
	--um-pd-blue-100: rgba(0, 113, 227, 0.06);
	--um-pd-blue-200: rgba(0, 113, 227, 0.10);
	--um-pd-blue-300: rgba(0, 113, 227, 0.16);
	--um-pd-blue-deep: #0058b0;
	--um-pd-blue-mid: #3a8fd9;
	--um-pd-blue-pale: #a0c4f1;
	--um-pd-blue-muted: #5a7ca8;
}

/* ==========================================================================
   1. Page Wrapper
   ========================================================================== */

.um-pd {
	max-width: 1000px;
	margin: 0 auto;
	padding: 16px 14px 36px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--um-pd-text);
	font-size: 13px;
}

.um-pd__header {
	margin-bottom: 14px;
}

.um-pd__title {
	font-size: 18px;
	font-weight: 700;
	color: var(--um-pd-primary);
	margin: 0 0 2px;
}

.um-pd__subtitle {
	font-size: 12px;
	color: var(--um-pd-grey);
	margin: 0;
}

/* ==========================================================================
   2. Stats Row
   ========================================================================== */

.um-pd__stats-row {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 8px;
	margin-bottom: 16px;
}

.um-pd__stat-card {
	background: var(--um-pd-white);
	border: 1px solid var(--um-pd-border);
	border-radius: var(--um-pd-radius);
	padding: 10px 10px 8px;
	transition: border-color 0.2s, box-shadow 0.2s;
	cursor: default;
	position: relative;
	overflow: hidden;
}

.um-pd__stat-card:hover {
	border-color: var(--um-pd-accent);
	box-shadow: 0 1px 6px rgba(0, 113, 227, 0.08);
}

.um-pd__stat-card--clickable {
	cursor: pointer;
}

/* Stat card as a link (e.g. Inbox → /inbox/) */
a.um-pd__stat-card--link {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
	display: block;
}

a.um-pd__stat-card--link:hover {
	border-color: var(--um-pd-accent);
	box-shadow: 0 1px 6px rgba(0, 113, 227, 0.08);
}

a.um-pd__stat-card--link .um-pd__stat-label {
	text-decoration: none;
}

a.um-pd__stat-card--link::after {
	content: '';
	position: absolute;
	top: 8px;
	right: 8px;
	width: 12px;
	height: 12px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7294' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-size: contain;
	opacity: 0.35;
	transition: opacity 0.15s;
}

a.um-pd__stat-card--link:hover::after {
	opacity: 0.6;
}

.um-pd__stat-icon {
	width: 26px;
	height: 26px;
	border-radius: 5px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 6px;
	flex-shrink: 0;
}

/* All icon variants use blue shades */
.um-pd__stat-icon--assets {
	background: var(--um-pd-blue-200);
	color: var(--um-pd-accent);
}

.um-pd__stat-icon--decks {
	background: var(--um-pd-blue-100);
	color: var(--um-pd-blue-mid);
}

.um-pd__stat-icon--documents {
	background: var(--um-pd-blue-300);
	color: var(--um-pd-blue-deep);
}

.um-pd__stat-icon--inbox {
	background: var(--um-pd-blue-100);
	color: var(--um-pd-blue-muted);
}

.um-pd__stat-icon--views {
	background: var(--um-pd-blue-200);
	color: var(--um-pd-accent-light);
}

.um-pd__stat-icon--followers {
	background: var(--um-pd-blue-100);
	color: var(--um-pd-blue-pale);
}

.um-pd__stat-icon svg {
	width: 14px;
	height: 14px;
}

.um-pd__stat-number {
	font-size: 20px;
	font-weight: 700;
	color: var(--um-pd-primary);
	line-height: 1.1;
	margin-bottom: 1px;
}

.um-pd__stat-label {
	font-size: 11px;
	color: var(--um-pd-grey);
	font-weight: 500;
	margin-bottom: 2px;
}

.um-pd__stat-sub {
	font-size: 10px;
	color: var(--um-pd-grey);
	opacity: 0.75;
}

.um-pd__stat-sub span {
	margin-right: 4px;
}

/* ==========================================================================
   3. Tabs
   ========================================================================== */

.um-pd__tabs {
	display: flex;
	gap: 0;
	border-bottom: 2px solid var(--um-pd-border);
	margin-bottom: 14px;
}

.um-pd__tab {
	padding: 8px 16px;
	font-size: 12px;
	font-weight: 600;
	color: var(--um-pd-grey);
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	cursor: pointer;
	transition: color 0.2s, border-color 0.2s;
	display: flex;
	align-items: center;
	gap: 5px;
}

.um-pd__tab:hover {
	color: var(--um-pd-primary);
}

.um-pd__tab--active {
	color: var(--um-pd-accent);
	border-bottom-color: var(--um-pd-accent);
}

.um-pd__tab-count {
	font-size: 10px;
	font-weight: 700;
	background: var(--um-pd-shade);
	color: var(--um-pd-grey);
	padding: 1px 6px;
	border-radius: 8px;
	min-width: 16px;
	text-align: center;
}

.um-pd__tab--active .um-pd__tab-count {
	background: var(--um-pd-blue-200);
	color: var(--um-pd-accent);
}

/* Panels */
.um-pd__panel {
	display: none;
}

.um-pd__panel--active {
	display: block;
}

/* ==========================================================================
   4. Content Table
   ========================================================================== */

.um-pd__table {
	width: 100%;
	border-collapse: collapse;
}

.um-pd__table th {
	text-align: left;
	font-size: 10px;
	font-weight: 600;
	color: var(--um-pd-grey);
	text-transform: uppercase;
	letter-spacing: 0.4px;
	padding: 6px 8px;
	border-bottom: 1px solid var(--um-pd-border);
	white-space: nowrap;
}

.um-pd__table td {
	padding: 7px 8px;
	font-size: 12px;
	color: var(--um-pd-text);
	border-bottom: 1px solid var(--um-pd-shade);
	vertical-align: middle;
}

.um-pd__table tr:hover td {
	background: var(--um-pd-shade);
}

.um-pd__table-title {
	font-weight: 500;
	color: var(--um-pd-primary);
	max-width: 220px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.um-pd__table-title a {
	color: var(--um-pd-primary);
	text-decoration: none;
}

.um-pd__table-title a:hover {
	color: var(--um-pd-accent);
}

/* Status badges — all blue shades */
.um-pd__badge {
	display: inline-block;
	padding: 2px 7px;
	border-radius: 3px;
	font-size: 10px;
	font-weight: 600;
	white-space: nowrap;
}

.um-pd__badge--publish {
	background: var(--um-pd-blue-200);
	color: var(--um-pd-accent);
}

.um-pd__badge--draft {
	background: var(--um-pd-blue-100);
	color: var(--um-pd-blue-muted);
}

.um-pd__badge--pending {
	background: var(--um-pd-blue-300);
	color: var(--um-pd-blue-deep);
}

.um-pd__badge--trash {
	background: var(--um-pd-shade);
	color: var(--um-pd-grey);
}

.um-pd__badge--signed {
	background: var(--um-pd-blue-200);
	color: var(--um-pd-accent);
}

.um-pd__badge--unsigned {
	background: var(--um-pd-blue-100);
	color: var(--um-pd-blue-muted);
}

/* Doc type badges — differentiated by blue shade */
.um-pd__doc-type {
	display: inline-block;
	padding: 2px 7px;
	border-radius: 3px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
}

.um-pd__doc-type--nda {
	background: var(--um-pd-blue-300);
	color: var(--um-pd-blue-deep);
}

.um-pd__doc-type--loi {
	background: var(--um-pd-blue-200);
	color: var(--um-pd-accent);
}

.um-pd__doc-type--apa {
	background: var(--um-pd-blue-100);
	color: var(--um-pd-blue-mid);
}

/* View count column */
.um-pd__views {
	font-weight: 500;
	color: var(--um-pd-grey);
	display: flex;
	align-items: center;
	gap: 3px;
	font-size: 11px;
}

.um-pd__views svg {
	opacity: 0.45;
	width: 12px;
	height: 12px;
}

/* ==========================================================================
   5. Action Buttons (in table rows)
   ========================================================================== */

.um-pd__row-actions {
	display: flex;
	gap: 4px;
}

.um-pd__row-btn {
	width: 24px;
	height: 24px;
	border: 1px solid var(--um-pd-border);
	border-radius: 4px;
	background: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--um-pd-grey);
	transition: all 0.15s;
	text-decoration: none;
	padding: 0;
}

.um-pd__row-btn svg {
	width: 12px;
	height: 12px;
}

.um-pd__row-btn:hover {
	background: var(--um-pd-blue-100);
	color: var(--um-pd-accent);
	border-color: var(--um-pd-accent);
}

.um-pd__row-btn--edit:hover {
	color: var(--um-pd-accent);
	border-color: var(--um-pd-accent);
}

.um-pd__row-btn--view:hover {
	color: var(--um-pd-blue-mid);
	border-color: var(--um-pd-blue-mid);
}

.um-pd__row-btn--pdf:hover {
	color: var(--um-pd-blue-deep);
	border-color: var(--um-pd-blue-deep);
}

/* ==========================================================================
   6. Quick Actions Bar
   ========================================================================== */

.um-pd__quick-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 12px 0;
	margin-top: 6px;
	border-top: 1px solid var(--um-pd-border);
}

.um-pd__quick-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 12px;
	border-radius: var(--um-pd-radius);
	font-size: 11px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.15s;
	border: 1px solid var(--um-pd-border);
	background: var(--um-pd-white);
	color: var(--um-pd-primary);
	cursor: pointer;
}

.um-pd__quick-btn svg {
	width: 12px;
	height: 12px;
}

.um-pd__quick-btn:hover {
	border-color: var(--um-pd-accent);
	color: var(--um-pd-accent);
	background: var(--um-pd-blue-100);
}

.um-pd__quick-btn--primary {
	background: var(--um-pd-accent);
	color: #fff;
	border-color: var(--um-pd-accent);
}

.um-pd__quick-btn--primary:hover {
	background: var(--um-pd-blue-deep);
	color: #fff;
}

/* ==========================================================================
   7. Visitor View
   ========================================================================== */

.um-pd__visitor-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin-bottom: 16px;
}

.um-pd__visitor-card {
	background: var(--um-pd-white);
	border: 1px solid var(--um-pd-border);
	border-radius: var(--um-pd-radius);
	padding: 12px;
	text-align: center;
}

.um-pd__visitor-card-number {
	font-size: 22px;
	font-weight: 700;
	color: var(--um-pd-primary);
	line-height: 1;
	margin-bottom: 2px;
}

.um-pd__visitor-card-label {
	font-size: 11px;
	color: var(--um-pd-grey);
	font-weight: 500;
}

/* Published content grid */
.um-pd__content-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
	gap: 10px;
	margin-bottom: 16px;
}

.um-pd__content-card {
	border: 1px solid var(--um-pd-border);
	border-radius: var(--um-pd-radius);
	overflow: hidden;
	background: var(--um-pd-white);
	transition: border-color 0.2s, box-shadow 0.2s;
	text-decoration: none;
	color: var(--um-pd-text);
	display: block;
}

.um-pd__content-card:hover {
	border-color: var(--um-pd-accent);
	box-shadow: 0 1px 8px rgba(0, 113, 227, 0.08);
}

.um-pd__content-card-thumb {
	width: 100%;
	aspect-ratio: 16/10;
	background: var(--um-pd-shade);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.um-pd__content-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.um-pd__content-card-type {
	color: var(--um-pd-blue-pale);
	display: flex;
	align-items: center;
	justify-content: center;
}

.um-pd__content-card-type svg {
	width: 28px;
	height: 28px;
}

.um-pd__content-card-body {
	padding: 8px 10px;
}

.um-pd__content-card-title {
	font-size: 12px;
	font-weight: 500;
	color: var(--um-pd-primary);
	margin: 0 0 2px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.um-pd__content-card-meta {
	font-size: 10px;
	color: var(--um-pd-grey);
	display: flex;
	gap: 6px;
}

/* Section headings */
.um-pd__section-heading {
	font-size: 13px;
	font-weight: 600;
	color: var(--um-pd-primary);
	margin: 0 0 10px;
}

/* ==========================================================================
   8. Load More Button
   ========================================================================== */

.um-pd__load-more {
	text-align: center;
	padding: 14px 0;
}

.um-pd__load-more-btn {
	display: inline-block;
	padding: 6px 20px;
	background: var(--um-pd-white);
	border: 1px solid var(--um-pd-border);
	border-radius: var(--um-pd-radius);
	color: var(--um-pd-primary);
	font-size: 12px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.15s;
}

.um-pd__load-more-btn:hover {
	border-color: var(--um-pd-accent);
	color: var(--um-pd-accent);
}

.um-pd__load-more-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

/* ==========================================================================
   9. Empty & Loading States
   ========================================================================== */

.um-pd__empty {
	text-align: center;
	padding: 36px 14px;
}

.um-pd__empty-icon {
	margin-bottom: 8px;
	color: var(--um-pd-blue-pale);
	opacity: 0.5;
}

.um-pd__empty-icon svg {
	width: 32px;
	height: 32px;
}

.um-pd__empty-text {
	font-size: 12px;
	color: var(--um-pd-grey);
}

.um-pd__loading {
	text-align: center;
	padding: 24px 0;
	color: var(--um-pd-grey);
	font-size: 12px;
}

/* Spinner */
.um-pd__spinner {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid var(--um-pd-border);
	border-top-color: var(--um-pd-accent);
	border-radius: 50%;
	animation: um-pd-spin 0.6s linear infinite;
}

@keyframes um-pd-spin {
	to { transform: rotate(360deg); }
}

/* ==========================================================================
   10. Stat Card Drill-Down
   ========================================================================== */

.um-pd__stat-detail {
	margin-top: 6px;
	padding-top: 6px;
	border-top: 1px solid var(--um-pd-border);
	display: none;
}

.um-pd__stat-card--expanded .um-pd__stat-detail {
	display: block;
}

.um-pd__stat-detail-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 2px 0;
	font-size: 10px;
}

.um-pd__stat-detail-label {
	color: var(--um-pd-grey);
	max-width: 65%;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.um-pd__stat-detail-value {
	font-weight: 600;
	color: var(--um-pd-primary);
}

/* ==========================================================================
   11. Responsive
   ========================================================================== */

@media (max-width: 768px) {
	.um-pd {
		padding: 10px 10px 24px;
	}

	.um-pd__title {
		font-size: 15px;
	}

	.um-pd__subtitle {
		font-size: 10px;
	}

	.um-pd__stats-row {
		grid-template-columns: repeat(3, 1fr);
		gap: 5px;
	}

	.um-pd__stat-card {
		padding: 7px 7px 5px;
	}

	.um-pd__stat-icon {
		width: 20px;
		height: 20px;
		border-radius: 4px;
		margin-bottom: 4px;
	}

	.um-pd__stat-icon svg {
		width: 11px;
		height: 11px;
	}

	.um-pd__stat-number {
		font-size: 15px;
	}

	.um-pd__stat-label {
		font-size: 9px;
	}

	.um-pd__stat-sub {
		font-size: 8px;
	}

	.um-pd__tabs {
		gap: 0;
	}

	.um-pd__tab {
		padding: 6px 8px;
		font-size: 10px;
		flex: 1;
		justify-content: center;
	}

	.um-pd__tab-count {
		font-size: 9px;
		padding: 1px 4px;
	}

	/* Table → card layout on mobile */
	.um-pd__table,
	.um-pd__table thead,
	.um-pd__table tbody,
	.um-pd__table th,
	.um-pd__table td,
	.um-pd__table tr {
		display: block;
	}

	.um-pd__table thead {
		display: none;
	}

	.um-pd__table tr {
		margin-bottom: 6px;
		border: 1px solid var(--um-pd-border);
		border-radius: var(--um-pd-radius);
		padding: 7px 8px;
		background: var(--um-pd-white);
	}

	.um-pd__table td {
		padding: 2px 0;
		border-bottom: none;
		display: flex;
		align-items: center;
		gap: 6px;
		font-size: 11px;
	}

	.um-pd__table td::before {
		content: attr(data-label);
		font-size: 9px;
		font-weight: 600;
		color: var(--um-pd-grey);
		text-transform: uppercase;
		min-width: 50px;
		flex-shrink: 0;
	}

	.um-pd__table-title {
		max-width: none;
		font-size: 11px;
	}

	.um-pd__row-actions {
		justify-content: flex-start;
	}

	.um-pd__row-btn {
		width: 22px;
		height: 22px;
	}

	.um-pd__row-btn svg {
		width: 10px;
		height: 10px;
	}

	.um-pd__visitor-stats {
		grid-template-columns: repeat(3, 1fr);
		gap: 5px;
	}

	.um-pd__visitor-card {
		padding: 8px 6px;
	}

	.um-pd__visitor-card-number {
		font-size: 16px;
	}

	.um-pd__visitor-card-label {
		font-size: 9px;
	}

	.um-pd__content-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 6px;
	}

	.um-pd__content-card-body {
		padding: 5px 7px;
	}

	.um-pd__content-card-title {
		font-size: 10px;
	}

	.um-pd__content-card-meta {
		font-size: 9px;
	}

	.um-pd__quick-bar {
		gap: 4px;
		padding: 8px 0;
	}

	.um-pd__quick-btn {
		padding: 5px 8px;
		font-size: 10px;
		gap: 3px;
		flex: 1;
		justify-content: center;
		min-width: 0;
	}

	.um-pd__quick-btn svg {
		width: 10px;
		height: 10px;
	}

	.um-pd__section-heading {
		font-size: 12px;
		margin-bottom: 6px;
	}

	.um-pd__empty {
		padding: 20px 10px;
	}

	.um-pd__empty-icon svg {
		width: 24px;
		height: 24px;
	}

	.um-pd__empty-text {
		font-size: 11px;
	}
}

@media (max-width: 420px) {
	.um-pd__stats-row {
		grid-template-columns: repeat(2, 1fr);
		gap: 4px;
	}

	.um-pd__quick-btn {
		flex: 1 1 calc(50% - 4px);
	}
}

/* ==========================================================================
   12. Dashboard Extras — Navigation Panel  (um-de)
   ========================================================================== */

.um-de {
	max-width: 1000px;
	margin: 0 auto;
	padding: 0 14px 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 13px;
}

.um-de__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 10px 0;
	border-bottom: 1px solid var(--um-pd-border);
}

.um-de__nav-link {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 12px;
	border-radius: var(--um-pd-radius);
	font-size: 11px;
	font-weight: 600;
	text-decoration: none;
	color: var(--um-pd-primary);
	border: 1px solid var(--um-pd-border);
	background: var(--um-pd-white);
	transition: all 0.15s;
	white-space: nowrap;
}

.um-de__nav-link:hover {
	border-color: var(--um-pd-accent);
	color: var(--um-pd-accent);
	background: var(--um-pd-blue-100);
}

.um-de__nav-link svg {
	flex-shrink: 0;
	width: 13px;
	height: 13px;
}

.um-de__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 16px;
	height: 16px;
	padding: 0 5px;
	border-radius: 8px;
	font-size: 9px;
	font-weight: 700;
	background: var(--um-pd-blue-300);
	color: var(--um-pd-blue-deep);
	line-height: 1;
}

/* Responsive — Dashboard Extras */
@media (max-width: 768px) {
	.um-de {
		padding: 0 10px 8px;
	}

	.um-de__nav {
		gap: 4px;
		padding: 8px 0;
	}

	.um-de__nav-link {
		padding: 5px 8px;
		font-size: 10px;
		gap: 4px;
	}

	.um-de__nav-link svg {
		width: 11px;
		height: 11px;
	}

	.um-de__badge {
		min-width: 14px;
		height: 14px;
		font-size: 8px;
		padding: 0 4px;
	}
}

@media (max-width: 420px) {
	.um-de__nav-link {
		padding: 4px 6px;
		font-size: 9px;
		gap: 3px;
	}

	.um-de__nav-link svg {
		width: 10px;
		height: 10px;
	}
}
