/* Light theme: textos de descripciones, nombres de servicios y celdas informativas en gris oscuro */
body.theme-light .timeline-details td,
body.theme-light .history-table td,
body.theme-light .service-main,
body.theme-light .service-item,
body.theme-light .distribution-item strong,
body.theme-light .distribution-item span,
body.theme-light .dashboard-screen .move-item,
body.theme-light .dashboard-screen .move-item div,
body.theme-light .dashboard-screen .move-tip {
	color: #334155 !important;
}
/* Light theme: detalles de timeline, horas y usuarios en gris oscuro */
body.theme-light .timeline-time,
body.theme-light .timeline-summary,
body.theme-light .timeline-summary div,
body.theme-light .history-list .muted,
body.theme-light .history-table td,
body.theme-light .history-table th,
body.theme-light .dashboard-screen .history-list,
body.theme-light .dashboard-screen .history-list div {
	color: #334155 !important;
}
/* Light theme: valores secundarios y textos informativos en gris oscuro */
body.theme-light .propina-details,
body.theme-light .kpi-subtext,
body.theme-light .kpi-label,
body.theme-light .propina-circle small,
body.theme-light .propina-circle span,
body.theme-light .summary-subtext,
body.theme-light .dashboard-screen .kpi-subtext,
body.theme-light .dashboard-screen .kpi-label {
	color: #334155 !important;
}
/* Light theme: labels y textos secundarios en gris oscuro */
body.theme-light label,
body.theme-light .form label,
body.theme-light .summary-label,
body.theme-light .card-subtitle,
body.theme-light .muted {
	color: #334155 !important;
}
/* Light theme: text color logic for backgrounds */
body.theme-light .card,
body.theme-light .summary-card,
body.theme-light .distribution-card,
body.theme-light .pie-card,
body.theme-light .history-card,
body.theme-light .timeline-list,
body.theme-light .timeline-entry,
body.theme-light .cart-table,
body.theme-light .history-results,
body.theme-light .history-summary,
body.theme-light .turno-chip,
body.theme-light .file-input-label,
body.theme-light ul.list,
body.theme-light .footer,
body.theme-light .form input,
body.theme-light .form select,
body.theme-light .form textarea,
body.theme-light .btn:not(.primary),
body.theme-light .btn.primary,
body.theme-light .btn.danger,
body.theme-light .notif-panel,
body.theme-light .notif-bell,
body.theme-light .brand,
body.theme-light .brand-text,
body.theme-light .nav-link,
body.theme-light .nav-text,
body.theme-light .sidebar-foot,
body.theme-light .who,
body.theme-light .muted,
body.theme-light .timeline-details th,
body.theme-light .timeline-details td,
body.theme-light .history-table th,
body.theme-light .history-table td,
body.theme-light table th,
body.theme-light table td {
	color: #0f172a !important;
}
body.theme-light .muted,
body.theme-light .summary-label,
body.theme-light .card-subtitle {
	color: #64748b !important;
}
body.theme-light .btn.primary {
	color: #fff !important;
}
body.theme-light .btn.danger {
	color: #dc2626 !important;
}
body.theme-light .nav-link.active,
body.theme-light .nav-link:hover {
	color: #0f172a !important;
}
/* Modo claro: texto de enlaces del menú más tenue por defecto */
body.theme-light .sidebar .nav-link:not(.active):not(:hover){
	color:#475569 !important; /* slate-600 */
}
body.theme-light .sidebar .nav-link:not(.active):not(:hover) .nav-text{
	color:#475569 !important;
}
body.theme-light .sidebar,
body.theme-light .sidebar-toggle,
body.theme-light .notif-bell,
body.theme-light .notif-panel {
	color: #0f172a !important;
}
body.theme-light .timeline-entry[open],
body.theme-light .timeline-entry[open] summary {
	color: #0f172a !important;
}
body.theme-light .dashboard-kpi-grid .kpi-card {
	color: #fff !important;
}
body.theme-light .dashboard-kpi-grid .kpi-card {
	background: linear-gradient(135deg,#0f766e,#14b8a6) !important;
}
body.theme-light .dashboard-kpi-grid .kpi-card:nth-child(2) {
	background: linear-gradient(135deg,#1d4ed8,#60a5fa) !important;
}
body.theme-light .dashboard-kpi-grid .kpi-card:nth-child(3) {
	background: linear-gradient(135deg,#f97316,#fb923c) !important;
}
body.theme-light .dashboard-kpi-grid .kpi-card:nth-child(4) {
	background: linear-gradient(135deg,#9333ea,#c084fc) !important;
}
body.theme-light .dashboard-kpi-grid .kpi-card * {
	color: #fff !important;
}
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root{
	--body-bg:#010409;
	--content-bg:#0f172a;
	--content-soft:#111c3f;
	--sidebar-bg:linear-gradient(180deg,#020617 0%,#0b1120 100%);
	--card-bg:#141c34;
	--card-border:rgba(148,163,184,0.2);
	--text:#f8fafc;
	--text-light:#94a3b8;
	--primary:#60a5fa;
	--primary-dark:#3b82f6;
	--primary-soft:rgba(96,165,250,0.18);
	--accent:#f472b6;
	--danger:#fb7185;
	--success:#4ade80;
	--shadow-deep:0 35px 65px -30px rgba(15,23,42,0.75);
	--shadow-card:0 25px 40px -25px rgba(15,23,42,0.8);
	--radius:18px;
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
	min-height:100vh;
	font-family:"Plus Jakarta Sans","Segoe UI",sans-serif;
	background:radial-gradient(circle at top,var(--content-soft),var(--body-bg));
	color:var(--text);
	-webkit-font-smoothing:antialiased;
}
/* Theme variables: dark (default) and light */
body.theme-dark{
	--body-bg:#010409;
	--content-bg:#0f172a;
	--content-soft:#111c3f;
	--sidebar-bg:linear-gradient(180deg,#020617 0%,#0b1120 100%);
	--card-bg:#141c34;
	--card-border:rgba(148,163,184,0.2);
	--text:#f8fafc;
	--text-light:#94a3b8;
	--primary:#60a5fa;
	--primary-dark:#3b82f6;
	--primary-soft:rgba(96,165,250,0.18);
	--accent:#f472b6;
	--danger:#fb7185;
	--success:#4ade80;
}
body.theme-light{
	--body-bg:#f7fafc;
	--content-bg:#ffffff;
	--content-soft:#e6eef9;
	--sidebar-bg:linear-gradient(180deg,#ffffff 0%,#f1f5f9 100%);
	--card-bg:#ffffff;
	--card-border:rgba(15,23,42,0.12);
	--text:#0f172a;
	--text-light:#334155;
	--primary:#2563eb;
	--primary-dark:#1d4ed8;
	--primary-soft:rgba(37,99,235,0.15);
	--accent:#db2777;
	--danger:#dc2626;
	--success:#16a34a;
}
/* Minor adjustments for light theme */
body.theme-light .topbar{background:rgba(241,245,249,0.7);border-color:rgba(15,23,42,0.12)}
body.theme-light .nav-link{color:#334155}
body.theme-light .nav-link:hover{color:#0f172a;background:rgba(2,6,23,0.06)}
body.theme-light .notif-bell{background:#fff;border-color:rgba(15,23,42,0.15)}
body.theme-light .notif-panel{background:#ffffff;border-color:rgba(15,23,42,0.12)}
body.theme-light .card{background:#fff}
/* Light theme: fix remaining dark components across pages */
body.theme-light .timeline-list{background:#ffffff;border-color:rgba(15,23,42,0.12);backdrop-filter:none}
body.theme-light .timeline-entry{background:#ffffff;border-color:rgba(15,23,42,0.12);box-shadow:none}
body.theme-light .timeline-entry summary{background:#f8fafc;color:#0f172a}
body.theme-light .timeline-time{color:#0f172a}
body.theme-light .timeline-summary{color:#334155}
body.theme-light .timeline-summary div:last-child{color:#64748b}
body.theme-light .timeline-details th, body.theme-light .timeline-details td{border-bottom-color:rgba(15,23,42,0.08);color:#0f172a}
body.theme-light .timeline-details thead{color:#475569}
body.theme-light .turno-chip{background:#ffffff;border-color:rgba(15,23,42,0.12);color:#0f172a;box-shadow:none}
body.theme-light .turno-chip strong{color:#0f172a}
body.theme-light .summary-label{color:#64748b}
body.theme-light .history-summary{background:#ffffff;border-color:rgba(15,23,42,0.12)}
body.theme-light .history-summary strong{color:#0f172a}
body.theme-light .history-results{background:#ffffff;border-color:rgba(15,23,42,0.12)}
body.theme-light table tr{background:#ffffff;box-shadow:none}
body.theme-light table td, body.theme-light table th{color:#0f172a}
body.theme-light table th{color:#334155}
body.theme-light ul.list{background:#ffffff;border-color:rgba(15,23,42,0.12);backdrop-filter:none}
body.theme-light ul.list li{color:#0f172a;border-color:rgba(15,23,42,0.08)}
body.theme-light .file-input-label{background:#ffffff;border-color:rgba(15,23,42,0.18)}
body.theme-light .footer{background:#f8fafc;color:#334155;border-top-color:rgba(15,23,42,0.12)}

/* Light theme: headings darker and bolder for readability */
body.theme-light h1,
body.theme-light h2,
body.theme-light h3{color:#0f172a;font-weight:800}
body.theme-light .topbar h1{color:#0f172a;font-weight:800}
body.theme-light .card-head h2{color:#0f172a;font-weight:800}
body.theme-light .history-table thead,
body.theme-light .timeline-details thead{color:#0f172a;font-weight:700}
/* Dashboard light theme overrides */
body.theme-light .dashboard-screen .chart-card,
body.theme-light .dashboard-screen .table-card,
body.theme-light .dashboard-screen .pie-card,
body.theme-light .dashboard-screen .history-card,
body.theme-light .distribution-card{
	background:#ffffff;
	border-color:rgba(15,23,42,0.12);
	box-shadow:none;
}
body.theme-light .dashboard-screen .bar-track{background:rgba(2,6,23,0.06)}
body.theme-light .dashboard-screen .bar-info{color:#334155}
body.theme-light .dashboard-screen .bar-value{color:#0f172a}
body.theme-light .history-list .muted{color:#64748b}
body.theme-light .history-card .card-head{border-bottom-color:rgba(15,23,42,0.08)}
body.theme-light .closed-users .pill{background:#eef2ff;color:#0f172a}
/* Light theme: refine forms, borders and active states */
body.theme-light .sidebar{border-right:1px solid rgba(15,23,42,0.08);box-shadow:none}
body.theme-light .brand small{color:#64748b}
body.theme-light .nav-link.active{background:rgba(37,99,235,0.10);color:#0f172a;border-color:rgba(37,99,235,0.28);box-shadow:none}
body.theme-light .btn:not(.primary){background:#ffffff;border:1px solid rgba(15,23,42,0.12);color:#0f172a}
body.theme-light .btn:not(.primary):hover{background:#f8fafc}
body.theme-light .btn.primary{color:#ffffff;box-shadow:0 10px 24px -16px rgba(37,99,235,0.5)}
body.theme-light .form input, body.theme-light .form select{background:#ffffff;color:#0f172a;border-color:rgba(15,23,42,0.15)}
body.theme-light .form input::placeholder{color:#94a3b8}
body.theme-light .form input:focus, body.theme-light .form select:focus{border-color:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,0.15)}
body.theme-light .cart-table{background:#ffffff;border-color:rgba(15,23,42,0.12);box-shadow:none}
body.theme-light .cart-table thead{background:rgba(2,6,23,0.06)}

/* Cuadre del día: Transferencias recibidas (MN) bloqueado */
#transferInput[disabled]{
	opacity:.85;
	cursor:not-allowed;
}
#transferInput::-webkit-outer-spin-button,
#transferInput::-webkit-inner-spin-button{
	-webkit-appearance:none;
	margin:0;
}
#transferInput{
	-moz-appearance:textfield;
}
body.theme-light .timeline-entry{background:#ffffff;border-color:rgba(15,23,42,0.12);box-shadow:none}
body.theme-light .timeline-entry[open]{border-color:rgba(37,99,235,0.28)}
body.theme-light .timeline-entry[open] summary{background:linear-gradient(120deg,rgba(241,245,249,0.9),rgba(255,255,255,0.85))}
body.theme-light .summary-card{background:linear-gradient(135deg,#ffffff,#f1f5f9);border-color:rgba(15,23,42,0.12);box-shadow:none}
body.theme-light .kpi-card::after{opacity:0.08}
body.theme-light .kpi-label{opacity:0.7;color:#334155}
body.theme-light .kpi-value{color:#0f172a}
/* Collapsed styles in light theme */
body.theme-light.sidebar-collapsed .nav-link{background:transparent}
/* Topbar right controls */
body.theme-light .theme-toggle{background:#ffffff;border-color:rgba(15,23,42,0.12)}
body.theme-light .theme-icon::after{background:#ffffff}
body.login-body{position:relative;display:grid;place-items:center;min-height:100vh;min-height:100dvh;background:linear-gradient(180deg,#1ab0ff,#0a5ecb);padding:32px;overflow:hidden}
.login-backdrop{position:absolute;inset:0;background:radial-gradient(circle at 30% 20%,rgba(255,255,255,0.25),transparent 40%);opacity:0.6;z-index:0}
body.login-body .login-shell{position:relative;z-index:1;width:100%;max-width:440px;padding:0 16px;display:flex;align-items:center;justify-content:center}
.login-card{background:rgba(255,255,255,0.18);border-radius:28px;padding:36px 32px;text-align:center;box-shadow:0 35px 65px -35px rgba(2,35,89,0.7);backdrop-filter:blur(32px);border:1px solid rgba(255,255,255,0.3)}
.login-logo-wrap{margin:0 auto 18px;display:flex;align-items:center;justify-content:center;max-width:100%;overflow:hidden}
.login-logo{display:block;max-width:min(320px, 78vw);max-height:96px;width:auto;height:auto;object-fit:contain}
.login-icon{width:88px;height:88px;border-radius:50%;border:2px solid rgba(255,255,255,0.8);margin:0 auto 18px;display:flex;align-items:center;justify-content:center;color:#fff}
.login-card h1{font-size:28px;color:#fff;margin-bottom:6px}
.login-copy{margin:0 0 10px;color:rgba(255,255,255,0.9);font-size:15px}
.login-form{display:flex;flex-direction:column;gap:14px;margin-top:16px}
.input-pill{display:flex;align-items:center;gap:10px;background:#fff;border-radius:18px;padding:0 16px;border:1px solid rgba(15,76,129,0.12);box-shadow:0 10px 25px -18px rgba(5,40,85,0.6)}
.input-pill input{flex:1;padding:14px 0;border:none;background:transparent;font-size:15px;color:#0f172a}
.input-pill input::placeholder{color:#6b7a8e}
.input-icon{display:flex;color:#6b7a8e}
.login-helpers{display:flex;justify-content:space-between;align-items:center;font-size:13px;color:rgba(255,255,255,0.85)}
.remember{display:flex;align-items:center;gap:6px}
.remember input{accent-color:#0a74da}
.forgot{color:#fff;text-decoration:none;font-weight:600}
.forgot:hover{text-decoration:underline}
.login-submit{margin-top:10px}
.btn.login-btn{width:100%;border:none;border-radius:16px;padding:14px 20px;font-size:16px;font-weight:700;background:#f7931e;color:#fff;box-shadow:0 20px 40px -20px rgba(247,147,30,0.8);cursor:pointer;transition:transform 0.2s ease,box-shadow 0.2s ease}
.btn.login-btn:hover{transform:translateY(-2px);box-shadow:0 30px 45px -25px rgba(247,147,30,0.95)}
.login-alert{margin-bottom:4px;background:rgba(255,255,255,0.2);border:1px solid rgba(255,255,255,0.65);color:#fff;padding:10px 14px;border-radius:14px;font-size:13px}
.login-foot{margin:14px 0 0;font-size:13px;color:rgba(255,255,255,0.85)}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
::selection{background:var(--primary);color:#010409}

.app{display:flex;min-height:100vh;position:relative;overflow:hidden}
.sidebar{
	width:280px;
	background:var(--sidebar-bg);
	color:#cbd5f5;
	padding:32px 24px;
	display:flex;
	flex-direction:column;
	gap:18px;
	box-shadow:var(--shadow-deep);
	border-right:1px solid rgba(148,163,184,0.15);
	z-index:2;
}
.brand{font-size:24px;font-weight:700;letter-spacing:-0.6px;color:#fff;margin-bottom:24px}
.brand small{display:block;font-size:13px;font-weight:500;color:var(--text-light)}
.brand-logo{height:28px;width:auto;margin-right:8px;vertical-align:middle;display:inline-block}
nav{display:flex;flex-direction:column;gap:8px}
.nav-link{
	color:rgba(226,232,240,0.65);
	text-decoration:none;
	padding:13px 18px;
	border-radius:14px;
	display:flex;
	align-items:center;
	gap:10px;
	font-weight:500;
	transition:all 0.2s ease;
	border:1px solid transparent;
}
.nav-group{margin:0;padding:0;border:0}
.nav-group > summary{list-style:none}
.nav-group > summary::-webkit-details-marker{display:none}
.nav-group-summary{cursor:pointer}
.nav-group[open] > .nav-group-summary .nav-caret{transform:rotate(180deg)}
.nav-caret{margin-left:auto;opacity:0.7;transition:transform 0.2s ease}
.nav-sub{padding-left:42px}
.nav-sub .nav-caret{display:none}
.nav-link:hover{color:#fff;background:rgba(255,255,255,0.08)}
.nav-link.active{
	background:rgba(96,165,250,0.18);
	color:#fff;
	border-color:rgba(96,165,250,0.4);
	box-shadow:0 20px 40px -30px rgba(96,165,250,0.9);
}
.sidebar-foot{margin-top:auto;padding-top:24px;border-top:1px solid rgba(148,163,184,0.15)}
.who{font-size:14px;color:rgba(226,232,240,0.7)}

.main{flex:1;display:flex;flex-direction:column;background:var(--content-bg)}
.topbar{
	padding:24px 40px;
	display:flex;
	justify-content:space-between;
	align-items:center;
	border-bottom:1px solid rgba(148,163,184,0.12);
	background:rgba(17,23,45,0.7);
	backdrop-filter:blur(14px);
	position:sticky;
	top:0;
	z-index:1;
}
.topbar-right{display:flex;align-items:center;gap:18px}
.theme-toggle{position:relative;width:36px;height:36px;border-radius:999px;border:1px solid rgba(148,163,184,0.4);background:rgba(15,23,42,0.9);display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.theme-icon{display:block;width:18px;height:18px;position:relative}
/* Usamos SVG para el icono; desactivamos pseudo-elementos para evitar luna en modo claro */
.theme-icon::before,.theme-icon::after{content:none}
.theme-icon svg{display:block;width:18px;height:18px}
/* Modo claro: mejorar contraste del botón de colapsar y oscurecer iconos del menú */
body.theme-light .sidebar-toggle{
	background:#f8fafc;
	border-color:#cbd5e1;
	box-shadow:0 1px 2px rgba(15,23,42,0.06);
}
body.theme-light .sidebar-toggle .ico{ color:#0f172a; }
body.theme-light .sidebar .nav-link .nav-icon .ico{ color:#334155; }
body.theme-light .sidebar .nav-link:hover .nav-icon .ico{ color:#0f172a; }
body.theme-light .sidebar .nav-link.active .nav-icon .ico{ color:#0f172a; }
.notif-bell{
	position:relative;
	width:36px;
	height:36px;
	border-radius:999px;
	border:1px solid rgba(148,163,184,0.4);
	background:rgba(15,23,42,0.9);
	display:flex;
	align-items:center;
	justify-content:center;
	cursor:pointer;
	padding:0;
}
.notif-bell-icon{
	display:flex;
	align-items:center;
	justify-content:center;
	color:rgba(226,232,240,0.9);
}
body.theme-light .notif-bell-icon{color:#0f172a}
.notif-bell-icon svg{
	width:18px;
	height:18px;
	display:block;
}
.notif-bell-count{
	position:absolute;
	top:-6px;
	right:-4px;
	min-width:16px;
	padding:0 4px;
	border-radius:999px;
	background:var(--danger);
	color:#fff;
	font-size:10px;
	font-weight:700;
	text-align:center;
}
.notif-bell.has-alert{
	border-color:var(--danger);
	box-shadow:0 0 0 1px rgba(248,113,113,0.55);
}
.notif-bell.has-alert .notif-bell-icon{
	color:var(--danger);
}
.notif-panel{
	position:absolute;
	top:60px;
	right:40px;
	min-width:260px;
	max-width:340px;
	background:rgba(15,23,42,0.98);
	border-radius:16px;
	border:1px solid rgba(148,163,184,0.45);
	box-shadow:var(--shadow-card);
	padding:10px 0 8px;
	display:none;
}
.notif-panel.open{display:block}
.notif-panel-head{
	padding:6px 16px 4px;
	font-size:12px;
	text-transform:uppercase;
	letter-spacing:0.12em;
	color:var(--text-light);
}
.notif-panel-body{padding:4px 16px 8px;max-height:260px;overflow:auto;font-size:13px}
.notif-item{padding:6px 0;border-bottom:1px solid rgba(148,163,184,0.2)}
.notif-item:last-child{border-bottom:none}
.notif-item strong{display:block;color:#e5e7eb;font-size:13px}
.notif-item span{display:block;color:var(--text-light);font-size:12px}
.user-info{font-size:14px;color:var(--text-light)}
.content{padding:40px;max-width:1340px;margin:0 auto;width:100%;display:flex;flex-direction:column;gap:32px}
.dashboard-screen{display:flex;flex-direction:column;gap:32px}
.dashboard-kpi-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:18px}
.kpi-card{border-radius:18px;padding:22px;color:#fff;box-shadow:0 25px 45px -25px rgba(15,23,42,0.65);display:flex;flex-direction:column;gap:6px;position:relative;overflow:hidden}
.kpi-card::after{content:"";position:absolute;inset:0;opacity:0.15;background:url('data:image/svg+xml,%3Csvg width="160" height="160" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 120 Q80 80 160 120" fill="none" stroke="white" stroke-width="12" opacity="0.4"/%3E%3C/svg%3E') center/cover;pointer-events:none}
.kpi-card:nth-child(1){background:linear-gradient(135deg,#0f766e,#14b8a6)}
.kpi-card:nth-child(2){background:linear-gradient(135deg,#1d4ed8,#60a5fa)}
.kpi-card:nth-child(3){background:linear-gradient(135deg,#f97316,#fb923c)}
.kpi-card:nth-child(4){background:linear-gradient(135deg,#9333ea,#c084fc)}
.kpi-label{text-transform:uppercase;font-size:11px;letter-spacing:0.15em;opacity:0.85}
.kpi-value{font-size:34px;font-weight:700;line-height:1}
.kpi-subtext{font-size:13px;opacity:0.85}
.dashboard-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:24px}
.card-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:16px}
.card-head h2{margin:0;font-size:18px}
.card-subtitle{font-size:13px;color:var(--text-light)}
.dashboard-screen .chart-card,.dashboard-screen .table-card,.dashboard-screen .pie-card,.dashboard-screen .history-card{background:#0e1527;border-radius:20px;border:1px solid rgba(148,163,184,0.18);padding:24px;box-shadow:0 35px 65px -45px rgba(6,11,23,0.95)}
.distribution-card{background:#0e1527;border-radius:20px;border:1px solid rgba(148,163,184,0.18);padding:24px;box-shadow:0 35px 65px -45px rgba(6,11,23,0.95)}
.distribution-card.is-collapsed{padding:18px 24px}
.distribution-card.is-collapsed .card-head{margin-bottom:0}
.distribution-card.is-collapsed .distribution-list{display:none !important}

/* Dashboard: admin summary collapsed (title only) */
.admin-summary-card.is-collapsed{padding:18px 24px}
.admin-summary-card.is-collapsed .card-head{margin-bottom:0}
.admin-summary-card.is-collapsed #adminSummarySubtitle{display:none !important}
.admin-summary-card.is-collapsed #adminSummaryBody{display:none !important}
.distribution-list{display:flex;flex-direction:column;gap:6px}
.distribution-item{display:flex;justify-content:space-between;align-items:center;padding:14px 0;border-bottom:1px solid rgba(148,163,184,0.15)}
.distribution-item:last-child{border-bottom:none}
.distribution-item strong{font-size:17px;letter-spacing:-0.01em;color:#f8fafc}
.distribution-item span{display:block;font-size:13px;color:var(--text-light)}
.distribution-amount{font-size:20px;color:#e2e8f0}
.distribution-total{display:flex;justify-content:space-between;align-items:center;margin-top:18px;padding-top:16px;border-top:1px solid rgba(148,163,184,0.2);font-size:14px;color:var(--text-light)}
.distribution-total strong{font-size:22px;color:#fff}
.dashboard-screen .bar-chart{display:flex;flex-direction:column;gap:14px}
.dashboard-screen .bar-row{display:flex;flex-direction:column;gap:6px}
.dashboard-screen .bar-info{display:flex;justify-content:space-between;font-size:13px;color:#cbd5f5}
.dashboard-screen .bar-track{position:relative;background:rgba(148,163,184,0.15);border-radius:999px;height:36px;display:flex;align-items:center;padding:0 16px}
.dashboard-screen .bar-fill{position:absolute;left:0;top:0;bottom:0;border-radius:999px;background:linear-gradient(90deg,#22d3ee,#3b82f6)}
.dashboard-screen .bar-value{margin-left:auto;font-weight:600;font-size:14px;color:#eef2ff;position:relative}
.dashboard-screen .table-card table{width:100%;border-collapse:collapse;font-size:13px}
.dashboard-screen .table-card thead{background:rgba(148,163,184,0.12);text-transform:uppercase;font-size:11px;letter-spacing:0.1em;color:#cbd5f5}
.dashboard-screen .table-card th,.dashboard-screen .table-card td{padding:12px 10px;border-bottom:1px solid rgba(148,163,184,0.18)}
.dashboard-screen .table-card tbody tr:last-child td{border-bottom:none}
.dashboard-screen .pie-card{display:flex;flex-direction:column;gap:18px}
.dashboard-screen .propina-progress{display:flex;gap:24px;align-items:center;flex-wrap:wrap}
.dashboard-screen .propina-circle{width:160px;height:160px;border-radius:50%;background:conic-gradient(#f97316 0%,#facc15 60%,rgba(15,23,42,0.5) 60%);display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;font-size:32px;font-weight:700;box-shadow:0 20px 40px -30px rgba(249,115,22,0.8)}
.dashboard-screen .propina-circle span{line-height:1}
.dashboard-screen .propina-circle small{font-size:12px;text-transform:uppercase;letter-spacing:0.2em}
.dashboard-screen .propina-details{flex:1;min-width:200px;font-size:14px;color:#cbd5f5;display:flex;flex-direction:column;gap:6px}
.dashboard-screen .tip-editor{display:flex;flex-direction:column;gap:10px}
.dashboard-screen .tip-editor label{display:block;margin-bottom:6px;font-size:15px;font-weight:600;color:#cbd5f5}
.dashboard-screen .tip-editor input{width:100%;padding:12px 14px;border-radius:14px;border:1px solid rgba(148,163,184,0.35);background:rgba(15,23,42,0.7);color:#f8fafc;font-size:16px}
.dashboard-screen .tip-editor-buttons{display:flex;gap:12px;flex-wrap:wrap}
.dashboard-screen .tip-editor-buttons .btn{flex:1;min-width:140px}
.dashboard-screen .history-card{padding:0}
.dashboard-screen .history-card .card-head{padding:24px 24px 0 24px}
.dashboard-screen .history-list{padding:0 24px 24px 24px;display:flex;flex-direction:column;gap:14px}
.dashboard-screen .history-list .muted{padding:24px 0}
.dashboard-screen .move-item{display:flex;flex-wrap:wrap;justify-content:space-between;gap:8px;padding:14px 0;border-bottom:1px solid rgba(148,163,184,0.15);font-size:14px;color:#e2e8f0}
.dashboard-screen .move-item:last-child{border-bottom:none}
.dashboard-screen .move-item div{display:flex;flex-direction:column;gap:4px}
.dashboard-screen .move-tip{font-size:12px;color:var(--text-light)}
/* Closed users list */
.closed-users{margin-top:16px}
.closed-users .pill{display:inline-block;padding:6px 10px;margin:4px;border-radius:999px;background:#eef;color:#223;font-size:13px}

h1,h2{font-weight:700;color:#f1f5f9;letter-spacing:-0.02em}
h1{font-size:28px;margin:0}
h2{font-size:20px;margin:0}

.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:32px}
.card{
	background:var(--card-bg);
	border-radius:var(--radius);
	padding:24px;
	border:1px solid var(--card-border);
	box-shadow:var(--shadow-card);
	transition:transform 0.2s ease,box-shadow 0.2s ease;
}
.card .amount-line{margin-top:6px;font-size:15px;font-weight:600;color:#f8fafc}
.card:hover{transform:translateY(-4px);box-shadow:0 35px 45px -30px rgba(96,165,250,0.5)}
.card h3{margin:0 0 6px 0;font-size:18px}
.muted{color:var(--text-light)}
.miron-dia-resumen{background:linear-gradient(135deg,rgba(16,24,48,0.95),rgba(30,41,74,0.85));border:1px solid rgba(96,165,250,0.25)}
.metric-card{display:flex;flex-direction:column;gap:10px;min-height:180px;justify-content:center}
.summary-card{display:flex;flex-direction:column;gap:10px;justify-content:center}
.metric-card .metric-label{font-size:13px;letter-spacing:0.08em;text-transform:uppercase;color:rgba(226,232,240,0.75)}
.metric-card .metric-value{font-size:40px;line-height:1;font-weight:700;color:#fff}
.metric-card .metric-subtext{font-size:13px;color:var(--text-light)}
.tip-card{display:flex;flex-direction:column;gap:14px}
.tip-card .row{width:100%}
.tip-card button{flex:1}

.row{display:flex;gap:16px;flex-wrap:wrap}
.row>div{flex:1;min-width:160px}

.form label{font-size:13px;font-weight:600;color:#cbd5f5;display:block;margin-bottom:6px}
.form input,.form select{width:100%;padding:12px 14px;border-radius:14px;border:1px solid rgba(148,163,184,0.35);background:rgba(15,23,42,0.7);color:#f8fafc;font-size:14px;transition:border 0.2s ease,box-shadow 0.2s ease}
.form input:focus,.form select:focus{border-color:var(--primary);box-shadow:0 0 0 4px var(--primary-soft);outline:none}
/* Pending button subtle style */
.btn.pending{background:rgba(255,255,255,0.08);color:#e2e8f0;border:1px solid rgba(226,232,240,0.18)}
.btn.pending:hover{background:rgba(255,255,255,0.14)}
/* Permission blocks */
.perm-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px}
.perm-block{background:rgba(255,255,255,0.03);border:1px solid rgba(148,163,184,0.18);border-radius:14px;padding:14px}
.perm-title{font-size:12px;color:#cbd5f5;text-transform:uppercase;letter-spacing:0.08em;margin-bottom:10px;font-weight:700}
.perm-list{display:flex;flex-direction:column;gap:8px}
.perm-item{
	display:flex;
	align-items:center;
	gap:10px;
	padding:8px 10px;
	border-radius:12px;
	transition:background 0.15s ease, border-color 0.15s ease;
}
.perm-item:hover{background:rgba(255,255,255,0.04)}
.perm-item input{flex:0 0 auto; width:16px; height:16px; accent-color:var(--primary); cursor:pointer}
.perm-item:focus-within{box-shadow:0 0 0 4px var(--primary-soft)}
.perm-name{font-size:14px;font-weight:700;line-height:1.2;color:#e2e8f0}
.perm-desc{font-size:12px; line-height:1.25; color:#94a3b8}
.perm-desc::before{content:" / "; color:var(--text-light); font-weight:600}
.perm-item input:checked ~ .perm-name{color:var(--text)}
.perm-item input:checked ~ .perm-desc{color:var(--text-light)}

/* Permission blocks (light theme) */
body.theme-light .perm-block{background:var(--card-bg);border-color:var(--card-border)}
body.theme-light .perm-title{color:#475569}
body.theme-light .perm-item{background:rgba(2,6,23,0.02);border:1px solid rgba(15,23,42,0.08)}
body.theme-light .perm-item:hover{background:rgba(2,6,23,0.04)}
body.theme-light .perm-name{color:#0f172a}
body.theme-light .perm-desc{color:#64748b}

.btn{
	border:none;
	border-radius:14px;
	padding:11px 20px;
	font-weight:600;
	font-size:14px;
	cursor:pointer;
	transition:all 0.2s ease;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	gap:8px;
	text-decoration:none;
}
.btn.primary{background:linear-gradient(90deg,#5f8cff,#6aa5ff);color:#fff;border:none}
.btn.primary:hover{filter:brightness(1.06)}
.btn.danger{background:linear-gradient(90deg,#ff5f7a,#ff7a8f);color:#fff;border:none}

/* Cash count enhancements */
.cash-count-grid{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:12px 18px}
.cash-count-row{display:flex;align-items:center;gap:12px;padding:8px 10px;background:rgba(255,255,255,0.03);border:1px solid rgba(255,255,255,0.06);border-radius:12px}
.cash-count-row label{min-width:95px;color:#cbd5f5}
.cash-count-row label.with-icon{display:inline-flex;align-items:center;gap:8px;line-height:1.1}
.cash-count-row label.with-icon .ico{width:18px;height:18px;flex:0 0 auto;display:block;opacity:0.9}
.cash-count-row input{flex:1;padding:10px 12px;border-radius:12px;border:1px solid rgba(148,163,184,0.28);background:rgba(15,23,42,0.65);color:#e9edf7}
.cash-count-row input:focus{outline:none;border-color:#6aa5ff;box-shadow:0 0 0 3px rgba(106,165,255,0.15)}
#debtAmountInput{flex:0 0 140px;max-width:160px}
#debtDescInput{flex:1 1 auto}
.cash-count-row select{flex:1;padding:10px 12px;border-radius:12px;border:1px solid rgba(148,163,184,0.28);background:rgba(15,23,42,0.65);color:#e9edf7;font-size:14px}
.cash-count-row select:focus{outline:none;border-color:#6aa5ff;box-shadow:0 0 0 3px rgba(106,165,255,0.15)}
.cash-count-total{margin-top:14px;padding:14px;border:1px dashed rgba(148,163,184,0.28);border-radius:12px;background:rgba(96,165,250,0.12)}
.cash-count-total strong{color:#dbeafe}

/* Cash count (light theme) */
body.theme-light .cash-count-row{background:#ffffff;border-color:rgba(15,23,42,0.12)}
body.theme-light .cash-count-row label{color:#334155}
body.theme-light .cash-count-row input{background:#ffffff;color:#0f172a;border-color:rgba(15,23,42,0.15)}
body.theme-light .cash-count-row input::placeholder{color:#94a3b8}
body.theme-light .cash-count-row input:focus{border-color:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,0.15)}
body.theme-light .cash-count-row select{background:#ffffff;color:#0f172a;border-color:rgba(15,23,42,0.15)}
body.theme-light .cash-count-row select:focus{border-color:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,0.15)}
body.theme-light .cash-count-total{background:rgba(2,6,23,0.03);border-color:rgba(15,23,42,0.15)}
body.theme-light .cash-count-total strong{color:#0f172a}
.btn.primary{background:linear-gradient(120deg,var(--primary),var(--primary-dark));color:#010409;box-shadow:0 15px 40px -20px rgba(59,130,246,0.9)}
.btn.primary:hover{filter:brightness(1.05)}
.btn.small{padding:7px 12px;font-size:12px;border-radius:10px}
.btn:not(.primary){background:rgba(255,255,255,0.08);color:#e2e8f0;border:1px solid rgba(226,232,240,0.1)}
.btn:not(.primary):hover{background:rgba(255,255,255,0.15)}

.footer{padding:24px;text-align:center;border-top:1px solid rgba(148,163,184,0.18);color:var(--text-light);background:rgba(9,13,24,0.85);backdrop-filter:blur(8px);margin-top:auto}
.footer-clock{margin-left:10px;font-weight:500;color:#e5e7eb;font-variant-numeric:tabular-nums;font-size:13px}

.page-center{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:40px;background:var(--body-bg)}

ul.list{list-style:none;margin:0;padding:0;border:1px solid var(--card-border);border-radius:var(--radius);overflow:hidden;background:rgba(15,23,42,0.75);backdrop-filter:blur(6px)}
ul.list li{padding:16px 20px;border-bottom:1px solid rgba(148,163,184,0.15);font-size:14px;color:#f1f5f9;line-height:1.55}
.history-panel ul.list{border:none;border-radius:0;background:transparent;backdrop-filter:none}
.history-panel ul.list li{border-color:rgba(148,163,184,0.12)}
ul.list li:last-child{border-bottom:none}
.manage-list li{display:flex;justify-content:space-between;align-items:center;gap:12px}
.manage-list li span{display:flex;flex-direction:column;gap:4px}
.manage-list li button{flex-shrink:0}
.service-item{display:flex;flex-direction:column;gap:12px}
.service-main{display:flex;justify-content:space-between;align-items:center;gap:16px}
.service-actions{display:flex;gap:10px;flex-wrap:wrap}
.service-item.editing .service-actions{justify-content:flex-end}
.service-item.editing input{width:100%}
.list-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.cart-table{border:1px solid var(--card-border);border-radius:var(--radius);background:rgba(15,23,42,0.75);padding:0;margin:16px 0;box-shadow:inset 0 0 0 1px rgba(148,163,184,0.05)}
.cart-table-scroll{max-height:260px;overflow:auto}
.qr-file-input{display:none}
.file-input-wrap{position:relative;display:flex;align-items:center;margin-top:6px}
.file-input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%}
.file-input-label{width:100%;display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;border:1px dashed rgba(148,163,184,0.45);background:rgba(15,23,42,0.65);cursor:pointer;transition:border 0.2s ease,box-shadow 0.2s ease,background 0.2s ease}
.file-input-label:hover{border-color:var(--primary);box-shadow:0 0 0 3px rgba(96,165,250,0.25);background:rgba(15,23,42,0.9)}
.file-input-button{padding:6px 12px;border-radius:999px;background:linear-gradient(120deg,var(--primary),var(--primary-dark));color:#010409;font-size:12px;font-weight:600;white-space:nowrap}
.file-input-name{flex:1;font-size:13px;color:var(--text-light);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cart-table table{width:100%;border-collapse:collapse}
.cart-table th,.cart-table td{padding:12px 14px;text-align:left;font-size:13px;color:#e2e8f0}
.cart-table thead{background:rgba(96,165,250,0.08)}
.cart-table tbody tr{border-bottom:1px solid rgba(148,163,184,0.12)}
.cart-table tbody tr:last-child{border-bottom:none}
.cart-empty{padding:16px}

.total-servicios-resumen{margin-top:0;background:linear-gradient(135deg,rgba(15,23,42,0.92),rgba(15,23,42,0.75));border:1px solid rgba(96,165,250,0.2)}
.total-servicios-resumen .total-summary{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:flex-end;gap:12px;font-size:15px;color:var(--text-light)}
.total-servicios-resumen .total-summary strong{font-size:28px;color:#fff;letter-spacing:-0.02em}

.summary-card{position:relative;overflow:hidden;background:linear-gradient(135deg,rgba(15,23,42,0.95),rgba(15,23,42,0.78));border:1px solid rgba(96,165,250,0.15);box-shadow:0 30px 45px -35px rgba(96,165,250,0.8)}
.summary-card::after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(circle at top right,rgba(96,165,250,0.35),transparent 55%);opacity:0.9}
.summary-card>*{position:relative}
.summary-head{display:flex;justify-content:space-between;align-items:flex-start}
.summary-label{font-size:12px;font-weight:600;color:rgba(248,250,252,0.7);letter-spacing:0.05em;text-transform:uppercase;margin-bottom:6px}
.summary-card label{font-size:12px;text-transform:uppercase;letter-spacing:0.05em;color:rgba(248,250,252,0.72)}
.turno-chip{display:flex;flex-direction:column;gap:4px;padding:14px 18px;border-radius:16px;background:rgba(15,23,42,0.9);border:1px solid rgba(148,163,184,0.25);font-size:13px;color:#e0e7ff;box-shadow:inset 0 1px 0 rgba(255,255,255,0.05)}
.turno-chip strong{font-size:18px;color:#fff}

.timeline-list{margin-top:8px;border-radius:18px;border:1px solid rgba(148,163,184,0.25);background:rgba(2,6,23,0.4);backdrop-filter:blur(10px);max-height:420px;overflow:auto;padding:4px}
.timeline-empty{padding:28px;text-align:center;font-size:14px}
.timeline-entry{border-radius:16px;margin:8px;border:1px solid rgba(148,163,184,0.15);background:rgba(15,23,42,0.85);box-shadow:0 20px 35px -30px rgba(15,23,42,0.9);overflow:hidden}
.timeline-entry summary{display:flex;align-items:center;gap:16px;padding:18px 22px;cursor:pointer;list-style:none;outline:none}
.timeline-entry summary::-webkit-details-marker{display:none}
.timeline-entry[open]{border-color:rgba(96,165,250,0.35)}
.timeline-entry[open] summary{box-shadow:inset 0 -1px 0 rgba(148,163,184,0.2);background:linear-gradient(120deg,rgba(30,41,59,0.9),rgba(15,23,42,0.85))}
.timeline-time{font-size:28px;font-weight:700;color:#f8fafc;min-width:78px}
.timeline-summary{display:flex;flex-direction:column;gap:3px;color:#cbd5f5;font-size:14px}
.timeline-summary div:last-child{color:#94a3b8;font-size:13px}
.timeline-actions{margin-left:auto;display:flex;gap:8px;flex-wrap:wrap}
.timeline-details{padding:0 22px 20px 22px}
.timeline-details table{width:100%;border-spacing:0;border-collapse:collapse;font-size:13px}
.timeline-details thead{color:#94a3b8;font-size:11px;text-transform:uppercase;letter-spacing:0.05em}
.timeline-details th,.timeline-details td{padding:10px 8px;text-align:left;border-bottom:1px solid rgba(148,163,184,0.12)}
.timeline-details tr:last-child td{border-bottom:none}
.timeline-details tr.row-success td:first-child{border-left:4px solid var(--success);padding-left:12px}
.timeline-details tr.row-success td:last-child{color:var(--success);font-weight:700}
.timeline-details tr.row-danger td:first-child{border-left:4px solid var(--danger);padding-left:12px}
.timeline-details tr.row-danger td:last-child{color:var(--danger);font-weight:700}
.timeline-edit-panel{padding:18px 22px 24px;border-top:1px solid rgba(148,163,184,0.2);background:rgba(2,6,23,0.5);display:flex;flex-direction:column;gap:14px}
.timeline-edit-panel[hidden]{display:none}
.timeline-edit-panel .inline-rows{display:flex;flex-direction:column;gap:12px}
.timeline-edit-panel .inline-row{display:flex;gap:12px;flex-wrap:wrap}
.timeline-edit-panel .inline-row input{flex:1;min-width:120px;padding:10px 12px;border-radius:10px;border:1px solid rgba(148,163,184,0.35);background:rgba(15,23,42,0.8);color:#f8fafc;font-size:13px}
.timeline-edit-panel .panel-mini-actions{display:flex;justify-content:flex-end}
.timeline-edit-panel .panel-sums{display:flex;gap:16px;flex-wrap:wrap}
.timeline-edit-panel .panel-sums>div{flex:1;min-width:180px}
.timeline-edit-panel .panel-actions{display:flex;gap:10px;flex-wrap:wrap}
.timeline-edit-panel .panel-msg{font-size:12px;color:var(--text-light)}
.timeline-edit-panel .panel-msg[data-state="error"]{color:var(--danger)}
.timeline-edit-panel label{margin-bottom:4px;font-size:12px;color:#cbd5f5;font-weight:600}
.btn.danger{background:rgba(251,113,133,0.15);color:var(--danger);border:1px solid rgba(251,113,133,0.5)}
.btn.danger:hover{background:rgba(251,113,133,0.3)}

.history-card{background:rgba(15,23,42,0.85);border:1px solid rgba(148,163,184,0.2);box-shadow:0 25px 40px -35px rgba(15,23,42,0.9)}
.history-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px}
.history-note{margin-top:4px;font-size:13px}
.history-actions .btn{min-width:120px}
.history-filters{margin-bottom:12px}

/* --- Sidebar icons and collapse styles --- */
.nav-icon{width:22px;display:inline-flex;align-items:center;justify-content:center;color:#cbd5f5}
.nav-icon .ico{width:18px;height:18px;display:block}
.sidebar .nav-icon img.ico{filter:brightness(0) invert(1)}
body.theme-light .sidebar .nav-icon img.ico{filter:none}
.nav-text{flex:1}
.brand{display:flex;align-items:center;gap:10px}
.brand .brand-text{flex:1}
.sidebar-toggle{
	margin-left:auto;
	width:38px;
	height:38px;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	cursor:pointer;
	border-radius:12px;
	border:1px solid var(--card-border);
	background:rgba(15,23,42,0.8);
	color:var(--text);
	transition:transform .12s ease,border-color .12s ease,background-color .12s ease,box-shadow .12s ease;
}
.sidebar-toggle:hover{
	border-color:rgba(96,165,250,0.35);
	background:rgba(15,23,42,0.85);
	transform:translateY(-1px);
}
.sidebar-toggle:active{
	transform:translateY(0);
}
.sidebar-toggle:focus-visible{
	outline:none;
	box-shadow:0 0 0 4px var(--primary-soft);
	border-color:var(--primary);
}
body.sidebar-collapsed .sidebar{width:84px;padding:24px 14px}
body.sidebar-collapsed .brand .brand-text{display:none}
body.sidebar-collapsed .sidebar-foot .who{display:none}
body.sidebar-collapsed nav .nav-text{display:none}
body.sidebar-collapsed nav .nav-link{justify-content:center;padding:12px}
.history-filters>div{min-width:160px}
.history-buttons{display:flex;align-items:flex-end}
.history-btn-group{display:flex;gap:10px}
.history-summary{display:flex;gap:18px;flex-wrap:wrap;align-items:center;font-size:14px;color:var(--text-light);padding:14px 18px;border:1px solid rgba(148,163,184,0.2);border-radius:14px;margin-bottom:16px;background:rgba(2,6,23,0.35)}
.history-summary strong{font-size:20px;color:#fff}
.history-results{border-radius:16px;border:1px solid rgba(148,163,184,0.15);background:rgba(2,6,23,0.35);padding:0}
.history-table-wrapper{width:100%;overflow:auto}
.history-table{width:100%;border-collapse:collapse;font-size:13px}

/* ---------------- Mobile responsiveness (Production only) ---------------- */
@media (max-width: 900px){
	/* Keep desktop intact; only adjust for small screens */
	.app{overflow-x:hidden}
	.main{width:100%}
	.topbar{padding:14px 16px;flex-wrap:wrap;gap:10px}
	.topbar-right{gap:10px;flex-wrap:wrap}
	.user-info{font-size:13px}
	h1{font-size:22px}

	.content{padding:16px;max-width:100%;gap:18px}
	.dashboard-screen{gap:18px}
	.cards{gap:16px}
	.card{padding:16px}
	.card-head{flex-direction:column;gap:10px;align-items:flex-start}

	.dashboard-kpi-grid{gap:12px;grid-template-columns:repeat(2,minmax(0,1fr))}
	.kpi-card{padding:16px;border-radius:16px}
	.kpi-value{font-size:28px}

	/* Forms / rows */
	.row{gap:12px}
	.row>div{min-width:100%}
	.dashboard-screen .tip-editor-buttons .btn{flex:1 1 100%;min-width:0}
	.dashboard-screen .propina-progress{gap:14px}

	/* Cash-count grid: stack */
	.cash-count-grid{grid-template-columns:1fr}
	.cash-count-row{flex-wrap:wrap}
	.cash-count-row label{min-width:auto}

	/* Tables: allow horizontal scroll on narrow screens */
	.cart-table-scroll,
	.history-table-wrapper,
	.timeline-details,
	.timeline-list{overflow:auto;-webkit-overflow-scrolling:touch}
	.cart-table table,
	.history-table,
	.timeline-details table{min-width:720px}

	/* Mobile menu: sticky top bar with horizontal scroll */
	.app{flex-direction:column}
	.sidebar{
		position:sticky;
		top:0;
		left:auto;
		right:auto;
		bottom:auto;
		height:auto;
		width:100%;
		padding:12px 12px 10px 12px;
		border-right:none;
		border-bottom:1px solid rgba(148,163,184,0.15);
		box-shadow:var(--shadow-deep);
		transform:none;
	}
	.sidebar-foot{display:none}

	/* Brand stays compact; toggle can remain but menu is always visible */
	.brand{margin-bottom:10px;font-size:18px}
	.brand-logo{height:24px}
	.sidebar-toggle{display:none}

	nav{
		flex-direction:row;
		gap:10px;
		overflow-x:auto;
		overflow-y:hidden;
		-webkit-overflow-scrolling:touch;
		padding-bottom:6px;
		margin:0 -2px;
	}
	.nav-link{
		flex:0 0 auto;
		white-space:nowrap;
		display:inline-flex;
		align-items:center;
		gap:8px;
		padding:10px 12px;
		border-radius:12px;
	}
	/* Mobile: groups are flattened via JS; keep presentation clean */
	.nav-caret{display:none}
	.nav-group-label{opacity:0.85;pointer-events:none}
	.nav-sub{padding-left:0}
	.nav-icon{display:inline-flex;width:auto}
	.nav-icon .ico{width:16px;height:16px}

	/* Ensure collapsed class doesn't hide/mini the menu on mobile */
	body.sidebar-collapsed .sidebar{width:100%;padding:12px 12px 10px 12px;transform:none}
	body.sidebar-collapsed nav .nav-text{display:inline}
	body.sidebar-collapsed nav .nav-link{justify-content:flex-start;padding:10px 12px}
}

@media (max-width: 520px){
	.dashboard-kpi-grid{grid-template-columns:1fr}
	.kpi-value{font-size:30px}
	.dashboard-screen .propina-circle{width:140px;height:140px}
}

/* Gastos: mobile collapsed cards (Concepto/Fecha/Negocio/Monto) */
.exp-cards{display:none}

@media (max-width: 900px){
	/* Keep desktop table intact; swap UI on mobile */
	.expenses-table-wrapper{display:none}
	.exp-cards{display:flex;flex-direction:column;gap:12px}

	.exp-card{
		border-radius:16px;
		border:1px solid var(--card-border);
		background:var(--card-bg);
		overflow:hidden;
	}
	.exp-card > summary{list-style:none}
	.exp-card > summary::-webkit-details-marker{display:none}

	.exp-card-summary{
		display:flex;
		align-items:flex-start;
		justify-content:space-between;
		gap:14px;
		padding:12px 14px;
		cursor:pointer;
	}
	.exp-card-main{min-width:0}
	.exp-card-concept{
		font-weight:800;
		color:var(--text);
		white-space:nowrap;
		overflow:hidden;
		text-overflow:ellipsis;
	}
	.exp-card-meta{margin-top:6px;display:flex;gap:8px;flex-wrap:wrap}
	.exp-chip{
		font-size:11px;
		letter-spacing:0.12em;
		text-transform:uppercase;
		color:var(--text-light);
		font-weight:700;
		padding:6px 8px;
		border-radius:999px;
		border:1px solid var(--card-border);
		background:rgba(15,23,42,0.35);
		white-space:nowrap;
	}
	.exp-card-amount{
		flex:0 0 auto;
		font-size:13px;
		font-weight:800;
		color:var(--text);
		opacity:0.92;
		white-space:nowrap;
		padding-top:2px;
	}

	.exp-card-body{
		padding:12px 14px;
		border-top:1px solid var(--card-border);
	}
	.exp-card-row{display:flex;justify-content:space-between;gap:12px;padding:6px 0}
	.exp-card-k{
		font-size:11px;
		letter-spacing:0.12em;
		text-transform:uppercase;
		color:var(--text-light);
		font-weight:700;
	}
	.exp-card-v{color:var(--text);text-align:right;word-break:break-word}

	.exp-card .exp-actions{display:flex;gap:10px;flex-wrap:wrap}
	.exp-card .exp-actions .btn{flex:1 1 140px}

	/* Light theme: chips a bit lighter */
	body.theme-light .exp-chip{background:rgba(15,23,42,0.04)}
}
.history-table thead{background:rgba(96,165,250,0.07);text-transform:uppercase;font-size:11px;color:#94a3b8}
.history-table th,.history-table td{padding:12px 14px;text-align:left;border-bottom:1px solid rgba(148,163,184,0.12)}
.history-table tbody tr:hover{background:rgba(96,165,250,0.05)}

.err{color:var(--danger);font-weight:600}

table{width:100%;border-collapse:separate;border-spacing:0 12px}
table tr{background:rgba(15,23,42,0.85);box-shadow:var(--shadow-card)}
table td,table th{padding:14px 18px;text-align:left;font-size:14px;color:#e2e8f0}
table th{color:var(--text-light);text-transform:uppercase;font-size:12px}

@media (max-width:1024px){
	.sidebar{width:240px;padding:28px 20px}
	.content{padding:28px}
	.topbar{padding:20px 28px}
	.dashboard-row{grid-template-columns:1fr}
}

@media (max-width:640px){
	body.login-body{padding:20px;overflow:auto}
	body.login-body .login-shell{max-width:100%}
	.login-card{padding:28px 24px}
	.login-logo{max-width:min(260px, 80vw);max-height:78px}
	.login-helpers{flex-direction:column;align-items:flex-start;gap:8px}
}

@media (max-width:768px){
	.app{flex-direction:column}
	.sidebar{width:100%;flex-direction:row;flex-wrap:wrap;align-items:center;gap:12px;position:sticky;top:0}
	nav{flex-direction:row;flex-wrap:wrap;gap:8px}
	.main{background:var(--body-bg)}
	.content{padding:20px}
	.topbar{position:static;border-radius:0}
	.dashboard-kpi-grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
	.dashboard-row{gap:18px}
}

@media (max-width:480px){
	/* En móvil no ocultamos el menú: lo convertimos en barra superior compacta */
	.sidebar{
		display:flex;
		width:100%;
		padding:14px 12px;
		gap:10px;
		position:sticky;
		top:0;
		border-right:none;
		border-bottom:1px solid rgba(148,163,184,0.15);
		box-shadow:none;
	}
	.brand{margin-bottom:0;gap:8px;font-size:18px}
	.brand small{display:none}
	.brand-logo{height:24px}
	.sidebar-toggle{width:36px;height:36px;border-radius:12px}
	/* Navegación horizontal (scroll) */
	nav{width:100%;flex-direction:row;flex-wrap:nowrap;gap:8px;overflow-x:auto;overflow-y:hidden;padding-bottom:4px}
	.nav-link{flex:0 0 auto;padding:10px 12px;border-radius:12px;white-space:nowrap}
	.nav-icon{width:18px}
	.nav-icon .ico{width:18px;height:18px}
	.nav-text{font-size:12px}
	/* Footer del sidebar compacto */
	.sidebar-foot{width:100%;padding-top:10px;margin-top:0;border-top:none;display:flex;align-items:center;justify-content:space-between;gap:10px}
	.sidebar-foot .who{display:none}

	.content{padding:16px;gap:20px}
	.topbar{flex-direction:column;align-items:flex-start;gap:6px;padding:16px}
	.row{flex-direction:column}
	.card{padding:18px}
	.dashboard-screen .propina-circle{width:140px;height:140px;font-size:28px}
	.timeline-entry summary{padding:14px 14px;gap:10px}
	.timeline-time{font-size:20px;min-width:56px}
	.timeline-details{padding:0 14px 16px 14px}
	.timeline-details th,.timeline-details td{padding:9px 6px}
	table td,table th{padding:12px 12px;font-size:13px}
}

/* Pending states */
.timeline-entry.pending{background:rgba(251,113,133,0.2);border-color:rgba(251,113,133,0.5)}
.pending-pill{display:inline-block;margin-left:8px;padding:4px 8px;border-radius:999px;background:rgba(251,113,133,0.25);color:#ffe;font-size:11px;border:1px solid rgba(251,113,133,0.6)}
/* Modo claro: resaltar más los pendientes */
body.theme-light .timeline-entry.pending{
	background:rgba(244,63,94,0.18) !important; /* rojo visible sobre fondo claro */
	border-color:rgba(244,63,94,0.55) !important;
}
body.theme-light .pending-pill{
	background:rgba(244,63,94,0.2) !important;
	color:#7f1d1d !important;
	border-color:rgba(244,63,94,0.5) !important;
}
body.theme-light .btn.pending{
	background:#fee2e2 !important;
	color:#7f1d1d !important;
	border-color:#fecaca !important;
}
body.theme-light .btn.pending:hover{
	background:#fecaca !important;
}
