/* Modern Admin Panel CSS */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --light-color: #f8fafc;
    --dark-color: #1e293b;
    --sidebar-width: 280px;
    --topbar-height: 70px;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --box-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    line-height: 1.6;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    background: white;
    color: var(--dark-color);
    z-index: 999;
    transition: all 0.3s ease;
    overflow-y: auto;
    border-right: 1px solid #e2e8f0;
    box-shadow: var(--box-shadow);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.sidebar-brand i {
    margin-right: 0.75rem;
    font-size: 1.75rem;
    color: var(--primary-color);
}

.company-info {
    opacity: 0.7;
    font-size: 0.875rem;
    color: var(--secondary-color);
}

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

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

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 1rem;
    position: relative;
}

.sidebar-nav .nav-link:hover {
    background-color: var(--light-color);
    color: var(--dark-color);
    transform: translateX(4px);
}

.sidebar-nav .nav-link.active {
    background-color: var(--primary-color);
    color: white !important;
    box-shadow: var(--box-shadow);
}

.sidebar-nav .nav-link.active i {
    color: white !important;
}

.sidebar-nav .nav-link.active span {
    color: white !important;
}

.sidebar-nav .nav-link.active .badge {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

/* Override icon colors when menu item is active */
.sidebar-nav .nav-link.active .text-warning,
.sidebar-nav .nav-link.active .text-success,
.sidebar-nav .nav-link.active .text-danger,
.sidebar-nav .nav-link.active .text-info {
    color: white !important;
}

.sidebar-nav .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    text-align: center;
}

.sidebar-nav .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.sidebar-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1rem 1.5rem;
    opacity: 0.5;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    min-height: calc(100vh - var(--topbar-height));
    transition: all 0.3s ease;
}

