/* ===================================================================
   CopiTime · CSS principal
   Tema CLARO · azul corporativo (#476eb4) + acento rojo (#e7354d)
   Inspiración: copyboom.es · minimalismo limpio
   =================================================================== */

/* -------- Reset & base -------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: #1a2332;
    background: #f5f7fb;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

:root {
    /* Marca */
    --brand: #476eb4;
    --brand-dark: #355688;
    --brand-light: #6688c5;
    --brand-pale: #eaf0f9;
    --brand-tint: #f5f8fc;
    --accent: #e7354d;
    --accent-dark: #c01f37;
    --accent-pale: #fdeaee;

    /* Neutros */
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #f9fafc;
    --border: #e1e6ee;
    --border-strong: #c9d1de;

    /* Texto */
    --text: #1a2332;
    --text-2: #4a5568;
    --text-dim: #8a94a6;
    --text-mute: #b1bac9;

    /* Estado */
    --ok: #1ea562;
    --ok-bg: #e7f6ee;
    --ok-dark: #157a48;
    --warn: #d97706;
    --warn-bg: #fdf4e3;
    --danger: #d93545;
    --danger-bg: #fbe9ec;

    /* Radios y sombras */
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --shadow-xs: 0 1px 2px rgba(20, 30, 50, 0.06);
    --shadow-sm: 0 2px 8px rgba(20, 30, 50, 0.06);
    --shadow: 0 4px 16px rgba(20, 30, 50, 0.08);
    --shadow-lg: 0 10px 30px rgba(20, 30, 50, 0.12);
    --shadow-xl: 0 20px 60px rgba(20, 30, 50, 0.15);
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 12px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }

p { margin: 0 0 12px; }
code {
    font-family: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--brand-pale);
    color: var(--brand-dark);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12.5px;
}

.muted { color: var(--text-dim); }
.small-text { font-size: 12px; }
.small { font-size: 12px; color: var(--text-dim); }

/* -------- App shell -------- */
.app-shell { display: flex; min-height: 100vh; }

/* -------- Sidebar -------- */
.sidebar {
    width: 248px;
    flex: 0 0 248px;
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 18px 12px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}
.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 8px 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 14px;
}
.brand-mark {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    background: var(--brand);
    color: #fff; font-weight: 700; border-radius: 9px;
    font-size: 14px; letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(71, 110, 180, 0.25);
    position: relative;
}
.brand-mark::after {
    content: '';
    position: absolute;
    top: 4px; right: 4px;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
}
.brand-center { display: flex; flex-direction: column; min-width: 0; }
.brand-center strong { color: var(--text); font-size: 15px; font-weight: 700; }
.brand-center span { color: var(--text-dim); font-size: 11px; }

.sidebar nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.sidebar nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border-radius: var(--radius-sm);
    color: var(--text-2); font-size: 13.5px; font-weight: 500;
    transition: all 0.15s ease;
    text-decoration: none;
}
/* Iconos como cajitas coloreadas (estilo dashboard moderno).
   Cada item tiene su color de "categoría" definido vía data-color. */
