* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent
}

#sidebar,
#mainContent {
    transition: width .25s ease, margin .25s ease, transform .25s ease
}

.nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .72rem 1rem;
    border-radius: .75rem;
    color: #94a3b8;
    font-size: .875rem;
    transition: .2s
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, .09);
    color: #fff
}

.nav-link.active {
    box-shadow: inset 3px 0 #3b82f6
}

.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem
}

.payroll-card {
    cursor: pointer;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease
}

.payroll-card:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .08)
}

.payroll-card:focus-visible {
    outline: 3px solid #bfdbfe;
    outline-offset: 3px
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    border-radius: .7rem;
    padding: .6rem .85rem;
    font-weight: 600;
    font-size: .82rem;
    transition: .15s
}

.btn-primary {
    background: #2563eb;
    color: white
}

.btn-primary:hover {
    background: #1d4ed8
}

.btn-ghost {
    border: 1px solid #e2e8f0;
    background: white
}

.btn-ghost:hover {
    background: #f8fafc
}

.input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: .7rem;
    padding: .65rem .8rem;
    background: white;
    outline: none
}

.input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px #dbeafe
}

.label {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: .35rem
}

.badge {
    display: inline-flex;
    padding: .25rem .55rem;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 700
}

.table-wrap {
    overflow: auto
}

.page-hide {
    display: none !important
}

#pager button[disabled] {
    opacity: .45;
    cursor: default;
    pointer-events: none
}

canvas {
    max-width: 100%
}

@media(max-width:640px) {
    .data-table th,
    .data-table td {
        padding: .6rem .65rem;
        font-size: .78rem
    }

    .card {
        border-radius: .85rem
    }

    .modal-card {
        max-width: 100% !important
    }
}

.data-table {
    width: 100%;
    font-size: .82rem
}

.data-table th {
    text-align: left;
    color: #64748b;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: .8rem 1rem;
    background: #f8fafc;
    white-space: nowrap
}

.data-table td {
    padding: .85rem 1rem;
    border-top: 1px solid #f1f5f9;
    white-space: nowrap
}

.data-table tr:hover td {
    background: #f8fafc
}

.modal-card {
    animation: pop .18s ease
}

body.feedback-open {
    overflow: hidden
}

.feedback-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    padding: 1rem
}

.feedback-modal[hidden] {
    display: none
}

.feedback-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(15, 23, 42, .58);
    backdrop-filter: blur(4px);
    cursor: default
}

.feedback-stage {
    position: relative;
    min-height: 100%;
    display: grid;
    place-items: center;
    pointer-events: none
}

.feedback-card {
    width: min(100%, 27rem);
    padding: 2rem;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .24);
    text-align: center;
    pointer-events: auto;
    animation: pop .18s ease;
    outline: none
}

.feedback-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    border-radius: 999px;
    display: grid;
    place-items: center
}

.feedback-icon svg {
    width: 2rem;
    height: 2rem
}

.feedback-card[data-tone="success"] .feedback-icon {
    color: #047857;
    background: #d1fae5
}

.feedback-card[data-tone="error"] .feedback-icon {
    color: #dc2626;
    background: #fee2e2
}

.feedback-card[data-tone="confirm"] .feedback-icon {
    color: #b45309;
    background: #fef3c7
}

.feedback-title {
    color: #172033;
    font-size: 1.2rem;
    line-height: 1.4;
    font-weight: 750
}

.feedback-message {
    margin-top: .55rem;
    color: #64748b;
    font-size: .9rem;
    line-height: 1.55;
    white-space: pre-line
}

.feedback-actions {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    gap: .65rem
}

.feedback-accept {
    min-width: 7rem;
    color: #fff;
    background: #2563eb
}

.feedback-card[data-tone="success"] .feedback-accept {
    background: #059669
}

.feedback-card[data-tone="error"] .feedback-accept {
    background: #dc2626
}

.feedback-accept:hover {
    filter: brightness(.92)
}

.feedback-accept:focus-visible,
.feedback-actions .btn:focus-visible {
    outline: 3px solid #bfdbfe;
    outline-offset: 2px
}

.pwa-connection,
.pwa-update {
    position: fixed;
    z-index: 85;
    border-radius: .85rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .2);
    font-size: .82rem;
    font-weight: 650
}

.pwa-connection {
    left: 50%;
    bottom: 1rem;
    transform: translateX(-50%);
    width: min(calc(100% - 2rem), 42rem);
    padding: .8rem 1rem;
    color: #92400e;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .8rem;
    text-align: center
}

.pwa-connection[hidden] {
    display: none
}

.pwa-connection[data-tone="online"] {
    color: #065f46;
    background: #ecfdf5;
    border-color: #6ee7b7
}

.pwa-connection button {
    flex: none;
    border: 0;
    border-radius: .6rem;
    padding: .45rem .65rem;
    color: #fff;
    background: #059669;
    font: inherit;
    cursor: pointer
}

.pwa-update {
    right: 1rem;
    bottom: 1rem;
    max-width: calc(100% - 2rem);
    padding: .75rem .8rem .75rem 1rem;
    display: flex;
    align-items: center;
    gap: .8rem;
    color: #1e3a8a;
    background: #eff6ff;
    border: 1px solid #93c5fd
}

.pwa-update>div {
    display: flex;
    gap: .45rem
}

.pwa-update button {
    flex: none;
    border: 0;
    border-radius: .65rem;
    padding: .55rem .7rem;
    color: #fff;
    background: #2563eb;
    font: inherit;
    cursor: pointer
}

.pwa-update button[data-update-later] {
    color: #1e40af;
    background: transparent;
    border: 1px solid #93c5fd
}

.pwa-update button:focus-visible {
    outline: 3px solid #bfdbfe;
    outline-offset: 2px
}

@media(max-width:520px) {
    .pwa-connection {
        align-items: stretch;
        flex-direction: column
    }

    .pwa-update {
        left: 1rem;
        right: 1rem;
        align-items: stretch;
        flex-direction: column
    }

    .pwa-update>div,
    .pwa-update button {
        flex: 1
    }
}

@keyframes pop {
    from {
        transform: translateY(8px) scale(.98);
        opacity: 0
    }

    to {
        transform: none;
        opacity: 1
    }
}

@media (prefers-reduced-motion: reduce) {
    .modal-card,
    .feedback-card {
        animation: none
    }
}

@media(min-width:1024px) {
    #sidebar.sidebar-collapsed {
        width: 5.5rem
    }

    #sidebar.sidebar-collapsed .sidebar-label,
    #sidebar.sidebar-collapsed .nav-label,
    #sidebar.sidebar-collapsed nav>p,
    #sidebar.sidebar-collapsed .sidebar-logout {
        display: none
    }

    #sidebar.sidebar-collapsed .nav-link {
        justify-content: center;
        padding: .75rem
    }

    #sidebar.sidebar-collapsed #collapseBtn svg {
        transform: rotate(180deg)
    }

    #mainContent.sidebar-collapsed {
        margin-left: 5.5rem
    }
}

@media print {

    aside,
    header,
    .no-print {
        display: none !important
    }

    main {
        margin: 0 !important
    }

    .card {
        border: 0
    }

    body {
        background: #fff
    }
}
