/* Component Styles */

/* Navbar - Tabler Sticky Style */
.navbar {
    background: #ffffff !important;
    border-bottom: 1px solid #e6e9ef !important;
    position: sticky !important;
    top: 0;
    z-index: 1040;
    padding: 1rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 3rem;
}

.nav-header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-shrink: 0;
    min-width: 0;
}

.nav-header-left h5 {
    margin: 0;
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.nav-header-left p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
    white-space: nowrap;
    font-weight: 400;
}

.nav-header-center {
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: center;
}

.nav-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    min-width: 0;
}

.nav-filters {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-left {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.nav-center {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Navbar specific styles */
.nav-separator {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    display: inline-block;
    margin: 0 0.5rem;
    align-self: center;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
    font-size: 0.875rem;
    color: #1e293b;
    font-weight: 500;
}

.chip .label {
    font-weight: 600;
    color: #64748b;
}

.chip .val {
    font-weight: 700;
    color: #1e293b;
}

/* Form elements in navbar */
.nav-input {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.375rem 0.75rem;
    background: #ffffff;
    font-size: 0.875rem;
    min-height: 38px;
    transition: border-color 0.2s ease;
}

.nav-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
    color: #374151;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.select-with-file {
    position: relative;
    display: flex;
    flex-direction: column;
}

.select-with-file > i.ti {
    position: absolute;
    top: 50%;
    right: 0.75rem;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 0.875rem;
    pointer-events: none;
}

/* Buttons - Tabler Style */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    min-height: 2.5rem;
}

.btn-primary {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

.btn-danger {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.btn-stacked {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    align-self: flex-start;
    vertical-align: top;
}

.btn-danger-custom {
    background: white;
    border: 1px solid #d63939;
    color: #d63939;
    border-radius: 8px !important;
}

.btn-danger-custom:hover {
    background: #d63939;
    color: white;
}

.btn-gray-custom {
    background: white;
    border: 1px solid #6b7280;
    color: #6b7280;
    border-radius: 8px !important;
}

.btn-gray-custom:hover {
    background: #6b7280;
    color: white;
}

/* Search */
.search-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.search-container label {
    margin: 0;
    font-weight: 500;
    color: #1e293b;
    font-size: 0.875rem;
}

.search-input {
    width: 370px;
    height: 2.5rem;
    font-size: 0.875rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    background: #ffffff;
    transition: all 0.15s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

.table-full-width {
    min-width: 100%;
}

.table-no-padding {
    padding: 0px !important;
}

/* Modal */
.modal-overlay {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
}

/* Chips */
.chip {
    background: #ffffff;
    color: #334155;
    border: 1px solid #e6e9ef;
    border-radius: 8px;
    height: 34px;
    padding: 0.375rem 0.625rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

/* Responsive - Tabler Style */
@media (max-width: 1200px) {
    .navbar-container {
        gap: 1rem;
    }
    
    .nav-header-left {
        gap: 1rem;
    }
    
    .search-input {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.5rem 1rem;
    }
    
    .navbar-container {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }
    
    .nav-header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .nav-header-right {
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .search-input {
        width: 100%;
        max-width: none;
    }
    
    .nav-filters {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 0.5rem;
    }
    
    .nav-header-left h5 {
        font-size: 1.125rem;
    }
    
    .btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Responsive Sidebar */
@media (max-width: 768px) {
    .sidenav {
        transform: translateX(0);
        transition: transform 0.3s ease;
    }
    
    .sidenav.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 280px;
    }
}

/* Products Page Specific */

.card { 
    border:none; 
    border-radius:12px; 
}

.card-header { 
    border:none; 
    padding:1rem 1.25rem; 
}

.card-body {
    padding: 0px !important;
}

.form-label { 
    color:#334155; 
    font-weight:600; 
}

.form-control, .form-select { 
    border-color:#e2e8f0; 
    border-radius:10px; 
}

.form-control:focus, .form-select:focus { 
    box-shadow:none; 
    border-color:#9ca3af; 
}

.table thead th { 
    background:#f1f5f9; 
}

.btn { 
    border-radius:10px; 
}

.nav-header-left h5 { 
    font-size: 1.25rem; 
    line-height: 1.25; 
    font-weight: 700; 
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.table th {
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
    padding: 1rem;
    text-align: left;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
    color: #495057;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

/* Action Buttons */
.table .btn { 
    padding:.25rem .5rem; 
    font-size:.75rem; 
    background: #ffffff !important;
    border: 1px solid #e6e9ef !important;
    color: #6b7280 !important;
}

.table .btn:hover {
    background: #f8f9fa !important;
    border-color: #d1d5db !important;
    color: #374151 !important;
}

/* Sortable Headers */
.table th.sortable { 
    cursor: pointer; 
    user-select: none; 
}

.table th .sort-indicator { 
    font-size:.9rem; 
    color:#9aa0a6; 
    margin-left:.35rem; 
    display:inline-block; 
}

/* Hidden Elements */
.main-content .card:first-of-type { 
    display:none !important; 
}

.main-content .card .card-header { 
    display:none !important; 
}

/* Add Product Button */
#openAddEinkauf.btn {
    background:#ffffff !important;
    color:#334155 !important;
    border:1px solid var(--tblr-border-color, #e6e9ef) !important;
    border-radius:8px !important;
    height:auto !important;
    padding:.375rem .75rem !important;
    display:inline-flex; 
    align-items:center; 
    gap:.45rem;
}

#openAddEinkauf .material-icons, 
#openAddEinkauf .ti { 
    color: var(--primary) !important; 
    font-size:18px; 
    margin-right:.35rem; 
}

/* Modal stil geliştirme */
#addEinkaufModal .modal-content { 
    max-height: 90vh; 
    overflow: auto; 
    box-shadow: 0 10px 30px rgba(0,0,0,.15); 
}

#addEinkaufBody form { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 1.25rem; 
}

#addEinkaufBody .form-label { 
    font-weight: 600; 
    color: #334155; 
}

#addEinkaufBody .form-control, 
#addEinkaufBody .form-select { 
    border-color: #e2e8f0; 
    border-radius: 10px; 
}

#addEinkaufBody .btn.btn-primary { 
    min-width: 220px; 
}

/* Verlustliste Page Specific */
.topbar-info { 
    display: flex; 
    align-items: center; 
    gap: .75rem; 
    color: var(--secondary); 
}

.topbar-info .chip { 
    display: inline-flex; 
    align-items: center; 
    gap: .45rem; 
    padding: .375rem .625rem; 
    border: 1px solid var(--tblr-border-color, #e6e9ef); 
    border-radius: 8px; 
    background: #ffffff; 
    font-size: .875rem; 
    color: #334155; 
}

.topbar-info .chip .ti { 
    font-size: 1rem; 
    color: var(--primary); 
    line-height: 1; 
    display: inline-block; 
}

.navbar .material-icons.topbar-hide { 
    display: none !important; 
}



/* Sidebar Styles */
.sidenav {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #ffffff;
    border-right: 1px solid #e6e9ef;
    z-index: 1030;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    transform: translateX(0);
}

.sidenav-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e6e9ef;
    background: #ffffff;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
}

.navbar-brand:hover {
    color: #1e293b;
    text-decoration: none;
}

.sidenav-nav {
    padding: 1rem 0;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #6b7280;
    text-decoration: none;
    transition: all 0.15s ease;
    border-radius: 0;
    font-weight: 500;
}

.nav-link:hover {
    background: #f1f5f9;
    color: #1e293b;
    text-decoration: none;
}

.nav-link.active {
    background: #3b82f6;
    color: #ffffff;
}

.nav-link.active:hover {
    background: #2563eb;
    color: #ffffff;
}

.nav-link i {
    font-size: 1.25rem;
    width: 1.25rem;
    text-align: center;
}

/* Sidebar danger button */
.btn-danger-sidebar {
    background: #dc2626 !important;
    color: #ffffff !important;
    border: none !important;
    width: 100% !important;
    text-align: left !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0 !important;
    font-weight: 500 !important;
    transition: all 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    font-size: 0.875rem !important;
    cursor: pointer !important;
}

.btn-danger-sidebar:hover {
    background: #b91c1c !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.btn-danger-sidebar:focus {
    background: #b91c1c !important;
    color: #ffffff !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Main content adjustment for sidebar */
.main-content {
    margin-left: 280px;
    min-height: 100vh;
    background: #f8f9fa;
}

#sidenavBottom { 
    position: absolute; 
    left: 1rem; 
    right: 1rem; 
    bottom: 1rem; 
}

aside.sidenav .topbar-info { 
    flex-direction: column; 
    align-items: stretch; 
    gap: .5rem; 
}

aside.sidenav .topbar-info .chip { 
    width: 100%; 
}

/* Filter Styles */
.nav-filters { 
    display:flex; 
    align-items:flex-end; 
    gap:.5rem; 
    width:100%; 
    flex-wrap:wrap; 
}

.nav-header-center {
    justify-content:flex-end;
    margin-left:auto; 
    margin-right:0;
    flex: 0 1 auto !important;
}

.nav-header-right { 
    margin-left:auto; 
}

.nav-header-right > .chip { 
    margin-right: 0; 
}

.nav-filters .nav-input {
    border:none !important;
    box-shadow:none !important;
    background-color:#ffffff !important;
    appearance: none !important; 
    -webkit-appearance: none !important; 
    -moz-appearance: none !important;
    padding:.375rem 2rem .375rem .75rem !important;
    min-height:34px !important;
    background-image: var(--tblr-form-select-bg-image) !important;
    background-repeat:no-repeat !important;
    background-position: right .5rem center !important;
    background-size: 16px 12px !important;
    border-radius: var(--tblr-border-radius, 8px) !important;
}

.select-with-file { 
    position: relative; 
}

.select-with-file > i.ti {
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%);
    color: var(--primary); 
    font-size: 18px; 
    pointer-events: none;
}

.select-with-file > i.ti-chevron-down { 
    right: .65rem; 
}

label[for="navYear"], 
label[for="navMonth"], 
label[for="navFiliale"] { 
    display:none !important; 
}

.nav-filters .btn { 
    height:34px; 
    border:none !important; 
}

.nav-filters .btn .material-icons, 
.nav-filters .btn .ti { 
    font-size: 18px; 
    margin-right: .35rem; 
}

/* Export Button Colors */
#navPdf .material-icons, 
#navPdf .ti { 
    color: #d63939 !important; 
}

