/* ============================================
   SISTEMA HOGAR - Estilos globales
   Mobile-first, modo claro/oscuro, paleta calida
   ============================================ */

:root {
    --primary:        #f97316;
    --primary-dark:   #ea580c;
    --primary-light:  #fff7ed;
    --accent:         #fb7185;

    --bg-page:        #fdf6f0;
    --bg-card:        #ffffff;
    --bg-input:       #ffffff;
    --bg-sidebar:     #1f1813;
    --bg-sidebar-hover: rgba(249, 115, 22, 0.12);

    --text-primary:   #1f2937;
    --text-secondary: #4b5563;
    --text-muted:     #6b7280;
    --text-sidebar:   #f3f4f6;
    --text-sidebar-muted: #9ca3af;

    --border:         rgba(0, 0, 0, 0.08);
    --border-sidebar: rgba(255, 255, 255, 0.08);

    --shadow-sm:      0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md:      0 4px 16px rgba(249, 115, 22, 0.10);
    --shadow-lg:      0 10px 32px rgba(0, 0, 0, 0.08);

    --success:        #10b981;
    --warning:        #f59e0b;
    --danger:         #ef4444;
    --info:           #3b82f6;

    --radius-sm:      0.5rem;
    --radius-md:      0.75rem;
    --radius-lg:      1rem;
    --radius-xl:      1.25rem;

    --sidebar-w:      260px;
}

html.dark-mode {
    --bg-page:        #1a1410;
    --bg-card:        #2a2018;
    --bg-input:       #1f1812;
    --bg-sidebar:     #110d09;
    --bg-sidebar-hover: rgba(249, 115, 22, 0.18);

    --text-primary:   #f3f4f6;
    --text-secondary: #d1d5db;
    --text-muted:     #9ca3af;

    --border:         rgba(255, 255, 255, 0.08);
    --shadow-md:      0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg:      0 10px 32px rgba(0, 0, 0, 0.4);

    --primary-light:  rgba(249, 115, 22, 0.12);
}

* { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* ============================================
   LAYOUT GUEST (login)
   ============================================ */

.guest-body {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(249, 115, 22, 0.18) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(251, 113, 133, 0.15) 0%, transparent 50%),
        var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

html.dark-mode .guest-body {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(249, 115, 22, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(251, 113, 133, 0.08) 0%, transparent 50%),
        var(--bg-page);
}

.auth-wrapper { width: 100%; max-width: 420px; }

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    animation: cardEntrance 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cardEntrance {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.auth-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 2rem 1.5rem 1.75rem;
    text-align: center;
}

.auth-header-icon {
    width: 64px; height: 64px;
    margin: 0 auto 0.75rem;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.85rem;
    backdrop-filter: blur(8px);
}

.auth-header h3 { margin: 0; font-weight: 700; font-size: 1.35rem; }
.auth-header p  { margin: 0.35rem 0 0; opacity: 0.92; font-size: 0.92rem; }

.auth-body { padding: 1.75rem 1.5rem; }

.input-icon-group { position: relative; }
.input-icon-group .form-control {
    padding-left: 2.75rem;
    padding-right: 1rem;
    height: 50px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s ease;
}
.input-icon-group .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15);
    background: var(--bg-input);
    color: var(--text-primary);
    outline: none;
}

.input-icon {
    position: absolute;
    left: 1rem; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.1rem;
    pointer-events: none;
}

.toggle-password-btn {
    position: absolute;
    right: 0.5rem; top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.toggle-password-btn:hover { color: var(--primary); }

.form-label { color: var(--text-secondary); font-weight: 500; font-size: 0.9rem; margin-bottom: 0.45rem; }
.form-error { color: var(--danger); font-size: 0.82rem; margin-top: 0.35rem; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border: none;
    height: 50px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-md);
    color: #fff;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.35);
    color: #fff;
}
.btn-primary:active { transform: translateY(0); }

/* Toggle tema flotante (solo guest) */
.theme-toggle {
    position: fixed;
    top: 1rem; right: 1rem;
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

/* ============================================
   LAYOUT APP (autenticado, con sidebar)
   ============================================ */

.app-body { background: var(--bg-page); }

.app-shell {
    min-height: 100vh;
    min-height: 100dvh;
    transition: padding-left 0.25s ease;
}

@media (min-width: 992px) {
    .app-shell { padding-left: var(--sidebar-w); }
}

/* SIDEBAR */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    height: 100dvh;
    background: var(--bg-sidebar);
    color: var(--text-sidebar);
    display: flex;
    flex-direction: column;
    z-index: 50;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
}

