/* =================================
   TEMEL STILLER
   ================================= */

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", -apple-system, "system-ui", "avenir next", avenir, "helvetica neue", helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif !important;
}

*, *::before, *::after {
    font-family: inherit;
}

app {
    display: block;
    height: 100%;
}

.header-logo {
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask: url('../images/Logo.svg');
    mask: url('../images/Logo.svg');
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    width: 28px;
    height: 24px;
}

#blazor-error-ui {
    background: inherit;
    bottom: 0;
    display: none;
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 100001;
}

/* =================================
   XAF RIBBON + TABBED MDI FIX
   ================================= */

.dxbl-tabs-content-panel {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    min-height: 0 !important;
    height: 100% !important;
    overflow: auto !important;
}

.dxbl-tabs-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 1 auto !important;
    height: 100% !important;
    min-height: 0 !important;
}

    .dxbl-tabs-content.dxbl-active {
        display: flex !important;
        flex-direction: column !important;
        flex: 1 1 auto !important;
        height: 100% !important;
        min-height: 0 !important;
    }

.dxbl-grid, .dxbl-listview {
    flex: 1 1 auto !important;
    min-height: 0 !important;
}

/* =================================
   AYARLAR PANELI FIX
   ================================= */

.dxbl-popup-content, .dxbl-dropdown-dialog, .dxbl-popup-body {
    background-color: #fff !important;
    opacity: 1 !important;
}

/* =============================================
   1. HEADER / RIBBON ALANI
   ============================================= */

/* Ust header bar - ince alt cizgi */
.dxbl-header-panel,
.xaf-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

    /* Sayfa basligi */
    .xaf-caption,
    .dxbl-header-panel .dxbl-text {
        font-weight: 600 !important;
        font-size: 16px !important;
        color: #1a1a1a !important;
        letter-spacing: -0.01em !important;
    }

    /* Kullanici ve ayarlar butonlari */
    .xaf-header .dxbl-btn,
    .dxbl-header-panel .dxbl-btn {
        border-radius: 8px !important;
        transition: background-color 0.2s ease !important;
    }

        .xaf-header .dxbl-btn:hover,
        .dxbl-header-panel .dxbl-btn:hover {
            background-color: rgba(0, 150, 120, 0.08) !important;
        }

/* Ribbon tab'lari (Home, View, Tools) */
.dxbl-ribbon-toolbar {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    background: #fafbfc !important;
}

    .dxbl-ribbon-toolbar .dxbl-tabs-item {
        font-weight: 500 !important;
        font-size: 13px !important;
        color: #555 !important;
        padding: 6px 16px !important;
        border-radius: 6px 6px 0 0 !important;
        transition: all 0.2s ease !important;
    }

        .dxbl-ribbon-toolbar .dxbl-tabs-item:hover {
            color: #009d80 !important;
            background: rgba(0, 150, 120, 0.06) !important;
        }

        .dxbl-ribbon-toolbar .dxbl-tabs-item.dxbl-active {
            color: #009d80 !important;
            font-weight: 600 !important;
            border-bottom: 2px solid #00b894 !important;
            background: #fff !important;
        }

    /* Ribbon toolbar butonlari (New, Delete vs.) */
    .dxbl-ribbon-toolbar .dxbl-toolbar-item {
        border-radius: 6px !important;
        transition: all 0.15s ease !important;
    }

        .dxbl-ribbon-toolbar .dxbl-toolbar-item:hover {
            background: rgba(0, 150, 120, 0.08) !important;
        }

/* =============================================
   2. SOL MENU (NAVIGASYON PANELI)
   ============================================= */

/* Sol panel arka plan */
.dxbl-nav-panel,
.xaf-nav-panel,
.dxbl-scroll-viewer-content > .dxbl-navigation {
    background: #f8fafb !important;
    border-right: 1px solid rgba(0, 0, 0, 0.06) !important;
}

/* Navigasyon gruplari (Hizli Islemler, Siparis Yonetimi vs.) */
.dxbl-accordion-item-header,
.xaf-nav-group-header {
    font-weight: 600 !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    color: #666 !important;
    padding: 10px 12px 6px !important;
}

