/* ============================================
   WORKCOUNT DASHBOARD - RESPONSIVE CSS
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ============================================
   SIDEBAR - DESKTOP
   ============================================ */
#sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 16rem !important;
    height: 100vh !important;
    z-index: 1000 !important;
    overflow-y: auto !important;
    transition: transform 0.3s ease !important;
}

#main-content {
    margin-left: 16rem !important;
    transition: margin-left 0.3s ease;
}

/* ============================================
   SIDEBAR - MOBILE & TABLET
   ============================================ */
@media (max-width: 1023px) {
    /* Sidebar gizli */
    #sidebar {
        width: 280px !important;
        transform: translateX(-100%) !important;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.5) !important;
    }
    
    /* Sidebar açık */
    #sidebar.open {
        transform: translateX(0) !important;
    }
    
    /* Main content tam genişlik */
    #main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}

/* ============================================
   SMALL MOBILE
   ============================================ */
@media (max-width: 639px) {
    #sidebar {
        width: 85vw !important;
        max-width: 320px !important;
    }
    
    /* Grid 1 sütun */
    .grid {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
    
    /* Padding küçült */
    .p-6 { padding: 1rem !important; }
    .px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }
    .py-6 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
    
    /* Font küçült */
    .text-2xl { font-size: 1.5rem !important; }
    .text-lg { font-size: 1.125rem !important; }
    
    /* Header arama gizle */
    header .flex-1.max-w-md { display: none !important; }
    
    /* Header buton text gizle */
    header button span { display: none; }
    header button { padding: 0.5rem !important; }
}

/* ============================================
   TABLET GRID
   ============================================ */
@media (min-width: 640px) and (max-width: 1023px) {
    .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* ============================================
   MENU
   ============================================ */
.submenu {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    display: block !important;
}

.submenu.hidden {
    max-height: 0 !important;
    opacity: 0 !important;
}

.submenu:not(.hidden) {
    max-height: 1000px !important;
    opacity: 1 !important;
}

/* ============================================
   MODALS
   ============================================ */
[id$="Modal"] {
    z-index: 1100 !important;
}

/* ============================================
   MOBILE OVERLAY
   ============================================ */
#mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#mobile-overlay.active {
    display: block !important;
    opacity: 1;
}

/* ============================================
   BUTTONS & FORMS
   ============================================ */
button, input, select, textarea {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

button:active {
    transform: scale(0.98);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #4b5563;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* ============================================
   SCROLLBAR
   ============================================ */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track {
    background: #1f2937;
}

#sidebar::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 3px;
}
