/* ==========================================================================
   🚗 WEBB2B - ENTERPRISE LIGHT THEME (KURUMSAL AÇIK TEMA)
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #f1f5f9;
    color: #1e293b;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.5;
}

a {
    color: #0284c7;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ==========================================
   LAYOUT (AÇIK TEMA)
   ========================================== */
.b2b-portal-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* TEK VE BİRLEŞİK ÜST HEADER */
.b2b-portal-header {
    background: #ffffff;
    border-bottom: 2px solid #0284c7;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.header-container {
    max-width: 1540px;
    margin: 0 auto;
    padding: 8px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.brand-box .brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.brand-icon {
    font-size: 22px;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}

.brand-titles {
    display: flex;
    flex-direction: column;
}

.brand-main {
    font-size: 17px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.brand-sub {
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}

.portal-nav-link {
    color: #475569;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.portal-nav-link:hover, .portal-nav-link.active {
    background: #0284c7;
    color: #ffffff;
    border-color: #0284c7;
    text-decoration: none;
}

/* KULLANICI PİLL & ÇIKIŞ */
.user-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    padding: 5px 12px;
    border-radius: 9999px;
    border: 1px solid #cbd5e1;
}

.role-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 7px;
    border-radius: 9999px;
    text-transform: uppercase;
}
.role-badge.musteri { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.role-badge.plasiyer { background: #fef3c7; color: #b45309; border: 1px solid #fde68a; }
.role-badge.yonetici { background: #f3e8ff; color: #7e22ce; border: 1px solid #e9d5ff; }

.user-name {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}

.btn-portal-logout {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-portal-logout:hover { background: #ef4444; color: #ffffff; }

.b2b-portal-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 12px 20px;
    color: #64748b;
    font-size: 12px;
    margin-top: auto;
}

.footer-container {
    max-width: 1540px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

/* ==========================================
   BUTTONS & FORMS (AÇIK TEMA)
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn:hover { text-decoration: none; opacity: 0.92; }
.btn-primary { background: #0284c7; color: #ffffff; border-color: #0284c7; }
.btn-success { background: #16a34a; color: #ffffff; border-color: #16a34a; }
.btn-warning { background: #f59e0b; color: #ffffff; border-color: #f59e0b; }
.btn-danger { background: #dc2626; color: #ffffff; border-color: #dc2626; }
.btn-secondary { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
.btn-outline-info { background: #f0f9ff; color: #0284c7; border-color: #bae6fd; }
.btn-outline-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.btn-outline-danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }

.form-control, .form-select-control {
    width: 100%;
    padding: 8px 12px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #0f172a;
    font-size: 13px;
    transition: border-color 0.15s;
}
.form-control:focus, .form-select-control:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.15);
}

/* ==========================================
   PLASİYER VE BAYİ KOMPAKT ÜST BARI (TEK SATIR)
   ========================================== */
.b2b-consolidated-bar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 20px;
}
.b2b-consolidated-inner {
    max-width: 1540px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.b2b-balance-pill {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    padding: 5px 12px;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    cursor: pointer;
}
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.dot.green { background: #16a34a; }
.dot.red { background: #dc2626; }

.b2b-cart-btn {
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.2);
    transition: background 0.15s;
    flex-shrink: 0;
}
.b2b-cart-btn:hover { background: #0369a1; }
.cart-icon { font-size: 18px; }
.cart-info { display: flex; flex-direction: column; text-align: left; }
.cart-count { font-size: 11px; opacity: 0.9; }
.cart-total { font-size: 13px; font-weight: 800; }

/* ==========================================
   KOMPAKT ARAMA & TECDOC ÇUBUĞU (EN TEPEDE)
   ========================================== */
.b2b-smart-search-box {
    max-width: 1540px;
    margin: 12px auto 0 auto;
    padding: 0 20px;
}
.search-card-wrapper {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.search-mode-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 8px;
}
.btn-search-tab {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
}
.btn-search-tab:hover { background: #f1f5f9; color: #0f172a; }
.btn-search-tab.active {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 800;
}

/* ==========================================
   ÜRÜN TABLOSU (AÇIK TEMA & YÜKSEK OKUNABİLİRLİK)
   ========================================== */
.b2b-storefront-content {
    max-width: 1540px;
    margin: 12px auto;
    padding: 0 20px;
}

.quick-table-container {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.quick-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.quick-table th {
    background: #f8fafc;
    color: #475569;
    font-size: 11px;
    font-weight: 800;
    padding: 9px 12px;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
    text-transform: uppercase;
    white-space: nowrap;
}
.quick-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #1e293b;
}
.quick-table tr:hover {
    background: #f8fafc;
}

.thumb-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.thumb-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: #0284c7;
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    padding: 1px 3px;
    border-radius: 2px;
}

.oem-badge {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
    font-size: 12px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    display: inline-block;
}
.brand-pill {
    background: #f1f5f9;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.stock-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
}
.stock-badge.green { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.stock-badge.red { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

.qty-selector {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    overflow: hidden;
}
.btn-qty {
    background: #f8fafc;
    border: none;
    color: #475569;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-weight: 800;
}
.btn-qty:hover { background: #e2e8f0; }
.qty-input {
    width: 38px;
    text-align: center;
    background: transparent;
    border: none;
    color: #0f172a;
    font-weight: 700;
    font-size: 12px;
}

/* KATALOG KARTLARI */
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.catalog-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.card-media-wrapper {
    height: 160px;
    background: #f8fafc;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e2e8f0;
}
.card-main-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card-body {
    padding: 12px 14px;
    flex: 1;
}
.card-title {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin: 6px 0;
    line-height: 1.3;
}
.card-footer {
    padding: 10px 14px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================
   SEPET VE MODALLAR (AÇIK TEMA)
   ========================================== */
.b2b-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    z-index: 1500;
}
.b2b-cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 440px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    border-left: 2px solid #0284c7;
    z-index: 1600;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
}
.drawer-header {
    padding: 14px 18px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.btn-close-drawer {
    background: transparent;
    border: none;
    color: #64748b;
    font-size: 24px;
    cursor: pointer;
}
.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 18px;
}
.cart-item-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.drawer-footer {
    padding: 16px 18px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
}

.b2b-custom-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 760px;
    max-width: 95vw;
    max-height: 90vh;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    z-index: 1600;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.modal-header-custom {
    padding: 14px 20px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-body-custom {
    padding: 20px;
}

/* ==========================================
   FEATURE TOGGLE KARTLARI (YÖNETİM PANELİ)
   ========================================== */
.feature-toggle-card {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    transition: all 0.15s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}
.feature-toggle-card.enabled {
    border-color: #0284c7;
    background: #f0f9ff;
}

.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd5e1;
    transition: .25s;
    border-radius: 24px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .25s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
input:checked + .slider {
    background-color: #16a34a;
}
input:checked + .slider:before {
    transform: translateX(20px);
}

/* GİRİŞ EKRANI (AÇIK TEMA) */
.b2b-login-wrapper {
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
    background: #f1f5f9;
}
.b2b-login-card-container {
    width: 100%;
    max-width: 920px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    display: grid;
    grid-template-columns: 1fr 1.1fr;
}
.b2b-login-banner-side {
    background: linear-gradient(135deg, #0284c7, #0369a1);
    padding: 36px 30px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.b2b-login-features {
    list-style: none;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.b2b-login-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #f0f9ff;
}
.b2b-login-form-side {
    padding: 36px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.login-tab-headers {
    display: flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 3px;
    gap: 4px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}
.login-tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #64748b;
    padding: 7px 8px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
}
.login-tab-btn.active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.demo-credentials-box {
    margin-top: 16px;
    padding: 10px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    font-size: 12px;
}
.demo-btn-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 6px;
}
.btn-demo-fill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
}
.btn-demo-fill:hover {
    border-color: #0284c7;
    color: #0284c7;
}