/* ============================================
   Ep Parts - Garanti ve İade Takip Sistemi
   Main Stylesheet
   ============================================ */

/* Tailwind Config */
/* Note: Tailwind config remains in HTML head for CDN usage */

/* Base Styles */
[x-cloak] { 
    display: none !important; 
}

html {
    scroll-behavior: smooth;
    height: 100%;
    font-size: 14px;
}

body { 
    background-color: #f8fafc; 
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Ensure full width layout */
.flex-1 {
    min-width: 0;
}

/* Template display fix */
template {
    display: none;
}

/* Minimal spacing utilities */
.gap-compact { gap: 0.5rem; }
.p-compact { padding: 0.75rem; }
.m-compact { margin: 0.5rem; }

/* ============================================
   SCROLLBAR STYLING
   ============================================ */
::-webkit-scrollbar { 
    width: 6px; 
    height: 6px; 
}

::-webkit-scrollbar-track { 
    background: transparent; 
}

::-webkit-scrollbar-thumb { 
    background: #cbd5e1; 
    border-radius: 10px; 
}

::-webkit-scrollbar-thumb:hover { 
    background: #94a3b8; 
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav-item { 
    position: relative; 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}

.nav-item::before { 
    content: ''; 
    position: absolute; 
    left: 0; 
    top: 50%; 
    transform: translateY(-50%); 
    height: 0; 
    width: 3px; 
    background: linear-gradient(180deg, #dc2626, #ef4444); 
    border-radius: 0 4px 4px 0; 
    transition: height 0.3s ease;
}

.nav-item.active::before { 
    height: 60%; 
}

.nav-item.active { 
    background: linear-gradient(90deg, rgba(220,38,38,0.12) 0%, transparent 100%); 
}

/* ============================================
   CARDS
   ============================================ */
.stat-card { 
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.7s;
}

.stat-card:hover::after {
    left: 100%;
}

.stat-card:hover { 
    transform: translateY(-6px); 
    box-shadow: 0 20px 50px -12px rgba(0,0,0,0.2); 
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary { 
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-primary::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.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 15px 30px -5px rgba(220,38,38,0.4); 
}

.btn-primary:active {
    transform: translateY(0);
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.input-focus { 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-focus:focus { 
    box-shadow: 0 0 0 4px rgba(220,38,38,0.1); 
    border-color: #dc2626;
    transform: translateY(-1px);
}

/* ============================================
   TABLES
   ============================================ */
.table-row-hover { 
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.table-row-hover:hover { 
    background: linear-gradient(90deg, #fef2f2 0%, #fff 100%); 
    transform: scale(1.003);
    box-shadow: 0 4px 12px -4px rgba(0,0,0,0.05);
}

/* ============================================
   STATUS BADGES
   ============================================ */
.status-pending { 
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%); 
    color: #92400e;
    box-shadow: 0 2px 8px -2px rgba(245, 158, 11, 0.3);
}

.status-approved { 
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%); 
    color: #065f46;
    box-shadow: 0 2px 8px -2px rgba(16, 185, 129, 0.3);
}

.status-rejected { 
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%); 
    color: #991b1b;
    box-shadow: 0 2px 8px -2px rgba(239, 68, 68, 0.3);
}

/* ============================================
   GLASS MORPHISM
   ============================================ */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.glass-dark {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes shake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.animate-shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

.animate-slide-in {
    animation: slideIn 0.3s ease-out;
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease-out;
}

/* Skeleton Loading */
.skeleton { 
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%); 
    background-size: 200% 100%; 
    animation: shimmer 1.5s infinite; 
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
*:focus-visible {
    outline: 2px solid #dc2626;
    outline-offset: 2px;
}

::selection {
    background: rgba(220, 38, 38, 0.2);
    color: inherit;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    @page { 
        margin: 0; 
        size: A4; 
    }
    
    body > :not(#print-area) { 
        display: none !important; 
    }
    
    #print-area { 
        display: block !important; 
        position: absolute; 
        top: 0; 
        left: 0; 
        width: 100%; 
        min-height: 100vh; 
        background: white; 
        z-index: 9999; 
    }
    
    .no-print { 
        display: none !important; 
    }
    
    * { 
        -webkit-print-color-adjust: exact !important; 
        print-color-adjust: exact !important; 
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.shadow-soft {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-card {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.text-gradient {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
