* {
    transition: all 0.2s ease-in-out;
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
}

.chart-container {
    position: relative;
    height: 100%;
    min-height: 250px;
}

.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0ea5e9, #3b82f6);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card:hover::before {
    transform: scaleX(1);
}

.sidebar {
    transition: all 0.3s ease-in-out;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 16rem;
    z-index: 50;
    overflow-y: auto;
    transform: translateX(0);
}

.sidebar.collapsed {
    width: 5rem;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item-text,
.sidebar.collapsed .nav-badge {
    opacity: 0;
    width: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
    padding: 0;
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.sidebar.collapsed .nav-icon {
    margin-right: 0 !important;
}

.main-content {
    margin-left: 16rem;
    transition: margin-left 0.3s ease-in-out;
    width: calc(100% - 16rem);
}

.sidebar.collapsed + .main-content {
    margin-left: 5rem;
    width: calc(100% - 5rem);
}

#toggleSidebar {
    transition: transform 0.3s ease-in-out;
    margin-right: 10px;
}

.sidebar.collapsed #toggleIcon {
    transform: rotate(180deg);
}

@media (max-width: 1023px) {
    .sidebar {
        position: fixed;
        z-index: 50;
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 40;
    }

    .overlay.active {
        display: block;
    }
}

.table-responsive {
    overflow-x: auto;
}

.rotate-180 {
    transform: rotate(180deg);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

.progress-bar {
    @apply w-full bg-gray-200 rounded-full h-2;
}

.progress-bar-fill {
    @apply h-2 rounded-full;
}

.progress-bar-primary { width: 24%; @apply bg-primary-800; }
.progress-bar-green { width: 18%; @apply bg-green-500; }
.progress-bar-yellow { width: 12%; @apply bg-yellow-500; }
.progress-bar-purple { width: 8%; @apply bg-purple-500; }

.notification-dot {
    @apply inline-block w-1.5 h-1.5 rounded-full mr-1;
}

.nav-item {
    animation: fadeIn 0.3s ease-out forwards;
    opacity: 0;
}

/* Status Badge Colors - Consistent across all modules */
.status-pending {
    background-color: #fef9c3;
    color: #854d0e;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-process {
    background-color: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-done, .status-active {
    background-color: #dcfce7;
    color: #166534;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-canceled, .status-inactive {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.ticket-item {
    transition: all 0.2s ease;
}

.ticket-item:hover {
    transform: translateY(-2px);
}

.nav-active {
    color: #3b82f6;
}

.nav-active svg {
    fill: #3b82f6;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

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

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-item:nth-child(3) { animation-delay: 0.2s; }
.nav-item:nth-child(4) { animation-delay: 0.25s; }
.nav-item:nth-child(5) { animation-delay: 0.3s; }
.nav-item:nth-child(6) { animation-delay: 0.35s; }
.nav-item:nth-child(7) { animation-delay: 0.4s; }
.nav-item:nth-child(8) { animation-delay: 0.45s; }
.nav-item:nth-child(9) { animation-delay: 0.5s; }
.nav-item:nth-child(10) { animation-delay: 0.55s; }
.nav-item:nth-child(11) { animation-delay: 0.6s; }
.nav-item:nth-child(12) { animation-delay: 0.65s; }
.nav-item:nth-child(13) { animation-delay: 0.7s; }
.nav-item:nth-child(14) { animation-delay: 0.75s; }
.nav-item:nth-child(15) { animation-delay: 0.8s; }
.nav-item:nth-child(16) { animation-delay: 0.85s; }
.nav-item:nth-child(17) { animation-delay: 0.9s; }
.nav-item:nth-child(18) { animation-delay: 0.95s; }
.nav-item:nth-child(19) { animation-delay: 1s; }
.nav-item:nth-child(20) { animation-delay: 1.05s; }

/* User Portal Specific Styles */
.card-hover {
    transition: all 0.2s ease-in-out;
}

.card-hover:hover {
    transform: translateY(-2px);
}

/* Form Validation Styles */
.form-error {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-error.active {
    display: block;
}

.input-error {
    border-color: #dc2626 !important;
    background-color: #fef2f2;
}

.input-error:focus {
    ring-color: #dc2626 !important;
    border-color: #dc2626 !important;
}

.input-success {
    border-color: #16a34a !important;
}

.input-success:focus {
    ring-color: #16a34a !important;
    border-color: #16a34a !important;
}

/* Loading State */
.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1rem;
    height: 1rem;
    margin-top: -0.5rem;
    margin-left: -0.5rem;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Data Attribute Helpers for Backend Integration */
[data-api-endpoint] {
    cursor: pointer;
}

[data-loading="true"] {
    opacity: 0.6;
    pointer-events: none;
}