@media (min-width: 992px) {
    .sidebar { transform: translateX(0); box-shadow: none; }
}

.sidebar.is-open { transform: translateX(0); }

.sidebar-head {
    padding: 1.1rem 1.15rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-sidebar);
}

.sidebar-brand {
    display: flex; align-items: center; gap: 0.6rem;
    font-weight: 700; font-size: 1.05rem; color: #fff;
}
.sidebar-brand i { font-size: 1.4rem; color: var(--primary); }

.sidebar-close {
    background: transparent;
    border: none;
    color: var(--text-sidebar);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    border-radius: var(--radius-sm);
}
.sidebar-close:hover { background: rgba(255, 255, 255, 0.08); }

@media (min-width: 992px) {
    .sidebar-close { display: none; }
}

.sidebar-user {
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-sidebar);
}

.sidebar-user-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.4rem;
    flex-shrink: 0;
}

.sidebar-user-info { min-width: 0; flex: 1; }
.sidebar-user-name {
    font-weight: 700; font-size: 0.92rem; color: #fff;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-rol { font-size: 0.78rem; color: var(--text-sidebar-muted); }

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0;
}

.sidebar-section {
    padding: 1rem 1.15rem 0.4rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-sidebar-muted);
    font-weight: 600;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.15rem;
    color: var(--text-sidebar);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
    position: relative;
}

.sidebar-link i { font-size: 1.15rem; color: var(--text-sidebar-muted); width: 22px; text-align: center; }
.sidebar-link span { flex: 1; }

.sidebar-link:hover {
    background: var(--bg-sidebar-hover);
    color: #fff;
}
.sidebar-link:hover i { color: var(--primary); }

.sidebar-link.is-active {
    background: var(--bg-sidebar-hover);
    color: #fff;
}
.sidebar-link.is-active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--primary);
}
.sidebar-link.is-active i { color: var(--primary); }

.sidebar-link-soon  { opacity: 0.65; }
.sidebar-link-danger:hover { color: var(--danger); }
.sidebar-link-danger:hover i { color: var(--danger); }

.sidebar-badge {
    flex: 0;
    background: rgba(249, 115, 22, 0.2);
    color: var(--primary);
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
    border-radius: 9999px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.sidebar-footer {
    padding: 0.85rem 1.15rem;
    border-top: 1px solid var(--border-sidebar);
}

.sidebar-theme-btn {
    width: 100%;
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-sidebar);
    border-radius: var(--radius-md);
    color: var(--text-sidebar);
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.15s ease;
}
.sidebar-theme-btn:hover { background: rgba(255, 255, 255, 0.08); }
.sidebar-theme-btn i { font-size: 1.05rem; color: var(--primary); }

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 40;
}
.sidebar-backdrop.is-visible { opacity: 1; visibility: visible; }

@media (min-width: 992px) {
    .sidebar-backdrop { display: none; }
}

/* TOPBAR */
.app-topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 30;
}

.topbar-menu-btn {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.topbar-menu-btn:hover { background: var(--bg-page); }

@media (min-width: 992px) {
    .topbar-menu-btn { display: none; }
}

.topbar-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    flex: 1;
}

.topbar-spacer { flex: 0; }

/* CONTAINER */
.app-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.25rem 1rem 4rem;
}

/* ALERTS */
.app-alert {
    max-width: 1100px;
    margin: 0.75rem auto 0;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    display: flex;
    gap: 0.6rem;
    align-items: center;
    font-size: 0.92rem;
    box-shadow: var(--shadow-sm);
}
.app-alert-error   { background: rgba(239, 68, 68, 0.12); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.25); }
.app-alert-success { background: rgba(16, 185, 129, 0.12); color: var(--success); border: 1px solid rgba(16, 185, 129, 0.25); }
.app-alert-warn    { background: rgba(245, 158, 11, 0.12); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.25); }

