/* LeFron Foods - Order Management System Styles */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=Playfair+Display:wght@600;700&family=Permanent+Marker&display=swap');

/* CSS Variables for Theme Consistency */
:root {
    /* Brand palette */
    --cream: #faf7f2;
    --espresso: #2c1810;
    --caramel: #c4883a;
    --caramel-light: #d4a054;
    --berry: #c2185b;
    --mint: #00897b;

    --primary-color: #2c1810;
    --primary-dark: #1a0e0a;
    --primary-light: #4a2818;
    --secondary-color: #c4883a;
    --accent-color: #c4883a;
    --success-color: #00897b;
    --danger-color: #c62828;
    --warning-color: #e65100;
    --info-color: #1565c0;

    --bg-primary: #faf7f2;
    --bg-secondary: #ffffff;
    --text-primary: #2c1810;
    --text-secondary: rgba(44, 24, 16, 0.55);
    --text-tertiary: rgba(44, 24, 16, 0.35);
    --border-color: rgba(44, 24, 16, 0.08);

    --shadow-sm: 0 1px 2px 0 rgb(44 24 16 / 0.04);
    --shadow-md: 0 4px 12px -2px rgb(44 24 16 / 0.08);
    --shadow-lg: 0 10px 24px -4px rgb(44 24 16 / 0.1);
    --shadow-xl: 0 20px 40px -8px rgb(44 24 16 / 0.12);
    --shadow-card: 0 1px 3px rgb(44 24 16 / 0.04), 0 4px 12px rgb(44 24 16 / 0.06);

    --graffiti-pink: #ff6b9d;
    --graffiti-purple: #c44dff;
    --graffiti-blue: #00d4ff;
    --graffiti-yellow: #ffd93d;
    --graffiti-green: #6bcb77;
    --graffiti-orange: #ff8c42;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;

    --focus-ring: 0 0 0 3px rgba(196, 136, 58, 0.3);
    --focus-ring-strong: 0 0 0 4px rgba(196, 136, 58, 0.4);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', 'Inter', sans-serif;
    background-color: #07090d;
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        radial-gradient(900px 600px at 90% 85%, rgba(0, 212, 255, 0.12), transparent 70%),
        radial-gradient(900px 600px at 85% 95%, rgba(255, 217, 61, 0.08), transparent 72%),
        radial-gradient(900px 600px at 95% 98%, rgba(196, 77, 255, 0.08), transparent 74%),
        linear-gradient(180deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0) 28%),
        #07090d;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.55;
    background:
        repeating-linear-gradient(0deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 42px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.045) 0 2px, transparent 2px 44px),
        repeating-linear-gradient(45deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 48px),
        radial-gradient(circle at 0% 0%, rgba(255,255,255,0.06), transparent 45%);
    mix-blend-mode: overlay;
    pointer-events: none;
}

body.auth-page::before {
    background-image:
        radial-gradient(1100px 820px at 92% 88%, rgba(0, 212, 255, 0.22), transparent 60%),
        radial-gradient(980px 760px at 78% 96%, rgba(196, 77, 255, 0.18), transparent 62%),
        radial-gradient(900px 760px at 66% 86%, rgba(255, 217, 61, 0.12), transparent 62%),
        linear-gradient(180deg, rgba(6, 8, 12, 0.88) 0%, rgba(6, 8, 12, 0.97) 100%),
        repeating-linear-gradient(0deg, rgba(255,255,255,0.03) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0 1px, transparent 1px 34px);
    background-size: cover, cover, cover, cover, auto, auto;
    background-position: center, center, center, center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat, repeat, repeat;
    background-attachment: fixed, fixed, fixed, fixed, fixed, fixed;
    background-blend-mode: screen, screen, screen, normal, overlay, overlay;
    filter: saturate(1.08) contrast(1.18) brightness(1.04);
}

body.auth-page::after {
    opacity: 0.18;
    background:
        radial-gradient(900px 700px at 16% 22%, rgba(255,255,255,0.07), transparent 60%),
        radial-gradient(900px 700px at 85% 82%, rgba(255,255,255,0.05), transparent 62%);
    mix-blend-mode: overlay;
}

@media (min-width: 1200px) {
    body.auth-page::before {
        background-size: cover, cover, cover, cover, auto, auto;
    }
}

@media (max-width: 767px) {
    body.auth-page::before {
        background-attachment: scroll, scroll, scroll, scroll, scroll, scroll;
        background-size: cover, cover, cover, cover, auto, auto;
    }
}

.auth-split {
    width: 100%;
    max-width: 980px;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(18px);
}

.auth-left {
    position: relative;
    min-height: 560px;
    background: radial-gradient(800px 560px at 30% 30%, rgba(255, 140, 66, 0.22), transparent 60%),
                radial-gradient(800px 560px at 60% 80%, rgba(0, 212, 255, 0.16), transparent 65%),
                linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
}

