/* B2B Bayi Sistemi - Modern Tasarım */

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --text-muted: #6b7280;
    --white: #ffffff;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

/* Sayfa taşması ve kaymayı önle; zoom kaldırıldı – sayfa düzgün oturuyor */
html {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--light-color);
    line-height: 1.6;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Header ve Navbar */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    box-shadow: var(--shadow-lg);
    padding: 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white) !important;
    padding: 1rem 0;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 1rem 1.25rem !important;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--white) !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-nav .nav-link.active {
    color: var(--white) !important;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.1)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.hero-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn-hero {
    padding: 0.875rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

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

.btn-hero-primary:hover {
    background-color: transparent;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-hero-outline:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Özellikler Bölümü */
.features-section {
    padding: 80px 0;
    background-color: var(--white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
    text-align: center;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 4rem;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Video Bölümü */
.video-section {
    padding: 80px 0;
    background-color: var(--light-color);
}

.video-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

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

.video-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    background-color: var(--dark-color);
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Vitrin (Ürünlerimiz): resim tam görünsün, kırpılmasın */
.vitrin-urunler .video-card {
    height: auto !important;
    overflow: visible;
}
.vitrin-urunler .video-thumbnail {
    padding-bottom: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    background: #f5f5f5;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.vitrin-urunler .video-thumbnail img {
    position: static !important;
    top: auto !important;
    left: auto !important;
    width: 100% !important;
    height: auto !important;
    max-height: 200px;
    object-fit: contain !important;
    object-position: center;
    vertical-align: middle;
}
.vitrin-urunler .video-card .video-thumbnail {
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background-color: rgba(37, 99, 235, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.video-play-btn:hover {
    background-color: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 1.5rem;
}

.video-info h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.video-info p {
    color: var(--text-muted);
    margin-bottom: 0;
    font-size: 0.875rem;
}

/* Ürün Sorgulama */
.search-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--light-color) 0%, var(--white) 100%);
}

.search-card {
    background: var(--white);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.search-card h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
    text-align: center;
}

.search-card p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.form-control-lg {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    border-radius: 50px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.form-control-lg:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.btn-search {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: var(--white);
    transition: all 0.3s ease;
}

.btn-search:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

/* Footer */
.footer {
    background-color: var(--dark-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 20px;
}

.footer h5 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding-top: 1.5rem;
    text-align: center;
}

/* Login/Register Page */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 2rem 0;
}

.auth-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 450px;
    width: 100%;
}

.auth-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 2rem;
    text-align: center;
}

.auth-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-body {
    padding: 2.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

.btn-auth {
    width: 100%;
    padding: 0.875rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: var(--white);
    transition: all 0.3s ease;
}

.btn-auth:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.auth-footer {
    text-align: center;
    padding: 1.5rem 2.5rem;
    background-color: var(--light-color);
    border-top: 1px solid var(--border-color);
}

/* Dashboard */
.dashboard {
    min-height: 100vh;
    display: flex;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

/*
 * Muhasebe / depo / pazar yeri: .dashboard.d-flex ile yan yana düzen.
 * Global .sidebar { position: fixed } + .main-content { margin-left: 260px } admin için;
 * flex düzeninde sabit sidebar akış dışı kalınca sağ sütun içerik genişliğinde kalır (sağda boş alan).
 */
.dashboard.d-flex .sidebar {
    position: relative;
    left: auto;
    top: auto;
    height: auto;
    min-height: 100vh;
    flex-shrink: 0;
}
.dashboard.d-flex > .flex-grow-1 {
    min-width: 0;
    flex: 1 1 0%;
}
.dashboard.d-flex .main-content {
    margin-left: 0;
    width: 100%;
    max-width: 100%;
}

/* Muhasebe vb.: sağ kolon sidebar kadar uzun olsun; içerik az olsa bile ana alan arka planı kesilmesin */
.dashboard.d-flex > .d-flex.flex-column.flex-grow-1 {
    min-height: 100vh;
}
.dashboard.d-flex > .d-flex.flex-column.flex-grow-1 > main.main-content {
    flex: 1 1 auto;
    min-height: 0;
}

.sidebar {
    width: 260px;
    background: linear-gradient(135deg, var(--dark-color) 0%, #111827 100%);
    color: var(--white);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

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

.sidebar-menu-item {
    padding: 0.875rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.sidebar-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.sidebar-menu-item.active {
    background-color: var(--primary-color);
    color: var(--white);
    border-left: 4px solid var(--white);
}

.sidebar-menu-item i {
    margin-right: 0.75rem;
    font-size: 1.125rem;
}

/* Sidebar submenu (Stok Takibi > Depo Yönetimi) */
.sidebar-menu-group {
    position: relative;
}
.sidebar-menu-toggle {
    cursor: pointer;
}
.sidebar-menu-toggle .sidebar-menu-chevron {
    margin-right: 0;
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}
.sidebar-menu-group.open .sidebar-menu-chevron {
    transform: rotate(180deg);
}
.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.sidebar-menu-group.open .sidebar-submenu {
    max-height: 200px;
}
.sidebar-submenu-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.5rem 0.6rem 2.5rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}
.sidebar-submenu-item i {
    margin-right: 0.6rem;
    font-size: 1rem;
}
.sidebar-submenu-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--white);
}
.sidebar-submenu-item.active {
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border-left-color: var(--primary-color);
}

.main-content {
    margin-left: 260px;
    flex: 1 1 0;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    background-color: var(--light-color);
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.top-navbar {
    background-color: var(--white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--text-color);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--danger-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
}

.content-wrapper {
    padding: 2rem;
    flex: 1;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Dashboard Cards */
.dashboard-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

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

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.stat-icon {
    font-size: 2.5rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
}

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

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

.table {
    margin-bottom: 0;
}

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

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-color);
}

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

/* Badges */
.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    font-size: 0.75rem;
}

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

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

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

.badge-info {
    background-color: var(--info-color);
    color: var(--white);
}

.badge-secondary {
    background-color: var(--text-muted);
    color: var(--white);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    color: var(--white);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

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

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

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

/* Responsive */
@media (max-width: 768px) {
    .sidebar-mobile-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 999;
        -webkit-tap-highlight-color: transparent;
    }
    .sidebar-mobile-backdrop.show {
        display: block;
    }

    .sidebar {
        width: 0;
        transform: translateX(-100%);
        transition: transform 0.25s ease, width 0.25s ease;
    }
    
    .sidebar.active {
        width: 260px;
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
        z-index: 1000;
    }

    /* Depo / pazar yeri vb.: flex satırında relative sidebar mobilde yer kaplamasın; overlay olarak açılsın */
    .dashboard.d-flex .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
    }

    /* Teknik servis: .ts-sidebar ayrı sınıf; mobilde aynı drawer davranışı */
    .ts-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 1000;
        width: 0;
        max-width: none;
        padding: 0 !important;
        overflow: hidden;
        transform: translateX(-100%);
        transition: transform 0.25s ease, width 0.25s ease, padding 0.25s ease;
    }
    .ts-sidebar.active {
        width: 260px;
        max-width: min(260px, 88vw);
        padding: 1rem !important;
        overflow-y: auto;
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        flex: 1 1 auto;
    }
    
    .content-wrapper {
        padding: 1rem;
        width: 100%;
    }
    
    .top-navbar {
        flex-wrap: wrap;
        padding: 0.75rem 1rem;
    }
    
    .page-title {
        font-size: 1.25rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

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

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

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-light {
    background-color: var(--light-color) !important;
}

.shadow {
    box-shadow: var(--shadow) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}