/* PAGE HEAD (titulo de seccion) */
.page-head { margin-bottom: 1.25rem; }
.page-head h2 {
    display: flex; align-items: center; gap: 0.5rem;
    margin: 0;
    font-size: 1.4rem;
    color: var(--text-primary);
    font-weight: 700;
}
.page-head h2 i { color: var(--primary); }
.page-sub { margin: 0.25rem 0 0; color: var(--text-muted); font-size: 0.92rem; }

/* ============================================
   DASHBOARD
   ============================================ */

.dash-greeting {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-md);
}
.dash-greeting-text h2 { margin: 0; font-size: 1.45rem; font-weight: 700; }
.dash-greeting-text p  { margin: 0.25rem 0 0; opacity: 0.9; font-size: 0.92rem; text-transform: capitalize; }
.dash-greeting-icon {
    width: 56px; height: 56px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
    flex-shrink: 0;
}

/* WIDGETS GRID */
.widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.widget {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.1rem;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.widget::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--text-muted);
}
.widget-primary::before { background: var(--primary); }
.widget-success::before { background: var(--success); }
.widget-warning::before { background: var(--warning); }

.widget-icon {
    width: 38px; height: 38px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-dark);
    font-size: 1.2rem;
    margin-bottom: 0.55rem;
}
html.dark-mode .widget-icon { color: var(--primary); }
.widget-success .widget-icon { background: rgba(16, 185, 129, 0.15); color: var(--success); }

.widget-num {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
}
.widget-label {
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* INFO CARD (Tu informacion) */
.info-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    overflow: hidden;
}

.info-card-header {
    padding: 0.85rem 1rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.92rem;
}
.info-card-header > span { flex: 1; }
.info-card-link {
    font-size: 0.82rem;
    color: var(--primary-dark);
    font-weight: 500;
    text-decoration: none;
}
.info-card-link:hover { text-decoration: underline; }

html.dark-mode .info-card-header,
html.dark-mode .info-card-link { color: var(--primary); }

.info-card-body { padding: 1rem; }

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }

.info-label { color: var(--text-muted); font-size: 0.92rem; }
.info-value { color: var(--text-primary); font-weight: 500; font-size: 0.95rem; }

.info-badge {
    padding: 0.2rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.info-badge-activa { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.info-badge-inactiva, .info-badge-cesada { background: rgba(239, 68, 68, 0.15); color: var(--danger); }

.info-badge.badge-pendiente { background: rgba(107, 114, 128, 0.15); color: var(--text-muted); }
.info-badge.badge-ok        { background: rgba(16, 185, 129, 0.15);  color: var(--success); }
.info-badge.badge-warn      { background: rgba(245, 158, 11, 0.18);  color: var(--warning); }
.info-badge.badge-info      { background: rgba(249, 115, 22, 0.15);  color: var(--primary-dark); }
html.dark-mode .info-badge.badge-info { color: var(--primary); }

/* CTA MARCAR */
.cta-marcar {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 1rem 1.15rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: all 0.15s ease;
}
.cta-marcar:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(249, 115, 22, 0.3); }
.cta-marcar:active { transform: translateY(0); }

.cta-icon {
    width: 48px; height: 48px;
    background: rgba(255, 255, 255, 0.22);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.cta-body { flex: 1; display: flex; flex-direction: column; }
.cta-body strong { font-size: 1.05rem; }
.cta-body span   { font-size: 0.82rem; opacity: 0.92; }
.cta-arrow { font-size: 1.5rem; opacity: 0.85; }

/* ADMIN INFO CARD */
.admin-info-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.admin-info-head {
    display: flex; align-items: center; gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.admin-info-head i { color: var(--primary); font-size: 1.3rem; }
.admin-info-head strong { color: var(--text-primary); font-size: 1.05rem; }
.admin-info-card p { color: var(--text-muted); margin: 0.25rem 0 1rem; font-size: 0.92rem; }

.btn-soon {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem;
    background: var(--bg-page);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.88rem;
    margin-right: 0.4rem;
    border: 1px solid var(--border);
}
.btn-soon:hover { color: var(--text-primary); }
.btn-soon span {
    background: rgba(249, 115, 22, 0.15);
    color: var(--primary);
    font-size: 0.68rem;
    padding: 0.1rem 0.4rem;
    border-radius: 9999px;
    text-transform: uppercase;
    font-weight: 700;
}

/* ACTION CARD generica (placeholder vacio) */
.action-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.action-card-icon {
    width: 56px; height: 56px;
    margin: 0 auto 0.75rem;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--primary-dark);
    font-size: 1.65rem;
}
html.dark-mode .action-card-icon { color: var(--primary); }
.action-card h4 { margin: 0; font-weight: 700; color: var(--text-primary); }
.action-card p { margin: 0.35rem 0 0; color: var(--text-muted); font-size: 0.92rem; }

/* ============================================
   PANTALLA MARCAR ASISTENCIA
   ============================================ */

.marcar-page { display: flex; flex-direction: column; gap: 1.25rem; }

.marcar-empleado {
    display: flex; align-items: center; gap: 0.85rem;
    background: var(--bg-card);
    padding: 0.85rem 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.marcar-foto, .marcar-foto-placeholder {
    width: 56px; height: 56px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--primary);
}
.marcar-foto-placeholder {
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.85rem;
}
.marcar-nombre { font-weight: 700; color: var(--text-primary); font-size: 1.05rem; }
.marcar-cargo  { color: var(--text-muted); font-size: 0.88rem; }

.estado-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1.75rem 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.estado-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: var(--text-muted);
}
.estado-card.estado-trabajando::before { background: var(--success); }
.estado-card.estado-en_pausa::before   { background: var(--warning); }
.estado-card.estado-en_comida::before  { background: var(--warning); }
.estado-card.estado-salio::before      { background: var(--primary); }

.estado-icono { font-size: 2.5rem; color: var(--primary); margin-bottom: 0.45rem; display: block; }
.estado-card.estado-trabajando .estado-icono { color: var(--success); }
.estado-card.estado-en_pausa .estado-icono,
.estado-card.estado-en_comida .estado-icono { color: var(--warning); }

.estado-titulo { font-size: 1.25rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.3rem; }
.estado-sub { color: var(--text-muted); font-size: 0.95rem; }

.cronometro {
    margin-top: 0.85rem;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--success);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
}
.cronometro-warn { color: var(--warning); }

