/* ==========================================================================
   Dashboard público del gestor (shortcode [gv_gestor_dashboard])
   Identidad visual: CubamericaX
   - Azul intenso:  #0b48c6
   - Azul oscuro:   #0a3a9d
   - Rojo de marca: #e21f1f
   - Amarillo:      #fcd800
   - Verde:         #1f9d55
   ========================================================================== */

.gv-dash {
	--gv-blue:        #0b48c6;
	--gv-blue-dark:   #0a3a9d;
	--gv-blue-soft:   #e9f0ff;
	--gv-red:         #e21f1f;
	--gv-red-soft:    #fde9e9;
	--gv-yellow:      #fcd800;
	--gv-green:       #1f9d55;
	--gv-green-soft:  #e6f4ea;
	--gv-text:        #16213a;
	--gv-muted:       #5b6273;
	--gv-border:      #e2e6f1;
	--gv-bg:          #ffffff;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	color: var(--gv-text);
	max-width: 1180px;
	margin: 24px auto;
	padding: 0 12px;
}
.gv-dash *, .gv-dash *::before, .gv-dash *::after { box-sizing: border-box; }

/* ----------------------------- HERO -------------------------------------- */
.gv-dash-hero {
	background: linear-gradient(135deg, var(--gv-blue) 0%, var(--gv-blue-dark) 100%);
	color: #fff;
	border-radius: 12px;
	padding: 22px 26px;
	box-shadow: 0 8px 24px rgba(11, 72, 198, 0.18);
	position: relative;
	overflow: hidden;
	margin-bottom: 18px;
}
.gv-dash-hero::after {
	content: "";
	position: absolute;
	right: -50px;
	top: -50px;
	width: 180px;
	height: 180px;
	background: var(--gv-yellow);
	opacity: 0.15;
	border-radius: 50%;
	pointer-events: none;
}
.gv-dash-hero-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: center;
	justify-content: space-between;
	position: relative;
	z-index: 1;
}
.gv-dash-hero-text { flex: 1 1 320px; min-width: 240px; }
.gv-dash-eyebrow {
	display: inline-block;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	background: var(--gv-yellow);
	color: var(--gv-blue-dark);
	padding: 3px 9px;
	border-radius: 999px;
	margin-bottom: 8px;
}
.gv-dash-title {
	margin: 0 0 8px;
	font-size: 24px;
	font-weight: 800;
	color: #fff;
	letter-spacing: -0.2px;
}
.gv-dash-hero-codigo {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
	font-size: 13px;
}
.gv-dash-hero-codigo-label { color: rgba(255,255,255,0.75); }
.gv-dash-hero-codigo-value {
	font-family: "SFMono-Regular", Menlo, Consolas, monospace;
	font-weight: 700;
	color: var(--gv-yellow);
	background: rgba(0,0,0,0.18);
	padding: 2px 8px;
	border-radius: 4px;
}

.gv-dash-hero-saldo {
	background: rgba(255,255,255,0.12);
	border: 1px solid rgba(255,255,255,0.25);
	border-left: 4px solid var(--gv-yellow);
	border-radius: 8px;
	padding: 14px 18px;
	min-width: 220px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.gv-dash-hero-saldo-label {
	font-size: 12px;
	color: rgba(255,255,255,0.85);
	font-weight: 500;
}
.gv-dash-hero-saldo-value {
	font-size: 24px;
	font-weight: 800;
	color: var(--gv-yellow);
	line-height: 1.1;
	margin-top: 2px;
}

/* ----------------------------- STAT CARDS (estilo admin) ----------------- */
.gv-dash-stats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 14px;
	margin: 0 0 22px;
	align-items: stretch;
}
.gv-dash-stats > .gv-dash-stat { height: 100%; }
.gv-dash-stat {
	background: #f3f4f6;
	border: 1px solid var(--gv-border);
	border-radius: 8px;
	padding: 16px 18px;
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 84px;
	box-shadow: 0 1px 2px rgba(15, 32, 84, 0.04);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gv-dash-stat:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(15, 32, 84, 0.08);
}