/* Navigasyon linkleri */
.xaf-nav-item,
.dxbl-accordion-item-content .xaf-nav-item,
.dxbl-nav-item {
    border-radius: 6px !important;
    margin: 1px 6px !important;
    padding: 7px 12px !important;
    transition: all 0.15s ease !important;
    font-size: 13px !important;
    color: #444 !important;
}

    .xaf-nav-item:hover,
    .dxbl-nav-item:hover {
        background: rgba(0, 150, 120, 0.08) !important;
        color: #009d80 !important;
    }

    /* Aktif navigasyon itemi */
    .xaf-nav-item.dxbl-active,
    .dxbl-nav-item.dxbl-active,
    .xaf-nav-item.active {
        background: rgba(0, 184, 148, 0.12) !important;
        color: #009d80 !important;
        font-weight: 600 !important;
        border-left: 3px solid #00b894 !important;
    }

    /* Navigasyon ikonlari */
    .xaf-nav-item .dxbl-image,
    .dxbl-nav-item .dxbl-image {
        opacity: 0.7 !important;
        transition: opacity 0.15s ease !important;
    }

    .xaf-nav-item:hover .dxbl-image,
    .xaf-nav-item.dxbl-active .dxbl-image {
        opacity: 1 !important;
    }

/* Filtre arama kutusu */
.dxbl-nav-panel .dxbl-text-edit,
.xaf-nav-panel .dxbl-text-edit {
    border-radius: 8px !important;
    margin: 8px !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    background: #fff !important;
}

/* =============================================
   3. TAB SEKMELERI
   ============================================= */

/* Tab container */
.dxbl-tabs-panel,
.dxbl-tabs-list {
    background: #f8fafb !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
    padding: 0 4px !important;
}

    /* Her tab */
    .dxbl-tabs-panel .dxbl-tabs-item,
    .dxbl-tabs-list .dxbl-tabs-item {
        font-size: 12.5px !important;
        font-weight: 500 !important;
        color: #666 !important;
        padding: 8px 14px !important;
        border-radius: 6px 6px 0 0 !important;
        border: 1px solid transparent !important;
        border-bottom: none !important;
        margin-right: 2px !important;
        transition: all 0.15s ease !important;
        background: transparent !important;
    }

        /* Tab hover */
        .dxbl-tabs-panel .dxbl-tabs-item:hover,
        .dxbl-tabs-list .dxbl-tabs-item:hover {
            color: #009d80 !important;
            background: rgba(0, 150, 120, 0.05) !important;
        }

        /* Aktif tab */
        .dxbl-tabs-panel .dxbl-tabs-item.dxbl-active,
        .dxbl-tabs-list .dxbl-tabs-item.dxbl-active {
            color: #009d80 !important;
            font-weight: 600 !important;
            background: #fff !important;
            border-color: rgba(0, 0, 0, 0.08) !important;
            border-bottom: 2px solid #fff !important;
            box-shadow: 0 -2px 0 #00b894 inset !important;
            margin-bottom: -1px !important;
        }

/* Tab kapat butonu */
.dxbl-tabs-item .dxbl-tabs-item-close-btn {
    opacity: 0.4 !important;
    transition: opacity 0.15s ease !important;
    border-radius: 4px !important;
}

.dxbl-tabs-item:hover .dxbl-tabs-item-close-btn {
    opacity: 0.8 !important;
}

.dxbl-tabs-item .dxbl-tabs-item-close-btn:hover {
    opacity: 1 !important;
    background: rgba(220, 53, 69, 0.1) !important;
    color: #dc3545 !important;
}

/* =============================================
   4. GRID / TABLO GORUNUMU
   ============================================= */

/* Grid header */
.dxbl-grid-header-row th,
.dxbl-grid .dxbl-grid-header-cell {
    background: #f4f6f8 !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    color: #555 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.03em !important;
    border-bottom: 2px solid rgba(0, 150, 120, 0.15) !important;
    padding: 10px 12px !important;
    white-space: nowrap !important;
}

/* Grid satirlari - zebra */
.dxbl-grid-table tbody tr:nth-child(even),
.dxbl-grid .dxbl-grid-data-row:nth-child(even) {
    background: rgba(0, 150, 120, 0.02) !important;
}

.dxbl-grid-table tbody tr:nth-child(odd),
.dxbl-grid .dxbl-grid-data-row:nth-child(odd) {
    background: #fff !important;
}

/* Satir hover */
.dxbl-grid-table tbody tr:hover,
.dxbl-grid .dxbl-grid-data-row:hover {
    background: rgba(0, 184, 148, 0.08) !important;
    transition: background-color 0.15s ease !important;
}

/* Grid hucreleri */
.dxbl-grid-table td,
.dxbl-grid .dxbl-grid-data-cell {
    font-size: 13px !important;
    color: #333 !important;
    padding: 8px 12px !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04) !important;
}

/* Secili satir */
.dxbl-grid .dxbl-grid-data-row.dxbl-selected,
.dxbl-grid-table tbody tr.dxbl-selected {
    background: rgba(0, 184, 148, 0.15) !important;
    border-left: 3px solid #00b894 !important;
}

