/* ============================================
   ADMIN PANEL - DESIGN SYSTEM
   ============================================ */

/* CSS Variables - Merkezi Renk Yönetimi */
:root {
    /* Primary Colors */
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --primary-dark: #0a58ca;
    /* Sidebar */
    --sidebar-bg: #212529;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --sidebar-text: #adb5bd;
    --sidebar-text-hover: #fff;
    --sidebar-active-bg: rgba(13, 110, 253, 0.15);
    --sidebar-active-border: var(--primary-color);
    /* Header */
    --header-bg: #f8f9fa;
    --header-height: 60px;
    --header-border: #e1e4e8;
    /* Content */
    --content-bg: #f8f9fa;
    --content-padding: 1.5rem;
    /* Card */
    --card-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --card-shadow-hover: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    /* Transitions */
    --transition-speed: 0.3s;
}

/* ============================================
   BASE STYLES
   ============================================ */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    min-height: 100vh;
    background-color: var(--content-bg);
    display: flex;
    flex-direction: column;
}

/* ============================================
   LAYOUT STRUCTURE
   ============================================ */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    transition: transform var(--transition-speed) ease;
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
}

.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-brand {
    padding: 1rem 1rem 1.25rem;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    width: 100%;
    height: 100px;
}

.sidebar-brand-logo {
    position: relative;
    z-index: 1;
    width: auto;
    height: 100%;
    max-width: 100%;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-brand:hover {
    color: #fff;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-group-title {
    display: block;
    padding: 0.35rem 1.25rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    user-select: none;
}

.sidebar-group-title::after {
    content: "";
    display: block;
    height: 1px;
    margin-top: 0.35rem;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-nav .nav-link {
    color: var(--sidebar-text);
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    color: var(--sidebar-text-hover);
    background-color: rgba(255, 255, 255, 0.05);
}

.sidebar-nav .nav-link.active {
    color: var(--sidebar-text-hover);
    background-color: var(--sidebar-active-bg);
    border-left-color: var(--sidebar-active-border);
    font-weight: 500;
}

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

/* Main Content Area */
.admin-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition-speed) ease;
}

/* Header */
.admin-header {
    background-color: var(--header-bg);
    height: var(--header-height);
    border-bottom: 1px solid var(--header-border);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
    min-width: 0; /* Allow flexbox to shrink */
}

.header-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #495057;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    display: none;
    flex-shrink: 0; /* Prevent toggle from shrinking */
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0; /* Prevent actions from shrinking */
}

.user-dropdown .dropdown-toggle {
    background: none;
    border: none;
    color: #495057;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    white-space: nowrap;
}

.user-dropdown .dropdown-toggle:hover {
    background-color: var(--content-bg);
}

/* Breadcrumb */
.admin-breadcrumb {
    background-color: transparent;
    padding: 0;
    margin: 0;
    font-size: 0.875rem;
}

.admin-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    color: #6c757d;
}

.admin-breadcrumb .breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.admin-breadcrumb .breadcrumb-item a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.admin-breadcrumb .breadcrumb-item.active {
    color: #495057;
}

/* Mobil breadcrumb için küçük stiller */
@media (max-width: 767.98px) {
    .admin-breadcrumb {
        font-size: 0.8125rem; /* Biraz daha küçük */
    }
    
    .admin-breadcrumb .breadcrumb-item {
        max-width: 150px; /* Uzun metinler için */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Content Container */
.admin-content {
    flex: 1;
    padding: var(--content-padding);
}

.content-header {
    margin-bottom: 1.5rem;
}

.content-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #212529;
    margin: 0;
}

/* ============================================
   RESPONSIVE BEHAVIOR
   ============================================ */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }
    
    .admin-sidebar.show {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
    }
    
    .header-toggle {
        display: block;
    }
    
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1035;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 767.98px) {
    /* Breadcrumb mobilde gizli - d-none d-md-block ile zaten gizli */
    .admin-breadcrumb {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .admin-content {
        padding: 1rem;
    }
    
    .content-title {
        font-size: 1.5rem;
    }
    
    .admin-header {
        padding: 0 1rem;
        height: 56px; /* Biraz daha k?sa */
    }
    
    .header-left {
        gap: 0.5rem; /* Daha az bo?luk */
    }
    
    .user-dropdown .dropdown-toggle {
        padding: 0.25rem 0.5rem; /* Daha kompakt */
    }
    
    .user-dropdown .dropdown-toggle i {
        font-size: 1.25rem;
    }
}

/* ============================================
   COMPONENTS
   ============================================ */
.card {
    box-shadow: var(--card-shadow);
    border: none;
    transition: box-shadow var(--transition-speed) ease;
}

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

/* Footer */
.admin-footer {
    background-color: var(--header-bg);
    border-top: 1px solid var(--header-border);
    padding: 1rem 1.5rem;
    margin-top: auto;
    font-size: 0.875rem;
    color: #6c757d;
}

.admin-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

.admin-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   TABLE ENHANCEMENTS
   ============================================ */
.table > :not(caption) > * > * {
    padding: 0.75rem;
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Table Actions */
.btn-group .btn {
    border-radius: 0.25rem !important;
}

.btn-group .btn:not(:last-child) {
    margin-right: 0.25rem;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.fw-medium {
    font-weight: 500;
}

/* Empty State */
.text-center i.display-1 {
    font-size: 5rem;
    opacity: 0.3;
}
