/* LML Panel — hoja de estilos del panel de resellers. */

:root {
	--bg: #ffffff;
	--bg-subtle: #fafafa;
	--surface: #ffffff;
	--surface-2: #f8fafc;
	--border: #e8e8ec;
	--border-strong: #d8d8de;
	--text: #0b0b0f;
	--text-muted: #6b7280;
	--text-faint: #9ca3af;
	--accent: #111318;
	--accent-text: #ffffff;
	--ring: rgba(17, 19, 24, 0.08);
	--green: #047857;
	--green-bg: #ecfdf5;
	--green-br: #a7f3d0;
	--amber: #b45309;
	--amber-bg: #fffbeb;
	--amber-br: #fde68a;
	--red: #b91c1c;
	--red-bg: #fef2f2;
	--red-br: #fecaca;
	--blue: #1d4ed8;
	--blue-bg: #eff6ff;
	--blue-br: #bfdbfe;
	--brand: #d24625;
	--brand-soft: #b9a392;
	--radius: 12px;
	--radius-sm: 8px;
	--shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
	--shadow-lg: 0 12px 32px -12px rgba(16, 24, 40, 0.18);
	--sidebar-w: 248px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
	--bg: #0b0c0f;
	--bg-subtle: #0b0c0f;
	--surface: #131519;
	--surface-2: #17191f;
	--border: #24262d;
	--border-strong: #32353e;
	--text: #f4f5f7;
	--text-muted: #9ba1ac;
	--text-faint: #6b7280;
	--accent: #f4f5f7;
	--accent-text: #0b0c0f;
	--ring: rgba(255, 255, 255, 0.08);
	--green: #34d399;
	--green-bg: rgba(52, 211, 153, 0.1);
	--green-br: rgba(52, 211, 153, 0.28);
	--amber: #fbbf24;
	--amber-bg: rgba(251, 191, 36, 0.1);
	--amber-br: rgba(251, 191, 36, 0.28);
	--red: #f87171;
	--red-bg: rgba(248, 113, 113, 0.1);
	--red-br: rgba(248, 113, 113, 0.28);
	--blue: #60a5fa;
	--blue-bg: rgba(96, 165, 250, 0.1);
	--blue-br: rgba(96, 165, 250, 0.28);
	--shadow: none;
	--shadow-lg: 0 12px 32px -12px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html, body {
	margin: 0;
	padding: 0;
	background: var(--bg-subtle);
	color: var(--text);
	font-family: var(--font);
	font-size: 14px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.02em; }

/* ---------- Estructura ---------- */

.lml-shell { display: flex; min-height: 100vh; }

.lml-sidebar {
	width: var(--sidebar-w);
	flex: 0 0 var(--sidebar-w);
	background: var(--surface);
	border-right: 1px solid var(--border);
	display: flex;
	flex-direction: column;
	position: sticky;
	top: 0;
	height: 100vh;
	overflow-y: auto;
}

.lml-brand {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 20px 18px 16px;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.03em;
}

/*
 * Logo: dos variantes que se alternan según el tema. Los selectores llevan
 * `.lml-logo` delante a propósito: con solo `.lml-logo-dark` la regla de
 * `.lml-logo img` tendría más especificidad y se verían los dos a la vez.
 */
.lml-logo { display: inline-flex; align-items: center; }
.lml-logo img { height: var(--logo-h, 28px); width: auto; max-width: 100%; }
.lml-logo .lml-logo-light { display: block; }
.lml-logo .lml-logo-dark { display: none; }
html[data-theme="dark"] .lml-logo .lml-logo-light { display: none; }
html[data-theme="dark"] .lml-logo .lml-logo-dark { display: block; }

.lml-brand-mark {
	width: 26px;
	height: 26px;
	border-radius: 7px;
	background: var(--accent);
	color: var(--accent-text);
	display: grid;
	place-items: center;
	font-size: 13px;
	font-weight: 800;
	flex: none;
}

.lml-nav { padding: 4px 10px 12px; display: flex; flex-direction: column; gap: 2px; }

.lml-nav-label {
	padding: 14px 8px 6px;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-faint);
}

