:root {
    --primary-color: #1e40af;
    --primary-light: #3b82f6;
    --primary-dark: #1e3a8a;
    --secondary-color: #1e293b;
    --secondary-light: #334155;
    --secondary-dark: #0f172a;
    --accent-color: #3b82f6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --dark-bg: #0f172a;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #f8fafc;
    --border-radius: 0.75rem;
    --box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.12);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 280px;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f8fafc, #eef2f6);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: var(--primary-dark);
}

.admin-layout {
    display: flex;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

.sidebar {
    background: linear-gradient(165deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    transition: var(--transition);
    box-shadow: 6px 0 25px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    overflow-y: auto;
    overflow-x: hidden;
    backdrop-filter: blur(10px);
}

.sidebar .logo {
    padding: 2.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
}

.sidebar .logo img {
    max-height: 50px;
    filter: brightness(0) invert(1);
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sidebar .logo img:hover {
    transform: scale(1.08);
}

.sidebar .nav-item {
    margin-bottom: 1rem;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 1.1rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-weight: 500;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin: 0;
}

.sidebar .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: transform 0.5s ease;
    z-index: -1;
    border-radius: var(--border-radius);
}

.sidebar .nav-link:hover::before {
    transform: translateX(100%);
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.sidebar .nav-link.active {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    transform: translateX(4px) scale(1.02);
    font-weight: 600;
}

.sidebar .nav-link i {
    margin-right: 14px;
    width: 22px;
    text-align: center;
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.sidebar .nav-link:hover i {
    transform: scale(1.15);
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
    background-color: transparent;
    min-height: 100vh;
    padding: 2.5rem;
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to bottom, rgba(30, 64, 175, 0.03), transparent);
    z-index: -1;
    pointer-events: none;
}

.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    background: white;
    overflow: hidden;
    position: relative;
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    box-shadow: 0 4px 10px rgba(30, 64, 175, 0.25);
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(30, 64, 175, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    transition: var(--transition);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.table-container:hover {
    box-shadow: var(--box-shadow-lg);
}

.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0 0.75rem;
}

.table thead th {
    background: linear-gradient(to right, #f8f9fa, #f1f5f9);
    border-bottom: 2px solid rgba(0, 0, 0, 0.03);
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.075em;
    padding: 1.25rem 1.5rem;
}

.table tbody tr {
    background: white;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
    border-radius: var(--border-radius);
}

.table tbody tr:hover {
    background: rgba(59, 130, 246, 0.03);
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.07);
}

.table td, .table th {
    vertical-align: middle;
    padding: 1.25rem 1.5rem;
}

/* Fix for dropdown menu appearing below next row */
.table td {
    position: relative;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute !important;
    transform: translate(0, -10px) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12) !important;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 0.75rem;
    background: white;
    min-width: 180px;
    z-index: 9999 !important;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    bottom: 100%;
    margin-bottom: 0.5rem;
}

.dropdown-menu.show {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translate(0, 0) !important;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.dropdown-item i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

.dropdown-item:hover {
    background-color: rgba(30, 64, 175, 0.08);
    color: var(--primary-color);
    transform: translateX(3px);
}

.dropdown-item:active {
    background-color: rgba(30, 64, 175, 0.12);
}

.dropdown-toggle {
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.dropdown-toggle:hover {
    background: rgba(30, 64, 175, 0.05);
    border-color: rgba(30, 64, 175, 0.2);
    color: var(--primary-color);
}

.dropdown-toggle:after {
    display: none;
}

.dropdown-toggle i {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}

.dropdown-toggle.show i {
    transform: rotate(180deg);
}

/* Style for the ID column */
.table td:first-child {
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    background-color: rgba(237, 238, 238, 0.05);
    border-radius: 0.5rem;
    text-align: center;
    width: 80px;
}

/* Style for the ID column header */
.table th:first-child {
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-align: center;
    width: 80px;
    background-color: rgba(30, 64, 175, 0.1);
    border-radius: 0.5rem;
}

.product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border: 3px solid white;
    transition: var(--transition);
}

.product-image:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.badge {
    padding: 0.45em 0.85em;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.075em;
    border-radius: 2rem;
    transition: var(--transition);
}

.badge.bg-success {
    background-color: rgba(16, 185, 129, 0.15) !important;
    color: var(--success-color) !important;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.form-control, .form-select {
    border-radius: var(--border-radius);
    padding: 0.85rem 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    background: white;
    font-size: 0.95rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
    transform: translateY(-2px);
}

.pagination .page-link {
    border: none;
    padding: 0.7rem 1.1rem;
    color: var(--text-secondary);
    border-radius: 0.5rem;
    margin: 0 0.1rem;
    font-weight: 500;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background: var(--primary-color);
    color: white;
}

.pagination .page-item.active .page-link {
    background: var(--primary-color);
    color: white;
}

.login-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 2.5rem 1rem;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.03), rgba(59, 130, 246, 0.05));
}

.login-form {
    background: white;
    padding: 3.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    border: 1px solid rgba(0, 0, 0, 0.02);
    position: relative;
    overflow: hidden;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-light));
}