.auth-left::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(380px 280px at 14% 18%, rgba(196, 136, 58, 0.2), transparent 70%),
        radial-gradient(420px 320px at 86% 86%, rgba(194, 24, 91, 0.12), transparent 70%);
    opacity: 0.9;
    pointer-events: none;
}

.auth-collage {
    position: relative;
    width: min(420px, 90%);
    margin: 0 auto;
    height: 380px;
}

.auth-collage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    background: rgba(255,255,255,0.92);
    padding: 18px;
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.12);
}

.auth-collage .img-a { position: absolute; left: 8%; top: 0; width: 84%; height: 100%; transform: rotate(-3deg); z-index: 1; }
.auth-collage .img-b { position: absolute; right: -10px; bottom: -18px; width: 58%; height: 66%; transform: rotate(7deg); z-index: 3; }
.auth-collage .img-c { position: absolute; left: -14px; bottom: -14px; width: 56%; height: 66%; transform: rotate(-9deg); z-index: 2; }

.auth-right {
    background: rgba(250, 247, 242, 0.96);
    backdrop-filter: blur(16px);
}

.auth-form-card {
    border-radius: 20px;
    border: 1px solid rgba(44, 24, 16, 0.08);
    background: rgba(255,255,255,0.82);
    box-shadow: 0 14px 42px rgba(44, 24, 16, 0.14);
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(44, 24, 16, 0.78);
    background: rgba(196, 136, 58, 0.14);
    border: 1px solid rgba(196, 136, 58, 0.22);
}

button,
input[type="button"],
input[type="submit"],
a[role="button"],
.btn,
.btn-brand,
.btn-add {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.font-display { font-family: 'Playfair Display', Georgia, serif; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.skip-link {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    transform: translateY(-200%);
    transition: transform 0.2s ease;
    z-index: 1000;
}

.skip-link:focus,
.skip-link:focus-visible {
    transform: translateY(0);
}

/* ============ WARM FOOD BRAND BACKGROUND STYLES ============ */
.graffiti-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(160deg, #faf7f2 0%, #f5ede0 40%, #eddcc8 100%);
}

.graffiti-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 500px 400px at 0% 0%, rgba(196, 136, 58, 0.12) 0%, transparent 70%),
        radial-gradient(ellipse 400px 500px at 100% 100%, rgba(44, 24, 16, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 300px 300px at 80% 20%, rgba(196, 136, 58, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 350px 350px at 20% 80%, rgba(194, 24, 91, 0.05) 0%, transparent 70%);
    animation: warm-drift 30s ease-in-out infinite;
}

.graffiti-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    opacity: 0.4;
    pointer-events: none;
}

@keyframes warm-drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(8px, -8px) scale(1.01); }
    66% { transform: translate(-6px, 4px) scale(0.99); }
}

/* Brand text style for headings */
.graffiti-text {
    font-family: 'Playfair Display', Georgia, serif;
    background: linear-gradient(135deg, var(--espresso), var(--caramel));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Login / Welcome Page Warm Background */
.login-graffiti-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(150deg, #2c1810 0%, #4a2818 35%, #c4883a 80%, #d4a054 100%);
}

.login-graffiti-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse 500px 500px at 0% 0%, rgba(255, 255, 255, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 600px 400px at 100% 100%, rgba(44, 24, 16, 0.4) 0%, transparent 70%),
        radial-gradient(ellipse 300px 300px at 70% 30%, rgba(196, 136, 58, 0.2) 0%, transparent 70%),
        radial-gradient(ellipse 250px 300px at 25% 70%, rgba(255, 255, 255, 0.04) 0%, transparent 70%);
    animation: warm-shift 18s ease-in-out infinite;
}

.login-graffiti-bg::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 35%;
    background: linear-gradient(to top, rgba(44, 24, 16, 0.35) 0%, transparent 100%);
}

@keyframes warm-shift {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.85; transform: scale(1.02); }
}

/* Floating warm orbs (replace paint splashes) */
.paint-splash {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    animation: orb-float 10s ease-in-out infinite;
    pointer-events: none;
}

.paint-splash:nth-child(1) {
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(196, 136, 58, 0.35) 0%, transparent 70%);
    top: 8%;
    left: 3%;
    animation-delay: 0s;
}

.paint-splash:nth-child(2) {
    width: 280px;
    height: 280px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    top: 55%;
    right: 5%;
    animation-delay: -3s;
}

.paint-splash:nth-child(3) {
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(212, 160, 84, 0.3) 0%, transparent 70%);
    bottom: 15%;
    left: 12%;
    animation-delay: -5s;
}

.paint-splash:nth-child(4) {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(44, 24, 16, 0.15) 0%, transparent 70%);
    top: 25%;
    right: 18%;
    animation-delay: -7s;
}

@keyframes orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.7; }
    50% { transform: translate(15px, -15px) scale(1.05); opacity: 0.9; }
}

