/**
 * B2B Bayi Yönetim Sistemi - Bayi Panel Stil Dosyası
 * Flat Design - Kurumsal Tasarım
 */

/* =============================================
   CSS DEĞİŞKENLERİ
============================================= */
:root {
    --primary-dark: #1a202c;
    --primary-blue: #3182ce;
    --primary-blue-hover: #2c5282;
    --light-gray: #f7fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #718096;
    --text-dark: #2d3748;
    --text-light: #a0aec0;
    --white: #ffffff;
    --success: #38a169;
    --warning: #d69e2e;
    --danger: #e53e3e;
    --sidebar-width: 250px;
    --header-height: 60px;
}

/* =============================================
   RESET & BASE
============================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-dark);
    background-color: var(--light-gray);
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* =============================================
   LAYOUT - ANA YAPI
============================================= */
.wrapper {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

/* =============================================
   SIDEBAR - SOL MENÜ
============================================= */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--primary-dark);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
}

.sidebar-header span {
    font-size: 12px;
    color: var(--text-light);
}

.sidebar-menu {
    padding: 15px 0;
}

.menu-label {
    padding: 10px 20px 5px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-light);
    letter-spacing: 1px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--medium-gray);
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    min-height: 44px; /* Touch target minimum */
}

.menu-item:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--white);
    border-left-color: var(--primary-blue);
}

.menu-item.active {
    background-color: rgba(49, 130, 206, 0.15);
    color: var(--white);
    border-left-color: var(--primary-blue);
}

.menu-item svg {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    vertical-align: middle;
}

.menu-item span {
    vertical-align: middle;
}

/* =============================================
   MAIN CONTENT - ANA İÇERİK
============================================= */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    overflow-x: hidden;
    max-width: calc(100% - var(--sidebar-width));
    width: calc(100% - var(--sidebar-width));
}

/* =============================================
   HEADER - ÜST BAR
============================================= */
.header {
    height: var(--header-height);
    background-color: var(--white);
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-dark);
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background-color: var(--primary-blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-details {
    text-align: right;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-dark);
}

.user-role {
    font-size: 12px;
    color: var(--dark-gray);
}

/* =============================================
   CONTENT AREA - İÇERİK ALANI
============================================= */
.content {
    padding: 25px;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* =============================================
   GLOBAL STOCK ALERT - DÜŞÜK STOK UYARISI
============================================= */
.global-stock-alert {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    border-left: 4px solid #e53e3e;
    padding: 12px 20px;
    position: relative;
    box-sizing: border-box;
    width: 100%;
}

/* Desktop: Normal görünüm */
.stock-alert-header-mobile {
    display: none;
}

.stock-alert-btn-inline {
    display: none;
}

.stock-alert-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stock-alert-icon {
    color: #c53030;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.stock-alert-text {
    flex: 1;
    min-width: 0;
}

.stock-alert-text strong {
    display: block;
    color: #742a2a;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 2px;
}

.stock-alert-text span {
    color: #9b2c2c;
    font-size: 12px;
    line-height: 1.4;
    display: block;
}

.stock-alert-btn {
    background: #c53030;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.stock-alert-btn:hover {
    background: #9b2c2c;
    color: white;
}

.stock-alert-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #9b2c2c;
    cursor: pointer;
    padding: 0 6px;
    line-height: 1;
    flex-shrink: 0;
}

/* =============================================
   CARDS - KARTLAR
============================================= */
.card {
    background-color: var(--white);
    border: 1px solid var(--medium-gray);
    margin-bottom: 20px;
    max-width: 100%;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.card-body {
    padding: 20px;
}

/* =============================================
   STAT CARDS - İSTATİSTİK KARTLARI
============================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background-color: var(--white);
    border: 1px solid var(--medium-gray);
    padding: 20px;
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 24px;
    height: 24px;
}

.stat-icon.blue { color: var(--primary-blue); }
.stat-icon.green { color: var(--success); }
.stat-icon.orange { color: var(--warning); }
.stat-icon.red { color: var(--danger); }

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-label {
    font-size: 13px;
    color: var(--dark-gray);
    margin-top: 5px;
}


/* =============================================
   TABLES - TABLOLAR
============================================= */
.table-container {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    max-width: 100%;
}

table thead {
    background-color: var(--light-gray);
}

table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--medium-gray);
    white-space: nowrap;
}

table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--medium-gray);
    color: var(--text-dark);
}