.lml-nav a {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	color: var(--text-muted);
	font-weight: 500;
	transition: background 0.12s ease, color 0.12s ease;
}
.lml-nav a:hover { background: var(--surface-2); color: var(--text); }
.lml-nav a.is-active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.lml-nav a svg { width: 17px; height: 17px; flex: none; opacity: 0.8; }
.lml-nav a .lml-nav-badge {
	margin-left: auto;
	font-size: 11px;
	font-weight: 600;
	padding: 1px 7px;
	border-radius: 999px;
	background: var(--red-bg);
	color: var(--red);
	border: 1px solid var(--red-br);
}

.lml-sidebar-foot { margin-top: auto; padding: 12px 10px 16px; }

.lml-userchip {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 10px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: var(--surface-2);
}
.lml-userchip:hover { border-color: var(--border-strong); }
.lml-avatar {
	width: 28px; height: 28px; border-radius: 8px; flex: none;
	background: var(--accent); color: var(--accent-text);
	display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.lml-userchip-meta { min-width: 0; }
.lml-userchip-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lml-userchip-role { font-size: 11px; color: var(--text-faint); }

.lml-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.lml-topbar {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 28px;
	border-bottom: 1px solid var(--border);
	background: var(--surface);
	position: sticky;
	top: 0;
	z-index: 20;
}

.lml-iconbtn {
	width: 34px; height: 34px;
	display: grid; place-items: center;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text-muted);
	cursor: pointer;
}
.lml-iconbtn:hover { color: var(--text); border-color: var(--border-strong); }
.lml-iconbtn svg { width: 16px; height: 16px; }

.lml-search {
	flex: 1;
	max-width: 380px;
	position: relative;
}
.lml-search input {
	width: 100%;
	padding: 8px 12px 8px 34px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
	color: var(--text);
	font-family: inherit;
	font-size: 13px;
}
.lml-search input:focus { outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--ring); }
.lml-search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-faint); }

.lml-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.lml-balance-chip {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 6px 12px;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface-2);
	font-size: 13px;
	font-weight: 600;
}
.lml-balance-chip span { color: var(--text-muted); font-weight: 500; }

.lml-content { padding: 28px; max-width: 1280px; width: 100%; }

.lml-page-head {
	display: flex; align-items: flex-start; gap: 16px;
	margin-bottom: 22px; flex-wrap: wrap;
}
.lml-page-head h1 { font-size: 26px; }
.lml-page-head p { margin: 4px 0 0; color: var(--text-muted); }
.lml-page-head .lml-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Componentes ---------- */

.lml-card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.lml-card-pad { padding: 20px; }
.lml-card-head {
	padding: 16px 20px;
	border-bottom: 1px solid var(--border);
	display: flex; align-items: center; gap: 12px;
}
.lml-card-head h2 { font-size: 15px; font-weight: 650; }
.lml-card-head .lml-actions { margin-left: auto; display: flex; gap: 8px; }

.lml-grid { display: grid; gap: 16px; }
.lml-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.lml-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lml-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.lml-stat { padding: 18px 20px; }
.lml-stat-label {
	display: flex; align-items: center; gap: 6px;
	font-size: 13px; color: var(--text-muted); font-weight: 500;
}
.lml-stat-value { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; margin-top: 10px; }
.lml-stat-sub { font-size: 12px; color: var(--text-faint); margin-top: 4px; }
.lml-stat-icon { margin-left: auto; color: var(--text-faint); }
.lml-stat-icon svg { width: 18px; height: 18px; }

