/* =========================================
   1. GLOBAL VARIABLES & RESET
   ========================================= */
:root {
    /* --- Base Palette (Luminous SaaS) --- */
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --electric-blue: #0ea5e9;
    --electric-emerald: #10b981;
    --electric-rose: #f43f5e;
    --electric-amber: #f59e0b;
    --electric-gradient: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);
    --emerald-gradient: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --rose-gradient: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);

    --secondary-dark: #0284c7;
    /* Sky 600 */

    --success: #10b981;
    /* Emerald 500 */
    --danger: #ef4444;
    /* Red 500 */
    --warning: #f59e0b;
    /* Amber 500 */

    /* --- Neutrals (Slate) --- */
    --bg-app: #f1f5f9;
    /* Slate 100 */
    --bg-card: #ffffff;
    --text-main: #0f172a;
    /* Slate 900 */
    --text-muted: #64748b;
    /* Slate 500 */
    --border-light: #e2e8f0;
    /* Slate 200 */

    /* --- Elevations & Shadows --- */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* --- Font --- */
    --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* Dark Mode Override (for login page if needed) or just specific classes */
body.login-page {
    --bg-app: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.7);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    /* Dark, sleek background for "physical device" feel */
    background-color: #0f172a;
    /* Slate 900 */
    color: var(--text-main);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    /* Rich, deep gradient pattern */
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
        repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.01) 0px, rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 10px);

    /* FAST TAP: Remove 300ms delay on all mobile interactions */
    touch-action: manipulation;
}

/* Ensure ALL interactive elements are fast */
button,
input,
a,
.hg-button {
    touch-action: manipulation;
}


/* =========================================
   2. TERMINAL SPECIFIC STYLES
   ========================================= */

/* Main Card Container */
/* Main Card Container */
.terminal-card {
    background: rgba(255, 255, 255, 0.95);
    /* Slightly more opaque for better contrast against dark bg */
    width: 95%;
    max-width: 1100px;
    max-height: 95vh;
    /* Keep limit */
    border-radius: 24px;
    /* Slightly less rounded, more "screen-like" */

    /* Deep shadow to lift it off the "wall" */
    box-shadow:
        0 0 0 12px rgba(255, 255, 255, 0.05),
        /* Outer "Glow/Bezel" effect */
        0 50px 100px -20px rgba(0, 0, 0, 0.5),
        /* Deep shadow */
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    /* Inner highlight */

    padding: 1.5rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeInScale 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    /* Subtle metallic border effect */
    border: 1px solid rgba(255, 255, 255, 0.1);

    overflow: hidden;
}

/* ... (other rules skipped) ... */

/* Force Enter Key to be Neutral (White) - Ultimate Specificity */
.simple-keyboard .hg-button-enter,
.hg-theme-default .hg-button.hg-button-enter {
    background: #fff !important;
    color: var(--text-main) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.simple-keyboard .hg-button-enter *,
.hg-theme-default .hg-button.hg-button-enter * {
    color: var(--text-main) !important;
    fill: var(--text-main) !important;
}



@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Header Section */
.terminal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 0.75rem;
    flex-shrink: 0;
}


/* Logo & Company Name */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.company-logo {
    max-height: 80px;
    /* 100% más grande que los 50px originales */
    width: auto;
    object-fit: contain;
}

.company-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}

.clock-wrapper {
    text-align: right;
}

.live-clock {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -2px;
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.05));
}


.date-display {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 0.1rem;
}


/* Main Grid Layout */
.main-interface-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
    transition: all 0.3s ease;
}

/* Left Side: Interaction Zone */
.interaction-zone {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    height: 100%;
}

.input-field-wrapper {
    position: relative;
    width: 100%;
}

.input-field-wrapper .input-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.25rem;
}

#codigo {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    /* Space for icon */
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--border-light);
    border-radius: 16px;
    background: #f8fafc;
    color: var(--text-main);
    transition: all 0.2s;
    text-align: center;
    letter-spacing: 2px;
}

#codigo:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
    background: white;
}

#codigo::placeholder {
    color: #cbd5e1;
    font-weight: 400;
    font-size: 1.1rem;
    letter-spacing: normal;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
    transition: all 0.3s ease;
}