.btn-marcar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 72px;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: var(--shadow-md);
    -webkit-tap-highlight-color: transparent;
}
.btn-marcar i { font-size: 1.6rem; }
.btn-marcar:active { transform: scale(0.98); }
.btn-marcar:disabled, .btn-marcar.btn-loading { opacity: 0.65; cursor: wait; }

.btn-entrada    { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.btn-salida     { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); }
.btn-finalizar  { background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); }

.acciones-secundarias {
    background: var(--bg-card);
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.acciones-titulo { color: var(--text-muted); font-size: 0.92rem; margin-bottom: 0.75rem; text-align: center; }
.acciones-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }

.btn-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 72px;
    padding: 0.65rem;
    border: 1px solid var(--border);
    background: var(--bg-page);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}
.btn-mini i { font-size: 1.5rem; color: var(--primary); }
.btn-mini:active { transform: scale(0.97); background: var(--primary-light); }
.btn-mini:disabled, .btn-mini.btn-loading { opacity: 0.5; cursor: wait; }
.btn-mini-pausa i  { color: var(--warning); }
.btn-mini-comida i { color: var(--accent); }

.resumen-dia {
    background: var(--bg-card);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.resumen-titulo {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.6rem;
    font-weight: 600;
}
.resumen-fila {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.95rem;
}
.resumen-fila:last-child { border-bottom: none; }
.resumen-fila > span { display: flex; align-items: center; gap: 0.15rem; flex-wrap: wrap; min-width: 0; }
.resumen-fila i { margin-right: 0.25rem; color: var(--primary); flex-shrink: 0; }
.resumen-fila strong { color: var(--text-primary); font-variant-numeric: tabular-nums; flex-shrink: 0; margin-left: 0.5rem; }

.resumen-foto-mini {
    width: 144px;
    height: 144px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}
.resumen-foto-mini:hover {
    border-color: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.2);
}

.resumen-fila-total {
    border-top: 2px solid var(--primary);
    margin-top: 0.15rem;
    font-weight: 600;
}
.resumen-fila-total strong { color: var(--primary-dark); font-size: 1.05rem; }
html.dark-mode .resumen-fila-total strong { color: var(--primary); }