.lml-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 7px;
	padding: 8px 14px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: var(--surface);
	color: var(--text);
	font-family: inherit;
	font-size: 13px;
	font-weight: 550;
	cursor: pointer;
	transition: background 0.12s, border-color 0.12s, opacity 0.12s;
	white-space: nowrap;
}
.lml-btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.lml-btn svg { width: 15px; height: 15px; }
.lml-btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.lml-btn-primary:hover { background: var(--accent); border-color: var(--accent); opacity: 0.88; }
.lml-btn-danger { color: var(--red); border-color: var(--red-br); background: var(--red-bg); }
.lml-btn-sm { padding: 5px 10px; font-size: 12px; }
.lml-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.lml-pill {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 550;
	border: 1px solid var(--border);
	background: var(--surface-2);
	color: var(--text-muted);
	white-space: nowrap;
}
.lml-pill-active { background: var(--green-bg); border-color: var(--green-br); color: var(--green); }
.lml-pill-expired { background: var(--surface-2); border-color: var(--border); color: var(--text-muted); }
.lml-pill-soon { background: var(--amber-bg); border-color: var(--amber-br); color: var(--amber); }
.lml-pill-trial { background: var(--blue-bg); border-color: var(--blue-br); color: var(--blue); }
.lml-pill-danger { background: var(--red-bg); border-color: var(--red-br); color: var(--red); }

/* ---------- Tablas ---------- */

.lml-table-wrap { overflow-x: auto; }
.lml-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lml-table th {
	text-align: left;
	padding: 11px 16px;
	font-size: 12px;
	font-weight: 600;
	color: var(--text-muted);
	border-bottom: 1px solid var(--border);
	white-space: nowrap;
	background: var(--surface);
}
.lml-table td {
	padding: 13px 16px;
	border-bottom: 1px solid var(--border);
	vertical-align: middle;
}
.lml-table tbody tr:last-child td { border-bottom: none; }
.lml-table tbody tr:hover { background: var(--surface-2); }
.lml-mono { font-family: var(--mono); font-size: 12.5px; }
.lml-strong { font-weight: 600; }
.lml-muted { color: var(--text-muted); }
.lml-faint { color: var(--text-faint); }
.lml-num { text-align: right; font-variant-numeric: tabular-nums; }
.lml-nowrap { white-space: nowrap; }

.lml-empty { padding: 48px 24px; text-align: center; color: var(--text-muted); }
.lml-empty svg { width: 34px; height: 34px; color: var(--text-faint); margin-bottom: 12px; }
.lml-empty h3 { font-size: 15px; margin-bottom: 4px; }

/* ---------- Formularios ---------- */

.lml-field { margin-bottom: 16px; }
.lml-field label { display: block; font-size: 13px; font-weight: 550; margin-bottom: 6px; }
.lml-field .lml-hint { font-size: 12px; color: var(--text-faint); margin-top: 6px; }

.lml-input, .lml-select, .lml-textarea {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface);
	color: var(--text);
	font-family: inherit;
	font-size: 14px;
}
.lml-input:focus, .lml-select:focus, .lml-textarea:focus {
	outline: none; border-color: var(--border-strong); box-shadow: 0 0 0 3px var(--ring);
}
.lml-textarea { min-height: 84px; resize: vertical; }
.lml-input-mono { font-family: var(--mono); }

.lml-check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; }
.lml-check input { margin-top: 3px; }

.lml-bouquets {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 8px;
	max-height: 260px;
	overflow-y: auto;
	padding: 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--surface-2);
}
.lml-bouquets label {
	display: flex; align-items: center; gap: 8px;
	font-size: 13px; font-weight: 450; margin: 0; cursor: pointer;
}

.lml-pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 10px; }
.lml-pkg {
	position: relative;
	display: block;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 13px 14px;
	cursor: pointer;
	background: var(--surface);
	transition: border-color 0.12s, box-shadow 0.12s;
}
.lml-pkg:hover { border-color: var(--border-strong); }
.lml-pkg input { position: absolute; opacity: 0; pointer-events: none; }
.lml-pkg.is-selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.lml-pkg-name { font-weight: 600; font-size: 13.5px; line-height: 1.35; }
.lml-pkg-cost { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* Encabezado de grupo dentro del selector de paquetes. */
.lml-pkg-group {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-faint);
	margin-bottom: 10px;
}

.lml-pkg-top {
	display: flex; align-items: baseline; justify-content: space-between;
	gap: 8px; margin-bottom: 6px;
}
.lml-pkg-dur { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }
.lml-pkg-price { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.lml-pkg-price strong { font-size: 14px; color: var(--text); }

.lml-pkg-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.lml-tag {
	font-size: 11px; font-weight: 550;
	padding: 1px 7px; border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--surface-2);
	color: var(--text-muted);
	white-space: nowrap;
}
.lml-tag-ok { background: var(--green-bg); border-color: var(--green-br); color: var(--green); }
.lml-tag-warn { background: var(--amber-bg); border-color: var(--amber-br); color: var(--amber); }
.lml-tag-info { background: var(--blue-bg); border-color: var(--blue-br); color: var(--blue); }