table tbody tr:hover {
    background-color: var(--light-gray);
}

table tbody tr:last-child td {
    border-bottom: none;
}

/* =============================================
   FORMS - FORMLAR
============================================= */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-dark);
    background-color: var(--white);
    border: 1px solid var(--medium-gray);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    min-height: 44px; /* Touch target minimum */
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.15);
}

.form-control::placeholder {
    color: var(--text-light);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Touch target minimum for textarea on mobile */
@media (max-width: 768px) {
    textarea.form-control {
        min-height: 44px; /* Touch target minimum */
    }
}

/* Checkbox and Radio Button Touch Targets */
input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
}

/* Touch-friendly checkbox/radio wrapper */
label:has(input[type="checkbox"]),
label:has(input[type="radio"]) {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px; /* Touch target minimum */
    cursor: pointer;
    padding: 8px 0;
}

select.form-control {
    cursor: pointer;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-hint {
    font-size: 12px;
    color: var(--dark-gray);
    margin-top: 5px;
}

/* =============================================
   BUTTONS - BUTONLAR
============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px; /* Touch target minimum */
    min-width: 44px; /* Touch target minimum */
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-blue-hover);
}

.btn-secondary {
    background-color: var(--medium-gray);
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: var(--dark-gray);
    color: var(--white);
}

.btn-success {
    background-color: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background-color: #2f855a;
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #c53030;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
    min-height: 44px; /* Touch target minimum */
    min-width: 44px; /* Touch target minimum */
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

/* =============================================
   BADGES - ETİKETLER
============================================= */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
    font-weight: 600;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
    font-weight: 600;
}

.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
    font-weight: 600;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
    font-weight: 600;
}

/* =============================================
   ALERTS - UYARILAR
============================================= */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(56, 161, 105, 0.1);
    border-color: var(--success);
    color: var(--success);
}

.alert-warning {
    background-color: rgba(214, 158, 46, 0.1);
    border-color: var(--warning);
    color: #b7791f;
}

.alert-danger {
    background-color: rgba(229, 62, 62, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

.alert-info {
    background-color: rgba(49, 130, 206, 0.1);
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

/* =============================================
   PAGINATION - SAYFALAMA
============================================= */
.pagination {
    display: flex;
    gap: 5px;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border: 1px solid var(--medium-gray);
    color: var(--text-dark);
    font-size: 14px;
}

.pagination a:hover {
    background-color: var(--light-gray);
}

.pagination .active {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

/* =============================================
   MODAL - POPUP
============================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    transition: background-color 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal {
    background-color: var(--white);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--dark-gray);
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--medium-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* =============================================
   LOGIN PAGE - GİRİŞ SAYFASI
============================================= */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light-gray);
}

.login-box {
    background-color: var(--white);
    border: 1px solid var(--medium-gray);
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 24px;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--dark-gray);
    font-size: 14px;
}

/* =============================================
   UTILITIES - YARDIMCI SINIFLAR
============================================= */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--dark-gray); }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-10 { gap: 10px; }

/* Alert flex layout */
.alert-flex {
    display: flex;
    align-items: center;
    gap: 15px;
}

.alert-link {
    color: #742a2a;
    font-weight: 600;
}

.text-small {
    font-size: 12px;
}

.text-tiny {
    display: block;
    font-size: 10px;
}

.text-small {
    font-size: 13px;
}

.margin-0 {
    margin: 0;
}

.margin-bottom-5 {
    margin-bottom: 5px;
}