#navExcel .material-icons, 
#navExcel .ti { 
    color: #2fb344 !important; 
}

.nav-filters .nav-input { 
    border: 1px solid var(--tblr-border-color, #e6e9ef) !important; 
}

.nav-filters .btn { 
    border: 1px solid var(--tblr-border-color, #e6e9ef) !important; 
}

/* Export Buttons */
#navPdf.btn, 
#navExcel.btn {
    background: #ffffff !important;
    color: #334155 !important;
    border: 1px solid var(--tblr-border-color, #e6e9ef) !important;
    border-radius: var(--tblr-border-radius, 8px) !important;
    height: auto !important;
    padding: .375rem .75rem !important;
    display: inline-flex; 
    align-items: center; 
    gap: .45rem;
}

/* Export button icons - override previous styles with higher specificity */
.nav-filters #navPdf .material-icons { 
    color: #d63939 !important; 
    font-size: 18px; 
    margin-right: .35rem; 
}

.nav-filters #navExcel .material-icons { 
    color: #2fb344 !important; 
    font-size: 18px; 
    margin-right: .35rem; 
}

/* Total Value */
#navTotal {
    background: #d63939 !important;
    border: none !important;
    padding:.375rem .5rem;
    color:#ffffff !important;
    display:inline-flex; 
    align-items:center; 
    gap:.45rem;
    border-radius: 8px;
}