.jornada-cerrada {
    text-align: center;
    padding: 1.5rem;
    background: var(--primary-light);
    border-radius: var(--radius-lg);
    color: var(--primary-dark);
}
.jornada-cerrada i { font-size: 2.5rem; display: block; margin-bottom: 0.4rem; }
.jornada-cerrada div { font-weight: 600; }
html.dark-mode .jornada-cerrada { color: var(--primary); }

/* ============================================
   HISTORIAL
   ============================================ */

.historial-filtros {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: flex-end;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.filtro-rapidos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: 100%;
}
.btn-filtro-rapido {
    padding: 0.35rem 0.7rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--bg-page);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.btn-filtro-rapido:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.filtro-campo { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; min-width: 130px; }
.filtro-campo label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }
.filtro-campo input {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.65rem;
    font-size: 0.92rem;
    font-family: inherit;
}
.filtro-campo input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

.btn-filtrar, .btn-limpiar {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.55rem 0.95rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
}
.btn-filtrar { background: var(--primary); color: #fff; }
.btn-filtrar:hover { background: var(--primary-dark); color: #fff; }
.btn-limpiar { background: var(--bg-page); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-limpiar:hover { color: var(--text-primary); }

.historial-lista { display: flex; flex-direction: column; gap: 0.6rem; }

.hist-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease;
}
.hist-card:hover { transform: translateX(2px); }

.hist-card-abierto { border-left: 3px solid var(--warning); }
.hist-card-cerrado { border-left: 3px solid var(--success); }

.hist-fecha {
    text-align: center;
    flex-shrink: 0;
    min-width: 56px;
}
.hist-dia {
    font-size: 1.65rem; font-weight: 700;
    color: var(--primary); line-height: 1;
    font-variant-numeric: tabular-nums;
}
.hist-mes-anio { font-size: 0.7rem; color: var(--text-muted); text-transform: lowercase; margin-top: 0.15rem; }

.hist-info { flex: 1; min-width: 0; }
.hist-dia-sem { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; }
.hist-horas {
    display: flex; gap: 0.4rem; align-items: center;
    color: var(--text-primary);
    font-weight: 500;
    margin-top: 0.15rem;
    font-variant-numeric: tabular-nums;
}
.hist-horas i { color: var(--primary); }
.hist-flecha { color: var(--text-muted); }
.hist-meta { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.4rem; }
.hist-chip {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.72rem;
    padding: 0.18rem 0.5rem;
    border-radius: 9999px;
    display: inline-flex; align-items: center; gap: 0.25rem;
}
html.dark-mode .hist-chip { color: var(--primary); }

.hist-total { text-align: right; flex-shrink: 0; }
.hist-total-num {
    font-size: 1.05rem; font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}
.hist-estado {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-top: 0.2rem;
}
.hist-estado-abierto { color: var(--warning); }
.hist-estado-cerrado { color: var(--success); }

.paginacion {
    display: flex; align-items: center; justify-content: center;
    gap: 0.85rem;
    margin-top: 1.25rem;
}
.pag-btn {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 38px; height: 38px;
    border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    text-decoration: none;
    cursor: pointer;
}
.pag-btn:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.pag-info { color: var(--text-muted); font-size: 0.88rem; }

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--bg-card);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}
.empty-state i { font-size: 3rem; color: var(--text-muted); display: block; margin-bottom: 0.5rem; }
.empty-state h4 { margin: 0; color: var(--text-primary); font-weight: 700; }
.empty-state p { margin: 0.3rem 0 0; color: var(--text-muted); font-size: 0.92rem; }

/* ============================================
   EMPLEADAS / REPORTES (Fase D)
   ============================================ */

.page-head-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all 0.15s ease;
}
.btn-action-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
}
.btn-action-primary:hover { transform: translateY(-1px); color: #fff; box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3); }
.btn-action-secondary {
    background: var(--bg-page);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* Lista de empleadas */
.empleadas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.85rem;
}

.empleada-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1rem;
    display: flex;
    gap: 0.85rem;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease;
}
.empleada-card:hover { transform: translateY(-2px); }

.empleada-estado-cesada, .empleada-estado-inactiva { opacity: 0.65; }

.empleada-avatar {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.85rem;
    flex-shrink: 0;
    overflow: hidden;
}
.empleada-avatar img { width: 100%; height: 100%; object-fit: cover; }