/* Top Bar */
.topbar {
    height: var(--topbar-height);
    background: white;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1001;
    box-shadow: var(--box-shadow);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-img {
    height: 40px;
    width: auto;
    border-radius: 8px;
    object-fit: contain;
    transition: all 0.3s ease;
    cursor: pointer;
}

.logo-img:hover {
    transform: scale(1.05);
    box-shadow: var(--box-shadow);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: none; /* Gizli, sadece logo gösterilecek */
}

.sidebar-toggle {
    color: var(--secondary-color);
    font-size: 1.25rem;
    margin-right: 1rem;
}

.page-title {
    color: var(--dark-color);
    font-weight: 600;
}

.topbar-right {
    display: flex;
    align-items: center;
}

.user-dropdown .btn {
    display: flex;
    align-items: center;
    color: var(--secondary-color);
    text-decoration: none;
    padding: 0.5rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 0.75rem;
}

.user-name {
    font-weight: 500;
}

/* Content Area */
.content {
    padding: 2rem;
    min-height: calc(100vh - var(--topbar-height) - 60px); /* 60px for footer */
    padding-bottom: 80px; /* Extra space for footer */
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
}

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

.card-header {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

/* Stats Cards */
.stats-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

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

.stats-card.success {
    border-left-color: var(--success-color);
}

.stats-card.warning {
    border-left-color: var(--warning-color);
}

.stats-card.danger {
    border-left-color: var(--danger-color);
}

.stats-card.info {
    border-left-color: var(--info-color);
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.stats-label {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-icon {
    font-size: 2.5rem;
    opacity: 0.3;
    float: right;
    margin-top: -1rem;
}

/* Tables */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    background: white;
}

.table thead th {
    background: var(--light-color);
    border: none;
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.table tbody td {
    padding: 1rem;
    border-color: #f1f5f9;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: var(--light-color);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

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

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
}

/* Status Badges */
.status-beklemede {
    background: #fef3c7;
    color: #92400e;
}

.status-hazirlaniyor {
    background: #dbeafe;
    color: #1e40af;
}

.status-kargoda {
    background: #e0e7ff;
    color: #3730a3;
}

.status-teslim-edildi {
    background: #d1fae5;
    color: #065f46;
}

.status-iptal {
    background: #fee2e2;
    color: #991b1b;
}

.status-yanitlandi {
    background: #d1fae5;
    color: #065f46;
}

.status-kapatildi {
    background: #f3f4f6;
    color: #374151;
}

/* Platform Icons */
.platform-whatsapp {
    color: #25d366;
}

.platform-instagram {
    color: #e4405f;
}

/* Forms */
.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.login-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    padding: 3rem;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
        top: var(--topbar-height);
        height: calc(100vh - var(--topbar-height));
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        margin-top: var(--topbar-height);
    }
    
    .content {
        padding: 1rem;
    }
    
    .footer {
        left: 0;
    }
}

@media (max-width: 767.98px) {
    .topbar {
        padding: 0 1rem;
    }
    
    .topbar-left {
        gap: 1rem;
    }
    
    .logo-img {
        height: 35px;
    }
    
    .page-title {
        font-size: 1.1rem;
    }
    
    .stats-card {
        margin-bottom: 1rem;
    }
    
    .table-responsive {
        border-radius: var(--border-radius);
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width);
    right: 0;
    height: 60px;
    background: white;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 998;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.05);
}

.footer-left {
    color: var(--secondary-color);
    font-size: 0.875rem;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-right a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.footer-right a:hover {
    color: var(--primary-color);
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* SweetAlert2 Custom Styles */
.swal2-popup-custom {
    border-radius: var(--border-radius) !important;
    box-shadow: var(--box-shadow-lg) !important;
    font-family: 'Inter', sans-serif !important;
}

.swal2-toast-custom {
    border-radius: var(--border-radius) !important;
    box-shadow: var(--box-shadow) !important;
    font-family: 'Inter', sans-serif !important;
}

.swal2-popup .swal2-title {
    font-weight: 600 !important;
    color: var(--dark-color) !important;
}

.swal2-popup .swal2-content {
    color: var(--secondary-color) !important;
}

.swal2-popup .swal2-icon {
    border: none !important;
}

.swal2-popup .swal2-icon.swal2-success {
    color: var(--success-color) !important;
}

.swal2-popup .swal2-icon.swal2-error {
    color: var(--danger-color) !important;
}

.swal2-popup .swal2-icon.swal2-warning {
    color: var(--warning-color) !important;
}

.swal2-popup .swal2-icon.swal2-info {
    color: var(--info-color) !important;
}

.swal2-popup .swal2-icon.swal2-question {
    color: var(--primary-color) !important;
}

/* Custom button styles for SweetAlert2 */
.swal2-popup .btn {
    padding: 0.5rem 1rem !important;
    border-radius: 8px !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
    transition: all 0.2s ease !important;
}

.swal2-popup .btn:hover {
    transform: translateY(-1px) !important;
}

/* Toast positioning - Force small toast in bottom right */
.swal2-toast {
    position: fixed !important;
    top: auto !important;
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
    width: 350px !important;
    max-width: 350px !important;
    min-width: 300px !important;
    z-index: 9999 !important;
    margin: 0 !important;
    transform: none !important;
}

/* Ensure SweetAlert2 popups are above everything */
.swal2-container {
    z-index: 10000 !important;
}

/* Fix toast container positioning */
.swal2-toast-container {
    z-index: 9999 !important;
    position: fixed !important;
    top: auto !important;
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
}

/* Force toast to stay small and in corner */
.swal2-toast.swal2-show {
    position: fixed !important;
    top: auto !important;
    bottom: 20px !important;
    right: 20px !important;
    left: auto !important;
    width: 350px !important;
    max-width: 350px !important;
    z-index: 9999 !important;
    pointer-events: auto !important;
    transform: none !important;
    margin: 0 !important;
}

/* Override any conflicting styles */
.swal2-toast .swal2-title {
    font-size: 16px !important;
}

.swal2-toast .swal2-content {
    font-size: 14px !important;
}

/* Loading spinner customization */
.swal2-popup .swal2-loader {
    border-color: var(--primary-color) transparent var(--primary-color) transparent !important;
}

/* Progress bar customization */
.swal2-popup .swal2-timer-progress-bar {
    background: var(--primary-color) !important;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .topbar-left .sidebar-toggle {
        display: block !important;
    }
    
    .footer {
        left: 0;
    }
}

/* Collapsible Menu Styles */
.collapse-icon {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.nav-link[aria-expanded="true"] .collapse-icon {
    transform: rotate(180deg);
}

.sub-nav-link {
    padding: 8px 16px !important;
    font-size: 0.9rem;
    border-radius: var(--border-radius);
    margin: 2px 0;
    transition: all 0.3s ease;
}

.sub-nav-link:hover {
    background-color: rgba(99, 102, 241, 0.1);
    transform: translateX(5px);
}

.sub-nav-link.active {
    background-color: rgba(99, 102, 241, 0.15);
    color: var(--primary-color) !important;
    border-left: 3px solid var(--primary-color);
}

.sub-nav-link.active i {
    color: var(--primary-color) !important;
}

.sub-nav-link.active span {
    color: var(--primary-color) !important;
}

.sub-nav-link i {
    width: 20px;
    text-align: center;
    margin-right: 8px;
}

/* Collapsible animation */
.collapse {
    transition: height 0.35s ease;
}

.collapsing {
    transition: height 0.35s ease;
}