/* Order status banner */
.order-status-banner {
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Info box */
.info-box {
    padding: 15px;
    background: #f7fafc;
    border-left: 3px solid #3182ce;
}

.empty-state {
    padding: 40px 0;
}

/* Table column widths */
.table-col-150 {
    width: 150px;
}

.table-col-130 {
    width: 130px;
}

.table-col-120 {
    width: 120px;
}

.table-col-180 {
    width: 180px;
}

/* =============================================
   RESPONSIVE - MOBİL UYUM (TAM UYUMLU)
============================================= */

/* Tablet */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Tablet ve Mobil */
@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }
    
    /* Sidebar mobil */
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Sidebar açıkken overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
    
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
    }
    
    /* Header mobil */
    .header {
        padding: 0 15px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .header-left {
        gap: 10px;
    }
    
    .page-title {
        font-size: 16px;
        max-width: 150px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .header-right .user-details {
        display: none;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    /* Content mobil */
    .content {
        padding: 15px;
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
        overflow-x: hidden;
        position: relative;
    }
    
    /* Global stock alert mobil - Kompakt & Şık */
    .global-stock-alert {
        margin: 0 !important;
        padding: 0 !important;
        border-left: none !important;
        border-radius: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
        margin-left: calc(-1 * (100vw - 100%) / 2) !important;
        box-sizing: border-box !important;
        background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%) !important;
        box-shadow: 0 2px 8px rgba(238, 90, 111, 0.3) !important;
        overflow: hidden !important;
    }
    
    /* Desktop içeriği tamamen gizle */
    .global-stock-alert .stock-alert-content,
    .global-stock-alert .stock-alert-icon,
    .global-stock-alert .stock-alert-text,
    .global-stock-alert .stock-alert-btn,
    .global-stock-alert .stock-alert-close,
    .global-stock-alert button {
        display: none !important;
    }
    
    /* Mobil header göster */
    .stock-alert-header-mobile {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 12px !important;
        padding: 10px 15px !important;
        position: relative !important;
        background: transparent !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .stock-alert-header-mobile strong {
        flex: 1 !important;
        font-size: 13px !important;
        color: #fff !important;
        line-height: 1.3 !important;
        font-weight: 600 !important;
        letter-spacing: 0.2px !important;
    }
    
    /* Inline buton göster */
    .stock-alert-btn-inline {
        display: block !important;
        background: rgba(255, 255, 255, 0.95) !important;
        color: #ee5a6f !important;
        padding: 6px 14px !important;
        border-radius: 6px !important;
        font-size: 13px !important;
        font-weight: 700 !important;
        text-decoration: none !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
        transition: all 0.2s ease !important;
    }
    
    .stock-alert-btn-inline:active {
        transform: scale(0.96) !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
    }
    
    .stock-alert-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        position: relative !important;
        padding-right: 30px !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .stock-alert-icon {
        width: 18px !important;
        height: 18px !important;
        flex-shrink: 0 !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
    }
    
    .stock-alert-text {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 26px !important;
        padding-right: 0 !important;
        box-sizing: border-box !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .stock-alert-text strong {
        font-size: 13px !important;
        margin-bottom: 4px !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        display: block !important;
        max-width: 100% !important;
    }
    
    .stock-alert-text span {
        font-size: 11px !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        display: block !important;
        max-width: 100% !important;
    }
    
    .stock-alert-btn {
        width: 100% !important;
        max-width: 100% !important;
        text-align: center !important;
        padding: 10px 14px !important;
        font-size: 13px !important;
        min-height: 40px !important;
        box-sizing: border-box !important;
        display: block !important;
        margin: 0 !important;
    }
    
    .stock-alert-close {
        position: absolute !important;
        top: 8px !important;
        right: 8px !important;
        font-size: 18px !important;
        padding: 2px !important;
        width: 24px !important;
        height: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        flex-shrink: 0 !important;
        background: none !important;
        border: none !important;
        cursor: pointer !important;
    }
    
    /* Stats mobil */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .stat-label {
        font-size: 12px;
    }
    
    /* Card mobil */
    .card-header {
        padding: 12px 15px;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    /* Table mobil - yatay scroll */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    table {
        font-size: 13px;
        min-width: 600px;
    }
    
    table th,
    table td {
        padding: 10px 12px;
    }
    
    /* Form mobil */
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-control {
        font-size: 16px; /* iOS zoom engelleme */
        padding: 12px;
    }
    
    /* Button mobil */
    .btn {
        padding: 12px 16px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
    }
    
    .btn-sm {
        padding: 8px 12px;
        width: auto;
    }
    
    /* Modal mobil */
    .modal-overlay {
        align-items: flex-end !important;
        padding: 0 !important;
        background: rgba(0,0,0,0.5) !important;
    }
    
    .modal {
        max-width: 100% !important;
        max-height: 90vh !important;
        border-radius: 16px 16px 0 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    
    .modal-header {
        padding: 15px !important;
        position: sticky !important;
        top: 0 !important;
        background: var(--white) !important;
        z-index: 10 !important;
        border-bottom: 1px solid var(--medium-gray) !important;
        flex-shrink: 0 !important;
    }
    
    .modal-body {
        padding: 15px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        flex: 1 !important;
        min-height: 0 !important;
    }
    
    .modal-footer {
        padding: 15px !important;
        flex-direction: column !important;
        position: sticky !important;
        bottom: 0 !important;
        background: var(--white) !important;
        border-top: 1px solid var(--medium-gray) !important;
        flex-shrink: 0 !important;
        gap: 10px !important;
    }
    
    .modal-footer .btn {
        width: 100% !important;
        margin: 0 !important;
    }
    
    /* Alert mobil */
    .alert {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    /* Pagination mobil */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 13px;
    }
    
    /* Dropdown mobil */
    .user-dropdown-menu {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        margin-top: 0;
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .dropdown-item {
        padding: 16px 20px;
        font-size: 16px;
    }
    
    /* Notification dropdown mobil */
    .notification-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 16px 16px 0 0;
        max-height: 70vh;
    }
    
    /* Profil mobil */
    .profil-container {
        max-width: 100%;
    }
    
    .profil-info {
        flex-direction: column;
        text-align: center;
    }
    
    .profil-avatar {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
    
    .profil-form {
        max-width: 100%;
    }
}

/* Küçük mobil */
@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        display: flex;
        align-items: center;
        gap: 15px;
    }
    
    .stat-card-header {
        margin-bottom: 0;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        background: var(--light-gray);
        border-radius: 8px;
    }
    
    .page-title {
        font-size: 15px;
        max-width: 120px;
    }
    
    /* Login mobil */
    .login-box {
        padding: 25px 20px;
        margin: 15px;
        border: none;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    /* Card header actions */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .card-header .btn {
        width: 100%;
        margin-top: 10px;
    }
}

/* Safe area (iPhone X ve sonrası) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .sidebar {
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .modal {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Touch cihazlar için hover efektlerini kaldır */
@media (hover: none) {
    .menu-item:hover {
        background-color: transparent;
        color: var(--medium-gray);
        border-left-color: transparent;
    }
    
    .menu-item.active:hover {
        background-color: rgba(49, 130, 206, 0.15);
        color: var(--white);
        border-left-color: var(--primary-blue);
    }
    
    .product-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn:hover {
        opacity: 1;
    }
    
    /* Active state for touch */
    .btn:active {
        opacity: 0.8;
        transform: scale(0.98);
    }
    
    .menu-item:active {
        background-color: rgba(255,255,255,0.1);
    }
    
    .product-card:active {
        transform: scale(0.98);
    }
}


/* =============================================
   NOTIFICATIONS - BİLDİRİMLER
============================================= */
.notification-wrapper {
    position: relative;
}

.notification-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    position: relative;
    color: var(--text-dark);
    transition: color 0.2s;
}

.notification-btn:hover {
    color: var(--primary-blue);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: var(--danger);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    min-width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background-color: var(--white);
    border: 1px solid var(--medium-gray);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
    margin-top: 10px;
}

.notification-dropdown.active {
    display: block;
}

.notification-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--light-gray);
}

.notification-header strong {
    font-size: 14px;
    color: var(--text-dark);
}

.notification-count {
    font-size: 12px;
    color: var(--dark-gray);
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid var(--medium-gray);
    transition: background-color 0.2s;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background-color: var(--light-gray);
}

.notification-item.critical {
    background-color: rgba(229, 62, 62, 0.05);
    border-left: 3px solid var(--danger);
}

.notification-item.warning {
    background-color: rgba(214, 158, 46, 0.05);
    border-left: 3px solid var(--warning);
}

.notification-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(229, 62, 62, 0.1);
    color: var(--danger);
}

.notification-item.warning .notification-icon {
    background-color: rgba(214, 158, 46, 0.1);
    color: var(--warning);
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-dark);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-text {
    font-size: 12px;
    color: var(--dark-gray);
}

.notification-text .badge {
    margin-left: 5px;
    padding: 2px 6px;
    font-size: 10px;
}

.notification-footer {
    padding: 10px 15px;
    border-top: 1px solid var(--medium-gray);
    text-align: center;
    background-color: var(--light-gray);
}

.notification-footer a {
    font-size: 13px;
    color: var(--primary-blue);
    font-weight: 500;
}

.notification-footer a:hover {
    text-decoration: underline;
}

/* =============================================
   MENU BADGE - MENÜ BİLDİRİM SAYISI
============================================= */
.menu-badge {
    background-color: var(--danger);
    color: var(--white);
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
}


/* =============================================
   USER DROPDOWN - KULLANICI MENÜSÜ
============================================= */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    transition: opacity 0.2s;
}