.gv-dash-stat-icon {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
}
.gv-dash-stat-blue   .gv-dash-stat-icon { background: var(--gv-blue); }
.gv-dash-stat-red    .gv-dash-stat-icon { background: var(--gv-red); }
.gv-dash-stat-yellow .gv-dash-stat-icon { background: #d4a800; }
.gv-dash-stat-green  .gv-dash-stat-icon { background: var(--gv-green); }

.gv-dash-stat-body { display: flex; flex-direction: column; min-width: 0; }
.gv-dash-stat-label {
	font-size: 12px;
	color: var(--gv-muted);
	font-weight: 500;
}
.gv-dash-stat-value {
	font-size: 22px;
	font-weight: 800;
	color: var(--gv-text);
	line-height: 1.1;
	margin-top: 2px;
}

/* ----------------------------- SECTION HEAD ------------------------------ */
.gv-dash-saldos,
.gv-dash-ventas,
.gv-dash-productos { margin-bottom: 28px; }

.gv-dash-section-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--gv-blue);
}
.gv-dash-section-head h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: var(--gv-blue-dark);
}
.gv-dash-section-tag {
	font-size: 11px;
	color: var(--gv-muted);
	background: var(--gv-blue-soft);
	padding: 3px 9px;
	border-radius: 999px;
}

