/* Modern Cosmetic Management System - Advanced UI */

:root {
  --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-glow: 0 8px 32px rgba(31, 38, 135, 0.37);
  --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Modern Utility Classes */
.fixed { position: fixed !important; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.flex { display: flex !important; }
.items-center { align-items: center !important; }
.justify-center { justify-content: center !important; }
.text-center { text-align: center !important; }
.hidden { display: none !important; }
.min-h-screen { min-height: 100vh !important; }
.max-w-md { max-width: 28rem !important; }
.w-full { width: 100% !important; }
.mx-4 { margin-left: 1rem !important; margin-right: 1rem !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-8 { margin-bottom: 2rem !important; }
.mt-6 { margin-top: 1.5rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.p-8 { padding: 2rem !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.rounded-3xl { border-radius: 1.5rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-full { border-radius: 50% !important; }
.shadow-2xl { box-shadow: var(--shadow-glow) !important; }
.shadow-lg { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important; }
.border { border-width: 1px !important; }
.text-white { color: white !important; }
.text-3xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }
.text-2xl { font-size: 1.5rem !important; line-height: 2rem !important; }
.text-sm { font-size: 0.875rem !important; line-height: 1.25rem !important; }
.text-xs { font-size: 0.75rem !important; line-height: 1rem !important; }
.font-bold { font-weight: 700 !important; }
.font-semibold { font-weight: 600 !important; }
.font-medium { font-weight: 500 !important; }
.block { display: block !important; }
.space-y-6 > * + * { margin-top: 1.5rem !important; }
.space-y-1 > * + * { margin-top: 0.25rem !important; }
.w-20 { width: 5rem !important; }
.h-20 { width: 5rem !important; }
.h-16 { height: 4rem !important; }
.w-16 { width: 4rem !important; }
.border-4 { border-width: 4px !important; }
.border-t-transparent { border-top-color: transparent !important; }
.animate-spin { animation: modernSpin 1s linear infinite !important; }
.transition-all { transition: var(--transition-smooth) !important; }
.duration-300 { transition-duration: 300ms !important; }
.transform { transform: translateZ(0) !important; }
.hover\:scale-105:hover { transform: scale(1.05) translateZ(0) !important; }
.hover\:bg-purple-50:hover { background-color: #faf5ff !important; }
.focus\:outline-none:focus { outline: none !important; }
.focus\:ring-2:focus { box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.3) !important; }
.focus\:ring-white\/50:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3) !important; }
.backdrop-blur-sm { backdrop-filter: blur(8px) !important; }
.backdrop-blur-lg { backdrop-filter: blur(24px) !important; }

/* Modern Color System */
.bg-gradient-to-br { background: var(--primary-gradient) !important; }
.bg-gradient-cosmic { background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #ff6b9d 75%, #feca57 100%) !important; }
.bg-gradient-beauty { background: linear-gradient(45deg, #ff9a9e 0%, #fecfef 50%, #fecfef 100%) !important; }
.bg-gradient-luxury { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important; }
.from-purple-600 { --tw-gradient-from: #9333ea; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(147, 51, 234, 0)); }
.via-pink-600 { --tw-gradient-stops: var(--tw-gradient-from), #db2777, var(--tw-gradient-to, rgba(219, 39, 119, 0)); }
.to-pink-600 { --tw-gradient-to: #db2777; }
.to-orange-400 { --tw-gradient-to: #fb923c; }
.text-purple-600 { color: #9333ea !important; }
.text-purple-100 { color: #ede9fe !important; }
.text-white\/80 { color: rgba(255, 255, 255, 0.8) !important; }
.text-white\/70 { color: rgba(255, 255, 255, 0.7) !important; }
.border-white\/30 { border-color: rgba(255, 255, 255, 0.3) !important; }
.border-white\/20 { border-color: rgba(255, 255, 255, 0.2) !important; }
.bg-white\/10 { background-color: var(--glass-bg) !important; }
.bg-white\/20 { background-color: rgba(255, 255, 255, 0.2) !important; }
.placeholder-white\/70::placeholder { color: rgba(255, 255, 255, 0.7) !important; }

/* Glassmorphism Effects */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-glow);
}

.glass-intense {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(30px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Modern Animation System */
@keyframes modernSpin {
    from { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.1); }
    to { transform: rotate(360deg) scale(1); }
}

@keyframes floatUp {
    0% { transform: translateY(0px) rotate(0deg); opacity: 1; }
    100% { transform: translateY(-100px) rotate(180deg); opacity: 0; }
}

@keyframes morphing {
    0% { border-radius: 50%; transform: rotate(0deg); }
    25% { border-radius: 25% 75%; transform: rotate(90deg); }
    50% { border-radius: 75% 25%; transform: rotate(180deg); }
    75% { border-radius: 25% 75%; transform: rotate(270deg); }
    100% { border-radius: 50%; transform: rotate(360deg); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(255, 107, 157, 0.5); }
    50% { box-shadow: 0 0 40px rgba(255, 107, 157, 0.8), 0 0 60px rgba(147, 51, 234, 0.6); }
}

/* Loading Screen */
#loading-screen {
    background: var(--primary-gradient);
    z-index: 9999;
    position: relative;
    overflow: hidden;
}

#loading-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: shimmer 2s infinite;
}

/* Advanced Beauty Loading */
.loading-animation {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
    position: relative;
}

.beauty-loader {
    position: relative;
    width: 80px;
    height: 80px;
}

.beauty-loader .orbit {
    position: absolute;
    border: 2px solid transparent;
    border-radius: 50%;
    animation: modernSpin 2s linear infinite;
}

.beauty-loader .orbit:nth-child(1) {
    width: 80px;
    height: 80px;
    border-top: 2px solid #ff6b9d;
    animation-duration: 1.5s;
}

.beauty-loader .orbit:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 10px;
    left: 10px;
    border-right: 2px solid #c44569;
    animation-duration: 2s;
    animation-direction: reverse;
}

.beauty-loader .orbit:nth-child(3) {
    width: 40px;
    height: 40px;
    top: 20px;
    left: 20px;
    border-bottom: 2px solid #f8b500;
    animation-duration: 1s;
}

.beauty-dots {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.beauty-dots .dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b9d, #c44569);
    animation: morphing 2s ease-in-out infinite, glow 1.5s ease-in-out infinite;
    position: relative;
}

.beauty-dots .dot:nth-child(1) {
    animation-delay: 0s;
    background: linear-gradient(45deg, #ff6b9d, #ff9ff3);
}

.beauty-dots .dot:nth-child(2) {
    animation-delay: 0.4s;
    background: linear-gradient(45deg, #c44569, #f8b500);
}

.beauty-dots .dot:nth-child(3) {
    animation-delay: 0.8s;
    background: linear-gradient(45deg, #f8b500, #feca57);
}

.beauty-dots .dot::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: floatUp 3s ease-in-out infinite;
    animation-delay: inherit;
}

/* Modern Login Page */
#login-page {
    background: var(--primary-gradient);
    position: relative;
    overflow: hidden;
}

#login-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: floatUp 20s linear infinite;
    opacity: 0.3;
}

.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(25px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.glass-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.glass-effect:hover::before {
    left: 100%;
}

/* Modern Sidebar */
.sidenav {
    background: linear-gradient(195deg, #2d3748 0%, #1a202c 100%) !important;
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidenav .nav-link {
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
}

.sidenav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.3s;
}

.sidenav .nav-link:hover::before {
    left: 100%;
}

.sidenav .nav-link:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.05);
}

/* Advanced Card Effects */
.card {
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.card:hover::before {
    transform: scaleX(1);
}

/* Modern Buttons */
.btn {
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
    border: none;
    background: var(--primary-gradient);
    color: white;
}

.btn::before {
    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.3s, height 0.3s;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:active {
    transform: translateY(-1px) scale(1.02);
}

/* Enhanced Forms */
.form-control, .form-select {
    transition: var(--transition-smooth);
    border: 2px solid rgba(0, 0, 0, 0.1);
    background: white !important;
    color: #333;
}

.form-control:focus, .form-select:focus {
    border-color: #cb0c9f;
    box-shadow: 0 0 0 3px rgba(203, 12, 159, 0.15), 0 0 20px rgba(203, 12, 159, 0.1);
    background: white !important;
    transform: scale(1.02);
}

.form-floating input {
    background: white !important;
    border: 2px solid rgba(0, 0, 0, 0.1);
    color: #333 !important;
}

.form-floating input:focus {
    background: white !important;
    border-color: #cb0c9f;
    box-shadow: 0 0 0 0.2rem rgba(203, 12, 159, 0.25);
}

.form-floating label {
    color: #666 !important;
}

/* Modern Tables */
.table {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.05);
}

.table th {
    border-top: none;
    font-weight: 600;
    background: var(--primary-gradient);
    color: white;
    position: relative;
}

.table tbody tr {
    transition: var(--transition-smooth);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: scale(1.01);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Toast Enhancements */
#toast-container {
    z-index: 1055;
}

.toast {
    backdrop-filter: blur(20px);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Modern Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border: 3px solid transparent;
    border-top: 3px solid;
    border-image: var(--primary-gradient) 1;
    animation: modernSpin 1s linear infinite;
}

/* Modern Dark Theme */
.dark-version {
    background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%) !important;
    color: #e2e8f0 !important;
    position: relative;
}

.dark-version::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 107, 157, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.dark-version .card {
    background: rgba(45, 55, 72, 0.8) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #e2e8f0 !important;
}

.dark-version .navbar-main {
    background: rgba(45, 55, 72, 0.9) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced Responsive Design */
@media (max-width: 991.98px) {
    .g-sidenav-show .main-content {
        margin-left: 0 !important;
        transition: var(--transition-smooth);
    }
    
    .sidenav {
        transform: translateX(-17.125rem);
        transition: var(--transition-smooth);
    }
    
    .g-sidenav-pinned .sidenav {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.3);
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 576px) {
    .glass-effect {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .beauty-loader {
        width: 60px;
        height: 60px;
    }
}

/* Advanced Animation Classes */
.animate-fade-in {
    animation: modernFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-up {
    animation: modernSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-slide-in-right {
    animation: slideInRight 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-bounce-in {
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-scale-in {
    animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-rotate-in {
    animation: rotateIn 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modern Keyframes */
@keyframes modernFadeIn {
    from { 
        opacity: 0;
        transform: translateY(10px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modernSlideUp {
    from { 
        opacity: 0;
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

/* Modern Utility Classes */
.hover-lift {
    transition: var(--transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.hover-glow {
    transition: var(--transition-smooth);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(147, 51, 234, 0.4);
}

.hover-rotate {
    transition: var(--transition-smooth);
}

.hover-rotate:hover {
    transform: rotate(5deg) scale(1.05);
}

.text-gradient {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 2px solid;
    border-image: var(--primary-gradient) 1;
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.pulse-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Micro-interactions */
.interactive {
    cursor: pointer;
    transition: var(--transition-bounce);
}

.interactive:hover {
    transform: scale(1.02);
}

.interactive:active {
    transform: scale(0.98);
}

.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Status Indicators */
.status-online {
    position: relative;
}

.status-online::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 12px;
    height: 12px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid white;
    animation: glow 2s ease-in-out infinite;
}

.status-offline::after {
    background: #ef4444;
}

.status-busy::after {
    background: #f59e0b;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

/* Material Icons Enhanced */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    transition: var(--transition-smooth);
}

.material-icons:hover {
    transform: scale(1.1);
    color: #cb0c9f;
}

/* Icon Animations */
.icon-spin {
    animation: modernSpin 2s linear infinite;
}

.icon-bounce {
    animation: iconBounce 1s ease-in-out infinite;
}

.icon-pulse {
    animation: iconPulse 1.5s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Notification Badge */
.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    animation: iconPulse 2s ease-in-out infinite;
}

/* Modern Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-gradient);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #db2777 100%);
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}