/* ---------- Avisos ---------- */

.lml-notice {
	display: flex; align-items: flex-start; gap: 10px;
	padding: 12px 14px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	background: var(--surface);
	margin-bottom: 16px;
	font-size: 13.5px;
}
.lml-notice svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.lml-notice-success { background: var(--green-bg); border-color: var(--green-br); color: var(--green); }
.lml-notice-error { background: var(--red-bg); border-color: var(--red-br); color: var(--red); }
.lml-notice-info { background: var(--blue-bg); border-color: var(--blue-br); color: var(--blue); }
.lml-notice-warn { background: var(--amber-bg); border-color: var(--amber-br); color: var(--amber); }

/* ---------- Tabs y paginación ---------- */

.lml-tabs {
	display: inline-flex; gap: 2px; padding: 3px;
	background: var(--surface-2);
	border: 1px solid var(--border);
	border-radius: 10px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}
.lml-tabs a {
	padding: 6px 13px; border-radius: 7px;
	font-size: 13px; font-weight: 550; color: var(--text-muted);
}
.lml-tabs a.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.lml-pagination {
	display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
	padding: 14px 20px; border-top: 1px solid var(--border);
}
.lml-pagination .lml-muted { margin-right: auto; font-size: 13px; }
.lml-pages { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.lml-page {
	min-width: 32px; height: 32px; padding: 0 9px;
	display: inline-flex; align-items: center; justify-content: center;
	border: 1px solid var(--border); border-radius: var(--radius-sm);
	font-size: 13px; font-weight: 550; color: var(--text-muted);
	background: var(--surface);
}
.lml-page:hover { border-color: var(--border-strong); color: var(--text); }
.lml-page.is-current {
	background: var(--accent); border-color: var(--accent); color: var(--accent-text);
}
.lml-page-gap { padding: 0 2px; color: var(--text-faint); font-size: 13px; }

/* Cabeceras ordenables. */
.lml-sort { display: inline-flex; align-items: center; gap: 5px; color: inherit; }
.lml-sort span { opacity: 0.35; font-size: 11px; }
.lml-sort:hover { color: var(--text); }
.lml-sort:hover span { opacity: 0.7; }
.lml-sort.is-active { color: var(--text); }
.lml-sort.is-active span { opacity: 1; }

/* Contador dentro de cada pestaña. */
.lml-tab-count {
	margin-left: 6px; padding: 0 6px;
	border-radius: 999px; font-size: 11px; font-weight: 600;
	background: var(--surface-2); border: 1px solid var(--border); color: var(--text-muted);
}
.lml-tabs a.is-active .lml-tab-count { background: var(--bg-subtle); }

.lml-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.lml-filters .lml-input, .lml-filters .lml-select { width: auto; min-width: 180px; }

/* ---------- Pasos numerados ---------- */

.lml-steps { margin: 0; padding-left: 20px; display: grid; gap: 9px; font-size: 13.5px; color: var(--text-muted); }
.lml-steps li { padding-left: 3px; }
.lml-steps strong { color: var(--text); }
.lml-steps a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Tarjeta destacada de saldo ---------- */

.lml-hero {
	border-radius: var(--radius);
	border: 1px solid var(--border);
	background: var(--surface);
	padding: 26px 28px;
	position: relative;
	overflow: hidden;
}
.lml-hero::after {
	content: "";
	position: absolute; right: -70px; top: -70px;
	width: 240px; height: 240px; border-radius: 50%;
	background: var(--brand); opacity: 0.07;
}
.lml-hero-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.lml-hero-value {
	font-size: 46px; font-weight: 750; letter-spacing: -0.04em;
	line-height: 1.05; margin-top: 8px;
}
.lml-hero-value small { font-size: 17px; font-weight: 600; color: var(--text-muted); margin-left: 6px; letter-spacing: 0; }
.lml-hero-sub { font-size: 13px; color: var(--text-muted); margin-top: 8px; }
.lml-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; position: relative; }