#navTotal .label { 
    font-weight:700; 
    font-size: 1.125rem; 
    color:#ffffff !important; 
}

/* Add Verlust Page Specific */
.card { 
    border:1px solid #e6e9ef; 
    border-radius:12px; 
}

.card-header { 
    border-bottom:1px solid #e6e9ef; 
    padding:1rem 1.25rem; 
}

.card-body { 
    padding:1.25rem; 
}

.btn.btn-outline-primary { 
    border-color:#e6e9ef; 
    color:#334155; 
}

.btn.btn-outline-primary:hover { 
    background:#f1f5f9; 
}

.alert.alert-success { 
    border:1px solid #d1fae5; 
    color:#065f46; 
    background:#ecfdf5; 
    border-radius:10px; 
}

/* Verlustliste specific styles */
.nav-filters .nav-left { 
    display: flex !important; 
    gap: 0.5rem; 
    align-items: flex-end; 
    flex-wrap: wrap; 
}

.nav-left-clone { 
    display: none !important; 
}

.nav-filters .nav-center { 
    display: flex; 
    justify-content: center; 
    align-items: flex-end; 
    gap: 0.5rem; 
    margin-right: auto; 
}

.nav-filters .nav-right { 
    display: flex; 
    gap: 0.35rem; 
    align-items: center; 
    flex-wrap: nowrap; 
}