.action-buttons button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem 1rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: var(--font-sans);
    position: relative;
    overflow: hidden;
}



.btn-action.check-in {
    background: #059669;
    /* Verde esmeralda más intenso */
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.6), 0 2px 4px rgba(16, 185, 129, 0.4);
}

.btn-action.check-in .icon-circle {
    background: white;
    color: #059669;
}

.btn-action.check-in:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 30px -10px rgba(16, 185, 129, 0.7), 0 8px 16px rgba(16, 185, 129, 0.5);
}

.btn-action.check-in:hover .icon-circle {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-action.check-out {
    background: #dc2626;
    /* Rojo más intenso */
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.6), 0 2px 4px rgba(239, 68, 68, 0.4);
}

.btn-action.check-out .icon-circle {
    background: white;
    color: #dc2626;
}

.btn-action.check-out:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 30px -10px rgba(239, 68, 68, 0.7), 0 8px 16px rgba(239, 68, 68, 0.5);
}

.btn-action.check-out:hover .icon-circle {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Botones Inactivos: Atenuados pero manteniendo el color */
.btn-action.disabled {
    opacity: 0.5;
    /* Más transparente cuando está deshabilitado */
    filter: saturate(0.4) brightness(0.9);
    /* Desaturado pero visible */
    pointer-events: auto !important;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

/* ... (skipped) ... */

/* Force Enter Key to be Soft Green Always */
.simple-keyboard .hg-button-enter,
.hg-theme-default .hg-button.hg-button-enter {
    background: #ecfdf5 !important;
    /* Verde muy suave (Emerald 50) */
    color: #059669 !important;
    /* Verde texto (Emerald 600) */
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2) !important;
    border-bottom-color: #d1fae5 !important;
    /* Emerald 100 */
}

.simple-keyboard .hg-button-enter *,
.hg-theme-default .hg-button.hg-button-enter * {
    color: #059669 !important;
    fill: #059669 !important;
}

.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: inherit;
}

.btn-action:hover .icon-circle {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.btn-action span {
    font-size: 1.1rem;
    font-weight: 700;
}

/* Right Side: Numpad Zone */
.numpad-zone {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--border-light);
}

/* Simple Keyboard Styling Override */
.simple-keyboard {
    font-family: var(--font-sans) !important;
    background-color: transparent !important;
}

.hg-theme-default .hg-button {
    height: 65px !important;
    border-radius: 14px !important;
    font-weight: 700 !important;
    font-size: 1.5rem !important;
    color: var(--text-main) !important;
    background: white !important;
    border-bottom: 4px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04) !important;
    margin: 5px !important;
    transition: all 0.2s ease !important;
}


.hg-theme-default .hg-button:hover {
    background: #f8fafc !important;
    border-bottom-color: #cbd5e1 !important;
}

.hg-theme-default .hg-button[data-skbtn="{enter}"] {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: white !important;
    border-bottom-color: #047857 !important;
}

.hg-theme-default .hg-button[data-skbtn="{enter}"]:hover {
    filter: brightness(1.1);
}


.hg-theme-default .hg-button:active {
    transform: translateY(3px) !important;
    border-bottom-width: 1px !important;
}


.hg-theme-default .hg-button.hg-functionBtn {
    background-color: #f1f5f9 !important;
    color: var(--text-muted) !important;
}

/* Footer Section */
.terminal-footer {
    border-top: 1px solid var(--border-light);
    padding-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    flex-shrink: 0;
}


.logout-link {
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: color 0.2s;
    padding: 0.5rem;
}

.logout-link:hover {
    color: var(--danger);
}

/* Status Message */
.status-message {
    min-height: 3rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    gap: 0.5rem;
    margin-top: 1rem;
}

.status-message.success {
    background-color: #dcfce7;
    color: #166534;
}

.status-message.error {
    background-color: #fee2e2;
    color: #991b1b;
}

.status-message.info {
    background-color: #e0f2fe;
    color: #075985;
}