.login-logo {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-logo img {
    max-height: 70px;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-logo img:hover {
    transform: scale(1.1);
}

.login-form h4 {
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    font-size: 1.75rem;
}

.login-form p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.login-form .btn {
    padding: 0.95rem 1.75rem;
    font-weight: 600;
    margin-top: 1.75rem;
    letter-spacing: 0.025em;
}

.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

.toast-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.toast {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
    width: 380px;
    animation: slideIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.95rem 1.25rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toast-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
    transition: var(--transition);
}

.toast-header .btn-close:hover {
    opacity: 1;
    transform: rotate(90deg);
}

.toast-body {
    padding: 1.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, var(--danger-color), #ff6b6b);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(239, 68, 68, 0.3);
    transition: var(--transition);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.notification-badge:hover {
    transform: scale(1.1);
}

/* Responsive styles */
@media (max-width: 992px) {
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: flex !important;
    }
    
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 1rem;
    }
    
    .table td, .table th {
        min-width: 120px;
        padding: 0.75rem;
        font-size: 0.9rem;
    }
    
    .card {
        margin-bottom: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

@media (min-width: 993px) {
    .sidebar-toggle {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .login-form {
        padding: 2rem;
        margin: 1rem;
        width: 90%;
    }
    
    .product-image {
        width: 40px;
        height: 40px;
    }
    
    .toast {
        width: 300px;
        margin: 0.5rem;
        font-size: 0.9rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .pagination .page-link {
        padding: 0.4rem 0.7rem;
        font-size: 0.9rem;
    }

    .showing-entries {
        font-size: 0.9rem;
    }

    .form-control, .form-select {
        font-size: 0.9rem;
    }

    /* ID sütununu gizle */
    .table td:first-child,
    .table th:first-child {
        display: none;
    }

    /* Ürün adı sütununa daha fazla alan ver */
    .table td:nth-child(2),
    .table th:nth-child(2) {
        width: 60%;
    }

    /* Kategori sütununu daralt */
    .table td:nth-child(3),
    .table th:nth-child(3) {
        width: 20%;
    }

    /* Actions sütununu daralt */
    .table td:last-child,
    .table th:last-child {
        width: 20%;
    }

    /* Tablo hücrelerinin padding'ini azalt */
    .table td, 
    .table th {
        padding: 0.5rem !important;
    }

    /* Dropdown menüyü daha kompakt yap */
    .dropdown-menu {
        min-width: 120px;
    }

    .dropdown-item {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .table td, .table th {
        padding: 0.75rem !important;
        font-size: 0.85rem;
    }

    .table-container {
        padding: 0.75rem !important;
    }

    .card {
        margin-bottom: 0.75rem !important;
    }

    .card-body {
        padding: 0.75rem !important;
    }

    .row.g-4 {
        gap: 0.5rem !important;
    }

    .mb-4 {
        margin-bottom: 0.75rem !important;
    }

    .d-flex.justify-content-between.align-items-center.mb-5 {
        margin-bottom: 1rem !important;
    }

    .d-flex.align-items-center {
        gap: 0.5rem !important;
    }

    .product-image {
        width: 35px !important;
        height: 35px !important;
    }

    /* ID column styling for mobile */
    .table td:first-child, .table th:first-child {
        width: 60px !important;
        font-size: 0.8rem !important;
        padding: 0.5rem !important;
    }

    .pagination {
        gap: 0.25rem !important;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .table-container {
        padding: 0.5rem;
    }
    
    .form-control, .form-select {
        padding: 0.5rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .toast-container {
        right: 10px;
        bottom: 10px;
    }

    .dropdown-menu {
        min-width: 120px;
        font-size: 0.9rem;
    }

    .table thead th {
        font-size: 0.8rem;
        padding: 0.5rem;
    }

    .product-image {
        width: 35px;
        height: 35px;
    }

    /* Kategori sütununu daha da daralt */
    .table td:nth-child(3),
    .table th:nth-child(3) {
        width: 25%;
    }

    /* Ürün adı sütununu genişlet */
    .table td:nth-child(2),
    .table th:nth-child(2) {
        width: 55%;
    }

    /* Actions sütununu daralt */
    .table td:last-child,
    .table th:last-child {
        width: 20%;
    }

    .pagination {
        gap: 0.25rem !important;
    }

    .pagination .page-link {
        padding: 0.35rem 0.75rem !important;
    }

    .toast {
        margin-bottom: 0.5rem !important;
    }

    .modal-body {
        padding: 0.75rem !important;
    }

    .modal-header, .modal-footer {
        padding: 0.75rem !important;
    }
}

@media (max-width: 576px) {
    .table td, .table th {
        padding: 0.35rem !important;
        font-size: 0.8rem;
    }

    .table-container {
        padding: 0.5rem !important;
    }

    .form-control, .form-select {
        padding: 0.35rem 0.5rem !important;
        font-size: 0.85rem;
    }

    .btn {
        padding: 0.35rem 0.75rem !important;
        font-size: 0.85rem;
    }

    h2 {
        font-size: 1.25rem !important;
    }

    .text-muted {
        font-size: 0.8rem !important;
    }

    .dropdown-menu {
        min-width: 100px !important;
        padding: 0.25rem 0 !important;
    }

    .dropdown-item {
        padding: 0.35rem 0.75rem !important;
        font-size: 0.85rem;
    }
}

.sidebar-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Language dropdown styles */
.language-btn-admin {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    text-align: left;
}

.language-btn-admin:hover {
    background: rgba(255, 255, 255, 0.15);
}

.language-btn-admin i {
    font-size: 16px;
}

.admin-dropdown-menu {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    background: rgba(30, 41, 59, 0.95);
    border-radius: 8px;
    padding: 8px;
    margin-top: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.admin-dropdown-menu.show {
    display: block;
}

.admin-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.admin-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.admin-dropdown-item .flag-icon {
    font-size: 18px;
}

/* RTL support for language dropdown */
[dir="rtl"] .admin-dropdown-menu {
    left: auto;
    right: 0;
}

[dir="rtl"] .admin-dropdown-item {
    text-align: right;
}

[dir="rtl"] .admin-dropdown-item .flag-icon {
    margin-right: 0;
    margin-left: 8px;
}

.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.pagination {
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.page-item {
    margin: 0;
}

.page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    color: var(--text-secondary);
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.page-link:hover {
    color: var(--primary-color);
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    color: white;
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.page-item.disabled .page-link {
    color: var(--text-muted);
    background: var(--light-bg);
    border-color: var(--border-color);
    cursor: not-allowed;
}

.showing-entries {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

@media (max-width: 768px) {
    .pagination-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .pagination {
        justify-content: center;
    }
    
    .page-link {
        min-width: 2rem;
        height: 2rem;
        padding: 0 0.5rem;
        font-size: 0.875rem;
    }
} 