.empleada-info { flex: 1; min-width: 0; }
.empleada-nombre { font-weight: 700; color: var(--text-primary); font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empleada-cargo  { color: var(--text-muted); font-size: 0.85rem; }
.empleada-meta   { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.35rem; align-items: center; }
.empleada-email  { font-size: 0.78rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 0.25rem; }

.empleada-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }

.btn-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg-page);
    color: var(--text-secondary);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.92rem;
}
.btn-icon:hover { color: var(--primary); border-color: var(--primary); }
.btn-icon-danger:hover  { color: var(--danger);  border-color: var(--danger); }
.btn-icon-success:hover { color: var(--success); border-color: var(--success); }

/* FORMULARIO */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.form-section {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}
.form-section:first-child { padding-top: 0.25rem; }
.form-section:last-of-type { border-bottom: none; }

.form-section-titulo {
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 0.65rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
html.dark-mode .form-section-titulo { color: var(--primary); }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}
.form-field { display: flex; flex-direction: column; gap: 0.3rem; }
.form-field label { color: var(--text-secondary); font-size: 0.85rem; font-weight: 500; }
.form-field input,
.form-field select,
.form-field textarea {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    padding: 0.6rem 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
    width: 100%;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}
.form-field textarea { resize: vertical; min-height: 70px; }

.form-help {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0.5rem 0 0;
    display: flex; align-items: center; gap: 0.35rem;
}
.form-help i { color: var(--info); }

.form-actions {
    display: flex;
    gap: 0.6rem;
    justify-content: flex-end;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    padding-top: 1rem;
}

/* TABLAS (reportes) */
.tabla-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tabla {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.tabla thead th {
    background: var(--bg-page);
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.65rem 0.85rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    font-weight: 600;
}
.tabla tbody td {
    padding: 0.55rem 0.85rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}
.tabla tbody tr:last-child td { border-bottom: none; }
.tabla tbody tr:hover { background: var(--primary-light); }
html.dark-mode .tabla tbody tr:hover { background: rgba(249, 115, 22, 0.08); }
.th-num, .td-num { text-align: right; font-variant-numeric: tabular-nums; }
.td-empty { text-align: center; color: var(--text-muted); padding: 1.5rem !important; }
.td-muted { color: var(--text-muted); font-style: italic; }

/* ============================================
   DETALLE DE ASISTENCIA (edicion admin)
   ============================================ */

.btn-link-small {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-page);
    white-space: nowrap;
}
.btn-link-small:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-color: var(--primary);
}
html.dark-mode .btn-link-small:hover { color: var(--primary); }

.edit-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)) auto;
    gap: 0.6rem;
    align-items: end;
    padding: 0.65rem 0;
    border-bottom: 1px dashed var(--border);
}
.edit-form-row:last-of-type { border-bottom: none; }

.edit-form-add {
    background: var(--primary-light);
    border-radius: var(--radius-md);
    padding: 0.85rem;
    margin-top: 0.85rem;
    border-bottom: none;
}
html.dark-mode .edit-form-add { background: rgba(249, 115, 22, 0.08); }

.edit-form-row .form-field {
    gap: 0.2rem;
}
.edit-form-row .form-field label {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.edit-form-row .form-field input,
.edit-form-row .form-field select {
    padding: 0.45rem 0.6rem;
    font-size: 0.88rem;
}

.form-field-static {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    align-self: stretch;
    justify-content: flex-end;
}
.form-field-static label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}
.dur-tag {
    background: var(--bg-page);
    color: var(--text-primary);
    padding: 0.4rem 0.65rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    font-size: 0.88rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.edit-form-actions {
    align-self: end;
    display: flex;
    gap: 0.3rem;
}

.edit-form-delete {
    margin-top: -0.6rem;
    margin-bottom: 0.65rem;
    text-align: right;
}

/* ============================================
   MODAL CAMARA (Fase B.2)
   ============================================ */

.cam-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.cam-modal-inner {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    max-height: 95vh;
}

.cam-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}
.cam-modal-head h3 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}
.cam-cerrar {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    padding: 0.35rem 0.55rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
}
.cam-cerrar:hover { background: var(--bg-page); color: var(--text-primary); }

.cam-modal-body {
    padding: 1rem 1.25rem;
}

