/**
 * ══════════════════════════════════════════════════════════════════
 * GLOBAL.CSS - Global Styles
 * ══════════════════════════════════════════════════════════════════
 */

/*
 * Tailwind's Preflight reset sets `svg { display: block }`, but Lucide
 * renders icons as raw <svg class="lucide ..."> elements. Without this
 * override, any icon meant to sit inline next to text (outside a flex
 * container) drops onto its own line instead of sitting beside the text.
 */
svg.lucide {
    display: inline-block;
    vertical-align: -0.125em;
}

/* Smooth transitions */
* {
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

/*
 * Tactile "pressed" feedback for every button in the app. Without this,
 * clicking gives no visual acknowledgement until the resulting action
 * (modal open, network response, etc.) shows up, which can feel unresponsive.
 */
button:not(:disabled),
[role="button"]:not(:disabled) {
    transition: transform 0.1s ease, filter 0.1s ease, background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

button:not(:disabled):active,
[role="button"]:not(:disabled):active {
    transform: scale(0.96);
    filter: brightness(0.93);
}

/* Hide browser default password reveal icon, especially Microsoft Edge */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-caps-lock-indicator {
    visibility: hidden;
    display: none !important;
    pointer-events: none;
}
/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    /* Hide navigation, buttons when printing */
    nav, header, button, .hide-on-print {
        display: none !important;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Loading animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

#recent-system-activity::-webkit-scrollbar {
    width: 6px;
}

#recent-system-activity::-webkit-scrollbar-track {
    background: #f3f4f6;
}

#recent-system-activity::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

#recent-system-activity::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}