/* ============ GLASSMORPHISM EFFECTS ============ */
.glass-card {
    background: rgba(255, 252, 247, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(196, 136, 58, 0.12);
    box-shadow: 0 8px 40px rgba(44, 24, 16, 0.12), 0 1px 0 rgba(255,255,255,0.8) inset;
}

.glass-card-dark {
    background: rgba(44, 24, 16, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(196, 136, 58, 0.2);
}

/* ============ IMPROVED SIDEBAR STYLES ============ */
.sidebar {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(180deg, #ffffff 0%, #fdf9f5 100%);
    box-shadow: 2px 0 12px rgba(44, 24, 16, 0.06);
    border-right: 1px solid rgba(196, 136, 58, 0.1) !important;
}

.sidebar-section-label {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(44, 24, 16, 0.6);
    padding: 1.1rem 0.875rem 0.4rem;
    margin-top: 0.25rem;
}

.sidebar-item {
    text-decoration: none;
    color: rgba(44, 24, 16, 0.6);
    border-radius: 0.75rem;
    margin: 2px 0;
    padding: 0.55rem 0.875rem;
    transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--caramel);
    transform: scaleY(0);
    transition: transform 0.2s ease;
    border-radius: 0 3px 3px 0;
}

.sidebar-item:hover {
    background: rgba(196, 136, 58, 0.08);
    color: var(--espresso);
    transform: translateX(3px);
}

.sidebar-item:hover::before {
    transform: scaleY(1);
}

.sidebar-item.active {
    background: linear-gradient(135deg, var(--espresso) 0%, #4a2818 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(44, 24, 16, 0.25);
    transform: translateX(2px);
}

.sidebar-item.active::before {
    display: none;
}

.sidebar-item .badge-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 9px;
    padding: 0 5px;
    margin-left: auto;
    background: var(--caramel);
    color: #fff;
}

.sidebar-item.active .badge-count {
    background: rgba(255,255,255,0.22);
}

/* ============ ENHANCED DASHBOARD CARDS ============ */
.dashboard-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 4px rgba(44,24,16,0.04), 0 6px 16px rgba(44,24,16,0.06);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(196, 136, 58, 0.08);
    position: relative;
    overflow: hidden;
}

.dashboard-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(196,136,58,0.15), transparent);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(44,24,16,0.04), 0 12px 28px rgba(44,24,16,0.1);
}

.dashboard-card:hover::after {
    opacity: 1;
}

/* Card color variants */
.dashboard-card.card-blue { border-left: 3px solid var(--info-color); }
.dashboard-card.card-green { border-left: 3px solid var(--success-color); }
.dashboard-card.card-purple { border-left: 3px solid var(--caramel); }
.dashboard-card.card-orange { border-left: 3px solid var(--warning-color); }

/* ============ IMPROVED FORM STYLES ============ */
.form-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    background: white;
}

.form-input:hover {
    border-color: #cbd5e1;
}

.form-input:focus {
    border-color: var(--caramel);
    box-shadow: 0 0 0 3px rgba(196, 136, 58, 0.12);
    outline: none;
}

/* Floating label effect */
.form-group {
    position: relative;
}

.form-group .floating-label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    transition: all 0.2s ease;
    pointer-events: none;
    background: white;
    padding: 0 4px;
}

