/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Custom checkbox — matches app dark theme */
input[type="checkbox"].ps-checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1.5px solid #475569;
    border-radius: 0.25rem;
    background-color: #0f172a;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    vertical-align: middle;
    transition: background-color 150ms, border-color 150ms, box-shadow 150ms;
}
input[type="checkbox"].ps-checkbox:checked {
    background-color: #22d3ee;
    border-color: #22d3ee;
}
input[type="checkbox"].ps-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 3px;
    top: 0px;
    width: 5px;
    height: 9px;
    border: 2px solid #0f172a;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}
input[type="checkbox"].ps-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.2);
}
input[type="checkbox"].ps-checkbox:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* New-record row highlight animation */
@keyframes ps-row-flash {
    0%   { background-color: rgba(6, 182, 212, 0.22); box-shadow: 0 0 0 2px rgba(6, 182, 212, 0.4); }
    70%  { background-color: rgba(6, 182, 212, 0.10); box-shadow: 0 0 0 1px rgba(6, 182, 212, 0.2); }
    100% { background-color: transparent; box-shadow: none; }
}
.ps-row-highlight { animation: ps-row-flash 3s ease-out forwards; border-radius: 4px; }

/* Number input spinner removal */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }
input.no-spinners::-webkit-outer-spin-button,
input.no-spinners::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input.no-spinners[type=number] { -moz-appearance: textfield; }
