/* SampleLab: naranja, negro y blanco.
   Si tenés el código exacto del naranja de la marca, se cambia solo en --sl-orange. */
:root {
	--sl-orange: #ff6a13;
	--sl-orange-dark: #e05a0a;
	--sl-black: #111111;
	--sl-white: #ffffff;

	--primary: var(--sl-orange);
	--primary-color: var(--sl-orange);
	--btn-primary: var(--sl-orange);
	--blue-500: var(--sl-orange);
}

/* Barra superior negra */
.navbar {
	background-color: var(--sl-black) !important;
	border-bottom: 3px solid var(--sl-orange);
}
.navbar .navbar-brand,
.navbar .nav-link,
.navbar .navbar-nav .nav-link,
.navbar .es-icon,
.navbar .icon use {
	color: var(--sl-white) !important;
	stroke: var(--sl-white);
}
.navbar .search-bar .form-control {
	background-color: #2a2a2a;
	color: var(--sl-white);
}

/* Botones principales */
.btn-primary,
.btn.btn-primary {
	background-color: var(--sl-orange) !important;
	border-color: var(--sl-orange) !important;
	color: var(--sl-white) !important;
}
.btn-primary:hover,
.btn.btn-primary:hover {
	background-color: var(--sl-orange-dark) !important;
	border-color: var(--sl-orange-dark) !important;
}

/* Elemento activo del menú lateral */
.desk-sidebar .standard-sidebar-item.selected,
.sidebar-item-container .standard-sidebar-item.selected {
	background-color: rgba(255, 106, 19, 0.12) !important;
	border-left: 3px solid var(--sl-orange);
}

/* Accesos del espacio de trabajo */
.widget.shortcut-widget-box:hover {
	border-color: var(--sl-orange) !important;
}

/* Pantalla de login */
.page-card-head .app-logo,
.for-login .page-card-head h4 {
	color: var(--sl-black);
}
.for-login .btn-primary {
	width: 100%;
}