.form-group .form-input:focus ~ .floating-label,
.form-group .form-input:not(:placeholder-shown) ~ .floating-label {
    top: 0;
    font-size: 0.75rem;
    color: var(--caramel);
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.animate-fade-in { animation: fadeIn 0.3s ease-out; }
.animate-slide-in { animation: slideIn 0.3s ease-out; }
.animate-slide-up { animation: slideUp 0.4s ease-out; }
.animate-pulse { animation: pulse 2s infinite; }
.animate-bounce { animation: bounce 2s infinite; }

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, rgba(44,24,16,0.04) 25%, rgba(44,24,16,0.07) 50%, rgba(44,24,16,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 0.5rem;
}

.skeleton-row {
    display: flex;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.skeleton-row .skeleton {
    height: 1rem;
}

.skeleton-card {
    background: white;
    border-radius: 0.875rem;
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

/* ============ ENHANCED MODAL STYLES ============ */
dialog.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 50;
    justify-content: center;
    align-items: center;
    border: none;
    padding: 0;
    margin: 0;
    max-width: 100%;
    max-height: 100%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

dialog.modal[open] {
    display: flex;
    opacity: 1;
}

dialog.modal.closing {
    opacity: 0;
}

dialog.modal::backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    border-radius: 1.5rem;
    max-width: 600px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(0,0,0,0.1);
    transform: translateY(8px);
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 1;
}

dialog.modal[open] .modal-content {
    transform: translateY(0);
}

dialog.modal.closing .modal-content {
    opacity: 0;
    transform: translateY(8px);
}

/* ============ IMPROVED BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn::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.3s, height 0.3s;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

.btn-primary {
    background: var(--espresso);
    color: white;
    box-shadow: 0 2px 8px rgba(44, 24, 16, 0.2);
}

.btn-primary:hover {
    background: var(--caramel);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(196, 136, 58, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1.5px solid rgba(44,24,16,0.1);
}

.btn-secondary:hover {
    background: var(--cream);
    border-color: var(--caramel);
    color: var(--espresso);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    box-shadow: 0 2px 8px rgba(198, 40, 40, 0.2);
}

.btn-danger:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(198, 40, 40, 0.3);
}

.btn-success {
    background: var(--success-color);
    color: white;
    box-shadow: 0 2px 8px rgba(0, 137, 123, 0.2);
}

.btn-caramel {
    background: var(--caramel);
    color: white;
    box-shadow: 0 2px 8px rgba(196, 136, 58, 0.2);
}

.btn-caramel:hover {
    background: var(--caramel-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(196, 136, 58, 0.3);
}

.btn-brand {
    background: var(--espresso) !important;
    color: white !important;
    transition: all 0.2s ease;
}

.btn-brand:hover {
    background: var(--caramel) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(196, 136, 58, 0.3);
}

.btn-brand:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-gradient {
    background: linear-gradient(135deg, var(--espresso) 0%, #6b3520 50%, var(--caramel) 100%);
    background-size: 200% 200%;
    background-position: 0% 50%;
    color: white;
    box-shadow: 0 4px 14px rgba(44, 24, 16, 0.25);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background-position: 100% 50%;
    box-shadow: 0 6px 20px rgba(196, 136, 58, 0.35);
    transform: translateY(-1px);
}

/* Warm glow shadow used on logo/images */
.shadow-glow {
    box-shadow: 0 0 30px rgba(196, 136, 58, 0.25), 0 8px 24px rgba(44, 24, 16, 0.15);
}

/* ============ ENHANCED TABLE STYLES ============ */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    background: var(--cream);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: rgba(44, 24, 16, 0.4);
    position: sticky;
    top: 0;
    z-index: 10;
}

.data-table th,
.data-table td {
    padding: 0.875rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr {
    transition: all 0.15s ease;
}

.data-table tbody tr:hover {
    background: rgba(196, 136, 58, 0.03);
}

/* ============ STATUS BADGES ============ */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-completed, .status-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
}

.status-processing, .status-warning {
    background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
    color: #854d0e;
}

.status-pending {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    color: #9a3412;
}

.status-shipped, .status-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
}

.status-cancelled, .status-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

/* ============ NOTIFICATION STYLES ============ */
.notification {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    z-index: 100;
    animation: slideIn 0.3s ease-out;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 400px;
}

.notification-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #16a34a 100%);
    color: white;
}

.notification-error {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
}

.notification-info {
    background: linear-gradient(135deg, var(--info-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.notification-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    color: white;
}

/* ============ LOADING SPINNER ============ */
.spinner {
    border: 3px solid rgba(196, 136, 58, 0.15);
    border-top: 3px solid var(--caramel);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    animation: spin 0.8s linear infinite;
}

.spinner-lg {
    width: 48px;
    height: 48px;
    border-width: 4px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ============ CUSTOM SCROLLBAR ============ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(44, 24, 16, 0.12);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(44, 24, 16, 0.2);
}

/* ============ CARD STYLES ============ */
.card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 1px 4px rgba(44,24,16,0.04), 0 6px 16px rgba(44,24,16,0.06);
    border: 1px solid rgba(196, 136, 58, 0.08);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 2px 8px rgba(44,24,16,0.05), 0 8px 24px rgba(44,24,16,0.09);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(196, 136, 58, 0.08);
    background: linear-gradient(to right, #ffffff, #fdf9f5);
}

.admin-card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 0.875rem 1.5rem;
    border-top: 1px solid rgba(196, 136, 58, 0.08);
    background: linear-gradient(to right, var(--cream), #fdf5ea);
}

/* ============ PROGRESS BAR ============ */
.progress-bar {
    height: 8px;
    border-radius: 4px;
    background: #e5e7eb;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--caramel) 0%, var(--espresso) 100%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* ============ AVATAR ============ */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    background: var(--espresso);
    color: white;
    box-shadow: 0 2px 8px rgba(44, 24, 16, 0.15);
}

.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.25rem; }

/* ============ RESPONSIVE UTILITIES ============ */
@media (max-width: 1023px) {
    .sidebar {
        position: fixed;
        z-index: 50;
        height: 100vh;
        width: 16rem;
    }
}

@media (min-width: 1024px) {
    #mobile-menu-btn {
        display: none;
    }
}