.user-dropdown-toggle:hover {
    opacity: 0.8;
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    background-color: var(--white);
    border: 1px solid var(--medium-gray);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
    margin-top: 5px;
}

.user-dropdown-menu.active {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-dark);
    font-size: 14px;
    border: none;
    background: var(--white);
    width: 100%;
    cursor: pointer;
    transition: background-color 0.2s;
    text-align: left;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: currentColor;
}

.dropdown-logout {
    border-top: 1px solid var(--medium-gray);
    color: var(--danger);
}

.dropdown-form {
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .user-dropdown-menu {
        right: -10px;
    }
}

/* =============================================
   PROFIL SAYFASI
============================================= */
.profil-container {
    max-width: 600px;
}

.profil-info {
    display: flex;
    align-items: center;
    gap: 20px;
}

.profil-avatar {
    width: 80px;
    height: 80px;
    background-color: var(--primary-blue);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 32px;
}

.profil-detay h2 {
    font-size: 20px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.profil-detay p {
    color: var(--dark-gray);
    margin-bottom: 5px;
}

.profil-detay small {
    color: var(--text-light);
    font-size: 12px;
}

.profil-form {
    max-width: 400px;
}

.profil-form .form-group {
    margin-bottom: 15px;
}

.profil-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-dark);
    font-size: 14px;
}

