/* Admin Pilot — Custom Dashboard Styles
   Applied on wp-admin/index.php when the builder is active.
   Uses the WP admin color scheme variables where possible.
   ------------------------------------------------------------------ */

/* ---- Widget wrapper reset (hide the metabox chrome) ---- */
#pnlrdb_custom_dashboard { margin-bottom: 0 !important; }
#pnlrdb_custom_dashboard .postbox-header,
#pnlrdb_custom_dashboard .hndle { display: none !important; }
#pnlrdb_custom_dashboard .inside { padding: 0 !important; margin: 0 !important; }

/* ---- Layout ---- */
.ap773-custom-dashboard { width: 100%; }

.ap773-db-section {
	display: grid;
	gap: 20px;
	margin-bottom: 24px;
}
.ap773-db-section:last-child { margin-bottom: 0; }
.ap773-db-cols-1 { grid-template-columns: 1fr; }
.ap773-db-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ap773-db-cols-3 { grid-template-columns: repeat(3, 1fr); }

.ap773-db-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* ---- Blocks ---- */
.ap773-db-block {
	background: #fff;
	border: 0.5px solid #e2e8f0;
	border-radius: 10px;
	overflow: hidden;
	padding: 16px 18px;
	box-sizing: border-box;
}

/* Heading */
.ap773-db-heading {
	margin: 0;
	padding: 0;
	font-weight: 600;
	color: #0f172a;
	line-height: 1.3;
}
.ap773-db-block--heading { padding: 14px 18px; }

/* Text */
.ap773-db-text { font-size: 14px; line-height: 1.7; color: #334155; }
.ap773-db-text p { margin: 0 0 .75em; text-align: inherit; }
.ap773-db-text p:last-child { margin-bottom: 0; }
.ap773-db-text a { color: #6366f1; }

/* Button */
.ap773-db-button-wrap {
	gap: 8px;
}

.ap773-db-btn,
.ap773-db-btn:link,
.ap773-db-btn:visited,
.ap773-db-btn:hover,
.ap773-db-btn:focus,
.ap773-db-btn:active {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 9px 20px;
	border-radius: 7px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	transition: opacity .15s ease;
	line-height: 1;
	box-sizing: border-box;
	outline: none;
	box-shadow: none;
}

/* Shared hover state */
.ap773-db-btn:hover,
.ap773-db-btn:focus,
.ap773-db-btn:active {
	opacity: .9;
	text-decoration: none !important;
}

/* Primary */
.ap773-db-btn--primary,
.ap773-db-btn--primary:link,
.ap773-db-btn--primary:visited,
.ap773-db-btn--primary:hover,
.ap773-db-btn--primary:focus,
.ap773-db-btn--primary:active {
	background: #6366f1 !important;
	border: 1px solid #6366f1 !important;
	color: #ffffff !important;
}

/* Secondary */
.ap773-db-btn--secondary,
.ap773-db-btn--secondary:link,
.ap773-db-btn--secondary:visited,
.ap773-db-btn--secondary:hover,
.ap773-db-btn--secondary:focus,
.ap773-db-btn--secondary:active {
	background: transparent !important;
	border: 1.5px solid #6366f1 !important;
	color: #6366f1 !important;
}

/* Link button */
.ap773-db-btn--link,
.ap773-db-btn--link:link,
.ap773-db-btn--link:visited,
.ap773-db-btn--link:hover,
.ap773-db-btn--link:focus,
.ap773-db-btn--link:active {
	background: transparent !important;
	border: none !important;
	color: #6366f1 !important;
	padding: 9px 0;
	text-decoration: underline !important;
}

/* Protection vs WordPress global styles */
#pnlrdb_custom_dashboard .ap773-db-btn,
#pnlrdb_custom_dashboard .ap773-db-btn:link,
#pnlrdb_custom_dashboard .ap773-db-btn:visited,
#pnlrdb_custom_dashboard .ap773-db-btn:hover,
#pnlrdb_custom_dashboard .ap773-db-btn:focus,
#pnlrdb_custom_dashboard .ap773-db-btn:active {
	text-decoration: none !important;
}

#pnlrdb_custom_dashboard .ap773-db-btn--primary,
#pnlrdb_custom_dashboard .ap773-db-btn--primary:link,
#pnlrdb_custom_dashboard .ap773-db-btn--primary:visited,
#pnlrdb_custom_dashboard .ap773-db-btn--primary:hover,
#pnlrdb_custom_dashboard .ap773-db-btn--primary:focus,
#pnlrdb_custom_dashboard .ap773-db-btn--primary:active {
	color: #ffffff !important;
	background: #6366f1 !important;
	border-color: #6366f1 !important;
}