.navbar > div > div:last-child .nav-right { 
    position: static; 
    min-width: 240px; 
    justify-content: flex-end; 
}

.nav-header-right { 
    justify-self: end; 
    margin-left: 0 !important; 
    display: flex; 
    align-items: center; 
}

.navbar > div { 
    display: flex; 
    align-items: center; 
    width: 100%; 
}

.nav-header-center { 
    margin-left: auto; 
    margin-right: auto; 
}

/* Remove visual card header/body chrome */
.card-header { 
    display: none !important; 
}

.card-body { 
    background: transparent !important; 
    padding: 0 !important; 
}

/* Sticky bar card-body override */
.sticky-filter-bar .card-body,
.sticky-search-bar .card-body {
    padding: 1rem !important;
}

/* Chip style for total on right */
.nav-filters .nav-right .chip { 
    background: #ffffff; 
    color: #334155; 
    border: 1px solid #e6e9ef; 
    border-radius: 8px; 
    height: 34px; 
    padding: 0.375rem 0.625rem; 
    display: inline-flex; 
    align-items: center; 
    gap: 0.45rem; 
}

/* Sticky Filter/Export Bar */
.sticky-filter-bar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: white !important;
    border-bottom: 1px solid #e6e9ef !important;
    margin-bottom: 1rem !important;
    border-radius: 0 !important;
}

.sticky-filter-bar .card-body {
    padding: 1rem !important;
}

.sticky-search-bar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
    background: white !important;
    border-bottom: 1px solid #e6e9ef !important;
    margin-bottom: 1rem !important;
    border-radius: 0 !important;
}

.sticky-search-bar .card-body {
    padding: 1rem !important;
}

/* Sticky bar hover effect */
.sticky-filter-bar:hover,
.sticky-search-bar:hover {
    /* Shadow removed */
}

/* Ensure proper spacing when sticky */
.sticky-filter-bar + .card,
.sticky-search-bar + .card {
    margin-top: 0 !important;
}

/* Responsive adjustments for sticky bars */
@media (max-width: 768px) {
    .sticky-filter-bar .nav-filters,
    .sticky-search-bar .search-add-bar {
        flex-direction: column !important;
        gap: 1rem !important;
    }
    
    .sticky-filter-bar .nav-left,
    .sticky-filter-bar .nav-center {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Export button icons - maximum specificity */
.nav-filters .nav-center #navPdf .material-icons {
    color: #d63939 !important;
    font-size: 18px;
    margin-right: .35rem;
}

.nav-filters .nav-center #navPdfMwst .material-icons {
    color: #ff6b35 !important;
    font-size: 18px;
    margin-right: .35rem;
}

.nav-filters .nav-center #navExcel .material-icons {
    color: #2fb344 !important;
    font-size: 18px;
    margin-right: .35rem;
}

/* Logo CSS - Merkezi Logo Stili */
.navbar-brand::before {
    content: '';
    display: inline-block;
    width: 64px;
    height: 64px;
    background-image: url('../static/floree-logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