/* ----------------------------- TABLAS ------------------------------------ */
.gv-dash-table-wrap {
	background: var(--gv-bg);
	border: 1px solid var(--gv-border);
	border-radius: 8px;
	overflow-x: auto;
}
.gv-dash-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	min-width: 600px;
}
.gv-dash-table th, .gv-dash-table td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--gv-border);
	text-align: left;
	vertical-align: middle;
}
.gv-dash-table th {
	background: var(--gv-blue);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.gv-dash-table tbody tr:nth-child(even) { background: #f7f9ff; }
.gv-dash-table tbody tr:hover { background: var(--gv-blue-soft); }
.gv-dash-table tbody tr:last-child td { border-bottom: 0; }
.gv-dash-th-right, .gv-dash-td-right { text-align: right; }
.gv-dash-strong { color: var(--gv-blue-dark); font-weight: 700; }
.gv-dash-link-inline {
	color: var(--gv-blue);
	font-weight: 600;
	text-decoration: none;
}
.gv-dash-link-inline:hover { color: var(--gv-red); text-decoration: underline; }

/* ----------------------------- BADGES ------------------------------------ */
.gv-dash-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	background: #eef0f1;
	color: var(--gv-muted);
}
.gv-dash-badge-pendiente  { background: #fff5d6; color: #8a6d00; }
.gv-dash-badge-confirmada { background: var(--gv-blue-soft); color: var(--gv-blue-dark); }
.gv-dash-badge-pagada     { background: var(--gv-green-soft); color: #1e6e2c; }
.gv-dash-badge-rechazada  { background: var(--gv-red-soft); color: var(--gv-red); }

/* ----------------------------- PRODUCTOS (lista compacta) ---------------- */
.gv-dash-productos-list {
	list-style: none;
	margin: 0;
	padding: 0;
	background: var(--gv-bg);
	border: 1px solid var(--gv-border);
	border-radius: 8px;
	overflow: hidden;
}
.gv-dash-producto {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	border-bottom: 1px solid var(--gv-border);
}
.gv-dash-productos-list .gv-dash-producto:last-child { border-bottom: 0; }
.gv-dash-productos-list .gv-dash-producto:nth-child(even) { background: #f7f9ff; }
.gv-dash-productos-list .gv-dash-producto:hover { background: var(--gv-blue-soft); }

.gv-dash-producto-thumb-wrap {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	background: #f3f5fb;
	border: 1px solid var(--gv-border);
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.gv-dash-producto-thumb {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.gv-dash-producto-placeholder {
	color: var(--gv-muted);
	font-size: 11px;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.gv-dash-producto-info {
	flex: 1 1 220px;
	min-width: 0;
}
.gv-dash-producto-title {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 700;
	color: var(--gv-text);
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.gv-dash-producto-meta {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
.gv-dash-producto-precio {
	background: var(--gv-blue-soft);
	color: var(--gv-blue-dark);
	font-weight: 700;
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 999px;
}
.gv-dash-producto-comision {
	background: var(--gv-red-soft);
	color: var(--gv-red);
	font-weight: 700;
	font-size: 11px;
	padding: 2px 8px;
	border-radius: 999px;
}

.gv-dash-producto-link {
	display: flex;
	gap: 6px;
	align-items: center;
	flex-wrap: wrap;
	margin-left: auto;
}
.gv-dash-producto-input {
	flex: 1 1 200px;
	min-width: 0;
	padding: 6px 8px;
	border: 1px solid var(--gv-border);
	border-radius: 5px;
	background: #f7f9ff;
	font-family: "SFMono-Regular", Menlo, Consolas, monospace;
	font-size: 11px;
	color: var(--gv-text);
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ----------------------------- BOTONES ----------------------------------- */
.gv-dash-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 7px 12px;
	border-radius: 5px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	text-decoration: none;
	white-space: nowrap;
}
.gv-dash-btn-light {
	background: #fff;
	color: var(--gv-blue-dark);
	border-color: #fff;
}
.gv-dash-btn-light:hover { background: var(--gv-yellow); color: var(--gv-blue-dark); }
.gv-dash-btn-solid {
	background: var(--gv-blue);
	color: #fff;
	border-color: var(--gv-blue);
}
.gv-dash-btn-solid:hover { background: var(--gv-red); border-color: var(--gv-red); color: #fff; }
.gv-dash-btn-mini { padding: 5px 9px; font-size: 11px; }
.gv-dash-btn svg { display: block; }

/* ----------------------------- PAGINATION -------------------------------- */
.gv-dash-pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-top: 12px;
	padding: 10px 14px;
	background: #fff;
	border: 1px solid var(--gv-border);
	border-radius: 8px;
	font-size: 13px;
}
.gv-dash-page {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	border-radius: 6px;
	font-weight: 600;
	text-decoration: none;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
	border: 1px solid transparent;
	white-space: nowrap;
}
.gv-dash-page-prev,
.gv-dash-page-next {
	background: var(--gv-blue);
	color: #fff !important;
	border-color: var(--gv-blue);
}
.gv-dash-page-prev:hover,
.gv-dash-page-next:hover {
	background: var(--gv-blue-dark);
	color: #fff !important;
	border-color: var(--gv-blue-dark);
}
.gv-dash-page-prev svg,
.gv-dash-page-next svg {
	color: #fff !important;
	stroke: #fff !important;
}
.gv-dash-page-disabled {
	background: #f3f4f6;
	color: #9aa1b2 !important;
	cursor: not-allowed;
	opacity: .7;
}
.gv-dash-page-disabled svg {
	color: #9aa1b2 !important;
	stroke: #9aa1b2 !important;
}
.gv-dash-page-info {
	flex: 1 1 auto;
	text-align: center;
	color: var(--gv-muted);
	font-size: 12px;
	font-weight: 500;
}

/* ----------------------------- MISC -------------------------------------- */
.gv-dash-empty {
	color: var(--gv-muted);
	font-style: italic;
	background: #f7f9ff;
	border: 1px dashed var(--gv-border);
	padding: 12px;
	border-radius: 6px;
	font-size: 13px;
}
.gv-dash-debug {
	background: #0a3a9d;
	color: #d6e0ff;
	padding: 12px;
	border-radius: 6px;
	overflow: auto;
	font-size: 11px;
}
.gv-dash-msg {
	padding: 12px 16px;
	border-radius: 6px;
	margin-bottom: 16px;
	font-size: 13px;
}
.gv-dash-msg-info {
	background: var(--gv-blue-soft);
	color: var(--gv-blue-dark);
	border-left: 3px solid var(--gv-blue);
}

/* ----------------------------- RESPONSIVE -------------------------------- */
@media (max-width: 720px) {
	.gv-dash-hero { padding: 18px; }
	.gv-dash-title { font-size: 20px; }
	.gv-dash-hero-saldo { text-align: left; width: 100%; }
	.gv-dash-hero-saldo-breakdown { justify-content: flex-start; }
	.gv-dash-producto { flex-wrap: wrap; }
	.gv-dash-producto-link { width: 100%; margin-left: 0; }
	.gv-dash-pagination { flex-wrap: wrap; justify-content: center; }
	.gv-dash-page-info { order: -1; flex-basis: 100%; margin-bottom: 4px; }
}