.profil-form .form-text {
    font-size: 12px;
    color: var(--dark-gray);
    margin-top: 4px;
}

.card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

/* Profil mobil ek stiller */
@media (max-width: 768px) {
    .profil-detay h2 {
        font-size: 18px;
    }
    
    .profil-detay p {
        font-size: 14px;
    }
}


/* =============================================
   EK MOBİL DÜZELTMELER
============================================= */

/* Dashboard - Hızlı İşlemler ve Son Siparişler */
@media (max-width: 768px) {
    .stats-grid[style*="1fr 2fr"],
    .stats-grid[style*="repeat(3"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Announcement box mobil */
    .announcement-box {
        flex-direction: column;
        padding: 15px;
    }
    
    .announcement-icon {
        align-self: flex-start;
    }
    
    .announcement-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    /* Filtre form mobil */
    .d-flex.gap-10.align-center.mb-20 {
        flex-direction: column;
        align-items: stretch;
    }
    
    .d-flex.gap-10.align-center.mb-20 select,
    .d-flex.gap-10.align-center.mb-20 .btn {
        width: 100%;
    }
    
    /* Stok takip input'ları */
    .table-container input[style*="width:120px"],
    .table-container input[style*="width: 120px"] {
        width: 100% !important;
        min-width: 80px;
    }
    
    /* Order status banner */
    .order-status-banner {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    /* Sipariş detay grid */
    .stats-grid[style*="repeat(3"] {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    /* Card header butonları */
    .card-header .btn {
        width: auto !important;
        flex-shrink: 0;
    }
    
    /* Sipariş özet sticky düzeltme */
    .siparis-ozet-card {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: none;
    }
    
    /* Sipariş formu için alt padding */
    #siparisForm {
        padding-bottom: 180px;
    }
    
    /* Genel toplam box mobil */
    .genel-toplam-box {
        text-align: center;
        width: 100%;
    }
    
    .toplam-tutar {
        font-size: 24px;
    }
    
    /* Ödeme seçenekleri mobil */
    .odeme-icerik {
        padding: 15px;
    }
    
    .odeme-icon {
        width: 40px;
        height: 40px;
    }
    
    .odeme-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .odeme-bilgi strong {
        font-size: 14px;
    }
    
    .odeme-badge {
        font-size: 9px;
        padding: 3px 8px;
    }
    
    /* Tablo hücreleri mobil */
    .fiyat-hucre {
        min-width: 100px;
    }
    
    .miktar-input-wrapper {
        min-width: 100px;
    }
    
    /* Satır toplam mobil */
    .satir-toplam {
        font-size: 13px;
        white-space: nowrap;
    }
    
    /* Birim badge mobil */
    .birim-badge {
        display: block;
        margin-left: 0;
        margin-top: 4px;
    }
    
    /* Öneri kartları mobil */
    .suggestions-list .suggestion-card {
        padding: 15px;
    }
    
    .suggestion-body {
        font-size: 13px;
    }
    
    /* Kahve önerileri mobil */
    .recommendation-body {
        padding: 15px;
    }
    
    .coffee-name {
        font-size: 16px;
    }
    
    .price-value {
        font-size: 20px;
    }
    
    /* Avantaj kartları mobil */
    .advantage-card {
        flex-direction: column;
        text-align: center;
        padding: 20px 15px;
    }
    
    .advantage-icon {
        margin: 0 auto;
    }
}

/* Küçük mobil ek düzeltmeler */
@media (max-width: 480px) {
    /* Sipariş tablosu daha kompakt */
    #urunTablosu th,
    #urunTablosu td {
        padding: 8px 6px;
        font-size: 12px;
    }
    
    #urunTablosu th:first-child,
    #urunTablosu td:first-child {
        min-width: 120px;
    }
    
    .miktar-input {
        padding: 8px !important;
        padding-right: 35px !important;
        font-size: 14px !important;
    }
    
    .miktar-birim {
        font-size: 10px;
        right: 6px;
    }
    
    /* Fiyat gösterimi kompakt */
    .eski-fiyat {
        font-size: 11px;
    }
    
    .yeni-fiyat {
        font-size: 14px;
    }
    
    .indirim-badge {
        font-size: 9px;
        padding: 1px 4px;
    }
    
    /* Genel toplam daha küçük */
    .genel-toplam {
        font-size: 18px;
    }
    
    .toplam-tutar {
        font-size: 20px;
    }
    
    /* Özet bilgiler */
    .ozet-sol {
        flex-direction: column;
        gap: 10px;
    }
    
    .ozet-label {
        font-size: 11px;
    }
    
    .ozet-deger {
        font-size: 14px;
    }
    
    /* Sipariş form padding */
    #siparisForm {
        padding-bottom: 200px;
    }
}