@media (max-width: 640px) {
    .dashboard-card {
        border-radius: 0.75rem;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        border-radius: 1rem 1rem 0 0;
        max-height: 95vh;
    }

    .notification {
        left: 1rem;
        right: 1rem;
        max-width: none;
    }

    /* Prevent iOS zoom on input focus */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    input[type="date"],
    select,
    textarea {
        font-size: 16px !important;
    }

    /* Better touch targets for table checkboxes */
    input[type="checkbox"] {
        min-width: 20px;
        min-height: 20px;
    }

    /* Prevent horizontal overflow */
    #main-content {
        overflow-x: hidden;
    }
}

/* ============ iOS & MOBILE ENHANCEMENTS ============ */

/* iOS safe area support */
@supports (padding: env(safe-area-inset-bottom)) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }

    .sidebar {
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* Bottom navigation safe area */
    nav.fixed.bottom-0,
    .fixed.bottom-0 {
        padding-bottom: env(safe-area-inset-bottom);
    }

    /* Notification positioning with safe area */
    .notification,
    [class*="fixed bottom-4"] {
        bottom: calc(1rem + env(safe-area-inset-bottom));
    }
}

/* iOS-specific fixes */
@media (max-width: 640px) {
    /* Fix iOS 100vh issue (address bar) */
    .min-h-screen {
        min-height: -webkit-fill-available;
    }

    html {
        height: -webkit-fill-available;
    }

    /* Smoother scrolling on iOS */
    .overflow-y-auto,
    .overflow-x-auto,
    .overflow-auto {
        -webkit-overflow-scrolling: touch;
    }

    /* Prevent iOS text size adjustments */
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }

    /* Fix iOS tap highlight color */
    a, button, input, select, textarea {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.05);
    }

    /* Better button touch targets (min 44px per Apple HIG) */
    button,
    .btn,
    a.inline-flex,
    [role="button"] {
        min-height: 44px;
    }

    /* Fix iOS rubber-band scrolling for fixed elements */
    .login-graffiti-bg,
    .graffiti-bg {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        overflow: hidden;
    }

    /* Improve glass-card on mobile */
    .glass-card {
        background: rgba(255, 255, 255, 0.97);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
    }

    /* Fix form inputs on iOS */
    input, select, textarea {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        border-radius: 0.75rem;
    }

    select {
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        padding-right: 32px;
    }

    /* Prevent scroll when modal is open */
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
        height: 100%;
    }

    /* Better table scrolling on mobile */
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .overflow-x-auto::-webkit-scrollbar {
        display: none;
    }

    /* Login/Register pages mobile optimization */
    .glass-card.rounded-2xl {
        margin: 0 -0.5rem;
        padding: 1.25rem;
    }

    /* Login form - full width on mobile */
    body > .flex.min-h-screen > .w-full {
        padding: 1rem;
    }

    /* Portal cards responsive */
    .portal-card {
        padding: 1.25rem;
    }

    .portal-card .portal-icon {
        width: 64px;
        height: 64px;
    }

    .portal-card .portal-icon i {
        font-size: 1.75rem;
    }

    /* Step indicator responsive */
    .step {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    .step-line {
        width: 40px;
    }

    /* Improve sidebar overlay on mobile */
    .sidebar-overlay {
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }

    /* Password grid stacking on small screens */
    .grid.grid-cols-2.gap-4 {
        grid-template-columns: 1fr;
    }

    /* Fix notification z-index on mobile */
    [class*="fixed"][class*="bottom-4"][class*="right-4"] {
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.5rem;
        max-width: none;
    }
}