#pnlrdb_custom_dashboard .ap773-db-btn--secondary,
#pnlrdb_custom_dashboard .ap773-db-btn--secondary:link,
#pnlrdb_custom_dashboard .ap773-db-btn--secondary:visited,
#pnlrdb_custom_dashboard .ap773-db-btn--secondary:hover,
#pnlrdb_custom_dashboard .ap773-db-btn--secondary:focus,
#pnlrdb_custom_dashboard .ap773-db-btn--secondary:active {
	color: #6366f1 !important;
	border-color: #6366f1 !important;
}

#pnlrdb_custom_dashboard .ap773-db-btn--link,
#pnlrdb_custom_dashboard .ap773-db-btn--link:link,
#pnlrdb_custom_dashboard .ap773-db-btn--link:visited,
#pnlrdb_custom_dashboard .ap773-db-btn--link:hover,
#pnlrdb_custom_dashboard .ap773-db-btn--link:focus,
#pnlrdb_custom_dashboard .ap773-db-btn--link:active {
	color: #6366f1 !important;
}
.ap773-db-block--button {
	background: transparent;
	border: none;
	padding: 4px 0;
}

/* Image */
.ap773-db-image img { display: inline-block; border-radius: 6px; }
.ap773-db-caption { font-size: 12px; color: #94a3b8; margin: 6px 0 0; text-align: center; }

/* Divider */
.ap773-db-divider { border: none; border-top: 1px solid #e2e8f0; margin: 0; }
.ap773-db-block--divider { background: transparent; border: none; padding: 4px 0; }

/* Video */
.ap773-db-video { aspect-ratio: 16/9; border-radius: 8px; overflow: hidden; }
.ap773-db-video iframe, .ap773-db-video embed, .ap773-db-video object { width: 100%; height: 100%; display: block; }
.ap773-db-block--video { padding: 0; }

/* Stats */
.ap773-db-stats { display: grid; gap: 10px; }
.ap773-db-stat {
	background: #f8fafc;
	border: 0.5px solid #e2e8f0;
	border-radius: 8px;
	padding: 12px 14px;
	display: flex;
	flex-direction: column;
	gap: 3px;
}
.ap773-db-stat-n { font-size: 22px; font-weight: 700; color: #0f172a; line-height: 1; }
.ap773-db-stat-l { font-size: 12px; color: #64748b; }
.ap773-db-block--stats { background: transparent; border: none; padding: 0; }

/* ---- Dark mode ---- */
body.pnlrdb-dark .ap773-db-block { background: #1a1f2e; border-color: #2d3148; }
body.pnlrdb-dark .ap773-db-heading { color: #f1f5f9; }
body.pnlrdb-dark .ap773-db-text { color: #cbd5e1; }
body.pnlrdb-dark .ap773-db-text a { color: #818cf8; }
body.pnlrdb-dark .ap773-db-stat { background: #1e2535; border-color: #2d3148; }
body.pnlrdb-dark .ap773-db-stat-n { color: #f1f5f9; }
body.pnlrdb-dark .ap773-db-stat-l { color: #64748b; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.ap773-db-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
	.ap773-db-cols-2,
	.ap773-db-cols-3 { grid-template-columns: 1fr; }
}

/* ---- File block (Pro) ---- */
.ap773-db-file {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	background: #f8fafc;
	border: 0.5px solid #e2e8f0;
	border-radius: 8px;
}
.ap773-db-file-icon {
	width: 36px;
	height: 36px;
	background: #fff7ed;
	color: #c2410c;
	border-radius: 7px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.ap773-db-file-info { display: flex; flex-direction: column; gap: 2px; }
.ap773-db-file-name { font-size: 13px; font-weight: 500; color: #6366f1; text-decoration: none; }
.ap773-db-file-name:hover { text-decoration: underline; }
.ap773-db-file-meta { font-size: 11px; color: #94a3b8; }
.ap773-db-block--file { padding: 0; background: transparent; border: none; }
