/* ============================================================
   LAPAKPOS — Modern Design System
   ============================================================ */

/* ----- CSS Variables ----- */
:root {
    --primary: #2eb85c;
    --primary-dark: #229a4a;
    --primary-light: #eafaf1;
    --primary-glow: rgba(46, 184, 92, 0.18);

    --sidebar-bg: #111827;
    --sidebar-width: 250px;

    --header-h: 62px;
    --body-bg: #f1f4f8;
    --card-bg: #ffffff;

    --border-r: 12px;
    --border-r-sm: 8px;

    --shadow-xs: 0 1px 4px rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.13);

    --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);

    --text: #111827;
    --text-muted: #6b7280;
    --text-light: #9ca3af;
    --border: rgba(0, 0, 0, 0.07);
}

/* ============================================================
   BASE
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    background-color: var(--body-bg) !important;
    font-family: "Quicksand", sans-serif !important;
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.c-sidebar {
    background: var(--sidebar-bg) !important;
    width: var(--sidebar-width) !important;
    border-right: none !important;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18) !important;
}

/* Brand */
.c-sidebar-brand {
    background: linear-gradient(135deg, #2eb85c 0%, #1a9048 100%) !important;
    height: var(--header-h) !important;
    padding: 0 18px !important;
    gap: 10px;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
    color: #fff !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Section titles */
.c-sidebar-nav-title {
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.8px !important;
    color: rgba(255, 255, 255, 0.28) !important;
    padding: 18px 20px 5px !important;
    margin: 0 !important;
}

/* Nav list */
.c-sidebar-nav {
    padding: 10px 0 20px !important;
    overflow-y: auto;
    overflow-x: hidden;
}

.c-sidebar-nav::-webkit-scrollbar {
    width: 3px;
}
.c-sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.c-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

/* Nav items */
.c-sidebar-nav-item {
    padding: 2px 10px !important;
}

.c-sidebar-nav-link {
    border-radius: var(--border-r-sm) !important;
    padding: 9px 14px !important;
    color: rgba(255, 255, 255, 0.62) !important;
    font-size: 0.855rem !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    transition: var(--transition) !important;
    border-left: 3px solid transparent !important;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
}

.c-sidebar-nav-link svg {
    flex-shrink: 0;
    opacity: 0.65;
    transition: var(--transition);
}

.c-sidebar-nav-link:hover {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #ffffff !important;
    border-left-color: var(--primary) !important;
    transform: translateX(2px);
}

.c-sidebar-nav-link:hover svg {
    opacity: 1;
    color: var(--primary);
}

.c-sidebar-nav-link.active,
.c-sidebar-nav-link.router-link-active {
    background: linear-gradient(
        90deg,
        rgba(46, 184, 92, 0.18) 0%,
        rgba(46, 184, 92, 0.05) 100%
    ) !important;
    color: #ffffff !important;
    border-left-color: var(--primary) !important;
    font-weight: 600 !important;
}

.c-sidebar-nav-link.active svg,
.c-sidebar-nav-link.router-link-active svg {
    opacity: 1;
    color: var(--primary);
}

/* Close button (mobile) */
.c-sidebar-close {
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

/* ============================================================
   HEADER / TOPBAR
   ============================================================ */
.c-header {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border) !important;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.06) !important;
    height: var(--header-h) !important;
    padding: 0 20px !important;
    display: flex !important;
    align-items: center !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 1030 !important;
}

.c-header-toggler {
    color: var(--text-muted) !important;
    border: none !important;
    background: transparent !important;
    padding: 7px 9px !important;
    border-radius: var(--border-r-sm) !important;
    transition: var(--transition) !important;
    cursor: pointer;
}

.c-header-toggler:hover {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

/* Avatar */
.c-avatar {
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    overflow: hidden;
    border: 2px solid var(--primary-light);
    transition: var(--transition);
    cursor: pointer;
}

.c-avatar:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.c-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* Header dropdown */
.dropdown-menu {
    border: none !important;
    border-radius: var(--border-r) !important;
    box-shadow: var(--shadow-md) !important;
    padding: 6px !important;
    min-width: 180px;
    animation: dropIn 0.18s ease;
}

@keyframes dropIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    border-radius: var(--border-r-sm) !important;
    padding: 9px 14px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: var(--text) !important;
    transition: var(--transition) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
}

/* ============================================================
   BODY / WRAPPER
   ============================================================ */
.c-body {
    background: var(--body-bg) !important;
    min-height: calc(100vh - var(--header-h));
}

.c-main {
    padding: 22px !important;
}

/* Footer */
.c-footer {
    background: transparent !important;
    border-top: 1px solid var(--border) !important;
    padding: 14px 22px !important;
    font-size: 0.8rem !important;
    color: var(--text-muted) !important;
}

/* ============================================================
   PAGE TRANSITIONS
   ============================================================ */
.fade-in {
    animation: fadeInUp 0.3s ease both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    border: none !important;
    border-radius: var(--border-r) !important;
    box-shadow: var(--shadow-sm) !important;
    background: var(--card-bg) !important;
    transition:
        box-shadow 0.22s ease,
        transform 0.22s ease !important;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md) !important;
}

