/* ====================================
   B2BPriceChecker Admin Panel - Custom CSS
   Phase 2: UI/UX İyileştirmeleri
   ==================================== */

/* Renk Paleti */
:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #3b82f6;
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-error: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* Genel Animasyonlar */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Sayfa Animasyonu */
.page-content {
    animation: fadeIn 0.4s ease-out;
}

/* Kart İyileştirmeleri */
.mud-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px !important;
}

.mud-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15) !important;
}

/* Stat Kartları */
.stat-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.2s ease-in-out;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
}

/* İkonlar için pulse animasyonu */
.stat-icon {
    animation: pulse 2s ease-in-out infinite;
}

/* Tablo İyileştirmeleri */
.mud-table {
    border-radius: 8px !important;
    overflow: hidden;
}

.mud-table-head {
    background: var(--gradient-primary) !important;
}

.mud-table-head .mud-th {
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
}

/* Zebra Striping */
.mud-table-row:nth-of-type(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.mud-table-row {
    transition: background-color 0.2s ease;
}

.mud-table-row:hover {
    background-color: rgba(102, 126, 234, 0.08) !important;
}

/* Buton İyileştirmeleri */
.mud-button {
    transition: all 0.2s ease !important;
    border-radius: 8px !important;
}

.mud-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.mud-button-filled-primary {
    background: var(--gradient-primary) !important;
}

.mud-button-filled-success {
    background: var(--gradient-success) !important;
}

/* Chip İyileştirmeleri */
.mud-chip {
    border-radius: 6px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease;
}

.mud-chip:hover {
    transform: scale(1.05);
}

/* Input İyileştirmeleri */
.mud-input-outlined {
    border-radius: 8px !important;
}

/* Dialog İyileştirmeleri */
.mud-dialog {
    border-radius: 12px !important;
    animation: scaleIn 0.3s ease-out;
}

/* AppBar İyileştirmeleri */
.mud-appbar {
    background: var(--gradient-primary) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

/* Drawer İyileştirmeleri */
.mud-nav-link {
    border-radius: 8px !important;
    margin: 4px 8px !important;
    transition: all 0.2s ease;
}

.mud-nav-link:hover {
    background-color: rgba(102, 126, 234, 0.1) !important;
}

.mud-nav-link.active {
    background: var(--gradient-primary) !important;
    color: white !important;
    font-weight: 600;
}

/* Loading Skeleton */
.mud-skeleton {
    border-radius: 8px !important;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Snackbar İyileştirmeleri */
.mud-snackbar {
    border-radius: 8px !important;
    animation: slideUp 0.3s ease-out;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.5s ease-out;
}

.empty-state-icon {
    font-size: 80px !important;
    color: rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

/* Loading Container */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.3);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Dark Mode Styles */
body.dark-mode {
    --primary: #8b9aff;
    --primary-dark: #7788ee;
    --gradient-primary: linear-gradient(135deg, #8b9aff 0%, #9566bd 100%);
}

body.dark-mode .mud-table-row:nth-of-type(even) {
    background-color: rgba(255, 255, 255, 0.02);
}

body.dark-mode .mud-table-row:hover {
    background-color: rgba(139, 154, 255, 0.15) !important;
}

body.dark-mode .empty-state-icon {
    color: rgba(255, 255, 255, 0.2);
}

body.dark-mode .stat-card::before {
    background: var(--gradient-primary);
}

/* Smooth Theme Transition */
body, 
.mud-card,
.mud-paper,
.mud-table,
.mud-drawer,
.mud-appbar {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

body.dark-mode ::-webkit-scrollbar-track {
    background: #2a2a2a;
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: var(--primary);
}

/* Mobile responsive improvements */
@media (max-width: 768px) {
    .mud-card {
        margin-bottom: 16px;
    }
    
    .stat-card::before {
        height: 3px;
    }
    
    .mud-table-toolbar {
        flex-direction: column !important;
        gap: 1rem;
    }

    .mud-table-toolbar > * {
        width: 100% !important;
    }
}

/* Print Styles */
@media print {
    .mud-appbar,
    .mud-drawer,
    .mud-button {
        display: none !important;
    }
    
    .mud-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}