/* Extra small devices (iPhone SE, etc.) */
@media (max-width: 375px) {
    .glass-card.rounded-2xl {
        padding: 1rem;
    }

    .text-2xl {
        font-size: 1.25rem;
    }

    .text-3xl {
        font-size: 1.5rem;
    }

    /* Tighter step indicators */
    .step-line {
        width: 24px;
    }

    .step {
        width: 24px;
        height: 24px;
        font-size: 0.625rem;
    }

    /* Compact portal cards */
    .portal-card {
        padding: 1rem;
    }

    .portal-card h2 {
        font-size: 1.125rem;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .login-graffiti-bg .paint-splash,
    .fixed.animate-pulse {
        display: none;
    }

    .glass-card {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }
}

/* ============ DARK MODE STYLES ============ */
body.dark,
html.dark {
    --bg-primary: #1a0e0a;
    --bg-secondary: #2a1a12;
    --text-primary: #faf7f2;
    --text-secondary: rgba(250, 247, 242, 0.55);
    --text-tertiary: rgba(250, 247, 242, 0.35);
    --border-color: rgba(250, 247, 242, 0.08);
}

body.dark,
html.dark body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

body.dark .sidebar,
html.dark .sidebar {
    background: #2a1a12;
    box-shadow: 1px 0 0 var(--border-color);
}

body.dark .sidebar-section-label,
html.dark .sidebar-section-label {
    color: rgba(250, 247, 242, 0.25);
}

body.dark .sidebar-item,
html.dark .sidebar-item {
    color: rgba(250, 247, 242, 0.55);
}

body.dark .sidebar-item:hover,
html.dark .sidebar-item:hover {
    background: rgba(196, 136, 58, 0.1);
    color: var(--text-primary);
}

body.dark .sidebar-item.active,
html.dark .sidebar-item.active {
    background: var(--caramel);
    color: #fff;
}

body.dark .dashboard-card,
body.dark .card,
body.dark .bg-white,
html.dark .dashboard-card,
html.dark .card,
html.dark .bg-white {
    background: var(--bg-secondary) !important;
    color: var(--text-primary);
    border-color: var(--border-color) !important;
}

body.dark .modal-content,
html.dark .modal-content {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.dark .form-input,
html.dark .form-input {
    background: rgba(0, 0, 0, 0.25);
    border-color: var(--border-color);
    color: var(--text-primary);
}

body.dark .form-input:focus,
html.dark .form-input:focus {
    border-color: var(--caramel);
    box-shadow: 0 0 0 3px rgba(196, 136, 58, 0.15);
}

body.dark .text-gray-500,
body.dark .text-gray-600,
html.dark .text-gray-500,
html.dark .text-gray-600 {
    color: var(--text-secondary) !important;
}

body.dark .text-gray-300,
body.dark .text-gray-400,
html.dark .text-gray-300,
html.dark .text-gray-400 {
    color: var(--text-tertiary) !important;
}

body.dark .text-gray-700,
body.dark .text-gray-800,
body.dark .text-gray-900,
html.dark .text-gray-700,
html.dark .text-gray-800,
html.dark .text-gray-900 {
    color: var(--text-primary) !important;
}

body.dark .border-gray-200,
body.dark .border-gray-300,
html.dark .border-gray-200,
html.dark .border-gray-300 {
    border-color: var(--border-color) !important;
}

body.dark .bg-gray-50,
body.dark .bg-gray-100,
body.dark .bg-gray-200,
body.dark .bg-gray-300,
html.dark .bg-gray-50,
html.dark .bg-gray-100,
html.dark .bg-gray-200,
html.dark .bg-gray-300 {
    background-color: rgba(250, 247, 242, 0.06) !important;
}

body.dark thead.bg-gray-50,
body.dark .data-table th,
html.dark thead.bg-gray-50,
html.dark .data-table th {
    background: var(--bg-primary) !important;
}

body.dark .hover\:bg-gray-50:hover,
body.dark .hover\:bg-gray-100:hover,
body.dark .hover\:bg-gray-200:hover,
html.dark .hover\:bg-gray-50:hover,
html.dark .hover\:bg-gray-100:hover,
html.dark .hover\:bg-gray-200:hover {
    background-color: rgba(250, 247, 242, 0.1) !important;
}

body.dark header,
html.dark header {
    background: var(--bg-secondary);
    border-color: var(--border-color);
}

body.dark .card-footer,
body.dark .card-header,
html.dark .card-footer,
html.dark .card-header {
    background: var(--bg-primary);
    border-color: var(--border-color);
}

body.dark ::-webkit-scrollbar-thumb,
html.dark ::-webkit-scrollbar-thumb {
    background: rgba(250, 247, 242, 0.12);
}

body.dark ::-webkit-scrollbar-thumb:hover,
html.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(250, 247, 242, 0.2);
}

body.dark .btn-secondary,
html.dark .btn-secondary {
    background: rgba(250, 247, 242, 0.06);
    border-color: rgba(250, 247, 242, 0.1);
    color: var(--text-primary);
}

body.dark .glass-card,
html.dark .glass-card {
    background: rgba(42, 26, 18, 0.9);
    border-color: rgba(250, 247, 242, 0.08);
}

body.dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body.dark select,
body.dark textarea,
html.dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
html.dark select,
html.dark textarea {
    background-color: rgba(250, 247, 242, 0.06);
    color: var(--text-primary);
    border-color: var(--border-color);
}

body.dark input::placeholder,
body.dark textarea::placeholder,
html.dark input::placeholder,
html.dark textarea::placeholder {
    color: var(--text-tertiary);
}

/* ============ UTILITY CLASSES ============ */
.text-gradient {
    background: linear-gradient(135deg, var(--espresso) 0%, var(--caramel) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--espresso) 0%, var(--primary-dark) 100%);
}

.bg-gradient-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #00695c 100%);
}

.bg-gradient-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #b71c1c 100%);
}

.bg-gradient-graffiti {
    background: linear-gradient(135deg, var(--espresso) 0%, var(--caramel) 100%);
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(196, 136, 58, 0.25);
}

.shadow-glow-success {
    box-shadow: 0 0 20px rgba(0, 137, 123, 0.25);
}

.shadow-glow-danger {
    box-shadow: 0 0 20px rgba(198, 40, 40, 0.25);
}

/* Hover lift effect */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* ============ ACCESSIBILITY: REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .graffiti-bg, .login-graffiti-bg::before {
        animation: none !important;
    }

    .paint-splash {
        animation: none !important;
    }

    .hover-lift:hover {
        transform: none;
    }
}