/* ---------- Dashboard ---------- */

.lml-dash-hero {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	overflow: hidden;
	margin-bottom: 16px;
}
.lml-dash-hero-main { padding: 26px 28px; position: relative; overflow: hidden; }
.lml-dash-hero-main::after {
	content: "";
	position: absolute; right: -80px; bottom: -90px;
	width: 230px; height: 230px; border-radius: 50%;
	background: var(--brand); opacity: 0.07;
}
.lml-dash-hero-main > * { position: relative; }

.lml-dash-hero-side {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	border-left: 1px solid var(--border);
	background: var(--surface-2);
}
.lml-mini {
	padding: 16px 18px;
	border-bottom: 1px solid var(--border);
	border-right: 1px solid var(--border);
}
.lml-mini:nth-child(2n) { border-right: none; }
.lml-mini:nth-last-child(-n+2) { border-bottom: none; }
.lml-mini-value { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; }
.lml-mini-warn { color: var(--amber); }
.lml-mini-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

.lml-dash-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }

.lml-urgent { margin-bottom: 16px; border-color: var(--amber-br); }
.lml-urgent .lml-card-head h2 { display: inline-flex; align-items: center; gap: 8px; color: var(--amber); }
.lml-urgent .lml-card-head h2 svg { width: 16px; height: 16px; }