/* Landscape mobil */
@media (max-width: 768px) and (orientation: landscape) {
    .siparis-ozet-card {
        position: relative;
    }
    
    #siparisForm {
        padding-bottom: 20px;
    }
    
    .modal {
        max-height: 95vh;
    }
}

/* =============================================
   UTILITY CLASSES - SAYFA STİLLERİ
============================================= */

/* Order Status Banner */
.order-status-banner {
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* HR Light */
.hr-light {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin: 10px 0;
}

/* SVG Margin Bottom */
.svg-margin-bottom {
    margin-bottom: 15px;
}

/* Text Small Muted */
.text-small-muted {
    margin: 0;
}

/* Mobil Responsive */
@media (max-width: 768px) {
    .order-status-banner {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }
}

/* =============================================
   ONAY MODAL (Confirm Modal)
============================================= */
.confirm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.confirm-modal-overlay.active {
    display: flex;
    opacity: 1;
}

.confirm-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.confirm-modal-overlay.active .confirm-modal {
    transform: scale(1);
}

.confirm-modal-header {
    padding: 20px 24px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.confirm-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.confirm-modal-icon.warning {
    background: #fef3c7;
    color: #d97706;
}

.confirm-modal-icon.danger {
    background: #fee2e2;
    color: #dc2626;
}

.confirm-modal-icon svg {
    width: 24px;
    height: 24px;
}

.confirm-modal-title {
    flex: 1;
}

.confirm-modal-title h3 {
    margin: 0 0 4px 0;
    font-size: 18px;
    color: #1a202c;
    font-weight: 600;
}

.confirm-modal-title p {
    margin: 0;
    font-size: 13px;
    color: #718096;
}

.confirm-modal-body {
    padding: 24px;
}

.confirm-modal-message {
    font-size: 15px;
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
}

.confirm-modal-footer {
    padding: 16px 24px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.confirm-modal-footer .btn {
    min-width: 100px;
}

/* Mobil Responsive */
@media (max-width: 768px) {
    .confirm-modal {
        max-width: 100%;
        width: 100%;
        margin: 20px;
        border-radius: 16px;
    }
    
    .confirm-modal-header {
        padding: 16px 20px;
    }
    
    .confirm-modal-icon {
        width: 44px;
        height: 44px;
    }
    
    .confirm-modal-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .confirm-modal-title h3 {
        font-size: 16px;
    }
    
    .confirm-modal-body {
        padding: 20px;
    }
    
    .confirm-modal-message {
        font-size: 14px;
    }
    
    .confirm-modal-footer {
        padding: 16px 20px;
        flex-direction: column-reverse;
    }
    
    .confirm-modal-footer .btn {
        width: 100%;
        min-width: 0;
    }
}
