/* ============================================
   WashPro — Custom CSS
   ============================================ */

/* --- Scrollbar Styling --- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.5);
}

/* --- Selection --- */
::selection {
    background: rgba(51, 140, 255, 0.3);
    color: inherit;
}

/* --- Glass Effect --- */
.glass {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(51, 65, 85, 0.5);
}

.glass-light {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(51, 65, 85, 0.3);
}

/* --- Gradient Text --- */
.gradient-text {
    background: linear-gradient(135deg, #338cff 0%, #18b074 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Card Hover Effects --- */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* --- Sidebar Active Link --- */
.sidebar-link {
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 60%;
    background: linear-gradient(180deg, #338cff, #18b074);
    border-radius: 0 4px 4px 0;
    transition: transform 0.2s ease;
}

.sidebar-link.active::before {
    transform: translateY(-50%) scaleY(1);
}

.sidebar-link.active {
    background: rgba(51, 140, 255, 0.1);
    color: #59afff;
}

.sidebar-link:hover:not(.active) {
    background: rgba(51, 65, 85, 0.5);
    color: #e2e8f0;
}

/* --- Stat Card Gradient Borders --- */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--card-gradient-from, #338cff), var(--card-gradient-to, #18b074));
}

.stat-card-blue { --card-gradient-from: #338cff; --card-gradient-to: #59afff; }
.stat-card-green { --card-gradient-from: #18b074; --card-gradient-to: #3bcb8c; }
.stat-card-amber { --card-gradient-from: #f59e0b; --card-gradient-to: #fbbf24; }
.stat-card-rose { --card-gradient-from: #f43f5e; --card-gradient-to: #fb7185; }
.stat-card-violet { --card-gradient-from: #8b5cf6; --card-gradient-to: #a78bfa; }
.stat-card-teal { --card-gradient-from: #14b8a6; --card-gradient-to: #2dd4bf; }

/* --- Badge Styles --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.badge-success { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.badge-danger { background: rgba(244, 63, 94, 0.15); color: #fb7185; }
.badge-info { background: rgba(51, 140, 255, 0.15); color: #59afff; }
.badge-neutral { background: rgba(100, 116, 139, 0.15); color: #94a3b8; }

/* --- Status Dot --- */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    animation: pulseSoft 2s ease-in-out infinite;
}

.status-dot-active { background: #4ade80; }
.status-dot-inactive { background: #64748b; animation: none; }
.status-dot-warning { background: #fbbf24; }

/* --- Input Focus Ring --- */
.input-field {
    transition: all 0.2s ease;
}

.input-field:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(51, 140, 255, 0.2);
    border-color: #338cff;
}

/* --- Button Ripple Effect --- */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.btn-ripple:active::after {
    width: 200px;
    height: 200px;
}

/* --- Table Row Hover --- */
.table-row-hover {
    transition: background 0.15s ease;
}

.table-row-hover:hover {
    background: rgba(51, 65, 85, 0.3);
}

/* --- Page Transitions --- */
.page-enter {
    animation: slideUp 0.3s ease-out forwards;
}

/* --- Shimmer Loading --- */
.shimmer {
    background: linear-gradient(90deg, rgba(30, 41, 59, 0) 0%, rgba(51, 65, 85, 0.4) 50%, rgba(30, 41, 59, 0) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

/* --- Toast Animations --- */
.toast-enter {
    animation: toastIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast-exit {
    animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
    0% { opacity: 0; transform: translateX(100%) scale(0.8); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
    0% { opacity: 1; transform: translateX(0) scale(1); }
    100% { opacity: 0; transform: translateX(100%) scale(0.8); }
}

/* --- Modal Backdrop --- */
.modal-backdrop {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-enter {
    animation: scaleIn 0.25s ease-out forwards;
}

@keyframes scaleIn {
    0% { opacity: 0; transform: scale(0.9) translateY(20px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- POS Receipt Print Styles --- */
@media print {
    body * {
        visibility: hidden;
    }

    #print-receipt,
    #print-receipt * {
        visibility: visible;
    }

    #print-receipt {
        position: absolute;
        left: 0;
        top: 0;
        width: 80mm;
        padding: 5mm;
        font-size: 12px;
        color: #000;
        background: #fff;
    }
}

/* --- Pulse Glow for Active Status --- */
.glow-active {
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
}

/* --- Number Counter Animation --- */
.counter-value {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Custom Chart Tooltip --- */
.chart-tooltip {
    background: rgba(15, 23, 42, 0.9) !important;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(51, 65, 85, 0.5) !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    font-family: 'Inter', sans-serif !important;
}

/* --- Responsive Sidebar Transitions --- */
@media (max-width: 1023px) {
    #sidebar.sidebar-open {
        transform: translateX(0);
    }
}

/* --- Focus Visible for Accessibility --- */
*:focus-visible {
    outline: 2px solid #338cff;
    outline-offset: 2px;
}

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