.sidebar nav a i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    transition: all 0.2s ease;
    background: var(--icon-bg, #e6ebf3);
    color: var(--icon-fg, #5a6a82);
}
/* Paleta de colores por categoría */
.sidebar nav a[data-color="blue"]   { --icon-bg: #dbeafe; --icon-fg: #2563eb; }
.sidebar nav a[data-color="purple"] { --icon-bg: #ede9fe; --icon-fg: #7c3aed; }
.sidebar nav a[data-color="teal"]   { --icon-bg: #ccfbf1; --icon-fg: #0d9488; }
.sidebar nav a[data-color="indigo"] { --icon-bg: #e0e7ff; --icon-fg: #4f46e5; }
.sidebar nav a[data-color="cyan"]   { --icon-bg: #cffafe; --icon-fg: #0891b2; }
.sidebar nav a[data-color="green"]  { --icon-bg: #d1fae5; --icon-fg: #059669; }
.sidebar nav a[data-color="orange"] { --icon-bg: #ffedd5; --icon-fg: #ea580c; }
.sidebar nav a[data-color="amber"]  { --icon-bg: #fef3c7; --icon-fg: #d97706; }
.sidebar nav a[data-color="pink"]   { --icon-bg: #fce7f3; --icon-fg: #db2777; }
.sidebar nav a[data-color="violet"] { --icon-bg: #f3e8ff; --icon-fg: #9333ea; }
.sidebar nav a[data-color="slate"]  { --icon-bg: #e2e8f0; --icon-fg: #475569; }
.sidebar nav a[data-color="sky"]    { --icon-bg: #e0f2fe; --icon-fg: #0284c7; }
.sidebar nav a[data-color="gray"]   { --icon-bg: #f1f5f9; --icon-fg: #64748b; }
.sidebar nav a[data-color="rose"]   { --icon-bg: #ffe4e6; --icon-fg: #e11d48; }
.sidebar nav a[data-color="red"]    { --icon-bg: #fee2e2; --icon-fg: #dc2626; }

/* Hover: oscurece la cajita y resalta el texto */
.sidebar nav a:hover {
    background: var(--brand-tint);
    color: var(--brand-dark);
    text-decoration: none;
    transform: translateX(2px);
}
.sidebar nav a:hover i {
    /* Invertimos para que destaque: fondo del color, icono blanco */
    background: var(--icon-fg, var(--brand));
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Activo (página actual): item con fondo azul corporativo, icono blanco */
.sidebar nav a.active {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 2px 10px rgba(71, 110, 180, 0.3);
    transform: none;
}
.sidebar nav a.active i {
    /* En estado activo, icono blanco sobre fondo semitransparente para que se vea */
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    box-shadow: none;
}

.kiosk-link {
    background: var(--accent-pale) !important;
    color: var(--accent-dark) !important;
    margin-top: 8px;
    font-weight: 600 !important;
}
.kiosk-link i {
    background: var(--accent) !important;
    color: #fff !important;
}
.kiosk-link:hover {
    background: var(--accent) !important;
    color: #fff !important;
    transform: translateX(2px);
}
.kiosk-link:hover i {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
}

.sidebar .logout {
    margin-top: auto;
    padding: 10px 12px;
    color: var(--danger);
    font-size: 13px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 10px;
    font-weight: 500;
}
.sidebar .logout:hover { background: var(--danger-bg); text-decoration: none; }
.sidebar .logout i { color: var(--danger); width: 18px; text-align: center; }

.user-card {
    display: flex; align-items: center; gap: 10px;
    padding: 10px;
    background: var(--brand-tint);
    border-radius: var(--radius);
    margin-top: 12px;
    border: 1px solid var(--border);
}
.avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--brand);
    display: grid; place-items: center;
    font-weight: 600; color: #fff; font-size: 13px;
    flex: 0 0 34px;
}
.user-card .meta { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; flex: 1; }
.user-card .meta strong { color: var(--text); font-size: 13px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-weight: 600; }
.user-card .meta .role { color: var(--text-dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.3px; font-weight: 500; }

/* -------- Main -------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 24px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 5;
    gap: 12px;
}
.topbar-title { min-width: 0; flex: 1; }
.topbar-title h1 { margin: 0; font-size: 19px; color: var(--text); font-weight: 600; }
.topbar-title .lead { color: var(--text-dim); font-size: 13px; margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.menu-toggle {
    display: none;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--text); width: 38px; height: 38px;
    border-radius: 8px; cursor: pointer; font-size: 18px;
    flex: 0 0 38px;
}

.content { padding: 22px 24px; flex: 1; }

/* -------- Cards / panels -------- */
.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 18px;
    box-shadow:
        0 1px 3px rgba(15, 23, 42, 0.05),
        0 1px 2px rgba(15, 23, 42, 0.03);
}
.panel-card { background: #f8fafc; }
.premium-card {
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
    color: #fff;
    border-color: transparent;
}
.premium-card h1, .premium-card h2, .premium-card h3 { color: #fff; }

.section-title {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
    gap: 12px; flex-wrap: wrap;
}
.section-title h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 9px;
}
.section-title h2 i {
    color: var(--brand);
    font-size: 16px;
    width: 30px;
    height: 30px;
    background: var(--brand-pale);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* -------- Grids -------- */
.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px; }

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(20, 30, 50, 0.08);
}
/* Barra superior coloreada en cada stat */
.stat::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--stat-color, var(--brand));
    border-radius: var(--radius) var(--radius) 0 0;
}
.stat .stat-icon {
    position: absolute; top: 16px; right: 16px;
    width: 38px; height: 38px;
    border-radius: 9px;
    background: var(--stat-bg, var(--brand-pale));
    color: var(--stat-color, var(--brand));
    display: grid; place-items: center;
    font-size: 16px;
}
/* Variantes legacy */
.stat-accent { --stat-color: #e7354d; --stat-bg: #fdeaee; }
.stat-ok     { --stat-color: #059669; --stat-bg: #d1fae5; }
.stat-warn   { --stat-color: #d97706; --stat-bg: #fef3c7; }
/* Paleta extendida (modo dashboard moderno) */
.stat-blue   { --stat-color: #2563eb; --stat-bg: #dbeafe; }
.stat-indigo { --stat-color: #4f46e5; --stat-bg: #e0e7ff; }
.stat-purple { --stat-color: #7c3aed; --stat-bg: #ede9fe; }
.stat-pink   { --stat-color: #db2777; --stat-bg: #fce7f3; }
.stat-rose   { --stat-color: #e11d48; --stat-bg: #ffe4e6; }
.stat-teal   { --stat-color: #0d9488; --stat-bg: #ccfbf1; }
.stat-cyan   { --stat-color: #0891b2; --stat-bg: #cffafe; }
.stat-sky    { --stat-color: #0284c7; --stat-bg: #e0f2fe; }
.stat-green  { --stat-color: #059669; --stat-bg: #d1fae5; }
.stat-emerald{ --stat-color: #10b981; --stat-bg: #d1fae5; }
.stat-orange { --stat-color: #ea580c; --stat-bg: #ffedd5; }
.stat-amber  { --stat-color: #d97706; --stat-bg: #fef3c7; }
.stat-violet { --stat-color: #9333ea; --stat-bg: #f3e8ff; }
.stat-slate  { --stat-color: #475569; --stat-bg: #e2e8f0; }

.stat .stat-label { color: var(--text-dim); font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 6px; font-weight: 600; }
.stat .value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.1; letter-spacing: -0.01em; }
.stat .delta { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* -------- Buttons -------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 16px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 13.5px; font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    line-height: 1.2;
    font-family: inherit;
    box-shadow: var(--shadow-xs);
}
.btn:hover { background: var(--brand-tint); border-color: var(--brand); color: var(--brand); text-decoration: none; }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn i { font-size: 12px; }

.btn-primary {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    box-shadow: 0 2px 6px rgba(71, 110, 180, 0.25);
}
.btn-primary:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(71, 110, 180, 0.35);
    transform: translateY(-1px);
}
.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(71, 110, 180, 0.3);
}

.btn-ok {
    background: var(--ok);
    border-color: var(--ok);
    color: #fff;
    box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}
.btn-ok:hover {
    background: var(--ok-dark);
    border-color: var(--ok-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 2px 6px rgba(231, 53, 77, 0.25);
}
.btn-danger:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #fff;
    box-shadow: 0 4px 12px rgba(231, 53, 77, 0.35);
    transform: translateY(-1px);
}

.btn-warn {
    background: var(--warn);
    border-color: var(--warn);
    color: #fff;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25);
}
.btn-warn:hover { background: #b45c04; border-color: #b45c04; color: #fff; }

.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-2); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

/* -------- Forms -------- */
label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #334155;
    font-weight: 600;
    letter-spacing: -0.005em;
}
label i {
    color: var(--brand);
    font-size: 12px;
    width: 14px;
    text-align: center;
    margin: 0;
}
/* Selector universal: TODO input que no sea botón/checkbox/radio/file/range/etc */
input:not([type]),
input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="time"], input[type="datetime-local"],
input[type="search"], input[type="tel"], input[type="url"], input[type="month"],
input[type="week"],
textarea, select {
    width: 100%;
    padding: 11px 14px;
    background: #fff;
    color: var(--text);
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
}
input:not([type]):hover,
input[type="text"]:hover, input[type="email"]:hover, input[type="password"]:hover,
input[type="number"]:hover, input[type="date"]:hover, input[type="time"]:hover,
input[type="datetime-local"]:hover, input[type="search"]:hover, input[type="tel"]:hover,
input[type="url"]:hover, input[type="month"]:hover, input[type="week"]:hover,
textarea:hover, select:hover {
    border-color: #cbd5e1;
}
input:not([type]):focus,
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus,
input[type="number"]:focus, input[type="date"]:focus, input[type="time"]:focus,
input[type="datetime-local"]:focus, input[type="search"]:focus, input[type="tel"]:focus,
input[type="url"]:focus, input[type="month"]:focus, input[type="week"]:focus,
textarea:focus, select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(71, 110, 180, 0.12),
                0 1px 2px rgba(15, 23, 42, 0.04);
    background: #fff;
}
input[type="color"] {
    padding: 4px;
    height: 44px;
    cursor: pointer;
}
input[disabled], input[readonly] {
    background: #f8fafc;
    color: var(--text-2);
    cursor: not-allowed;
}
select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
textarea { min-height: 90px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder {
    color: #94a3b8;
    opacity: 1;
    font-weight: 400;
}
small.muted {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-2);
    line-height: 1.4;
}

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }

.filters {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px; align-items: flex-end;
}
.filters-actions { display: flex; gap: 8px; align-items: flex-end; }

.switch { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; cursor: pointer; }
.switch input[type="checkbox"] { width: auto; margin: 0; transform: scale(1.15); }

/* -------- Tables -------- */
.table-wrap {
    overflow-x: auto;
    margin: 0 -2px;
    border-radius: var(--radius-sm);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
    background: linear-gradient(to bottom, var(--brand-tint), var(--surface-2));
    color: var(--brand-dark);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 11px;
    padding: 12px 12px;
    text-align: left;
    border-bottom: 2px solid var(--brand-pale);
    white-space: nowrap;
}
thead th i {
    color: var(--brand);
    margin-right: 4px;
    font-size: 11px;
}
tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
tbody tr:hover { background: var(--brand-tint); }
.row-cancelled td { opacity: 0.5; text-decoration: line-through; }
.cell-incidents { max-width: 260px; font-size: 12px; color: var(--text-dim); }
.cell-detail { font-size: 12px; color: var(--text-dim); max-width: 360px; word-break: break-word; }
.empty { text-align: center; padding: 36px; color: var(--text-mute); font-size: 13px; }
.empty i { font-size: 32px; display: block; margin-bottom: 10px; color: var(--text-mute); opacity: 0.5; }

/* -------- Badges -------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    background: var(--brand-pale);
    color: var(--brand-dark);
    letter-spacing: 0.2px;
}
.badge-ok { background: var(--ok-bg); color: var(--ok-dark); }
.badge-danger { background: var(--danger-bg); color: var(--accent-dark); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-info { background: var(--brand-pale); color: var(--brand-dark); }
.badge-action { background: var(--brand-pale); color: var(--brand); font-family: ui-monospace, monospace; font-size: 10.5px; }
.badge-purple { background: #ede9fe; color: #6d28d9; }
.badge-pink   { background: #fce7f3; color: #be185d; }
.badge-teal   { background: #ccfbf1; color: #0f766e; }
.badge-indigo { background: #e0e7ff; color: #4338ca; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-amber  { background: #fef3c7; color: #b45309; }
.badge-cyan   { background: #cffafe; color: #0e7490; }
.badge-emerald{ background: #d1fae5; color: #047857; }

/* -------- Alerts -------- */
.alert {
    padding: 12px 16px 12px 14px;
    border-radius: var(--radius);
    border: 1px solid;
    border-left: 4px solid;
    margin-bottom: 16px;
    font-size: 13.5px;
    display: flex; align-items: center; gap: 10px;
    box-shadow: 0 1px 2px rgba(20, 30, 50, 0.04);
    animation: alertSlide 0.25s ease;
}
@keyframes alertSlide {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}
.alert i { font-size: 16px; flex-shrink: 0; }
.alert-danger { background: var(--danger-bg); border-color: #f3c2c8; border-left-color: var(--accent); color: var(--accent-dark); }
.alert-ok     { background: var(--ok-bg); border-color: #b8e0c8; border-left-color: var(--ok); color: var(--ok-dark); }
.alert-warn   { background: var(--warn-bg); border-color: #f3d6a3; border-left-color: var(--warn); color: var(--warn); }
.alert-info   { background: var(--brand-tint); border-color: var(--brand-pale); border-left-color: var(--brand); color: var(--brand-dark); }

/* -------- Notes / incidencias -------- */
.note-form {
    background: var(--surface-2);
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-top: 8px;
    border: 1px solid var(--border);
}
.note-box {
    background: var(--surface-2);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    font-size: 12px;
    border-left: 3px solid var(--brand);
}

/* -------- Dashboard bars chart -------- */
.bars { display: flex; gap: 10px; align-items: flex-end; padding: 14px 0 8px; height: 200px; }
.bar-wrap { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.bar-wrap .day { font-size: 11px; color: var(--text-dim); }
.bar-wrap .val { font-size: 11px; color: var(--text); font-weight: 600; }
.bar {
    width: 100%; max-width: 36px;
    background: linear-gradient(180deg, var(--brand-light) 0%, var(--brand) 100%);
    border-radius: 6px 6px 0 0;
    min-height: 4px;
    transition: opacity 0.2s;
}
.bar:hover { opacity: 0.85; }

/* -------- Quick actions grid -------- */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.quick {
    display: flex; align-items: center; gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    transition: all 0.18s ease;
    text-decoration: none;
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}
/* Barra superior coloreada por categoría */
.quick::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--quick-color, var(--brand));
    opacity: 0;
    transition: opacity 0.18s ease;
}
.quick:hover::before { opacity: 1; }
.quick:hover {
    transform: translateY(-3px);
    border-color: var(--quick-color, var(--brand));
    box-shadow: 0 8px 20px rgba(20, 30, 50, 0.08);
    text-decoration: none;
    color: var(--text);
}
.quick .ico {
    width: 38px; height: 38px;
    border-radius: 9px;
    background: var(--quick-bg, var(--brand-pale));
    color: var(--quick-color, var(--brand));
    display: grid; place-items: center;
    font-size: 16px;
    flex-shrink: 0;
    transition: all 0.18s ease;
}
.quick:hover .ico {
    background: var(--quick-color, var(--brand));
    color: #fff;
    transform: scale(1.05);
}
.quick .info { min-width: 0; }
.quick strong { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; }
.quick:hover strong { color: var(--quick-color, var(--brand)); }
.quick .small { display: block; font-size: 11.5px; color: var(--text-dim); margin-top: 1px; }
/* Paleta data-color para quick */
.quick[data-color="blue"]    { --quick-color: #2563eb; --quick-bg: #dbeafe; }
.quick[data-color="purple"]  { --quick-color: #7c3aed; --quick-bg: #ede9fe; }
.quick[data-color="teal"]    { --quick-color: #0d9488; --quick-bg: #ccfbf1; }
.quick[data-color="cyan"]    { --quick-color: #0891b2; --quick-bg: #cffafe; }
.quick[data-color="green"]   { --quick-color: #059669; --quick-bg: #d1fae5; }
.quick[data-color="pink"]    { --quick-color: #db2777; --quick-bg: #fce7f3; }
.quick[data-color="rose"]    { --quick-color: #e11d48; --quick-bg: #ffe4e6; }
.quick[data-color="orange"]  { --quick-color: #ea580c; --quick-bg: #ffedd5; }
.quick[data-color="amber"]   { --quick-color: #d97706; --quick-bg: #fef3c7; }
.quick[data-color="violet"]  { --quick-color: #9333ea; --quick-bg: #f3e8ff; }
.quick[data-color="sky"]     { --quick-color: #0284c7; --quick-bg: #e0f2fe; }
.quick[data-color="indigo"]  { --quick-color: #4f46e5; --quick-bg: #e0e7ff; }

/* -------- Pagination -------- */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; padding: 12px 0; }

/* -------- Modal -------- */
.modal {
    position: fixed; inset: 0;
    background: rgba(20, 30, 50, 0.5);
    display: none; align-items: center; justify-content: center;
    z-index: 100;
    backdrop-filter: blur(3px);
    padding: 20px;
}
.modal.show { display: flex; }
.modal-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    max-width: 460px; width: 100%;
    box-shadow: var(--shadow-xl);
}
.modal-box h2 { margin-top: 0; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* ===================================================================
   LOGIN
   =================================================================== */
.login-page {
    min-height: 100vh;
    display: grid; place-items: center;
    background:
        radial-gradient(ellipse 800px 600px at 80% -20%, rgba(71, 110, 180, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 600px 500px at -10% 110%, rgba(231, 53, 77, 0.06) 0%, transparent 60%),
        var(--bg);
    padding: 20px;
}
.login-wrap { width: 100%; max-width: 420px; }
.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}
.login-card .logo-box {
    text-align: center;
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}
.login-card .logo-box img { max-height: 56px; width: auto; max-width: 240px; }
.login-card h1 { text-align: center; margin: 8px 0 4px; font-size: 21px; }
.login-card .lead { text-align: center; color: var(--text-dim); margin-bottom: 22px; font-size: 13.5px; }
.login-card label { display: block; font-weight: 600; margin: 14px 0 6px; color: var(--text); font-size: 13.5px; }
.login-card label i { color: var(--brand); margin-right: 4px; }
.login-card input {
    width: 100%; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 14.5px; font-family: inherit; background: #fff; color: var(--text);
}
.login-card input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(71,110,180,.14); }
/* Espacio entre último input y el botón submit — forzado e importante
   porque algunos navegadores aplican defaults agresivos a <button> */
.login-card button[type="submit"],
.login-card .btn-block {
    margin-top: 24px !important;
    padding: 14px 16px;
    font-size: 14.5px;
    font-weight: 600;
}
.login-card button[type="submit"] + p,
.login-card form + p {
    margin-top: 18px;
}
.login-footer { text-align: center; margin-top: 14px; color: var(--text-mute); font-size: 12px; }

/* ===================================================================
   KIOSCO (TABLET) — diseño limpio claro
   =================================================================== */
body.kiosk-body {
    background:
        radial-gradient(ellipse 1000px 600px at 50% -10%, rgba(71, 110, 180, 0.06) 0%, transparent 70%),
        var(--bg);
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    /* En móvil necesitamos scroll; en escritorio queremos pantalla fija */
    min-height: 100vh;
    min-height: 100dvh; /* dynamic viewport: respeta barras nav móvil */
}
.kiosk-shell {
    display: flex; flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 18px 24px;
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
    padding-left: max(24px, env(safe-area-inset-left));
    padding-right: max(24px, env(safe-area-inset-right));
    max-width: 1200px;
    margin: 0 auto;
    box-sizing: border-box;
}
.kiosk-top {
    display: flex; align-items: center; justify-content: space-between;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
}
.kiosk-logo img { max-height: 38px; width: auto; }
.kiosk-store-pill {
    display: flex; align-items: center; gap: 8px;
    background: var(--brand-pale);
    color: var(--brand-dark);
    padding: 7px 14px;
    border-radius: 99px;
    font-size: 13px;
    font-weight: 600;
}
.kiosk-store-pill i { color: var(--brand); }
.kiosk-clock {
    text-align: right;
    color: var(--text);
    font-variant-numeric: tabular-nums;
}
.kiosk-clock .time {
    font-size: 28px; font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1;
}
.kiosk-clock .date {
    font-size: 12px; color: var(--text-dim); font-weight: 500;
    text-transform: capitalize;
    margin-top: 3px;
}
.kiosk-exit-btn {
    background: transparent; color: var(--text-dim);
    border: 1px solid var(--border); width: 40px; height: 40px;
    border-radius: 10px; cursor: pointer;
    display: grid; place-items: center;
    font-size: 16px;
}
.kiosk-exit-btn:hover { color: var(--accent); border-color: var(--accent); }

.kiosk-main {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 22px;
    padding: 22px 0;
    min-height: 0;
}

/* PIN area */
.kiosk-pinbox {
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    min-height: 0;
}
.kiosk-pinbox .title {
    display: flex; align-items: center; gap: 10px;
    color: var(--text); margin-bottom: 4px;
    font-size: 17px; font-weight: 600;
}
.kiosk-pinbox .title i { color: var(--brand); }
.kiosk-pinbox .subtitle {
    color: var(--text-dim); font-size: 12.5px;
    margin-bottom: 18px;
}

.pin-dots {
    display: flex; gap: 14px; justify-content: center;
    padding: 14px 0 22px;
}
.dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border-strong);
    transition: all 0.15s;
}
.dot.done { background: var(--brand); border-color: var(--brand); }

.kiosk-keypad {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
    margin-bottom: 18px;
}
.key {
    padding: 22px 0;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 26px; font-weight: 600;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.1s;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}
.key:hover { background: var(--brand-pale); border-color: var(--brand); color: var(--brand); }
.key:active { transform: scale(0.96); background: var(--brand); border-color: var(--brand); color: #fff; }
.key-warn {
    background: #fff7e6; color: var(--warn);
    border-color: #fae0a8; font-size: 16px;
}
.key-warn:active { background: var(--warn); color: #fff; }
.key-danger {
    background: var(--danger-bg); color: var(--accent);
    border-color: #f3c2c8; font-size: 16px;
}
.key-danger:active { background: var(--accent); color: #fff; }

.kiosk-feedback {
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    margin-bottom: 12px;
    border: 1px solid;
    display: flex; align-items: center; gap: 10px; justify-content: center;
}
.kiosk-feedback i { font-size: 18px; }
.kiosk-feedback-ok { background: var(--ok-bg); color: var(--ok-dark); border-color: #b8e0c8; }
.kiosk-feedback-err { background: var(--danger-bg); color: var(--accent-dark); border-color: #f3c2c8; }

/* Action panel (right) */
.kiosk-actions-pane {
    display: flex; flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    min-height: 0;
}
.kiosk-actions-pane .title {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 4px;
    font-size: 17px; font-weight: 600;
}
.kiosk-actions-pane .title i { color: var(--brand); }
.kiosk-actions-pane .subtitle { color: var(--text-dim); font-size: 12.5px; margin-bottom: 20px; }

.kiosk-employee-card {
    background: var(--brand-tint);
    border: 1px solid var(--brand-pale);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 18px;
    text-align: center;
    min-height: 80px;
    display: flex; flex-direction: column; justify-content: center;
}
.kiosk-employee-card.empty {
    background: var(--surface-2);
    border-color: var(--border);
    color: var(--text-mute);
    font-style: italic;
}
.kiosk-employee-card .greet { font-size: 12px; color: var(--text-dim); margin-bottom: 4px; }
.kiosk-employee-card .ename { font-size: 18px; font-weight: 700; color: var(--text); }
.kiosk-employee-card .estatus { font-size: 12.5px; color: var(--text-2); margin-top: 4px; }
.kiosk-employee-card .estatus .badge { margin-left: 4px; }

.kiosk-action-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.kiosk-action-btn {
    padding: 22px 12px;
    border: none;
    border-radius: var(--radius);
    font-size: 14.5px; font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-xs);
}
.kiosk-action-btn i { font-size: 22px; }
.kiosk-action-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: var(--shadow); }
.kiosk-action-btn:active:not(:disabled) { transform: translateY(0); }
.kiosk-action-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.kiosk-action-btn.enter { background: var(--ok); color: #fff; }
.kiosk-action-btn.exit { background: var(--accent); color: #fff; }
.kiosk-action-btn.pause-start { background: var(--warn); color: #fff; }
.kiosk-action-btn.pause-end { background: var(--brand); color: #fff; }

.kiosk-foot {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 14px; border-top: 1px solid var(--border);
    font-size: 11.5px; color: var(--text-mute);
    gap: 12px; flex-wrap: wrap;
}
.kiosk-foot .legal { max-width: 70%; }
.net-status { display: inline-flex; align-items: center; gap: 5px; }
.net-status i { font-size: 8px; }
.net-ok i { color: var(--ok); }
.net-bad i { color: var(--accent); }

/* Kiosko: pantalla de vinculación (no pareado) */
.kiosk-pair-screen {
    min-height: 100vh;
    display: grid; place-items: center;
    padding: 20px;
    background:
        radial-gradient(ellipse 900px 500px at 50% 0%, var(--brand-tint) 0%, transparent 65%),
        var(--bg);
}
.kiosk-pair-card {
    width: 100%; max-width: 560px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow-lg);
}
.kiosk-pair-card .logo-box { text-align: center; margin-bottom: 18px; }
.kiosk-pair-card .logo-box img { max-height: 56px; max-width: 240px; }
.kiosk-pair-card h1 { text-align: center; font-size: 22px; margin: 8px 0 8px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.kiosk-pair-card h1 i { color: var(--brand); }
.kiosk-pair-card .lead { text-align: center; color: var(--text-dim); font-size: 14px; margin-bottom: 24px; line-height: 1.55; }
.kiosk-pair-card label { display: block; font-weight: 600; margin: 14px 0 6px; color: var(--text); font-size: 13.5px; }
.kiosk-pair-card label i { color: var(--brand); margin-right: 4px; }
.kiosk-pair-card input[type="email"],
.kiosk-pair-card input[type="password"],
.kiosk-pair-card input[type="text"] {
    width: 100%; padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 15.5px; font-family: inherit; background: #fff; color: var(--text);
}
.kiosk-pair-card input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(71,110,180,.14); }
/* Espacio entre el último input y el botón submit (forzado) */
.kiosk-pair-card button[type="submit"],
.kiosk-pair-card .btn-block {
    margin-top: 24px !important;
}
.kiosk-pair-card .pair-actions {
    margin-top: 22px;
}
.kiosk-pair-card .pair-actions .btn {
    margin-top: 0;
}
.kiosk-pair-card .login-footer { text-align: center; margin-top: 22px; }
.kiosk-pair-card .login-footer a { color: var(--text-dim); font-size: 13.5px; }

/* Wizard pasos */
.pair-steps {
    display: flex; gap: 0; justify-content: center; align-items: center;
    margin: 0 -6px 26px;
    position: relative;
}
.pair-steps::before {
    content: ''; position: absolute; top: 16px; left: 25%; right: 25%; height: 2px; background: var(--border); z-index: 0;
}
.pair-step {
    flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; gap: 6px;
    background: transparent; padding: 0 26px; position: relative; z-index: 1;
}
.pair-step .dot {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--surface); border: 2px solid var(--border);
    display: grid; place-items: center;
    font-weight: 700; font-size: 14px; color: var(--text-mute);
    transition: all .2s ease;
}
.pair-step small { font-size: 11.5px; font-weight: 600; color: var(--text-mute); text-transform: uppercase; letter-spacing: .3px; }
.pair-step.active .dot { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(71,110,180,.15); }
.pair-step.active small { color: var(--brand); }
.pair-step.done .dot { background: var(--ok); color: #fff; border-color: var(--ok); }
.pair-step.done small { color: var(--ok); }

.pair-step-panel { animation: fadeInPair .25s ease; }
@keyframes fadeInPair { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Lista de tiendas como tarjetas tocables */
.pair-stores-list {
    display: grid; gap: 10px; margin-bottom: 22px;
    max-height: 320px; overflow-y: auto;
    padding: 2px;
}
.pair-store-card {
    display: flex; align-items: center; gap: 14px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    cursor: pointer;
    text-align: left;
    font: inherit; color: inherit;
    transition: all .15s ease;
}
.pair-store-card:hover { border-color: var(--brand-light); background: var(--brand-tint); }
.pair-store-card.selected { border-color: var(--brand); background: var(--brand-pale); box-shadow: 0 0 0 3px rgba(71,110,180,.12); }
.pair-store-icon {
    flex: 0 0 auto;
    width: 42px; height: 42px; border-radius: 10px;
    background: var(--brand-pale); color: var(--brand);
    display: grid; place-items: center; font-size: 17px;
}
.pair-store-card.selected .pair-store-icon { background: var(--brand); color: #fff; }
.pair-store-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pair-store-text strong { font-size: 15px; color: var(--text); }
.pair-store-text small { font-size: 12.5px; color: var(--text-dim); }
.pair-store-text small.muted-addr { color: var(--text-mute); font-size: 12px; }
.pair-store-text small.muted-addr i { color: var(--text-mute); margin-right: 3px; }
.pair-store-check {
    flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
    background: var(--border); color: transparent;
    display: grid; place-items: center; font-size: 12px;
    transition: all .15s ease;
}
.pair-store-card.selected .pair-store-check { background: var(--brand); color: #fff; }

.pair-actions {
    display: flex; gap: 10px; margin-top: 8px;
    justify-content: space-between;
}
.pair-actions .btn { flex: 1; }

/* Botón grande para wizard */
.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 10px; }
.btn-lg i { font-size: 14px; }

/* ===================================================================
   INSTALL WIZARD
   =================================================================== */
.wizard {
    min-height: 100vh;
    background:
        radial-gradient(ellipse 1000px 600px at 50% -10%, rgba(71, 110, 180, 0.08) 0%, transparent 60%),
        var(--bg);
    padding: 30px 20px;
}
.steps { display: flex; gap: 6px; justify-content: center; margin-bottom: 24px; flex-wrap: wrap; }
.steps .step {
    padding: 6px 14px; border-radius: 99px;
    background: var(--surface); color: var(--text-mute);
    font-size: 12px; border: 1px solid var(--border);
    font-weight: 500;
}
.steps .step.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.steps .step.done { background: var(--ok); color: #fff; border-color: var(--ok); }
.check { display: inline-block; margin-right: 6px; }
.check.ok::before { content: '✅'; }
.check.fail::before { content: '❌'; }

/* ===================================================================
   RESPONSIVE
   =================================================================== */
@media (max-width: 1100px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .menu-toggle { display: grid; place-items: center; }
    .sidebar {
        position: fixed; top: 0; left: 0;
        height: 100vh; z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: var(--shadow-xl);
    }
    body.nav-open .sidebar { transform: translateX(0); }
    /* Backdrop separado en lugar de ::after para evitar problemas de z-index
       con iconos y otros pseudo-elementos */
    .nav-backdrop {
        position: fixed; inset: 0;
        background: rgba(20, 30, 50, 0.4);
        backdrop-filter: blur(2px);
        z-index: 40;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
    }
    body.nav-open .nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
    .content { padding: 16px; }
    .topbar { padding: 12px 16px; }
    .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
    .span-2, .span-3 { grid-column: span 1; }
    .kiosk-main { grid-template-columns: 1fr; gap: 14px; padding: 14px 0; }
}

@media (max-width: 600px) {
    .kpi-grid { grid-template-columns: 1fr; }
    .stat .value { font-size: 22px; }
    .topbar-title h1 { font-size: 16px; }
    .topbar-title .lead { display: none; }
    .quick-grid { grid-template-columns: 1fr; }
    .login-card, .kiosk-pair-card { padding: 24px; }

    /* === KIOSK en MÓVIL (iPhone, Android pequeño) ===
       Estrategia: dejamos que la página HAGA SCROLL en vez de
       comprimir todo a 100vh. Esto evita que se "corte" contenido. */
    body.kiosk-body {
        min-height: 100vh;
        min-height: 100dvh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .kiosk-shell {
        min-height: auto;
        padding: 10px 12px 24px;
        padding-top: max(10px, env(safe-area-inset-top));
        padding-bottom: max(24px, env(safe-area-inset-bottom));
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    /* Header: logo + reloj + exit en una fila; pill debajo a anchura completa */
    .kiosk-top {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 10px;
        padding-bottom: 10px;
    }
    .kiosk-logo { grid-row: 1; }
    .kiosk-logo img { max-height: 28px; display: block; }
    .kiosk-clock {
        grid-row: 1;
        grid-column: 2;
        text-align: center;
    }
    .kiosk-clock .time { font-size: 18px; }
    .kiosk-clock .date { font-size: 10px; margin-top: 1px; }
    .kiosk-exit-btn {
        grid-row: 1;
        grid-column: 3;
        width: 34px; height: 34px;
        font-size: 13px;
    }
    .kiosk-store-pill {
        grid-row: 2;
        grid-column: 1 / -1;
        font-size: 11.5px;
        padding: 5px 10px;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
    }

    /* Main: una columna, flujo natural sin flex:1 */
    .kiosk-main {
        display: flex;
        flex-direction: column;
        gap: 12px;
        padding: 12px 0;
        flex: none;
        min-height: 0;
    }
    .kiosk-pinbox, .kiosk-actions-pane {
        padding: 14px;
        min-height: 0;
        flex: none;
    }
    .kiosk-pinbox .title, .kiosk-actions-pane .title {
        font-size: 14px;
        margin-bottom: 2px;
    }
    .kiosk-pinbox .subtitle, .kiosk-actions-pane .subtitle {
        font-size: 11.5px;
        margin-bottom: 10px;
    }

    /* PIN dots */
    .pin-dots {
        gap: 9px;
        padding: 6px 0 12px;
    }
    .dot { width: 12px; height: 12px; }

    /* Teclado: ancho completo, botones cuadrados con aspect-ratio
       para que no se descuadre en pantallas estrechas */
    .kiosk-keypad {
        gap: 7px;
        margin-bottom: 10px;
        width: 100%;
    }
    .key {
        padding: 0;
        aspect-ratio: 1.6 / 1;
        font-size: 22px;
        border-radius: 12px;
        min-height: 48px;
    }
    .key-warn, .key-danger { font-size: 13px; }

    /* Feedback */
    .kiosk-feedback {
        padding: 9px 12px;
        font-size: 12.5px;
        margin-bottom: 10px;
    }
    .kiosk-feedback i { font-size: 14px; }

    /* Tarjeta del empleado */
    .kiosk-employee-card {
        padding: 12px;
        margin-bottom: 12px;
        min-height: 0;
    }
    .kiosk-employee-card .greet { font-size: 11px; }
    .kiosk-employee-card .ename { font-size: 15.5px; }
    .kiosk-employee-card .estatus { font-size: 11px; margin-top: 3px; }

    /* Botones de acción 2x2 con aspect-ratio para que no se aplasten */
    .kiosk-action-grid { gap: 8px; }
    .kiosk-action-btn {
        padding: 12px 6px;
        font-size: 11.5px;
        letter-spacing: 0.2px;
        gap: 4px;
        border-radius: 12px;
        min-height: 70px;
    }
    .kiosk-action-btn i { font-size: 17px; }

    /* Footer compacto */
    .kiosk-foot {
        font-size: 10.5px;
        padding-top: 10px;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    .kiosk-foot .legal { max-width: 100%; }

    /* Modal de salir admin: full-width en móvil */
    .modal-box {
        width: calc(100% - 24px);
        max-width: 100%;
        margin: 12px;
        padding: 18px;
    }
    .modal-box h2 { font-size: 16px; }
    .modal-actions { flex-direction: column; gap: 8px; }
    .modal-actions .btn { width: 100%; }
}

/* iPhone SE / muy estrechos */
@media (max-width: 380px) {
    .kiosk-shell { padding: 8px 10px 20px; }
    .kiosk-logo img { max-height: 24px; }
    .kiosk-clock .time { font-size: 16px; }
    .kiosk-clock .date { font-size: 9.5px; }
    .kiosk-store-pill { font-size: 10.5px; padding: 4px 8px; }
    .kiosk-exit-btn { width: 30px; height: 30px; font-size: 12px; }
    .kiosk-keypad { gap: 6px; }
    .key { font-size: 19px; aspect-ratio: 1.5 / 1; min-height: 44px; }
    .key-warn, .key-danger { font-size: 12px; }
    .kiosk-action-btn { padding: 10px 4px; font-size: 10.5px; min-height: 62px; }
    .kiosk-action-btn i { font-size: 15px; }
    .kiosk-pinbox, .kiosk-actions-pane { padding: 12px; }
    .kiosk-employee-card { padding: 10px; }
    .kiosk-employee-card .ename { font-size: 14px; }
}

/* Tablet portrait — kiosk specific (entre 600 y 820 vertical) */
@media (min-width: 601px) and (max-width: 820px) and (orientation: portrait) {
    .kiosk-main { grid-template-columns: 1fr; }
    .kiosk-clock .time { font-size: 24px; }
    .kiosk-pinbox, .kiosk-actions-pane { padding: 20px; }
    .key { padding: 18px 0; font-size: 22px; }
    .kiosk-action-btn { padding: 18px 12px; font-size: 13px; }
    .kiosk-action-btn i { font-size: 18px; }
}

/* Móvil landscape (iPhone girado) — pantalla muy baja */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
    body.kiosk-body { overflow-y: auto; }
    .kiosk-shell { min-height: auto; padding: 8px 14px 16px; }
    .kiosk-main {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 8px 0;
        flex: none;
    }
    .kiosk-top { padding-bottom: 6px; }
    .kiosk-logo img { max-height: 24px; }
    .kiosk-clock .time { font-size: 16px; }
    .kiosk-store-pill { font-size: 11px; padding: 4px 10px; }
    .kiosk-pinbox, .kiosk-actions-pane { padding: 10px 12px; min-height: 0; }
    .pin-dots { padding: 4px 0 8px; gap: 7px; }
    .dot { width: 10px; height: 10px; }
    .kiosk-keypad { gap: 5px; margin-bottom: 6px; }
    .key { padding: 0; aspect-ratio: 1.8 / 1; font-size: 17px; min-height: 36px; }
    .key-warn, .key-danger { font-size: 11px; }
    .kiosk-employee-card { padding: 8px; margin-bottom: 8px; min-height: 0; }
    .kiosk-employee-card .ename { font-size: 13px; }
    .kiosk-employee-card .greet { font-size: 10px; }
    .kiosk-action-grid { gap: 6px; }
    .kiosk-action-btn { padding: 8px 6px; font-size: 10.5px; min-height: 56px; gap: 2px; }
    .kiosk-action-btn i { font-size: 14px; }
    .kiosk-foot { padding-top: 6px; font-size: 10px; }
}

/* =====================================================================
   KIOSK X · DISEÑO CLARO LUMINOSO PREMIUM
   Fondo claro · cards coloridas · proporciones fluidas viewport
   ===================================================================== */
body.kiosk-x {
    --bg-base: #f1f5fb;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.92);
    --line: rgba(15, 23, 42, 0.08);
    --line-strong: rgba(15, 23, 42, 0.14);

    --brand-1: #476eb4;
    --brand-2: #6d8fcf;

    --accent-1: #0891b2;
    --accent-2: #7c3aed;
    --accent-3: #db2777;
    --accent-4: #059669;
    --accent-5: #d97706;
    --accent-6: #dc2626;

    --t-1: #0f172a;
    --t-2: #334155;
    --t-3: #64748b;

    margin: 0;
    background: var(--bg-base);
    color: var(--t-1);
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    position: relative;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ====== FONDO CLARO con blobs muy sutiles ====== */
.x-bg {
    position: fixed; inset: 0; z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 50% at 0% 0%,  rgba(71, 110, 180, 0.10) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(139, 92, 246, 0.08) 0%, transparent 60%);
}
.x-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(50px);
    opacity: 0.45;
    /* will-change para que la GPU lo trate en su propia capa */
    will-change: transform;
}
.x-blob-1 {
    width: 28vw; height: 28vw;
    top: -8%; left: -6%;
    background: radial-gradient(circle, #b6d4ff 0%, transparent 70%);
}
.x-blob-2 {
    width: 26vw; height: 26vw;
    bottom: -8%; right: -6%;
    background: radial-gradient(circle, #e9d5ff 0%, transparent 70%);
}
.x-blob-3 {
    width: 20vw; height: 20vw;
    top: 55%; left: 62%;
    background: radial-gradient(circle, #fce7f3 0%, transparent 70%);
    opacity: 0.55;
}
/* En dispositivos potentes, animación suave */
@media (min-width: 1100px) and (hover: hover) {
    .x-blob-1 { animation: blob1 40s ease-in-out infinite; }
    .x-blob-2 { animation: blob2 50s ease-in-out infinite; }
    @keyframes blob1 {
        0%, 100% { transform: translate(0,0) scale(1); }
        50%      { transform: translate(40px, 60px) scale(1.08); }
    }
    @keyframes blob2 {
        0%, 100% { transform: translate(0,0) scale(1); }
        50%      { transform: translate(-50px, -40px) scale(1.05); }
    }
}

/* ====== SHELL · TAMAÑOS FLUIDOS ====== */
body.kiosk-x .x-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding: clamp(12px, 1.8vh, 22px) clamp(14px, 2.2vw, 32px);
    padding-top: max(clamp(12px, 1.8vh, 22px), env(safe-area-inset-top));
    padding-bottom: max(clamp(10px, 1.5vh, 16px), env(safe-area-inset-bottom));
    gap: clamp(10px, 1.5vh, 16px);
}

/* ====== HEADER ====== */
/* Por defecto: layout horizontal de 3 columnas (tienda · logo · reloj) */
.x-top {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: clamp(8px, 1.2vw, 14px);
    min-width: 0;
}
.x-top-left   { justify-self: start; min-width: 0; }
.x-top-center { justify-self: center; }
.x-top-right  { justify-self: end; display: flex; align-items: center; gap: 8px; }

/* Store badge */
.x-store {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px 8px 8px;
    background: var(--bg-glass);
    border: 1px solid var(--line);
    border-radius: 16px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 4px 16px rgba(15, 23, 42, 0.06),
        0 1px 2px rgba(15, 23, 42, 0.04);
}
.x-store-icon {
    width: clamp(36px, 4.2vh, 44px);
    height: clamp(36px, 4.2vh, 44px);
    border-radius: 12px;
    /* Fondo sólido azul corporativo, sin variables ni gradientes */
    background-color: #476eb4 !important;
    background-image: none !important;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(15px, 1.9vh, 19px);
    color: #ffffff !important;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(71, 110, 180, 0.35);
}
.x-store-icon i,
.x-store-icon svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}
.x-store-meta { line-height: 1.15; min-width: 0; }
.x-store-meta small {
    display: block;
    color: var(--t-3);
    font-size: 9.5px;
    letter-spacing: 2.2px;
    font-weight: 700;
    margin-bottom: 2px;
}
.x-store-meta strong {
    display: block;
    color: var(--t-1);
    font-size: clamp(12.5px, 1.5vh, 14.5px);
    font-weight: 700;
    letter-spacing: 0.1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 26vw;
}
.x-store-code {
    display: inline-block;
    margin-top: 3px;
    padding: 2px 8px;
    background-color: #476eb4 !important;
    background-image: none !important;
    border-radius: 6px;
    color: #ffffff !important;
    font-family: ui-monospace, 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 2px 6px rgba(71, 110, 180, 0.3);
}

/* Logo central */
.x-logo {
    max-height: clamp(38px, 5.5vh, 60px);
    max-width: clamp(180px, 28vw, 320px);
    display: block;
}

/* Reloj */
.x-clock {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 6px 14px;
    background: var(--bg-glass);
    border: 1px solid var(--line);
    border-radius: 14px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 4px 16px rgba(15, 23, 42, 0.06),
        0 1px 2px rgba(15, 23, 42, 0.04);
}
.x-clock-time {
    font-size: clamp(20px, 3.2vh, 30px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
    color: var(--t-1);
}
.x-clock-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}
.x-clock-sec {
    color: var(--accent-1);
    font-size: 10px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    font-family: ui-monospace, monospace;
}
.x-clock-date {
    color: var(--t-2);
    font-size: 10px;
    letter-spacing: 1.2px;
    font-weight: 700;
}

/* Botón ajustes */
.x-settings-btn {
    width: clamp(40px, 4.5vh, 48px);
    height: clamp(40px, 4.5vh, 48px);
    border-radius: 14px;
    background: var(--bg-glass);
    border: 1px solid var(--line);
    color: var(--t-2);
    cursor: pointer;
    font-size: clamp(15px, 1.8vh, 18px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 4px 16px rgba(15, 23, 42, 0.06),
        0 1px 2px rgba(15, 23, 42, 0.04);
    transition: all 0.25s ease;
}
.x-settings-btn:hover {
    color: var(--brand-1);
    transform: rotate(60deg);
    border-color: color-mix(in srgb, var(--brand-1) 30%, transparent);
}

/* ====== HERO ====== */
.x-hero {
    text-align: center;
    padding: clamp(4px, 0.6vh, 8px) 0;
    animation: heroIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes heroIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.x-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background: color-mix(in srgb, var(--accent-1) 8%, white);
    border: 1px solid color-mix(in srgb, var(--accent-1) 22%, transparent);
    border-radius: 99px;
    color: var(--accent-1);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 8px;
}
.x-hero-eyebrow .x-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--accent-1);
    box-shadow: 0 0 8px var(--accent-1);
    animation: dotPulse 1.6s ease-in-out infinite;
}
@keyframes dotPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.3; transform: scale(0.7); }
}

.x-hero-title {
    margin: 0 0 6px;
    font-size: clamp(22px, 4.2vh, 40px);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.05;
    display: inline-flex;
    align-items: baseline;
    gap: clamp(8px, 1.2vw, 14px);
    flex-wrap: wrap;
    justify-content: center;
}
.x-wave {
    font-size: clamp(22px, 4.2vh, 40px);
    display: inline-block;
    animation: wave 2.6s ease-in-out infinite;
    transform-origin: 70% 90%;
}
@keyframes wave {
    0%, 60%, 100% { transform: rotate(0); }
    10%, 30%      { transform: rotate(14deg); }
    20%           { transform: rotate(-8deg); }
    40%           { transform: rotate(-4deg); }
    50%           { transform: rotate(10deg); }
}
.x-hola {
    background: linear-gradient(120deg, var(--brand-1) 0%, var(--accent-2) 50%, var(--accent-3) 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: holaShim 5s ease-in-out infinite;
}
@keyframes holaShim {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}
.x-rest {
    color: var(--t-1);
    font-weight: 500;
    font-size: clamp(18px, 3.4vh, 30px);
    opacity: 0.85;
}
.x-hero-sub {
    margin: 0;
    color: var(--t-2);
    font-size: clamp(11px, 1.4vh, 13px);
    letter-spacing: 1.8px;
    font-weight: 600;
    text-transform: uppercase;
}

/* ====== GRID ====== */
.x-grid-wrap {
    position: relative;
    flex: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    min-height: 0;
}
.x-scroll-btn {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 44px; height: 44px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--line-strong);
    color: var(--brand-1);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    transition: all 0.2s ease;
    font-size: 14px;
}
.x-scroll-btn:hover {
    transform: translateX(-50%) scale(1.1);
    border-color: var(--brand-1);
}
.x-scroll-up   { top: -6px; }
.x-scroll-down { bottom: -6px; }
.x-scroll-down i { animation: bounceY 1.5s ease-in-out infinite; }
@keyframes bounceY {
    0%, 100% { transform: translateY(0); opacity: 0.6; }
    50%      { transform: translateY(3px); opacity: 1; }
}

.x-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-rows: max-content;
    justify-content: center;
    gap: clamp(12px, 1.8vh, 22px);
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    flex: 1;
    align-content: start;
    overflow-y: auto;
    overflow-x: hidden;
    padding: clamp(8px, 1.2vh, 14px) 6px clamp(16px, 2vh, 24px);
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 20px), transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 12px, #000 calc(100% - 20px), transparent 100%);
}
.x-grid::-webkit-scrollbar { width: 6px; }
.x-grid::-webkit-scrollbar-track { background: transparent; }
.x-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--brand-1), var(--accent-2));
    border-radius: 99px;
    opacity: 0.6;
}

/* ====== CARD DE EMPLEADO ====== */
.x-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 0;
    cursor: pointer;
    color: inherit;
    font-family: inherit;
    text-align: center;
    overflow: hidden;
    max-width: 280px;
    width: 100%;
    justify-self: center;
    box-shadow:
        0 4px 16px rgba(15, 23, 42, 0.06),
        0 1px 2px rgba(15, 23, 42, 0.04);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.2),
                box-shadow 0.3s ease,
                border-color 0.3s ease;
    animation: cardIn 0.5s ease both;
    display: flex;
    flex-direction: column;
    align-items: center;
}
@keyframes cardIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Top coloreado de la card (banda gradient sutil) */
.x-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--c, var(--brand-1)) 18%, transparent) 0%,
        transparent 100%);
    pointer-events: none;
    border-radius: 22px 22px 0 0;
}

.x-card:hover {
    transform: translateY(-6px);
    border-color: color-mix(in srgb, var(--c, var(--brand-1)) 40%, transparent);
    box-shadow:
        0 16px 36px rgba(15, 23, 42, 0.12),
        0 6px 16px color-mix(in srgb, var(--c, var(--brand-1)) 18%, transparent);
}
.x-card:active { transform: translateY(-2px); }

.x-card-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: clamp(16px, 2vh, 22px) clamp(12px, 1.2vw, 18px) clamp(14px, 1.8vh, 18px);
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Avatar */
.x-card-avatar {
    position: relative;
    width: clamp(80px, 11vh, 130px);
    height: clamp(80px, 11vh, 130px);
    border-radius: 50%;
    background: var(--c, var(--brand-1));
    margin-bottom: clamp(8px, 1.2vh, 14px);
    overflow: hidden;
    box-shadow:
        0 8px 20px rgba(15, 23, 42, 0.15),
        inset 0 -6px 14px rgba(0, 0, 0, 0.12);
    transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}
.x-card-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(150deg, rgba(255,255,255,0.3) 0%, transparent 45%);
    pointer-events: none;
    z-index: 2;
}
.x-card-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    -webkit-user-drag: none;
}
.x-card-avatar span {
    width: 100%; height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: clamp(28px, 4.2vh, 48px);
    font-weight: 800;
}
.x-card:hover .x-card-avatar { transform: scale(1.06); }

/* Puesto */
.x-card-pos {
    padding: 3px 10px;
    border-radius: 99px;
    background: color-mix(in srgb, var(--c, var(--brand-1)) 10%, white);
    border: 1px solid color-mix(in srgb, var(--c, var(--brand-1)) 20%, transparent);
    color: var(--c, var(--brand-1));
    font-size: clamp(8.5px, 1vh, 10px);
    font-weight: 800;
    letter-spacing: 1.6px;
    margin-bottom: clamp(6px, 0.8vh, 8px);
}

/* Nombre */
.x-card-name {
    color: var(--t-1);
    font-size: clamp(13px, 1.8vh, 17px);
    font-weight: 700;
    line-height: 1.25;
    margin-bottom: clamp(10px, 1.4vh, 14px);
    letter-spacing: -0.01em;
    word-break: break-word;
}

/* Hueco de empuje para que el CTA quede pegado abajo */
.x-card-inner > .x-card-cta { margin-top: auto; }

/* CTA */
.x-card-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: clamp(8px, 1.1vh, 11px) clamp(10px, 1.4vw, 16px);
    background: #f1f5fb;
    border: 1.5px solid color-mix(in srgb, var(--c, var(--brand-1)) 35%, transparent);
    border-radius: 99px;
    color: #0f172a !important;
    font-size: clamp(10px, 1.15vh, 11.5px);
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    width: 100%;
    justify-content: center;
}
.x-card-cta span { color: #0f172a !important; }
.x-card-cta i:first-child {
    font-size: clamp(11px, 1.3vh, 13px);
    color: var(--c, var(--brand-1)) !important;
    /* fallback de seguridad si el color del empleado es muy claro */
    filter: brightness(0.85);
}
.x-card-arrow {
    margin-left: 2px;
    transition: transform 0.3s ease;
    font-size: 10px;
    color: #475569 !important;
}
.x-card:hover .x-card-cta {
    background: var(--c, var(--brand-1));
    color: #ffffff !important;
    border-color: var(--c, var(--brand-1));
    box-shadow: 0 6px 18px color-mix(in srgb, var(--c, var(--brand-1)) 40%, transparent);
}
.x-card:hover .x-card-cta span,
.x-card:hover .x-card-cta i,
.x-card:hover .x-card-arrow { color: #ffffff !important; filter: none; }

/* Loading / empty */
.x-loading, .x-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--t-3);
    font-size: 14px;
    letter-spacing: 0.5px;
}
.x-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}
.x-spinner {
    width: 22px; height: 22px;
    border-radius: 50%;
    border: 2px solid rgba(71, 110, 180, 0.15);
    border-top-color: var(--brand-1);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.x-empty i { font-size: 38px; opacity: 0.3; margin-bottom: 10px; display: block; }

/* ====== FOOTER ====== */
.x-foot {
    display: flex;
    justify-content: center;
    padding: 2px 0 0;
}
.x-foot-bar {
    display: inline-flex;
    align-items: center;
    gap: clamp(10px, 1.4vw, 16px);
    padding: clamp(6px, 0.9vh, 10px) clamp(14px, 2vw, 22px);
    background: var(--bg-glass);
    border: 1px solid var(--line);
    border-radius: 99px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow:
        0 4px 16px rgba(15, 23, 42, 0.06),
        0 1px 2px rgba(15, 23, 42, 0.04);
}
.x-foot-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.x-foot-icon {
    width: clamp(26px, 3vh, 30px);
    height: clamp(26px, 3vh, 30px);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}
.x-foot-icon-secure {
    background-color: #476eb4 !important;
    background-image: none !important;
    color: #ffffff !important;
}
.x-foot-icon-secure i { color: #ffffff !important; }
.x-foot-icon-net {
    background-color: #059669 !important;
    background-image: none !important;
    color: #ffffff !important;
}
.x-foot-icon-net i { color: #ffffff !important; }
.x-foot-icon-net.led-bad {
    background-color: #dc2626 !important;
    background-image: none !important;
    animation: badPulse 1s ease-in-out infinite;
}
@keyframes badPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.x-foot-txt { line-height: 1.15; }
.x-foot-txt strong {
    display: block;
    color: var(--t-1);
    font-size: clamp(10px, 1.1vh, 11px);
    font-weight: 800;
    letter-spacing: 1.4px;
}
.x-foot-txt small {
    color: var(--t-3);
    font-size: clamp(9.5px, 1vh, 10.5px);
    font-weight: 500;
}
.x-foot-divider {
    width: 1px;
    height: 24px;
    background: var(--line-strong);
}

/* ====== PIN OVERLAY (claro) ====== */
.pin-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 20px;
}
.pin-overlay.show { display: flex; animation: ovIn 0.25s ease; }
@keyframes ovIn { from { opacity: 0; } to { opacity: 1; } }

.pin-overlay-box {
    position: relative;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: clamp(20px, 3vh, 32px) clamp(18px, 2.5vh, 28px);
    width: 100%;
    max-width: 460px;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow:
        0 30px 80px rgba(15, 23, 42, 0.25),
        0 10px 30px rgba(15, 23, 42, 0.12);
    color: var(--t-1);
    animation: boxIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes boxIn {
    from { opacity: 0; transform: scale(0.92) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.pin-close {
    position: absolute;
    top: 14px; right: 14px;
    width: 36px; height: 36px;
    background: #f1f5f9;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--t-2);
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 3;
}
.pin-close:hover {
    background: #fee2e2;
    color: var(--accent-6);
    border-color: rgba(239, 68, 68, 0.3);
}

.pin-emp-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line);
}
.pin-emp-avatar {
    width: clamp(56px, 7vh, 72px);
    height: clamp(56px, 7vh, 72px);
    border-radius: 50%;
    background: var(--brand-1);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(20px, 2.6vh, 26px);
    font-weight: 800;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.15);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}
.pin-emp-avatar::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(150deg, rgba(255,255,255,0.3) 0%, transparent 45%);
    pointer-events: none;
    z-index: 2;
}
.pin-emp-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: relative;
    z-index: 1;
}
.pin-emp-info { flex: 1; min-width: 0; }
.pin-emp-name {
    color: var(--t-1);
    font-size: clamp(16px, 2vh, 19px);
    font-weight: 800;
    line-height: 1.25;
    word-break: break-word;
}
.pin-emp-pos {
    font-size: 10.5px;
    color: var(--brand-1);
    margin-top: 4px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 700;
}

.pin-step { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.pin-title {
    color: var(--t-2);
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* PIN dots */
.pin-overlay .pin-dots {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-bottom: 22px;
}
.pin-overlay .pin-dots .dot {
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #e2e8f0;
    border: 1.5px solid #cbd5e1;
    transition: all 0.18s ease;
}
.pin-overlay .pin-dots .dot.done {
    background: var(--brand-1);
    border-color: var(--brand-1);
    box-shadow: 0 0 12px color-mix(in srgb, var(--brand-1) 50%, transparent);
    transform: scale(1.12);
}

/* Teclado */
.pin-overlay .kiosk-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.pin-overlay .key {
    background: #f8fafc;
    border: 1px solid var(--line);
    color: var(--t-1);
    font-family: inherit;
    font-size: 22px;
    font-weight: 700;
    padding: 0;
    aspect-ratio: 1.7 / 1;
    min-height: 58px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.12s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pin-overlay .key:hover {
    background: color-mix(in srgb, var(--brand-1) 8%, white);
    border-color: color-mix(in srgb, var(--brand-1) 30%, transparent);
    color: var(--brand-1);
}
.pin-overlay .key:active {
    transform: scale(0.94);
    background: color-mix(in srgb, var(--brand-1) 15%, white);
}
.pin-overlay .key-warn { color: var(--accent-5); }
.pin-overlay .key-warn:hover {
    background: color-mix(in srgb, var(--accent-5) 10%, white);
    border-color: color-mix(in srgb, var(--accent-5) 30%, transparent);
}
.pin-overlay .key-danger { color: var(--accent-6); }
.pin-overlay .key-danger:hover {
    background: color-mix(in srgb, var(--accent-6) 10%, white);
    border-color: color-mix(in srgb, var(--accent-6) 30%, transparent);
}

/* Estado */
.pin-status-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 18px;
}
.pin-status-card .status-dot {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--t-3);
    flex-shrink: 0;
}
.pin-status-card .status-text {
    color: var(--t-1);
    font-size: 13.5px;
    font-weight: 600;
}
.pin-status-card.state-working { border-color: color-mix(in srgb, var(--accent-4) 40%, transparent); background: color-mix(in srgb, var(--accent-4) 6%, white); }
.pin-status-card.state-working .status-dot { background: var(--accent-4); animation: dotPulse 1.5s ease-in-out infinite; }
.pin-status-card.state-paused  { border-color: color-mix(in srgb, var(--accent-5) 40%, transparent); background: color-mix(in srgb, var(--accent-5) 6%, white); }
.pin-status-card.state-paused  .status-dot { background: var(--accent-5); animation: dotPulse 1.5s ease-in-out infinite; }

/* Botones acción */
.pin-overlay .kiosk-action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.pin-overlay .kiosk-action-btn {
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 16px;
    padding: 16px 10px 12px;
    color: inherit;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-height: 110px;
    gap: 2px;
}
.pin-overlay .kiosk-action-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    filter: grayscale(0.6);
}
.pin-overlay .kiosk-action-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
}
.pin-overlay .kiosk-action-btn .act-icon {
    width: 46px; height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    margin-bottom: 6px;
}
.pin-overlay .kiosk-action-btn .act-title {
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 1.2px;
    line-height: 1;
}
.pin-overlay .kiosk-action-btn .act-sub {
    font-size: 10.5px;
    color: var(--t-3);
    margin-top: 3px;
}

.pin-overlay .act-in .act-icon { background: color-mix(in srgb, var(--accent-4) 12%, white); color: var(--accent-4); }
.pin-overlay .act-in .act-title { color: var(--accent-4); }
.pin-overlay .act-in:not(:disabled):hover { border-color: var(--accent-4); }

.pin-overlay .act-pause .act-icon { background: color-mix(in srgb, var(--accent-5) 12%, white); color: var(--accent-5); }
.pin-overlay .act-pause .act-title { color: var(--accent-5); }
.pin-overlay .act-pause:not(:disabled):hover { border-color: var(--accent-5); }

.pin-overlay .act-resume .act-icon { background: color-mix(in srgb, var(--accent-1) 12%, white); color: var(--accent-1); }
.pin-overlay .act-resume .act-title { color: var(--accent-1); }
.pin-overlay .act-resume:not(:disabled):hover { border-color: var(--accent-1); }

.pin-overlay .act-out .act-icon { background: color-mix(in srgb, var(--accent-6) 12%, white); color: var(--accent-6); }
.pin-overlay .act-out .act-title { color: var(--accent-6); }
.pin-overlay .act-out:not(:disabled):hover { border-color: var(--accent-6); }

/* Éxito */
.success-anim { text-align: center; padding: 16px 10px 8px; }
.success-circle {
    width: 92px; height: 92px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-4) 0%, #059669 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 14px 36px color-mix(in srgb, var(--accent-4) 50%, transparent);
    animation: successPop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.4);
    position: relative;
}
.success-circle::before, .success-circle::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px solid var(--accent-4);
    animation: successRing 1.4s ease-out infinite;
}
.success-circle::after { animation-delay: 0.7s; }
@keyframes successPop {
    0%   { transform: scale(0); }
    60%  { transform: scale(1.1); }
    100% { transform: scale(1); }
}
@keyframes successRing {
    0%   { transform: scale(0.85); opacity: 1; }
    100% { transform: scale(1.55); opacity: 0; }
}
.success-title {
    color: var(--t-1);
    font-size: 21px;
    font-weight: 800;
    margin-bottom: 6px;
}
.success-sub {
    color: var(--t-2);
    font-size: 13px;
}

/* Feedback */
.pin-overlay .kiosk-feedback {
    border-left: 3px solid;
    padding: 9px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.pin-overlay .kiosk-feedback-ok {
    border-left-color: var(--accent-4);
    background: color-mix(in srgb, var(--accent-4) 8%, white);
    color: #065f46;
}
.pin-overlay .kiosk-feedback-err {
    border-left-color: var(--accent-6);
    background: color-mix(in srgb, var(--accent-6) 8%, white);
    color: #991b1b;
}

/* ====== AJUSTES ESPECÍFICOS HORIZONTAL/VERTICAL ====== */

/* En pantallas muy cortas (tablet horizontal): comprimir alturas */
@media (max-height: 600px) {
    body.kiosk-x .x-shell { gap: 8px; padding-top: 10px; padding-bottom: 10px; }
    .x-hero { padding: 0; }
    .x-hero-eyebrow { margin-bottom: 4px; padding: 3px 10px; }
    .x-hero-title { margin-bottom: 2px; }
    .x-hero-sub { font-size: 10px; letter-spacing: 1.5px; }
    .x-grid { padding-top: 6px; padding-bottom: 14px; }
}

/* TABLET VERTICAL / PANTALLAS ESTRECHAS: header en 2 filas */
/* Se activa siempre que el ancho sea menor de 1200px */
@media (max-width: 1200px) {
    .x-top {
        grid-template-columns: 1fr 1fr;  /* solo 2 columnas */
        grid-template-rows: auto auto;
        row-gap: 12px;
        column-gap: 10px;
    }
    /* Logo grande arriba ocupa el ancho completo */
    .x-top-center {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
    }
    /* Tienda a la izquierda en la segunda fila */
    .x-top-left {
        grid-column: 1;
        grid-row: 2;
        justify-self: start;
        max-width: 100%;
    }
    /* Reloj a la derecha en la segunda fila */
    .x-top-right {
        grid-column: 2;
        grid-row: 2;
        justify-self: end;
    }
    .x-store-meta strong { max-width: 35vw; }
    .x-logo { max-height: clamp(40px, 6vh, 56px); }
}

/* Pantalla aún más estrecha: tienda ocupando todo, reloj debajo */
@media (max-width: 600px) {
    body.kiosk-x .x-shell { padding: 10px 12px; }
    .x-top {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        row-gap: 10px;
    }
    .x-top-center { grid-column: 1; grid-row: 1; }
    .x-top-left   { grid-column: 1; grid-row: 2; justify-self: center; }
    .x-top-right  { grid-column: 1; grid-row: 3; justify-self: center; }
    .x-store { padding: 6px 12px 6px 6px; gap: 8px; }
    .x-store-meta strong { max-width: 50vw; font-size: 13px; }
    .x-clock { padding: 5px 12px; }
    .x-clock-time { font-size: 22px; }
    .x-clock-date { font-size: 10px; letter-spacing: 0.8px; }
    .x-settings-btn { width: 38px; height: 38px; font-size: 14px; }
    .x-logo { max-height: 42px; }
    .x-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
}


/* ====== BLINDAJE FINAL: garantía absoluta de visibilidad ====== */
/* Estas reglas van al FINAL y aseguran que en ningún caso haya texto invisible */

/* INPUTS: garantizar estilo uniforme en TODO input del admin
   (selector explícito para cubrir inputs sin atributo type) */
body.app input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]):not([type="hidden"]),
body.app textarea,
body.app select {
    width: 100%;
    padding: 11px 14px;
    background: #fff;
    color: #0f172a;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    min-height: 44px;
}
body.app input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]):not([type="hidden"]):hover,
body.app textarea:hover,
body.app select:hover {
    border-color: #cbd5e1;
}
body.app input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="range"]):not([type="color"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]):not([type="hidden"]):focus,
body.app textarea:focus,
body.app select:focus {
    outline: none;
    border-color: #476eb4;
    box-shadow: 0 0 0 4px rgba(71, 110, 180, 0.12),
                0 1px 2px rgba(15, 23, 42, 0.04);
}
body.kiosk-x .x-store-meta strong { color: #0f172a !important; }
body.kiosk-x .x-store-meta small { color: #64748b !important; }
body.kiosk-x .x-clock-time { color: #0f172a !important; }
body.kiosk-x .x-clock-date { color: #334155 !important; font-weight: 700; }
body.kiosk-x .x-settings-btn { color: #334155 !important; }
body.kiosk-x .x-settings-btn i { color: #334155 !important; }
body.kiosk-x .x-card-name { color: #0f172a !important; }
body.kiosk-x .x-foot-txt strong { color: #0f172a !important; }
body.kiosk-x .x-foot-txt small { color: #475569 !important; }
body.kiosk-x .x-hero-title .x-rest { color: #0f172a !important; }
body.kiosk-x .x-hero-sub { color: #475569 !important; }

/* CRÍTICO: FONDOS SÓLIDOS para los círculos con iconos blancos */
/* Si por algún motivo el gradiente o las variables CSS fallan,
   estos fondos sólidos garantizan que se vean */
body.kiosk-x .x-store-icon {
    background-color: #476eb4 !important;
    background-image: none !important;
}
body.kiosk-x .x-store-code {
    background-color: #476eb4 !important;
    background-image: none !important;
    color: #ffffff !important;
}
body.kiosk-x .x-foot-icon-secure {
    background-color: #476eb4 !important;
    background-image: none !important;
}
body.kiosk-x .x-foot-icon-net {
    background-color: #059669 !important;
    background-image: none !important;
}
body.kiosk-x .x-foot-icon-net.led-bad {
    background-color: #dc2626 !important;
    background-image: none !important;
}
/* Iconos blancos en círculos coloreados — color y peso */
body.kiosk-x .x-store-icon,
body.kiosk-x .x-store-icon i,
body.kiosk-x .x-store-icon svg,
body.kiosk-x .x-store-code,
body.kiosk-x .x-foot-icon-secure,
body.kiosk-x .x-foot-icon-secure i,
body.kiosk-x .x-foot-icon-secure svg,
body.kiosk-x .x-foot-icon-net,
body.kiosk-x .x-foot-icon-net i,
body.kiosk-x .x-foot-icon-net svg {
    color: #ffffff !important;
    fill: #ffffff !important;
}


.avatar-picker {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 4px;
}
.avatar-picker-current {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.avatar-preview {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    color: #fff;
    font-size: 28px;
}
.avatar-preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-picker-info { font-size: 12.5px; color: var(--text-2); }
.avatar-picker-info strong { display: block; font-size: 13px; color: var(--text); margin-bottom: 2px; }
.avatar-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
    padding: 10px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-height: 260px;
    overflow-y: auto;
}
.avatar-thumb {
    background: var(--surface);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-thumb:hover {
    border-color: var(--brand-pale);
    background: var(--brand-tint);
}
.avatar-thumb.selected {
    border-color: var(--brand);
    background: var(--brand-tint);
    box-shadow: 0 0 0 2px rgba(71, 110, 180, 0.2);
}
.avatar-thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }

/* Print */
@media print {
    body { background: #fff !important; color: #000 !important; }
    .sidebar, .topbar, .actions, .filters { display: none !important; }
    .main { display: block; }
    .content { padding: 0; }
    .card { box-shadow: none; border: 1px solid #ccc; background: #fff; color: #000; }
}