.card-header {
    background: #ffffff !important;
    border-bottom: 1px solid var(--border) !important;
    padding: 14px 20px !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 18px 20px !important;
}

/* Colored top border variants */
.border-top-purple {
    border-top: 4px solid var(--primary) !important;
}
.border-top-info {
    border-top: 4px solid #3b82f6 !important;
}
.border-top-warning {
    border-top: 4px solid #f59e0b !important;
}
.border-top-danger {
    border-top: 4px solid #ef4444 !important;
}
.border-top-success {
    border-top: 4px solid var(--primary) !important;
}

/* Card hover lift */
.card-hover:hover {
    transform: translateY(-3px) !important;
    box-shadow: var(--shadow-lg) !important;
}

/* ============================================================
   TABLES
   ============================================================ */
.table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    font-size: 0.875rem !important;
}

.table thead th {
    background: #f8fafc !important;
    color: var(--text-muted) !important;
    font-weight: 700 !important;
    font-size: 0.75rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    padding: 11px 14px !important;
    border-bottom: 2px solid var(--border) !important;
    white-space: nowrap;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover td {
    background: #f8fffe !important;
}

.table tbody td {
    padding: 11px 14px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid var(--border) !important;
    border-top: none !important;
    font-size: 0.875rem !important;
    transition: var(--transition);
}

.table-bordered td,
.table-bordered th {
    border: 1px solid var(--border) !important;
}

.table-striped tbody tr:nth-of-type(even) td {
    background-color: #fafbfc !important;
}

.table-striped tbody tr:nth-of-type(even):hover td {
    background-color: #f0faf5 !important;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    border-radius: var(--border-r-sm) !important;
    font-weight: 600 !important;
    font-size: 0.84rem !important;
    letter-spacing: 0.2px !important;
    transition: var(--transition) !important;
    padding: 7px 16px !important;
    border: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.btn:active {
    transform: scale(0.97) !important;
}

/* Primary (green) */
.btn-primary {
    background: linear-gradient(135deg, #2eb85c 0%, #1fa04e 100%) !important;
    border: none !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(46, 184, 92, 0.3) !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #35d46b 0%, #2eb85c 100%) !important;
    box-shadow: 0 5px 16px rgba(46, 184, 92, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Success */
.btn-success {
    background: linear-gradient(135deg, #2eb85c 0%, #1fa04e 100%) !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(46, 184, 92, 0.25) !important;
}

.btn-success:hover {
    background: linear-gradient(135deg, #35d46b 0%, #2eb85c 100%) !important;
    box-shadow: 0 5px 16px rgba(46, 184, 92, 0.35) !important;
    transform: translateY(-1px) !important;
}

/* Danger */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(239, 68, 68, 0.25) !important;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f87171 0%, #ef4444 100%) !important;
    box-shadow: 0 5px 16px rgba(239, 68, 68, 0.35) !important;
    transform: translateY(-1px) !important;
}

/* Warning */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(245, 158, 11, 0.25) !important;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    box-shadow: 0 5px 16px rgba(245, 158, 11, 0.35) !important;
    transform: translateY(-1px) !important;
}

/* Secondary */
.btn-secondary {
    background: #6b7280 !important;
    color: #fff !important;
}

.btn-secondary:hover {
    background: #4b5563 !important;
    transform: translateY(-1px) !important;
}

/* Purple (reused as primary) */
.btn-purple {
    background: linear-gradient(135deg, #2eb85c 0%, #1fa04e 100%) !important;
    color: #fff !important;
    box-shadow: 0 3px 10px rgba(46, 184, 92, 0.25) !important;
}

.btn-purple:hover {
    background: linear-gradient(135deg, #35d46b 0%, #2eb85c 100%) !important;
    box-shadow: 0 5px 16px rgba(46, 184, 92, 0.35) !important;
    transform: translateY(-1px) !important;
}

/* Outline */
.btn-outline-primary {
    border: 2px solid var(--primary) !important;
    color: var(--primary) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--primary-light) !important;
}

/* Size modifiers */
.btn-sm {
    padding: 5px 12px !important;
    font-size: 0.8rem !important;
}

.btn-lg {
    padding: 10px 22px !important;
    font-size: 0.95rem !important;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control,
.form-select {
    border-radius: var(--border-r-sm) !important;
    border: 1.5px solid #e5e7eb !important;
    padding: 9px 14px !important;
    font-size: 0.875rem !important;
    font-family: "Quicksand", sans-serif !important;
    transition: var(--transition) !important;
    background: #fafafa !important;
    color: var(--text) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px var(--primary-glow) !important;
    background: #ffffff !important;
    outline: none !important;
}

.form-control.is-invalid {
    border-color: #ef4444 !important;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.form-label {
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    margin-bottom: 6px !important;
}

.input-group .btn {
    border-radius: 0 var(--border-r-sm) var(--border-r-sm) 0 !important;
}

.input-group .form-control {
    border-radius: var(--border-r-sm) 0 0 var(--border-r-sm) !important;
}

.input-group-text {
    background: var(--primary) !important;
    color: #fff !important;
    border: none !important;
    font-weight: 600 !important;
    font-size: 0.84rem !important;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    font-size: 0.72rem !important;
    font-weight: 700 !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    letter-spacing: 0.2px;
}

.bg-success {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}
.bg-danger {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
}
.bg-warning {
    background-color: #fef3c7 !important;
    color: #92400e !important;
}
.bg-info {
    background-color: #dbeafe !important;
    color: #1e40af !important;
}
.bg-secondary {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
}
.bg-primary {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
}

/* Keep text-dark working with warning */
.bg-warning.text-dark {
    color: #78350f !important;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border: none !important;
    border-radius: var(--border-r) !important;
    padding: 14px 18px !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    border-left: 4px solid !important;
}

.alert-info {
    background: #eff6ff !important;
    border-left-color: #3b82f6 !important;
    color: #1e40af !important;
}
.alert-success {
    background: #f0fdf4 !important;
    border-left-color: var(--primary) !important;
    color: #166534 !important;
}
.alert-danger {
    background: #fef2f2 !important;
    border-left-color: #ef4444 !important;
    color: #991b1b !important;
}
.alert-warning {
    background: #fffbeb !important;
    border-left-color: #f59e0b !important;
    color: #92400e !important;
}

/* ============================================================
   BREADCRUMBS / PAGE HEADER
   ============================================================ */
.page-header {
    margin-bottom: 20px;
}

.page-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    gap: 4px;
}

.page-link {
    border: 1.5px solid var(--border) !important;
    border-radius: var(--border-r-sm) !important;
    color: var(--text-muted) !important;
    font-weight: 600 !important;
    font-size: 0.84rem !important;
    padding: 6px 13px !important;
    transition: var(--transition) !important;
    background: #fff !important;
}

.page-link:hover {
    background: var(--primary-light) !important;
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.page-item.active .page-link {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    box-shadow: 0 3px 8px rgba(46, 184, 92, 0.3) !important;
}

.page-item.disabled .page-link {
    opacity: 0.4 !important;
}

/* ============================================================
   UTILITIES & MISC
   ============================================================ */
.shadow {
    box-shadow: var(--shadow-sm) !important;
}
.shadow-sm {
    box-shadow: var(--shadow-xs) !important;
}
.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.rounded-3 {
    border-radius: var(--border-r) !important;
}
.rounded-sm {
    border-radius: var(--border-r-sm) !important;
}

.text-primary {
    color: var(--primary) !important;
}
.text-success {
    color: var(--primary) !important;
}
.text-muted {
    color: var(--text-muted) !important;
}
.text-green {
    color: var(--primary) !important;
}
.text-red {
    color: #ef4444 !important;
}
.text-darkorange {
    color: #f59e0b !important;
}

.bg-green {
    background-color: var(--primary) !important;
}
.bg-primary {
    background-color: var(--primary) !important;
}
.bg-jumbotron {
    background: var(--primary-light) !important;
}
.bg-gray {
    background-color: #f3f4f6 !important;
}

/* Divider */
hr {
    border-color: var(--border) !important;
    opacity: 1 !important;
    margin: 14px 0 !important;
}

/* Export buttons spacing */
.export {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* Stat card body */
.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* Loading overlay */
#loading {
    position: fixed;
    display: block;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    text-align: center;
    opacity: 0.7;
    background-color: #fff;
    z-index: 9999;
}

/* Print receipt label */
.final-price {
    text-align: right;
}

/* Transition for page slot */
.page-enter-active,
.page-leave-active {
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}
.page-enter-from,
.page-leave-to {
    opacity: 0;
    transform: translateY(8px);
}

/* Scrollbar (webkit) */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ============================================================
   MOBILE IMPROVEMENTS
   ============================================================ */

/* ----- Sidebar mobile overlay backdrop ----- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.52);
    z-index: 1038;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.28s ease;
    cursor: pointer;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
    animation: overlayIn 0.28s ease forwards;
}

@keyframes overlayIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ----- Stat cards: 2-per-row on mobile ----- */
@media (max-width: 767px) {
    .row.g-3 > [class*="col-md-"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Very small: single column */
    @media (max-width: 400px) {
        .row.g-3 > [class*="col-md-"] {
            flex: 0 0 100%;
            max-width: 100%;
        }
    }
}

/* ----- Responsive adjustments ----- */
@media (max-width: 991px) {
    /* Sidebar: slide in from left on mobile */
    .c-sidebar {
        transform: translateX(-100%);
        transition:
            transform 0.28s cubic-bezier(0.4, 0, 0.2, 1),
            box-shadow 0.28s ease !important;
        z-index: 1039 !important;
    }

    .c-sidebar.c-sidebar-show {
        transform: translateX(0) !important;
        box-shadow: 6px 0 32px rgba(0, 0, 0, 0.35) !important;
    }

    .c-wrapper {
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {
    /* Page padding */
    .c-main {
        padding: 12px !important;
    }

    /* Card padding */
    .card-body {
        padding: 14px !important;
    }

    .card-header {
        padding: 12px 14px !important;
        font-size: 0.82rem !important;
    }

    /* Header compact */
    .c-header {
        padding: 0 12px !important;
        height: 54px !important;
    }

    /* Buttons: ensure min tap target */
    .btn {
        font-size: 0.8rem !important;
        padding: 8px 12px !important;
        min-height: 38px;
    }

    .btn-sm {
        padding: 6px 10px !important;
        font-size: 0.77rem !important;
        min-height: 32px;
    }

    /* Stat values smaller */
    .stat-value {
        font-size: 1.2rem !important;
    }

    .stat-label {
        font-size: 0.68rem !important;
    }

    /* Table action buttons wrap */
    td .btn,
    td .btn-sm {
        margin-bottom: 3px;
        white-space: nowrap;
    }

    /* Table: make text smaller on mobile */
    .table tbody td,
    .table thead th {
        font-size: 0.78rem !important;
        padding: 8px 9px !important;
    }

    /* Dashboard date filter stacks */
    .card-body form.d-flex {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .card-body form.d-flex > div,
    .card-body form.d-flex .ms-auto {
        width: 100% !important;
        margin-left: 0 !important;
    }

    .card-body form.d-flex .d-flex.gap-2 {
        flex-wrap: wrap !important;
    }

    /* Period badge full-width on mobile */
    .card-body form .badge {
        width: 100% !important;
        text-align: center !important;
        font-size: 0.8rem !important;
    }

    /* Row gap for stat cards */
    .row.g-3 {
        --bs-gutter-x: 0.6rem !important;
        --bs-gutter-y: 0.6rem !important;
    }

    /* Footer compact */
    .c-footer {
        padding: 10px 14px !important;
        font-size: 0.72rem !important;
    }

    /* Section headers */
    .header h1 {
        font-size: 1.1rem !important;
        margin: 8px 0 4px !important;
    }

    /* Pagination compact */
    .page-link {
        padding: 5px 10px !important;
        font-size: 0.78rem !important;
    }

    /* Form controls */
    .form-control,
    .form-select {
        font-size: 0.875rem !important;
        padding: 8px 12px !important;
    }

    /* Input group buttons */
    .input-group .btn {
        padding: 8px 12px !important;
    }
}

@media (max-width: 576px) {
    .table thead th {
        font-size: 0.7rem !important;
        padding: 7px 8px !important;
    }

    .table tbody td {
        padding: 7px 8px !important;
        font-size: 0.75rem !important;
    }

    /* Cards margin */
    .card {
        margin-bottom: 10px;
    }

    /* col-6 on very small screens for stat cards */
    .row.g-3 > [class*="col-md-"] {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    /* Danger-only full-width stat cards */
    .row.g-3 > .col-md-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
}

/* ----- Table: horizontal scroll indicator on mobile ----- */
.table-responsive {
    position: relative;
}

@media (max-width: 768px) {
    .table-responsive::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 24px;
        background: linear-gradient(to left, rgba(255, 255, 255, 0.9), transparent);
        pointer-events: none;
        border-radius: 0 var(--border-r) var(--border-r) 0;
    }

    .table-responsive:not(.scrolled-right)::after {
        display: block;
    }
}

/* ----- Mobile: better action button layout in tables ----- */
@media (max-width: 768px) {
    td[class*="text-center"] .btn,
    td.text-center .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 0.72rem !important;
        padding: 5px 9px !important;
    }

    /* Make action buttons wrap nicely */
    td[style*="min-width"] {
        min-width: 100px !important;
    }
}

/* ----- Better touch feedback ----- */
@media (hover: none) {
    .btn:active {
        transform: scale(0.95) !important;
        opacity: 0.85;
    }

    .c-sidebar-nav-link:active {
        background: rgba(255, 255, 255, 0.12) !important;
    }

    .card:hover {
        box-shadow: var(--shadow-sm) !important;
        transform: none !important;
    }
}