/* Privacy Consent Enhanced */
.consent-container {
    background: #fffbeb;
    border: 2px solid #fbbf24;
    padding: 1.5rem;
    border-radius: 16px;
    margin-top: 1rem;
    box-shadow: 0 4px 6px rgba(245, 158, 11, 0.1);
    animation: slideUp 0.3s ease;
    box-sizing: border-box;
    width: 100%;
}

.consent-container h4 {
    margin: 0 0 1rem 0;
    color: #92400e;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.consent-text {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #fde68a;
    margin-bottom: 1rem;
}

.custom-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 1.05rem;
    gap: 1rem;
    color: #4b5563;
    line-height: 1.5;
    user-select: none;
}

.custom-checkbox input {
    width: 24px;
    height: 24px;
    margin-top: 2px;
    cursor: pointer;
    accent-color: var(--primary);
}

.custom-checkbox a {
    color: var(--primary);
    text-decoration: underline;
    font-weight: 600;
}

.btn-consent {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2);
}

.btn-consent:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

/* =========================================
   3. RESPONSIVE adjust
   ========================================= */
@media (max-width: 768px) {
    .terminal-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        padding-bottom: 1.5rem;
    }

    .logo-wrapper {
        width: 100%;
        justify-content: center;
        gap: 0.75rem;
    }

    .clock-wrapper {
        width: 100%;
        text-align: center;
    }

    .company-name {
        font-size: 1.8rem;
        text-align: center;
    }

    .main-interface-grid {
        grid-template-columns: 1fr;
        /* Stack vertically on tablets/mobile */
        gap: 1rem;
    }

    .terminal-card {
        padding: 1.5rem;
        gap: 1.5rem;
        border-radius: 16px;
    }

    .live-clock {
        font-size: 4rem;
    }

    .date-display {
        font-size: 0.9rem;
    }

    .company-logo {
        max-height: 50px;
    }

    .hg-theme-default .hg-button {
        height: 60px !important;
        font-size: 1.25rem !important;
    }

    /* Action buttons responsive */
    .action-buttons {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .action-btn {
        padding: 1.25rem;
        font-size: 1rem;
    }

    /* Consent Form Mobile Fixes */
    .consent-container {
        padding: 1rem;
        margin-top: 0.5rem;
        border-radius: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .consent-text {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .consent-text label {
        font-size: 0.85rem;
        line-height: 1.4;
        display: flex;
        gap: 0.5rem;
    }

    .custom-checkbox input {
        width: 20px;
        height: 20px;
        min-width: 20px;
        /* Prevent shrinking */
        margin-top: 2px;
    }

    .btn-consent {
        padding: 0.8rem;
        font-size: 0.95rem;
        border-radius: 10px;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .terminal-card {
        padding: 1rem;
        gap: 1rem;
    }

    .terminal-header {
        padding-bottom: 1rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .logo-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
    }

    .clock-wrapper {
        width: 100%;
        text-align: center;
        order: 2;
    }

    .company-name {
        font-size: 1.5rem;
        order: 1;
    }

    .company-logo {
        max-height: 110px;
        margin-bottom: 0.5rem;
    }

    .live-clock {
        font-size: 3.5rem;
    }

    .date-display {
        font-size: 0.85rem;
    }

    .input-display {
        padding: 1rem;
    }

    .input-field-wrapper input {
        font-size: 1.5rem;
    }

    .action-btn {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .hg-theme-default .hg-button {
        height: 55px !important;
        font-size: 1.1rem !important;
    }

    /* Mobile Numpad - Bottom Sheet Style */
    .numpad-zone {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        background: white !important;
        border-radius: 20px 20px 0 0 !important;
        box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.3) !important;
        padding: 1.5rem 1rem 2rem 1rem !important;
        z-index: 9999 !important;
        transform: translateY(100%) !important;
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
        display: block !important;
    }

    /* Show numpad when active - slides up */
    .numpad-zone.active {
        transform: translateY(0) !important;
    }

    /* Add overlay backdrop when numpad is active */
    .numpad-zone.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
        animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    /* Add handle bar at top of numpad */
    .numpad-zone::after {
        content: '';
        position: absolute;
        top: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: #cbd5e1;
        border-radius: 2px;
    }

    /* Adjust keyboard inside numpad */
    .numpad-zone .simple-keyboard {
        margin-top: 1rem;
    }
}

/* =========================================
   4. LOGIN PAGE STYLES (Restoring previous dark/glassmorphism)
   ========================================= */
body.login-page {
    background: radial-gradient(circle at top left, #1e1b4b, #0f172a);
}

body.login-page .glass-card {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 4rem 3rem;
    width: 100%;
    max-width: 460px;
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}


body.login-page .glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    background-size: 200% 100%;
    animation: gradientMove 4s linear infinite;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 0%;
    }

    100% {
        background-position: 100% 0%;
    }
}

body.login-page .login-title {
    font-size: 2.25rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.025em;
}

body.login-page .login-subtitle {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

body.login-page .input-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

body.login-page .input-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #cbd5e1;
    margin-left: 0.25rem;
}

body.login-page .input-wrapper {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
}

body.login-page .input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
    background: rgba(15, 23, 42, 0.8);
}

body.login-page .form-input {
    width: 100%;
    background: transparent;
    border: none;
    padding: 1.1rem 1.1rem 1.1rem 3rem;
    color: white;
    font-size: 1.05rem;
    outline: none;
    font-family: inherit;
}

/* Chrome/Edge Autofill fix for dark mode */
body.login-page .form-input:-webkit-autofill,
body.login-page .form-input:-webkit-autofill:hover,
body.login-page .form-input:-webkit-autofill:focus {
    -webkit-text-fill-color: white;
    -webkit-box-shadow: 0 0 0px 1000px #1e293b inset;
    transition: background-color 5000s ease-in-out 0s;
    border-radius: 11px;
}

body.login-page .input-icon {
    top: 50%;
    transform: translateY(-50%);
    position: absolute;
    left: 1.1rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color 0.3s;
}

body.login-page .input-wrapper:focus-within .input-icon {
    color: var(--primary-light);
}

body.login-page .toggle-password {
    position: absolute;
    right: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
}

body.login-page .toggle-password:hover {
    color: white;
}

body.login-page .btn-submit {
    width: 100%;
    padding: 1.1rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, #4338ca 100%);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 10px 15px -3px rgba(79, 70, 229, 0.3);
}

body.login-page .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.3), 0 20px 25px -5px rgba(79, 70, 229, 0.4);
    filter: brightness(1.1);
}