/* ================================================
   ENHANCED ANIMATIONS & TRANSITIONS (v2)
   ================================================ */

/* === Page Load Orchestration === */
@keyframes pageIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
        filter: blur(4px);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: blur(0);
    }
}

@keyframes fadeScaleIn {
    0% {
        opacity: 0;
        transform: scale(0.95);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideLeftFade {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideRightFade {
    0% {
        opacity: 0;
        transform: translateX(-30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === Staggered Entrance Animations === */
@keyframes staggerIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.stagger-in {
    animation: staggerIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.stagger-in:nth-child(1) { animation-delay: 0ms; }
.stagger-in:nth-child(2) { animation-delay: 50ms; }
.stagger-in:nth-child(3) { animation-delay: 100ms; }
.stagger-in:nth-child(4) { animation-delay: 150ms; }
.stagger-in:nth-child(5) { animation-delay: 200ms; }
.stagger-in:nth-child(6) { animation-delay: 250ms; }
.stagger-in:nth-child(7) { animation-delay: 300ms; }
.stagger-in:nth-child(8) { animation-delay: 350ms; }
.stagger-in:nth-child(9) { animation-delay: 400ms; }
.stagger-in:nth-child(10) { animation-delay: 450ms; }

/* === Spring Animations === */
@keyframes springIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }
    50% {
        transform: scale(1.02) translateY(-5px);
    }
    70% {
        transform: scale(0.98) translateY(2px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.spring-in {
    animation: springIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.bounce-in {
    animation: bounceIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* === Enhanced Hover Effects === */
.hover-scale {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(196, 136, 58, 0.4);
    transform: translateY(-2px);
}

/* === Magnetic Button Effect === */
.magnetic-btn {
    transition: transform 0.15s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.magnetic-btn:hover {
    transform: scale(1.05) translateY(-2px);
}

.magnetic-btn:active {
    transform: scale(0.98);
}

/* === Ripple Effect === */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* === Morphing Background === */
@keyframes morphBg {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    25% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
    50% {
        border-radius: 50% 60% 30% 60% / 30% 40% 70% 60%;
    }
    75% {
        border-radius: 40% 50% 60% 50% / 60% 40% 50% 60%;
    }
}

.morph-bg {
    animation: morphBg 8s ease-in-out infinite;
}

/* === Floating Animation === */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes floatSlow {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-15px) rotate(2deg);
    }
    66% {
        transform: translateY(-8px) rotate(-1deg);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

.float-slow {
    animation: floatSlow 6s ease-in-out infinite;
}

.float-delay-1 { animation-delay: -1s; }
.float-delay-2 { animation-delay: -2s; }
.float-delay-3 { animation-delay: -3s; }

/* === Pulse Glow === */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(196, 136, 58, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(196, 136, 58, 0.6);
    }
}

.pulse-glow {
    animation: pulseGlow 2s ease-in-out infinite;
}

/* === Shimmer Loading === */
@keyframes shimmerWave {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.shimmer-wave {
    background: linear-gradient(
        90deg,
        rgba(196, 136, 58, 0.05) 0%,
        rgba(196, 136, 58, 0.15) 50%,
        rgba(196, 136, 58, 0.05) 100%
    );
    background-size: 200% 100%;
    animation: shimmerWave 2s ease-in-out infinite;
}

/* === Text Reveal Animation === */
@keyframes textReveal {
    0% {
        clip-path: inset(0 100% 0 0);
    }
    100% {
        clip-path: inset(0 0 0 0);
    }
}

.text-reveal {
    animation: textReveal 0.8s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

/* === Underline Grow Effect === */
.underline-grow {
    position: relative;
}

.underline-grow::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--caramel);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.underline-grow:hover::after {
    width: 100%;
}

/* === Card Flip === */
.card-flip-container {
    perspective: 1000px;
}

.card-flip {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.card-flip:hover {
    transform: rotateY(10deg) rotateX(5deg);
}

/* === Marquee === */
@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.marquee {
    animation: marquee 30s linear infinite;
}

.marquee:hover {
    animation-play-state: paused;
}

/* === Cursor Trail === */
.cursor-trail {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--caramel);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cursor-trail.active {
    opacity: 0.6;
}

/* === Smooth Page Transitions === */
.page-transition-enter {
    opacity: 0;
    transform: translateX(20px);
}

.page-transition-enter-active {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-transition-exit {
    opacity: 1;
    transform: translateX(0);
}

.page-transition-exit-active {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* === Enhanced Card Hover === */
.enhanced-card {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-style: preserve-3d;
}

.enhanced-card:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: 
        0 20px 40px rgba(44, 24, 16, 0.15),
        0 0 0 1px rgba(196, 136, 58, 0.1);
}

.enhanced-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--espresso), var(--caramel), var(--espresso));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.enhanced-card:hover::before {
    opacity: 1;
}

/* === Notification Slide === */
@keyframes notificationSlideIn {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes notificationSlideOut {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification-in {
    animation: notificationSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.notification-out {
    animation: notificationSlideOut 0.3s ease-in forwards;
}

/* === Smooth Scrollbar === */
.smooth-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.smooth-scrollbar::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 3px;
}

.smooth-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(196, 136, 58, 0.3);
    border-radius: 3px;
}

.smooth-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(196, 136, 58, 0.5);
}

/* === Loading Dots === */
@keyframes loadingDot {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-dots span {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin: 0 2px;
    background: var(--caramel);
    border-radius: 50%;
    animation: loadingDot 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0ms; }
.loading-dots span:nth-child(2) { animation-delay: 100ms; }
.loading-dots span:nth-child(3) { animation-delay: 200ms; }

/* === Typewriter Effect === */
@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

.typewriter {
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--caramel);
    animation: typewriter 3s steps(40) forwards, blink 0.8s step-end infinite;
}

/* === Parallax Layers === */
.parallax-container {
    perspective: 1px;
    overflow-x: hidden;
    overflow-y: auto;
    height: 100vh;
}

.parallax-layer {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.parallax-back {
    transform: translateZ(-1px) scale(2);
}

.parallax-front {
    transform: translateZ(0);
}

/* === Elastic Bounce === */
@keyframes elasticBounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    60% {
        transform: scale(1.1);
    }
    80% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.elastic-bounce {
    animation: elasticBounce 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

/* === Vapor Trail === */
@keyframes vaporTrail {
    0% {
        opacity: 0.8;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(1.5) translateY(-20px);
    }
}

.vapor-trail {
    animation: vaporTrail 1s ease-out forwards;
}

/* === Progress Steps === */
@keyframes progressStep {
    0% {
        width: 0;
    }
    100% {
        width: 100%;
    }
}

.progress-step {
    animation: progressStep 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* === Rotate Reveal === */
@keyframes rotateReveal {
    0% {
        opacity: 0;
        transform: rotate(-180deg) scale(0.5);
    }
    100% {
        opacity: 1;
        transform: rotate(0deg) scale(1);
    }
}

.rotate-reveal {
    animation: rotateReveal 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* === Apply Enhanced Animations to Components === */
.dashboard-card {
    animation: slideUpFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.dashboard-card:nth-child(1) { animation-delay: 0ms; }
.dashboard-card:nth-child(2) { animation-delay: 50ms; }
.dashboard-card:nth-child(3) { animation-delay: 100ms; }
.dashboard-card:nth-child(4) { animation-delay: 150ms; }
.dashboard-card:nth-child(5) { animation-delay: 200ms; }
.dashboard-card:nth-child(6) { animation-delay: 250ms; }

.glass-card {
    animation: fadeScaleIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.sidebar-item {
    animation: slideRightFade 0.4s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.sidebar-item:nth-child(1) { animation-delay: 50ms; }
.sidebar-item:nth-child(2) { animation-delay: 75ms; }
.sidebar-item:nth-child(3) { animation-delay: 100ms; }
.sidebar-item:nth-child(4) { animation-delay: 125ms; }
.sidebar-item:nth-child(5) { animation-delay: 150ms; }
.sidebar-item:nth-child(6) { animation-delay: 175ms; }
.sidebar-item:nth-child(7) { animation-delay: 200ms; }
.sidebar-item:nth-child(8) { animation-delay: 225ms; }

/* === Smooth Focus States === */
*:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    transition: box-shadow 0.2s ease;
}

/* === Interactive Card Grid === */
.interactive-grid > * {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-grid > *:hover {
    transform: translateY(-4px) scale(1.02);
    z-index: 10;
}

/* === Liquid Button === */
@keyframes liquidPulse {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.liquid-btn {
    background: linear-gradient(
        135deg,
        var(--espresso) 0%,
        var(--caramel) 50%,
        var(--espresso) 100%
    );
    background-size: 200% 200%;
    animation: liquidPulse 3s ease infinite;
    transition: all 0.3s ease;
}

.liquid-btn:hover {
    background-position: 100% 0;
    box-shadow: 
        0 10px 30px rgba(196, 136, 58, 0.4),
        0 0 0 0 rgba(196, 136, 58, 0.4);
    transform: translateY(-2px);
}

.liquid-btn:active {
    transform: translateY(0);
}

/* === Glow Border Animation === */
@keyframes glowBorder {
    0%, 100% {
        box-shadow: 
            0 0 5px rgba(196, 136, 58, 0.3),
            inset 0 0 5px rgba(196, 136, 58, 0.1);
    }
    50% {
        box-shadow: 
            0 0 20px rgba(196, 136, 58, 0.5),
            inset 0 0 10px rgba(196, 136, 58, 0.2);
    }
}

.glow-border {
    animation: glowBorder 2s ease-in-out infinite;
}
