/* KAASTORE - Main Stylesheet */
:root {
    --primary: #6C3BF7;
    --primary-dark: #5A2FD6;
    --primary-light: #8B6BF8;
    --secondary: #FF6B6B;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    --dark: #1E1E2E;
    --light: #F8F9FA;
    --gradient-1: linear-gradient(135deg, #6C3BF7 0%, #FF6B6B 100%);
    --gradient-2: linear-gradient(135deg, #3B82F6 0%, #10B981 100%);
    --gradient-3: linear-gradient(135deg, #F59E0B 0%, #EF4444 100%);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
    --shadow-xl: 0 20px 60px rgba(0,0,0,0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-bs-theme="dark"] {
    --glass-bg: rgba(0, 0, 0, 0.2);
    --glass-border: rgba(255, 255, 255, 0.05);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow-x: hidden;
    background: var(--light);
    transition: var(--transition);
}

[data-bs-theme="dark"] body {
    background: #0F0F1A;
    color: #E4E4E7;
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
}

.glass-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

[data-bs-theme="dark"] .glass-card {
    background: rgba(30, 30, 46, 0.8);
    border-color: rgba(255, 255, 255, 0.05);
}

.glass-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* Gradient Text */
.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn-gradient {
    background: var(--gradient-1);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 59, 247, 0.3);
    color: white;
}

.btn-gradient-2 {
    background: var(--gradient-2);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 28px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-gradient-2:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
    color: white;
}

.btn-outline-glass {
    background: transparent;
    border: 2px solid rgba(108, 59, 247, 0.3);
    color: var(--primary);
    border-radius: var(--radius-sm);
    padding: 10px 24px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-glass:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-img-top {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    height: 200px;
    object-fit: cover;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 260px;
    background: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    z-index: 1000;
    overflow-y: auto;
    transition: var(--transition);
}

[data-bs-theme="dark"] .sidebar {
    background: #1A1A2E;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
}

.sidebar-logo {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.sidebar-logo h3 {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-nav { padding: 15px 0; }

.sidebar-nav .nav-item { padding: 0 12px; margin-bottom: 2px; }

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    color: #6B7280;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(108, 59, 247, 0.1);
    color: var(--primary);
}

.sidebar-nav .nav-link i { width: 20px; text-align: center; }

/* Main Content */
.main-content {
    margin-left: 260px;
    padding: 24px;
    min-height: 100vh;
}

/* Stats Cards */
.stat-card {
    padding: 24px;
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

[data-bs-theme="dark"] .stat-card {
    background: #1A1A2E;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 4px 4px 0;
}

.stat-card:nth-child(1)::before { background: var(--gradient-1); }
.stat-card:nth-child(2)::before { background: var(--gradient-2); }
.stat-card:nth-child(3)::before { background: var(--gradient-3); }
.stat-card:nth-child(4)::before { background: linear-gradient(135deg, #8B5CF6, #EC4899); }

.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.stat-number { font-size: 28px; font-weight: 700; margin: 8px 0 4px; }
.stat-label { font-size: 14px; color: #9CA3AF; font-weight: 500; }

/* Tables */
.table-container {
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

[data-bs-theme="dark"] .table-container {
    background: #1A1A2E;
}

.table { margin-bottom: 0; }

.table thead th {
    background: #F9FAFB;
    border-bottom: 2px solid #E5E7EB;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    color: #6B7280;
}

[data-bs-theme="dark"] .table thead th {
    background: #15152A;
    border-color: #2D2D44;
    color: #9CA3AF;
}

.table tbody td { padding: 12px 16px; vertical-align: middle; }

/* Badges */
.badge {
    padding: 4px 12px;
    font-weight: 500;
    border-radius: 20px;
    font-size: 12px;
}

.badge-pending { background: #FEF3C7; color: #D97706; }
.badge-confirmed { background: #DBEAFE; color: #2563EB; }
.badge-processing { background: #E0E7FF; color: #4F46E5; }
.badge-delivered { background: #D1FAE5; color: #059669; }
.badge-cancelled { background: #FEE2E2; color: #DC2626; }
.badge-active { background: #D1FAE5; color: #059669; }
.badge-expired { background: #FEE2E2; color: #DC2626; }

/* Forms */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    border: 1.5px solid #E5E7EB;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(108, 59, 247, 0.15);
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

[data-bs-theme="dark"] .auth-card {
    background: rgba(30, 30, 46, 0.95);
}

.auth-card .auth-logo { text-align: center; margin-bottom: 30px; }
.auth-card .auth-logo h2 { font-weight: 800; font-size: 28px; }

/* Hero Section */
.hero-section {
    position: relative;
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #0F0F1A 0%, #1A1A3E 50%, #0F0F1A 100%);
    overflow: hidden;
    color: white;
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(108, 59, 247, 0.15);
    top: -200px;
    right: -200px;
    filter: blur(80px);
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(255, 107, 107, 0.1);
    bottom: -100px;
    left: -100px;
    filter: blur(60px);
}

.hero-section h1 { font-size: 56px; font-weight: 800; line-height: 1.1; margin-bottom: 20px; }
.hero-section p { font-size: 18px; color: rgba(255,255,255,0.7); max-width: 500px; margin-bottom: 30px; }

/* Floating Orbs */
.floating-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    animation: float 6s ease-in-out infinite;
    pointer-events: none;
}

.orb-1 { width: 300px; height: 300px; background: rgba(108, 59, 247, 0.2); top: 10%; left: 10%; animation-delay: 0s; }
.orb-2 { width: 200px; height: 200px; background: rgba(255, 107, 107, 0.15); top: 60%; right: 15%; animation-delay: 2s; }
.orb-3 { width: 250px; height: 250px; background: rgba(59, 130, 246, 0.15); bottom: 10%; left: 30%; animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

/* Pricing Cards */
.pricing-card {
    padding: 32px;
    border-radius: var(--radius-lg);
    background: white;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
}

[data-bs-theme="dark"] .pricing-card {
    background: #1A1A2E;
}

.pricing-card.featured {
    background: var(--gradient-1);
    color: white;
    transform: scale(1.05);
}

.pricing-card.featured .btn {
    background: white;
    color: var(--primary);
}

.pricing-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.pricing-card.featured:hover { transform: scale(1.05) translateY(-8px); }

.pricing-card .price { font-size: 48px; font-weight: 800; }
.pricing-card .price span { font-size: 18px; font-weight: 400; }

/* Product Cards */
.product-card {
    border: none;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }

.product-card .product-img {
    height: 220px;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-img { transform: scale(1.05); }

.product-card .card-body { padding: 16px; }
.product-card .product-price { font-size: 20px; font-weight: 700; color: var(--primary); }
.product-card .product-store { font-size: 13px; color: #9CA3AF; }

/* Chat */
.chat-container { height: calc(100vh - 200px); display: flex; background: white; border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); }

[data-bs-theme="dark"] .chat-container { background: #1A1A2E; }

.chat-sidebar { width: 320px; border-right: 1px solid #E5E7EB; overflow-y: auto; }
.chat-main { flex: 1; display: flex; flex-direction: column; }

.chat-messages { flex: 1; overflow-y: auto; padding: 20px; }

.chat-message { margin-bottom: 16px; display: flex; }
.chat-message.sent { justify-content: flex-end; }
.chat-message.received { justify-content: flex-start; }

.chat-message .message-content {
    max-width: 70%;
    padding: 12px 18px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-message.sent .message-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-message.received .message-content {
    background: #F3F4F6;
    color: #1F2937;
    border-bottom-left-radius: 4px;
}

[data-bs-theme="dark"] .chat-message.received .message-content {
    background: #2D2D44;
    color: #E4E4E7;
}

.chat-input { padding: 16px; border-top: 1px solid #E5E7EB; background: white; }

[data-bs-theme="dark"] .chat-input { background: #1A1A2E; border-color: #2D2D44; }

/* Page Header */
.page-header {
    padding: 24px 0;
    margin-bottom: 24px;
}

.page-header h1 { font-size: 28px; font-weight: 700; }
.page-header p { color: #6B7280; font-size: 14px; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); width: 280px; }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; padding: 16px; }
    .hero-section h1 { font-size: 32px; }
    .hero-section { padding: 80px 0 40px; }
    .pricing-card.featured { transform: none; }
    .chat-sidebar { width: 100%; }
    .chat-container { flex-direction: column; }
    .stat-number { font-size: 22px; }
    .auth-card { padding: 24px; }
}

/* Toast / Notifications */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* Loading */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #E5E7EB;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Page transition */
.page-transition {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
