@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ==================== RESET & BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
}

/* ==================== GLASS EFFECT ==================== */
.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ==================== GRADIENTS ==================== */
.gradient-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-blue {
    background: linear-gradient(135deg, #0077B6 0%, #00B4D8 100%);
}

/* ==================== NAVIGATION ==================== */
.nav-shadow {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

nav.sticky {
    position: sticky;
    top: 0;
    z-index: 50;
}

/* ==================== ANIMATIONS ==================== */
@keyframes floating {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.6s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-down {
    animation: slideDown 0.5s ease;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes bounce {
    0%, 80%, 100% { 
        transform: scale(0);
        opacity: 0.5;
    }
    40% { 
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* ==================== CARDS ==================== */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(102, 126, 234, 0.3);
}

.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.order-card {
    position: relative;
    overflow: hidden;
}

.order-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.order-card:hover::before {
    left: 100%;
}

/* ==================== STATUS BADGES ==================== */
.status-badge {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    animation: fadeIn 0.5s ease;
}

.status-pending { 
    background: linear-gradient(135deg, #FFA726 0%, #FB8C00 100%); 
    color: white; 
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.3);
}

.status-proses { 
    background: linear-gradient(135deg, #42A5F5 0%, #1E88E5 100%); 
    color: white;
    box-shadow: 0 4px 15px rgba(66, 165, 245, 0.3);
}

.status-selesai { 
    background: linear-gradient(135deg, #66BB6A 0%, #43A047 100%); 
    color: white;
    box-shadow: 0 4px 15px rgba(102, 187, 106, 0.3);
}

.status-diambil { 
    background: linear-gradient(135deg, #AB47BC 0%, #8E24AA 100%); 
    color: white;
    box-shadow: 0 4px 15px rgba(171, 71, 188, 0.3);
}

.status-dibatalkan {
    background: linear-gradient(135deg, #EF5350 0%, #E53935 100%); 
    color: white;
    box-shadow: 0 4px 15px rgba(239, 83, 80, 0.3);
}

/* ==================== BUTTONS ==================== */
.btn-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-gradient:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.btn-gradient:active {
    transform: scale(0.98);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== STATS GRID ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ==================== ICONS ==================== */
.icon-container {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    transition: transform 0.3s ease;
}

.icon-container:hover {
    transform: rotate(10deg) scale(1.1);
}

/* ==================== ALERTS ==================== */
.alert-success {
    background: linear-gradient(135deg, #66BB6A 0%, #43A047 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(102, 187, 106, 0.3);
    animation: slideDown 0.5s ease;
}

.alert-error {
    background: linear-gradient(135deg, #EF5350 0%, #E53935 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(239, 83, 80, 0.3);
    animation: slideDown 0.5s ease;
}

.alert-info {
    background: linear-gradient(135deg, #42A5F5 0%, #1E88E5 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 15px rgba(66, 165, 245, 0.3);
    animation: slideDown 0.5s ease;
}

/* ==================== LOADING ==================== */
.loading-dots {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.loading-dots div {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots div:nth-child(1) {
    background: #667eea;
    animation-delay: -0.32s;
}

.loading-dots div:nth-child(2) {
    background: #764ba2;
    animation-delay: -0.16s;
}

.loading-dots div:nth-child(3) {
    background: #f093fb;
    animation-delay: 0s;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-state-icon {
    font-size: 5rem;
    color: #e0e0e0;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

/* ==================== TIMELINE ==================== */
.order-timeline {
    position: relative;
    padding-left: 2rem;
}

.order-timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
}

.timeline-dot {
    position: absolute;
    left: 0;
    width: 1.5rem;
    height: 1.5rem;
    background: white;
    border: 3px solid #667eea;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
}

/* ==================== PRICE HIGHLIGHT ==================== */
.price-highlight {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 1.25rem;
}

.order-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* ==================== MODALS ==================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    animation: slideUp 0.3s ease;
}

/* ==================== TABLES ==================== */
table {
    border-collapse: collapse;
}

thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: rgba(102, 126, 234, 0.05);
}

/* ==================== FORMS ==================== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    ring: 2px;
    ring-color: #667eea;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* ==================== FOOTER ==================== */
footer {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .glass-effect {
        padding: 1.5rem !important;
    }
    
    .icon-container {
        width: 3rem;
        height: 3rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .status-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.shadow-glow {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.transition-all {
    transition: all 0.3s ease;
}

.cursor-pointer {
    cursor: pointer;
}

.pointer-events-none {
    pointer-events: none;
}

.overflow-hidden {
    overflow: hidden;
}

.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ==================== DARK OVERLAY ==================== */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99;
    display: none;
}

.overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ==================== FLOATING ICON ==================== */
.wa-button {
    background-color: #25D366;
    border: 2px solid #25D366;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.4s ease;
    white-space: nowrap;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 15px;
}

.wa-button span {
    opacity: 0;
    margin-left: 0px;
    transition: opacity 0.3s ease, margin-left 0.3s ease;
}

.wa-button:hover {
    width: 220px;
    background-color: #fff;
    color: #25D366;
    border-radius: 50px;
    text-align: center;
    gap: 0;
}

.wa-button:hover span {
    opacity: 1;
    margin-left: 10px;
    transition: opacity 0.4s ease-in-out, margin-left 0.6s ease;
}

.wa-button i {
    color: #fff;
    transition: color 0.4s ease;
    margin-left: 135px;
}

.wa-button:hover i {
    color: #25D366;
    margin-left: 0px;
    transition: opacity 0.3s ease, margin-left 0.3s ease;
}