body.login-page .btn-submit:active {
    transform: translateY(1px);
}

body.login-page .footer-link {
    display: block;
    margin-top: 2rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s;
}

body.login-page .footer-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.alert {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Success Animation Modal */
.success-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.success-modal.show {
    display: flex;
}

.success-content {
    background: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    animation: slideUp 0.5s ease;
}

.success-checkmark {
    margin: 0 auto 2rem;
}

.success-checkmark .checkmark {
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: #10b981;
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke-width: 3;
    stroke: #10b981;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.6s forwards;
}

@keyframes stroke {
    100% {
        stroke-dashoffset: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.success-time-badge {
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 99px;
    font-weight: 700;
    color: #4b5563;
    font-size: 1.25rem;
    border: 1px solid #e5e7eb;
}

.success-time-badge i {
    color: var(--primary);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Custom Checkmark Color for Out */
.success-modal.check-out-theme .checkmark-circle {
    stroke: var(--rose-gradient);
}

.success-modal.check-out-theme .checkmark-check {
    stroke: var(--rose-gradient);
}

.success-modal.check-out-theme .success-title {
    color: var(--electric-rose);
}

/* Greeting Card Section */
.greeting-zone {
    width: 100%;
    animation: fadeInScale 0.4s ease-out;
}

.greeting-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.user-icon {
    font-size: 4rem;
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.welcome-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.employee-name {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    margin: 0.25rem 0 0 0;
}

.btn-confirm-action {
    width: 100%;
    padding: 1.25rem;
    border-radius: 16px;
    border: none;
    background: linear-gradient(135deg, var(--primary), var(--electric-blue));
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px -5px rgba(99, 102, 241, 0.4);
}

.btn-confirm-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px -5px rgba(99, 102, 241, 0.5);
    filter: brightness(1.1);
}

.btn-confirm-action:active {
    transform: translateY(0);
}

/* Input Instructions Styling */
.input-instructions {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    animation: fadeIn 0.5s ease-out;
}

.input-instructions i.fa-info-circle {
    color: var(--primary);
    font-size: 1.1rem;
}

/* Trust Badges Styling */
.terminal-trust-badges {
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.terminal-trust-badges:hover {
    opacity: 1;
}

.terminal-trust-badges i {
    color: var(--primary-light);
}

.badge-separator {
    color: #cbd5e1;
}

/* Technical Footer Styling (Diego's Specialist Touch) */
.terminal-technical-footer {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    animation: fadeIn 0.8s ease-out;
}

.tech-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
}

.tech-badge i {
    font-size: 1.25rem;
    color: var(--primary-light);
    opacity: 0.8;
}

.tech-badge span {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.tech-badge:hover {
    color: var(--text-main);
    transform: translateY(-2px);
}

/* --- Keyboard Customization --- */
.simple-keyboard .hg-button-enter {
    background: var(--success) !important;
    color: white !important;
    /* Tick blanco */
}

.simple-keyboard .hg-button-enter svg,
.simple-keyboard .hg-button-enter i {
    fill: white !important;
    color: white !important;
}

/* Ensure footer visibility */
.terminal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    margin-top: auto;
    width: 100%;
    position: relative;
    z-index: 10;
}

.logout-link i {
    font-size: 1.2rem;
    /* Icono un poco más grande */
}

.tech-badge:hover i {
    opacity: 1;
    color: var(--electric-blue);
}

/* Input Field Weight Refinement */
.input-field-wrapper {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    background: rgba(255, 255, 255, 0.9) !important;
}

.input-instructions {
    background: rgba(255, 255, 255, 0.4);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    backdrop-filter: blur(4px);
}


/* Terminal Status Panel (Neo-Tech Edition) */
.terminal-status-panel {
    margin-top: 2rem;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    animation: fadeIn 0.8s ease-out;
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 0.75rem;
}

.status-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 0.1em;
}

.status-indicator {
    font-size: 0.7rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.status-indicator .pulse-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: fastPulse 1.5s infinite;
}

@keyframes fastPulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.5;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.status-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-item i {
    font-size: 1.1rem;
    color: var(--primary-light);
    opacity: 0.8;
}

.status-val {
    display: flex;
    flex-direction: column;
}

.val-label {
    font-size: 0.6rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.val-text {
    font-size: 0.85rem;
    font-weight: 800;
    color: #f1f5f9;
}

.node-activity {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    border-radius: 12px;
}

.activity-bars {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 25px;
}

.activity-bars .bar {
    width: 3px;
    background: linear-gradient(to top, var(--primary), var(--electric-blue));
    border-radius: 1px;
    animation: barAnim 2s infinite ease-in-out;
}

@keyframes barAnim {

    0%,
    100% {
        height: 30%;
    }

    50% {
        height: 90%;
    }
}

.activity-bars .bar:nth-child(2) {
    animation-delay: 0.2s;
}

.activity-bars .bar:nth-child(3) {
    animation-delay: 0.5s;
}

.activity-bars .bar:nth-child(4) {
    animation-delay: 0.1s;
}

.activity-bars .bar:nth-child(5) {
    animation-delay: 0.4s;
}

.activity-bars .bar:nth-child(6) {
    animation-delay: 0.3s;
}

.terminal-id {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.65rem;
    color: #475569;
    font-weight: 600;
}

/* Hide when not in idle */
.interaction-zone:has(#greeting-zone[style*="block"]) .terminal-status-panel,
.interaction-zone:has(.action-buttons[style*="grid"]) .terminal-status-panel {
    display: none;
}

/* --- Admin Control (Top Right) --- */
.admin-login-link {
    position: fixed;
    top: 20px;
    right: 20px;
    color: var(--text-muted);
    font-size: 1.5rem;
    opacity: 0.3;
    /* Sutil */
    transition: all 0.3s ease;
    z-index: 1000;
    text-decoration: none;
    padding: 10px;
    border-radius: 50%;
}

.admin-login-link:hover {
    opacity: 1;
    color: var(--primary);
    background: rgba(255, 255, 255, 0.8);
    transform: rotate(90deg);
}

/* --- Footer & Shutdown --- */
.terminal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 0.8rem;
    margin-top: auto;
    padding-bottom: 0;
    /* Compacto */
    /* Subir visualmente */
    font-size: 0.85rem;
    color: var(--text-muted);
    width: 100%;
}

.logout-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.logout-link:hover {
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    opacity: 1;
    transform: rotate(90deg);
}

/* Force Enter Key to be Neutral (White) */
.simple-keyboard .hg-button-enter {
    background: #fff !important;
    color: var(--text-main) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

.simple-keyboard .hg-button-enter * {
    color: var(--text-main) !important;
    fill: var(--text-main) !important;
}

/* --- Keyboard Customization --- */
.simple-keyboard {
    background-color: transparent !important;
}

.simple-keyboard .hg-button {
    height: 60px !important;
    border-radius: 10px !important;
    box-shadow: 0 3px 5px -1px rgba(0, 0, 0, 0.1) !important;
    font-weight: 600 !important;
    font-size: 1.4rem !important;
    color: var(--text-main) !important;
}

/* Tecla ENTER (Neutra) */
.simple-keyboard .hg-button-enter {
    background: #fff !important;
    /* Blanco normal */
    color: var(--text-main) !important;
}

.simple-keyboard .hg-button-enter span,
.simple-keyboard .hg-button-enter svg,
.simple-keyboard .hg-button-enter i {
    color: var(--text-main) !important;
    /* Color texto normal */
    fill: var(--text-main) !important;
}

/* --- Mini Confirm Button (Inside Input) --- */
.input-field-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field-wrapper input {
    padding-right: 60px !important;
}

.mini-confirm-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: #cbd5e1;
    /* Gris muy suave, casi invisible */
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: default;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.mini-confirm-btn:hover {
    background: #f0fdf4;
    /* Fondo verde muy claro */
    color: var(--success);
    /* Icono verde */
    border-color: var(--success);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.mini-confirm-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Estado: PIN VALIDO (Verde / Tick) */
.mini-confirm-btn.valid {
    background: var(--success) !important;
    color: white !important;
    border-color: var(--success) !important;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
    animation: pulsoVerde 1.5s infinite;
    cursor: default;
    /* Solo informativo */
    pointer-events: none;
}

/* Estado: PIN INVALIDO (Rojo / Aspa) */
.mini-confirm-btn.invalid {
    background: var(--danger) !important;
    color: white !important;
    border-color: var(--danger) !important;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    animation: shake 0.5s;
    cursor: pointer;
    /* Clickeable para borrar? */
    pointer-events: auto;
}

@keyframes pulsoVerde {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

/* --- Usability Improvements --- */

/* 1. Shake Animation (Error Feedback) */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
        border-color: var(--danger);
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
        border-color: var(--danger);
    }
}

.shake-input {
    animation: shake 0.5s cubic-bezier(.36, .07, .19, .97) both;
}

/* 2. Better Backspace Visibility */
.simple-keyboard .hg-button-bksp {
    background: #fff1f2 !important;
    /* Rojo muy muy claro */
    color: var(--red-dark) !important;
    border: 1px solid #fecaca !important;
}

.simple-keyboard .hg-button-bksp:active {
    background: #fee2e2 !important;
}

/* Remove pointer-events none to allow feedback on click */
.btn-action.disabled {
    opacity: 0.5;
    filter: brightness(0.95);
    /* Mostrar color atenuado */
    cursor: not-allowed;
    pointer-events: auto !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Force Enter Key to be Soft Green Always */
.simple-keyboard .hg-button-enter,
.hg-theme-default .hg-button.hg-button-enter {
    background: #ecfdf5 !important;
    color: #059669 !important;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2) !important;
    border-bottom-color: #d1fae5 !important;
}

.simple-keyboard .hg-button-enter *,
.hg-theme-default .hg-button.hg-button-enter * {
    color: #059669 !important;
    fill: #059669 !important;
}

/* --- HELP BUTTON & MODAL STYLES --- */
.help-trigger {
    position: fixed;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
}

.help-trigger:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.help-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.help-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.help-content {
    background: white;
    border-radius: 24px;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.help-modal-overlay.active .help-content {
    transform: translateY(0);
}

.help-header {
    background: #f8fafc;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.help-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

.close-help {
    background: white;
    border: 1px solid #e2e8f0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #64748b;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-help:hover {
    background: #fee2e2;
    color: #ef4444;
    border-color: #fecaca;
}

.help-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.help-item {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}

.help-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.help-item h4 {
    margin: 0 0 0.5rem 0;
    color: #334155;
    font-size: 1rem;
    font-weight: 700;
}

.help-item p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
    line-height: 1.6;
}

.help-footer {
    background: #f8fafc;
    padding: 1rem 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
}



/* =========================================
   MOBILE RESPONSIVE - LOGIN PAGE
   ========================================= */
@media (max-width: 768px) {
    body.login-page .glass-card {
        padding: 2.5rem 1.5rem;
        max-width: 95%;
        margin: 1rem;
        border-radius: 24px;
    }

    body.login-page .glass-card img[alt="O'Clocky Logo"] {
        height: 90px !important;
        max-width: 90%;
    }

    body.login-page .login-title {
        font-size: 1.75rem;
    }

    body.login-page .login-subtitle,
    body.login-page p[style*="font-size: 0.85rem"] {
        font-size: 0.8rem !important;
    }

    body.login-page .input-label {
        font-size: 0.85rem;
    }

    body.login-page .form-input {
        padding: 1rem 1rem 1rem 2.75rem;
        font-size: 1rem;
    }

    body.login-page .input-icon {
        left: 1rem;
        font-size: 1rem;
    }

    body.login-page .toggle-password {
        right: 1rem;
    }

    body.login-page .btn-submit {
        padding: 1rem;
        font-size: 1rem;
    }

    body.login-page .footer-link {
        font-size: 0.85rem;
        margin-top: 1.5rem;
    }

    .alert {
        padding: 0.875rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    body.login-page .glass-card {
        padding: 2rem 1.25rem;
        border-radius: 20px;
    }

    body.login-page .glass-card img[alt="O'Clocky Logo"] {
        height: 75px !important;
    }

    body.login-page .input-group {
        margin-bottom: 1.25rem;
    }
}

/* =========================================
   4. UX ANIMATIONS & HAPTICS (Sara & Diego)
   ========================================= */

/* 1. Breathing Clock Animation */
@keyframes clock-breathe {

    0%,
    100% {
        filter: drop-shadow(0 0 2px rgba(99, 102, 241, 0.1));
        text-shadow: 0 0 5px rgba(99, 102, 241, 0.05);
    }

    50% {
        filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.3));
        text-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
        transform: scale(1.01);
    }
}

.live-clock {
    animation: clock-breathe 4s infinite ease-in-out;
    transition: transform 0.2s;
    /* Ensure it doesn't shift layout */
    backface-visibility: hidden;
}

/* 2. Haptic Visual Feedback (Shake) */
@keyframes shake-visual {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.shake-input {
    animation: shake-visual 0.4s cubic-bezier(.36, .07, .19, .97) both;
    border-color: var(--danger) !important;
    background-color: #fef2f2 !important;
    /* Light red bg */
}

/* 3. Button Interaction Enhancements (Tactile Feel) */
.hg-theme-default .hg-button:active,
.btn-action:active,
.mini-confirm-btn:active,
.btn-consent:active {
    transform: scale(0.96) !important;
    transition: transform 0.05s ease-out !important;
}

/* 4. Success Pulse */
@keyframes success-pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(16, 185, 129, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.pulse-success {
    animation: success-pulse-ring 0.6s ease-out;
}

/* 5. Numpad Touch Optimization */
@media (hover: none) and (pointer: coarse) {
    .hg-theme-default .hg-button {
        min-height: 65px !important;
        /* Larger touch target */
    }

    .hg-theme-default .hg-button:active {
        background-color: #e2e8f0 !important;
        /* Visual feedback on touch */
    }
}