/* Listas tocables: sustituyen a las tablas donde el dedo manda. */
.lml-list { display: flex; flex-direction: column; }
.lml-list-row {
	display: flex; align-items: center; gap: 12px;
	padding: 13px 20px;
	border-bottom: 1px solid var(--border);
	transition: background 0.12s;
}
.lml-list-row:last-child { border-bottom: none; }
.lml-list-row:hover { background: var(--surface-2); }
.lml-list-main { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.lml-list-main > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lml-list-sub { font-size: 12px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Paquetes de recarga ---------- */

.lml-buy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.lml-buy {
	position: relative;
	width: 100%; text-align: left;
	border: 1px solid var(--border); border-radius: var(--radius);
	background: var(--surface); color: var(--text);
	padding: 16px; cursor: pointer; font-family: inherit;
	transition: border-color 0.12s, transform 0.12s, box-shadow 0.12s;
}
.lml-buy:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.lml-buy-qty { font-size: 25px; font-weight: 750; letter-spacing: -0.03em; }
.lml-buy-qty span { font-size: 13px; font-weight: 500; color: var(--text-muted); margin-left: 4px; letter-spacing: 0; }
.lml-buy-price { font-size: 14px; font-weight: 600; margin-top: 8px; }
.lml-buy-unit { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.lml-buy-badge {
	position: absolute; top: 10px; right: 10px;
	font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
	padding: 2px 7px; border-radius: 999px;
	background: var(--brand); color: #fff;
}

/* ---------- Cantidad personalizada ---------- */

.lml-custom {
	border: 1px dashed var(--border-strong);
	border-radius: var(--radius);
	background: var(--surface-2);
	padding: 18px;
	margin-top: 4px;
}
.lml-custom-form { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.lml-custom-field { flex: 1; min-width: 190px; }
.lml-custom-field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.lml-custom-input { position: relative; }
.lml-custom-input .lml-input { padding-right: 76px; font-size: 17px; font-weight: 600; height: 46px; }
.lml-custom-suffix {
	position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
	font-size: 13px; color: var(--text-faint); pointer-events: none;
}
.lml-custom-total { display: flex; flex-direction: column; gap: 2px; min-width: 110px; }
.lml-custom-total strong { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.lml-custom .lml-btn { height: 46px; padding: 0 22px; }

/* ---------- Lista de ventajas ---------- */

.lml-features {
	list-style: none; margin: 16px 0 0; padding: 0;
	display: flex; gap: 18px; flex-wrap: wrap;
}
.lml-features li {
	display: inline-flex; align-items: center; gap: 7px;
	font-size: 13px; color: var(--text-muted);
}
/* Los SVG en línea no traen tamaño propio: sin esto ocupan todo el ancho. */
.lml-features svg { width: 15px; height: 15px; flex: none; color: var(--green); }

/* ---------- Página pública de credenciales ---------- */

.lml-share { min-height: 100vh; display: grid; place-items: start center; padding: 40px 16px; background: var(--bg-subtle); }
.lml-share-card {
	width: 100%; max-width: 520px;
	background: var(--surface); border: 1px solid var(--border);
	border-radius: 16px; padding: 30px 26px; box-shadow: var(--shadow-lg);
}
.lml-cred { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.lml-cred-row {
	display: flex; align-items: center; gap: 10px;
	padding: 11px 14px; border-bottom: 1px solid var(--border);
}
.lml-cred-row:last-child { border-bottom: none; }
.lml-cred-label { font-size: 13px; color: var(--text-muted); width: 92px; flex: none; }
.lml-cred-value { flex: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13.5px; font-weight: 600; }
.lml-cred-url {
	background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
	padding: 11px 13px; font-size: 12px; overflow-wrap: anywhere; color: var(--text-muted);
}
.lml-share-block { margin-top: 22px; }
.lml-share-title { font-size: 14px; font-weight: 650; margin-bottom: 4px; }

/* ---------- Barra de progreso simple ---------- */

.lml-bar { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.lml-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

/* ---------- Gráfica de barras ---------- */

.lml-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding: 0 2px; }
.lml-chart-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; height: 100%; }
.lml-chart-col i {
	display: block; width: 100%;
	background: var(--brand); opacity: 0.85;
	border-radius: 3px 3px 0 0;
	min-height: 2px;
}
.lml-chart-col:hover i { opacity: 1; }

/* ---------- Login ---------- */

.lml-auth {
	min-height: 100vh;
	display: grid;
	place-items: center;
	padding: 32px 20px;
	background: var(--bg-subtle);
}
.lml-auth-card {
	width: 100%; max-width: 400px;
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: 16px;
	padding: 36px 32px;
	box-shadow: var(--shadow-lg);
	text-align: center;
}
.lml-auth-brand {
	display: flex; align-items: center; justify-content: center;
	gap: 10px; font-size: 17px; font-weight: 700;
	letter-spacing: -0.03em; margin-bottom: 26px;
}
.lml-auth h1 { font-size: 21px; margin-bottom: 6px; }
.lml-auth p.lml-sub { color: var(--text-muted); margin: 0 0 24px; font-size: 14px; }
.lml-auth .lml-btn { width: 100%; padding: 11px 16px; font-size: 15px; }
.lml-auth .lml-field { text-align: left; }
.lml-auth .lml-field label { text-align: left; }
.lml-auth .lml-notice { text-align: left; }
.lml-auth-foot { margin-top: 20px; text-align: center; font-size: 13px; color: var(--text-muted); }
.lml-auth-foot a { color: var(--text); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.lml-otp-input {
	width: 100%;
	text-align: center;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: 12px;
	padding: 14px 12px 14px 24px;
	font-family: var(--mono);
}

/* ---------- Responsive ---------- */

.lml-menu-toggle { display: none; }

/*
 * iOS Safari hace zoom automático al enfocar un campo cuyo texto mide menos de
 * 16px. Por debajo de esa medida el formulario "salta" y descoloca la página,
 * así que en pantallas pequeñas todos los controles suben a 16px.
 */
@media (max-width: 900px) {
	.lml-input,
	.lml-select,
	.lml-textarea,
	.lml-search input,
	input[type="text"],
	input[type="email"],
	input[type="url"],
	input[type="tel"],
	input[type="number"],
	input[type="search"],
	input[type="password"],
	select,
	textarea {
		font-size: 16px;
	}
	/* El campo del código va aún más grande: se declara después para que la
	   regla de 16px de arriba no lo encoja. */
	.lml-otp-input { font-size: 28px; padding: 16px 12px 16px 26px; letter-spacing: 12px; }
	.lml-filters .lml-input,
	.lml-filters .lml-select { min-width: 0; width: 100%; }
	.lml-filters { flex-direction: column; align-items: stretch; }
}

@media (max-width: 1100px) {
	.lml-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Pasos de la conexión con VivaPlayer. */
.lml-viva-steps { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.lml-viva-step {
	display: inline-flex; align-items: center; gap: 9px;
	padding: 9px 14px; border: 1px solid var(--border); border-radius: 999px;
	font-size: 13px; color: var(--text-muted); background: var(--surface-2);
}
.lml-viva-step span {
	width: 19px; height: 19px; border-radius: 50%; flex: none;
	display: grid; place-items: center; font-size: 11px; font-weight: 700;
	background: var(--accent); color: var(--accent-text);
}
.lml-viva-step a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 860px) {
	.lml-sidebar {
		position: fixed; z-index: 50; left: 0; top: 0;
		transform: translateX(-100%);
		transition: transform 0.2s ease;
		box-shadow: var(--shadow-lg);
	}
	body.lml-nav-open .lml-sidebar { transform: translateX(0); }
	body.lml-nav-open::after {
		content: ""; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 40;
	}
	.lml-menu-toggle { display: grid; }
	.lml-content { padding: 18px 16px; }
	.lml-topbar { padding: 10px 16px; }

	/* El menú se toca con el dedo: entradas más altas y texto más grande. */
	.lml-sidebar { width: 270px; flex-basis: 270px; }
	.lml-nav { padding: 6px 12px 16px; gap: 4px; }
	.lml-nav a { padding: 13px 12px; font-size: 15.5px; gap: 13px; }
	.lml-nav a svg { width: 20px; height: 20px; }
	.lml-nav-label { padding: 16px 8px 8px; font-size: 12px; }
	.lml-brand { padding: 22px 16px 14px; }
	.lml-userchip { padding: 12px; }
	.lml-userchip-name { font-size: 14.5px; }
	.lml-grid-3, .lml-grid-2 { grid-template-columns: minmax(0, 1fr) !important; }
	.lml-page-head h1 { font-size: 22px; }
	.lml-page-head .lml-actions { width: 100%; }
	.lml-page-head .lml-actions .lml-btn { flex: 1; justify-content: center; }
	.lml-search { max-width: none; }
	.lml-balance-chip span { display: none; }

	/*
	 * En el móvil las tarjetas de cifras van de dos en dos: una sola por fila
	 * obliga a scrollear media pantalla antes de ver la primera tabla.
	 */
	.lml-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.lml-stat { padding: 13px 14px; }
	.lml-stat-label { font-size: 12px; }
	.lml-stat-value { font-size: 21px; margin-top: 6px; }
	.lml-stat-sub { font-size: 11px; }
	.lml-stat-icon { display: none; }

	.lml-hero { padding: 20px; }
	.lml-hero-value { font-size: 36px; }
	.lml-hero-actions .lml-btn { flex: 1; justify-content: center; }

	.lml-card-pad { padding: 16px; }
	.lml-card-head { padding: 14px 16px; }
	.lml-table th, .lml-table td { padding: 11px 12px; }
	.lml-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
	.lml-tabs a { white-space: nowrap; }
	.lml-chart { height: 90px; }
	.lml-pagination { padding: 12px 14px; }
	.lml-pagination .lml-muted { width: 100%; margin-bottom: 6px; }
	.lml-buy-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }

	/* El bloque de saldo pasa a una columna y las cifras quedan debajo. */
	.lml-dash-hero { grid-template-columns: minmax(0, 1fr); }
	.lml-dash-hero-main { padding: 22px 18px; }
	.lml-dash-hero-side { border-left: none; border-top: 1px solid var(--border); }
	.lml-dash-grid { grid-template-columns: minmax(0, 1fr); }
	.lml-mini { padding: 14px 16px; }
	.lml-mini-value { font-size: 21px; }
	.lml-list-row { padding: 14px 16px; }
	.lml-list-main > span:first-child { font-size: 14.5px; }
	.lml-custom-form { gap: 12px; }
	.lml-custom-field, .lml-custom .lml-btn { width: 100%; }
	.lml-custom .lml-btn { justify-content: center; }
}

@media (max-width: 560px) {
	.lml-hide-sm { display: none; }
}