/* ============ Pantallas simples de Simple Gestión (prefijo sg-) ============ */
.sg-wrap { max-width: 1400px; min-width: 0; box-sizing: border-box; margin: 0 auto; padding: 4px 0 40px; font-size: 14px; }
.sg-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 8px 0 16px; }
.sg-toolbar input, .sg-toolbar select { height: 36px; border-radius: 8px; border: 1px solid #ddd; padding: 0 12px; background: #fff; }
.sg-toolbar input.sg-search { flex: 1 1 280px; font-size: 15px; }
.sg-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.sg-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 14px 16px; }
.sg-card .sg-label { color: #6b6b6b; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.sg-card .sg-value { font-size: 22px; font-weight: 700; margin-top: 4px; color: #111; }
.sg-card .sg-sub { color: #8a8a8a; font-size: 12px; margin-top: 2px; }
.sg-card.sg-accent { border-left: 4px solid var(--sl-orange); }
.sg-card.sg-good .sg-value { color: #1a7f37; }
.sg-card.sg-bad .sg-value { color: #c62828; }
.sg-table-wrap { background: #fff; border: 1px solid #eee; border-radius: 12px; overflow: auto; max-height: 70vh; }
table.sg-table { width: 100%; border-collapse: collapse; }
.sg-table th { position: sticky; top: 0; background: #fafafa; z-index: 1; font-weight: 600; color: #444; font-size: 12px;
	text-align: left; padding: 10px; border-bottom: 1px solid #eee; white-space: nowrap; cursor: pointer; user-select: none; }
.sg-table td { padding: 9px 10px; border-bottom: 1px solid #f3f3f3; white-space: nowrap; }
.sg-table tr:hover td { background: #fff8f3; }
.sg-table .sg-num { text-align: right; font-variant-numeric: tabular-nums; }
.sg-table .sg-strong { font-weight: 700; }
.sg-table .sg-muted { color: #999; }
.sg-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.sg-pill.ok { background: #e8f5e9; color: #1a7f37; }
.sg-pill.bajo { background: #fff4e5; color: #b26a00; }
.sg-pill.sin { background: #fdecea; color: #c62828; }
.sg-table input.sg-price { width: 110px; text-align: right; border: 1px solid #e5e5e5; border-radius: 6px; padding: 4px 8px; }
.sg-table input.sg-price.changed { border-color: var(--sl-orange); background: #fff4ec; }
.sg-table input.sg-qty { width: 70px; text-align: right; border: 1px solid #e5e5e5; border-radius: 6px; padding: 4px 8px; }
.sg-margin { font-size: 11px; color: #888; display: block; text-align: right; }
.sg-margin.neg { color: #c62828; }
.sg-pos { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
.sg-pos > * { min-width: 0; }
@media (max-width: 900px) { .sg-pos { grid-template-columns: 1fr; } }
.sg-results { position: relative; }
.sg-dropdown { position: absolute; left: 0; right: 0; top: 40px; background: #fff; border: 1px solid #eee; border-radius: 10px;
	box-shadow: 0 8px 24px rgba(0,0,0,.08); z-index: 10; max-height: 340px; overflow: auto; }
.sg-dropdown .sg-opt { padding: 10px 12px; display: flex; justify-content: space-between; gap: 12px; cursor: pointer; }
.sg-dropdown .sg-opt:hover, .sg-dropdown .sg-opt.active { background: #fff4ec; }
.sg-total-box { background: #111; color: #fff; border-radius: 12px; padding: 18px; }
.sg-total-box .sg-total { font-size: 34px; font-weight: 800; margin: 6px 0 14px; }
.sg-total-box select, .sg-total-box input { box-sizing: border-box; width: 100%; height: 38px; border-radius: 8px; border: none; padding: 0 10px; margin-bottom: 10px; color: #111; }
.sg-total-box .btn { width: 100%; height: 46px; font-size: 16px; font-weight: 700; }
.sg-empty { padding: 40px; text-align: center; color: #999; }
.sg-section-title { font-size: 16px; font-weight: 700; margin: 22px 0 10px; }

/* ============ Menú lateral fijo de Simple Gestión ============ */
:root { --sg-nav-width: 232px; }
#sg-nav {
	position: fixed; top: var(--navbar-height, 48px); left: 0; bottom: 0; width: var(--sg-nav-width);
	background: #fff; border-right: 1px solid #eee; overflow-y: auto; padding: 12px 10px 40px; z-index: 1020;
	font-size: 14px;
}
body.sg-nav-on #body { margin-left: var(--sg-nav-width); transition: margin-left .15s; }
/* El menú lateral propio de Frappe (solo en los espacios de trabajo) queda reemplazado por este. */
body.sg-nav-on #page-Workspaces .layout-side-section { display: none !important; }
body.sg-nav-on #page-Workspaces .layout-main-section-wrapper { flex: 0 0 100%; max-width: 100%; }
#sg-nav, #sg-nav * { text-align: left; direction: ltr; }
#sg-nav .sg-nav-item {
	display: flex; flex-direction: row; justify-content: flex-start; align-items: center; gap: 10px;
	width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px;
	color: #222; text-decoration: none; cursor: pointer; font-weight: 500; user-select: none;
}
#sg-nav .sg-nav-item .sg-nav-label { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#sg-nav .sg-nav-item svg, #sg-nav .sg-nav-item .icon { flex: 0 0 20px; width: 20px; margin: 0; }
#sg-nav .sg-nav-collapse {
	display: flex; align-items: center; gap: 6px; width: 100%; border: none; background: transparent; color: #888;
	font-size: 12px; padding: 4px 10px 10px; cursor: pointer;
}
#sg-nav .sg-nav-collapse:hover { color: #111; }
#sg-nav .sg-when-closed { display: none; font-size: 18px; }

/* Menú achicado: solo íconos */
body.sg-nav-collapsed { --sg-nav-width: 60px; }
body.sg-nav-collapsed #sg-nav { padding: 12px 6px; overflow-x: hidden; }
body.sg-nav-collapsed #sg-nav .sg-nav-label,
body.sg-nav-collapsed #sg-nav .sg-caret,
body.sg-nav-collapsed #sg-nav .sg-nav-children,
body.sg-nav-collapsed #sg-nav .sg-when-open { display: none !important; }
body.sg-nav-collapsed #sg-nav .sg-when-closed { display: inline; }
body.sg-nav-collapsed #sg-nav .sg-nav-item { justify-content: center; padding: 10px 0; }
body.sg-nav-collapsed #sg-nav .sg-nav-collapse { justify-content: center; }
#sg-nav .sg-nav-item:hover, #sg-nav .sg-nav-sub:hover { background: #f5f5f5; text-decoration: none; }
#sg-nav .sg-nav-item .icon { flex: 0 0 auto; }
#sg-nav .sg-nav-item.active { background: rgba(255, 106, 19, 0.12); color: #111; box-shadow: inset 3px 0 0 var(--sl-orange); }
#sg-nav .sg-caret { margin-left: auto; transition: transform .15s; color: #999; font-size: 16px; }
#sg-nav .sg-nav-group.open .sg-caret { transform: rotate(90deg); }
#sg-nav .sg-nav-group.has-active > .sg-nav-item { color: var(--sl-orange-dark); }
#sg-nav .sg-nav-children { display: none; padding: 2px 0 6px 34px; }
#sg-nav .sg-nav-group.open .sg-nav-children { display: block; }
#sg-nav .sg-nav-sub { display: block; width: 100%; box-sizing: border-box; padding: 6px 10px; border-radius: 6px; color: #444; text-decoration: none; font-size: 13.5px; }
#sg-nav .sg-nav-sub.active { background: rgba(255, 106, 19, 0.12); color: #111; font-weight: 600; }
#sg-nav-btn { display: none; }

/* Pantallas chicas (celular / tablet): el menú se abre con el botón "Menú". */
@media (max-width: 991px) {
	body.sg-nav-on #body { margin-left: 0; }
	#sg-nav { transform: translateX(-100%); transition: transform .2s; box-shadow: 2px 0 12px rgba(0,0,0,.08); }
	body.sg-nav-mobile-open #sg-nav { transform: none; }
	#sg-nav-btn {
		display: block; position: fixed; left: 12px; bottom: 16px; z-index: 1030; border: none; border-radius: 999px;
		background: #111; color: #fff; padding: 10px 16px; font-weight: 600; box-shadow: 0 4px 12px rgba(0,0,0,.2);
	}
}
@media print { #sg-nav, #sg-nav-btn { display: none !important; } body.sg-nav-on #body { margin-left: 0; } }

/* Fotos de productos */
.sg-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; border: 1px solid #eee; background: #fafafa;
	display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; font-size: 11px; color: #aaa; }
.sg-thumb-empty { background: #f4f4f4; }
a.sg-vfoto { cursor: pointer; text-decoration: none; }
.sg-dropdown .sg-opt-main { display: flex; align-items: center; gap: 10px; }
.sg-total-box .sg-last { display: flex; gap: 12px; align-items: center; background: #1d1d1d; border-radius: 10px; padding: 10px; margin-bottom: 14px; }
.sg-total-box .sg-last img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; background: #fff; }

/* Asistente de alta de productos */
.sg-steps { display: flex; gap: 8px; margin: 6px 0 16px; flex-wrap: wrap; }
.sg-step { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: #f1f1f1; color: #777; font-weight: 600; font-size: 13px; }
.sg-step span { width: 22px; height: 22px; border-radius: 50%; background: #ddd; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.sg-step.on { background: #fff1e8; color: #111; } .sg-step.on span { background: var(--sl-orange); }
.sg-step.done span { background: #1a7f37; }
.sg-panel { background: #fff; border: 1px solid #eee; border-radius: 14px; padding: 22px; }
.sg-panel h3 { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.sg-tipos { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 14px; }
.sg-tipo { border: 2px solid #eee; border-radius: 14px; padding: 18px; cursor: pointer; }
.sg-tipo:hover, .sg-tipo.on { border-color: var(--sl-orange); }
.sg-tipo b { display: block; font-size: 17px; margin: 10px 0 4px; } .sg-tipo p { color: #666; margin: 0; }
.sg-tipo-ico { width: 48px; height: 48px; border-radius: 12px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.sg-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px 18px; margin-top: 14px; }
.sg-panel label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 4px; color: #333; }
.sg-in { width: 100%; box-sizing: border-box; height: 38px; border: 1px solid #ddd; border-radius: 8px; padding: 0 10px; background: #fff; }
.sg-in:disabled { background: #f3f3f3; color: #999; }
.sg-hint { font-size: 12px; color: #b26a00; margin-top: 4px; }
.sg-row { display: flex; gap: 8px; align-items: center; }
.sg-foto { display: flex; gap: 14px; align-items: center; margin-top: 16px; padding: 12px; border: 1px dashed #ccd; border-radius: 12px; }
.sg-foto-box { width: 72px; height: 72px; border-radius: 10px; background: #f4f6fb; display: flex; align-items: center; justify-content: center; font-size: 26px; overflow: hidden; }
.sg-foto-box img { width: 100%; height: 100%; object-fit: cover; }
.sg-info { background: #eef5ff; border: 1px solid #cfe0ff; color: #234; border-radius: 10px; padding: 12px 14px; margin-top: 10px; }
.sg-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 40px; border: 1px solid #ddd; border-radius: 8px; padding: 4px 8px; background: #fff; }
.sg-chip { background: #f1f1f1; border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.sg-chip a { cursor: pointer; color: #999; margin-left: 4px; }
.sg-chip-in { border: none; outline: none; flex: 1; min-width: 160px; height: 30px; }
.sg-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sg-preset { background: #f6f6f6; border: 1px solid #e5e5e5; border-radius: 6px; padding: 2px 8px; font-size: 12.5px; color: #333; cursor: pointer; text-decoration: none; }
.sg-preset:hover { border-color: var(--sl-orange); text-decoration: none; }
.sg-nav-btns { display: flex; justify-content: space-between; margin-top: 16px; }
.sg-nav-btns .btn { min-width: 140px; height: 40px; font-weight: 600; }
.sg-table input.sg-in { height: 32px; }
/* Facturación rápida: el nombre del producto puede ocupar dos renglones para que entre el subtotal. */
.sg-lines .sg-table td { white-space: normal; }
.sg-lines .sg-table td.sg-num { white-space: nowrap; }
.sg-lines .sg-table input.sg-price { width: 100px; }
.sg-lines .sg-table input.sg-qty { width: 56px; }

/* Pedido de la dueña (02/11): sin comentarios ni "Actividad" al pie de los formularios, en todo el sistema.
   El historial de cambios se sigue guardando por dentro (auditoría); solo deja de mostrarse. */
.form-footer .after-save,
.form-footer .comment-box,
.form-footer .timeline,
.list-row .comment-count,
.list-row-col .comment-count,
.form-sidebar .form-comments { display: none !important; }

/* Productos agrupados (artículo con sus variantes adentro, como en Dux) */
.sg-prod { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #fff; border: 1px solid #eee;
	border-radius: 10px; margin-bottom: 6px; cursor: pointer; text-align: left; }
.sg-prod:hover { border-color: #ffb27a; }
.sg-prod.abierto { border-bottom-left-radius: 0; border-bottom-right-radius: 0; margin-bottom: 0; border-color: #ffb27a; }
.sg-prod-flecha { width: 14px; color: #888; flex: none; }
.sg-prod-nombre { flex: 1 1 auto; min-width: 0; }
.sg-prod-nombre b { overflow-wrap: anywhere; margin-right: 6px; }
.sg-ver { vertical-align: baseline; padding: 1px 10px; }
.sg-prod-stock { flex: none; text-align: right; min-width: 80px; }
.sg-prod-vars { border: 1px solid #ffb27a; border-top: 0; border-radius: 0 0 10px 10px; margin-bottom: 10px; overflow-x: auto; background: #fff; }
.sg-prod-vars .sg-table { margin: 0; }
.sg-var { cursor: pointer; }
.sg-var:hover td { background: #fff7f0; }

/* Ficha de artículo (como en Dux) */
.sg-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid #e6e6e6; margin-bottom: 16px; }
.sg-tab { padding: 10px 14px; cursor: pointer; color: #555; border-bottom: 2px solid transparent; text-decoration: none !important; }
.sg-tab:hover { color: #111; }
.sg-tab.activo { color: #ff6a00; border-bottom-color: #ff6a00; font-weight: 600; }
.sg-ficha-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.sg-ficha-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.sg-ficha-cards .sg-card { margin: 0; }
.sg-datos label { display: block; margin: 8px 0 4px; font-size: 12px; color: #666; }
.sg-img-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.sg-img-card { background: #fff; border: 1px solid #eee; border-radius: 10px; padding: 10px; text-align: left; }
.sg-img-box { height: 140px; display: flex; align-items: center; justify-content: center; background: #f7f7f7; border-radius: 8px; margin-bottom: 8px; overflow: hidden; }
.sg-img-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 900px) { .sg-ficha-grid { grid-template-columns: minmax(0, 1fr); } }

/* Artículo eliminado (se conserva por sus movimientos) */
.sg-eliminado { background: #fdecea; border: 1px solid #f5c2bd; color: #8a1c12; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; }
.sg-eliminado .btn { margin-left: 8px; }
.sg-badge-elim { display: inline-block; background: #fdecea; color: #8a1c12; border-radius: 6px; padding: 0 6px; font-size: 11px; margin-left: 4px; }

/* Movimientos: filtros arriba como en Dux */
.sg-filtros { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 14px; margin-bottom: 14px; }
.sg-filtros label { display: block; font-size: 12px; color: #666; margin-bottom: 4px; }
.sg-filtro-buscar { grid-column: span 2; }
@media (max-width: 600px) { .sg-filtro-buscar { grid-column: auto; } }

/* Carga rápida de stock */
.sg-carga-modos { display: flex; gap: 6px; flex-wrap: wrap; }
.sg-carga-modos .btn { min-width: 110px; }
.sg-carga-ayuda { margin-top: 8px; }
.sg-carga-scan { display: grid; grid-template-columns: minmax(0, 1fr) 130px; gap: 10px; align-items: end; }
.sg-scan { font-size: 16px; padding: 12px 14px !important; border: 2px solid #ff6a00 !important; }
.sg-carga-cant label { font-size: 12px; color: #666; display: block; margin-bottom: 4px; }
.sg-scan-res { margin-top: 8px; }
.sg-scan-op { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid #eee; border-radius: 8px; margin-bottom: 6px; cursor: pointer; background: #fff; text-align: left; }
.sg-scan-op:hover { border-color: #ff6a00; background: #fff7f0; }
.sg-noexiste { background: #fff7e6; border: 1px solid #ffd59a; border-radius: 10px; padding: 12px; }
.sg-carga-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.sg-carga-prod { min-width: 200px; white-space: normal; }
.sg-carga-prod b { font-size: 14px; }
.sg-carga-var { display: inline-block; background: #fff0e5; color: #b34a00; border-radius: 6px; padding: 1px 8px; font-weight: 600; margin-top: 2px; }
.sg-qty { display: inline-flex; align-items: center; gap: 4px; }
.sg-qty .sg-cant { width: 56px; text-align: center; }
.sg-carga .sg-costo { width: 96px; text-align: right; }
.sg-carga .sg-table th, .sg-carga .sg-table td { padding-left: 8px; padding-right: 8px; }
.sg-flash td { animation: sgflash 1.2s ease-out; }
@keyframes sgflash { from { background: #ffe2cc; } to { background: transparent; } }
@media (max-width: 600px) { .sg-carga-scan { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Logo de SampleLab (03/11/2026) ---------- */
/* Barra superior: logo horizontal sin lema (Frappe lo achica a 24px de ancho). */
.navbar .navbar-brand .app-logo { width: auto !important; height: 28px; max-width: 170px; object-fit: contain; }
/* Inicio de sesión: logo completo, con el lema "Soluciones que impulsan tus ideas". */
.page-card-head .app-logo {
	content: url("/assets/samplelab/images/samplelab-logo.png");
	width: auto !important; height: 72px !important; max-width: 280px; object-fit: contain; margin-bottom: 12px;
}