/* Grid footer / pager */
.dxbl-grid-footer,
.dxbl-grid .dxbl-pager {
    background: #f8fafb !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    font-size: 12px !important;
    color: #666 !important;
}

/* Pager aktif sayfa */
.dxbl-pager .dxbl-active,
.dxbl-pager .dxbl-btn-primary {
    background: #00b894 !important;
    color: #fff !important;
    border-radius: 6px !important;
    border: none !important;
}

/* "No data to display" mesaji */
.dxbl-grid-empty-data-area {
    color: #999 !important;
    font-style: italic !important;
    padding: 40px !important;
}

/* Grid filtre ikonlari */
.dxbl-grid-header-cell .dxbl-grid-filter-btn {
    opacity: 0.3 !important;
    transition: opacity 0.15s ease !important;
}

.dxbl-grid-header-cell:hover .dxbl-grid-filter-btn {
    opacity: 0.7 !important;
}

/* =============================================
   GENEL IYILESTIRMELER
   (Sadece XAF/DevExpress bileşenlerine uygulanır,
    .adiscope-site web sitesine SIZMAZ)
   ============================================= */

/* Tum butonlara yumusak gecis - sadece DevExpress */
.dxbl-btn {
    transition: all 0.15s ease !important;
    border-radius: 6px !important;
}

/* Primary buton rengi - Adiscope teal - sadece DevExpress */
.dxbl-btn-primary {
    background: #00b894 !important;
    border-color: #00b894 !important;
}

    .dxbl-btn-primary:hover {
        background: #009d80 !important;
        border-color: #009d80 !important;
    }

/* ═══ LINK RENKLERİ - SADECE XAF İÇİN ═══
   .adiscope-site kendi link stillerini kullanır,
   bu kurallar oraya sızmaz. */
.dxbl-grid a,
.dxbl-nav-item a,
.dxbl-accordion a,
.dxbl-header-panel a,
.xaf-header a,
.xaf-nav-item a,
.dxbl-popup-content a,
.dxbl-tabs-item a {
    color: #009d80 !important;
    text-decoration: none !important;
}

    .dxbl-grid a:hover,
    .dxbl-nav-item a:hover,
    .dxbl-accordion a:hover,
    .xaf-header a:hover,
    .xaf-nav-item a:hover {
        color: #00b894 !important;
        text-decoration: underline !important;
    }

/* Checkbox styling */
.dxbl-checkbox-checked .dxbl-checkbox-check-element {
    background-color: #00b894 !important;
    border-color: #00b894 !important;
}

/* Splitter / ayirici cizgiler */
.dxbl-splitter-bar {
    background: rgba(0, 0, 0, 0.04) !important;
    width: 4px !important;
}

    .dxbl-splitter-bar:hover {
        background: rgba(0, 150, 120, 0.15) !important;
    }

/* =================================
   SPLASH SCREEN
   ================================= */

.splash-screen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    background: linear-gradient(135deg, #667eea, #764ba2) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    flex-direction: column !important;
}

    .splash-screen img {
        max-width: 200px !important;
        max-height: 200px !important;
        animation: pulse 2s infinite !important;
    }

/* =================================
   LOADING ANIMATION
   ================================= */

.loading-animation, .dx-loading-indicator {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    100% {
        opacity: 0.6;
        transform: scale(1);
    }
}

/* =================================
   SCROLLBAR - Adiscope teal
   ================================= */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 150, 120, 0.25);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: rgba(0, 150, 120, 0.45);
    }

/* =================================
   MOBILE OPTIMIZASYONLARI
   ================================= */

@media (max-width: 768px) {
    .btn, .dx-button, .nav-link, .dropdown-toggle {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    .form-control, .dx-textbox, .dx-numberbox {
        padding: 12px !important;
        font-size: 16px !important;
    }
}

/* =================================
   PWA INSTALL BANNER
   ================================= */

.pwa-install-banner {
    position: fixed;
    top: env(safe-area-inset-top, 20px);
    right: 20px;
    z-index: 10000;
    background: #00b894;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 184, 148, 0.4);
    transition: all 0.3s ease;
    animation: slideInRight 0.5s ease;
    font-size: 14px;
}

    .pwa-install-banner:hover {
        background: #009d80;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 184, 148, 0.5);
    }

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* =================================
   FOCUS STILLERI - Sadece XAF için
   ================================= */

.dxbl-btn:focus,
.dxbl-text-edit:focus,
.dxbl-grid:focus {
    outline: 2px solid #00b894 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.15) !important;
}