.cam-stage {
    position: relative;
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: flex; align-items: center; justify-content: center;
}
.cam-stage video,
.cam-stage img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scaleX(-1); /* selfie effect */
}

.cam-msg {
    margin-top: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
}
.cam-msg-error { background: rgba(239, 68, 68, 0.12); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.25); }
.cam-msg-info  { background: rgba(59, 130, 246, 0.12); color: var(--info);   border: 1px solid rgba(59, 130, 246, 0.25); }

.cam-progress {
    margin-top: 0.75rem;
    background: var(--bg-page);
    border-radius: 9999px;
    height: 24px;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}
.cam-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-dark) 100%);
    transition: width 0.2s ease;
    width: 0%;
}
.cam-progress span {
    position: absolute;
    inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.78rem;
    color: var(--text-primary);
    font-weight: 600;
}

.cam-modal-actions {
    padding: 0.85rem 1.25rem 1.25rem;
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.cam-btn {
    flex: 1;
    min-height: 50px;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: all 0.15s ease;
}
.cam-btn:disabled { opacity: 0.5; cursor: wait; }
.cam-btn:active { transform: scale(0.98); }

.cam-btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
}
.cam-btn-secondary {
    background: var(--bg-page);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* ============================================
   REPORTE DE JORNADA (pantalla marcar, estado salio)
   ============================================ */

.reporte-marcas {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--border);
}

.reporte-marca {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.reporte-marca-foto {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary);
    flex-shrink: 0;
}
.reporte-marca-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.reporte-marca-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 1.4rem;
    border-color: var(--border);
}

.reporte-marca-arrow {
    color: var(--text-muted);
    font-size: 1.2rem;
    align-self: center;
    margin-top: -1.2rem;
}

.reporte-marca-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
}
.reporte-marca-hora {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

.reporte-seccion {
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}
.reporte-seccion:last-of-type { border-bottom: none; }

.reporte-seccion-titulo {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.reporte-seccion-titulo i { color: var(--primary); }

.reporte-detalle-fila {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.reporte-detalle-fila strong {
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.reporte-motivo {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
}

.reporte-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0 0;
    border-top: 2px solid var(--primary);
    margin-top: 0.5rem;
    font-size: 1rem;
}
.reporte-total span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-secondary);
    font-weight: 600;
}
.reporte-total span i { color: var(--primary); }
.reporte-total strong {
    font-size: 1.2rem;
    color: var(--primary-dark);
    font-variant-numeric: tabular-nums;
}
html.dark-mode .reporte-total strong { color: var(--primary); }

/* GALERIA DE FOTOS DEL DIA (pantalla marcar) */

.fotos-galeria {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 0.6rem;
}

.foto-galeria-item {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--bg-page);
    transition: all 0.15s ease;
}
.foto-galeria-item:hover {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
    transform: translateY(-2px);
}

.foto-galeria-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.foto-galeria-info {
    padding: 0.3rem 0.4rem;
    text-align: center;
}
.foto-galeria-tipo {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.foto-galeria-hora {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* ============================================
   FOTOS EN REPORTES
   ============================================ */

.fotos-row > td {
    padding: 0.35rem 0.85rem 0.65rem !important;
    background: var(--bg-page);
    border-bottom: 2px solid var(--border) !important;
}
.fotos-row:hover > td { background: var(--bg-page) !important; }

.fotos-strip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
}

.fotos-strip-icon {
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.foto-thumb-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-decoration: none;
    flex-shrink: 0;
}

.foto-thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 2px solid var(--border);
    transition: all 0.15s ease;
}
.foto-thumb-link:hover .foto-thumb {
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.25);
    transform: scale(1.08);
}

.foto-thumb-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 576px) {
    .dash-greeting { padding: 1.15rem; }
    .dash-greeting-text h2 { font-size: 1.25rem; }
    .dash-greeting-icon { width: 48px; height: 48px; font-size: 1.4rem; }
    .widgets-grid { grid-template-columns: 1fr 1fr; }
    .widget-num { font-size: 1.35rem; }
    .hist-card { padding: 0.75rem; gap: 0.75rem; }
    .hist-dia { font-size: 1.45rem; }
    .hist-fecha { min-width: 48px; }
    .app-container { padding: 1rem 0.75rem 4rem; }
}

@media (min-width: 768px) {
    .auth-body { padding: 2rem; }
}
