/* 
 * Stok Takip Sistemi CSS Dosyası
 * Tüm sayfalar için ortak stil tanımlamaları
 */

/* Genel stil tanımlamaları */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f7f9fc;
    color: #333;
    font-size: 14px;
    line-height: 1.6;
}

a {
    color: #3f51b5;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #1a237e;
}

/* Ana konteynır */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Üst menü - Geliştirilmiş Tasarım */
.header {
    background-color: #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: bold;
    font-size: 1.6rem;
    color: #3f51b5;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.logo span {
    transition: color 0.3s ease;
}

/* Kullanıcı Bilgisi ve Dark Mode Switch */
.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 5px 0;
}

.user-info .user-name {
    font-weight: 500;
    font-size: 14px;
    margin-right: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.user-info .user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #3f51b5;
    margin-right: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(63, 81, 181, 0.15);
}

/* Dark Mode Toggle */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.theme-switch {
    display: inline-block;
    position: relative;
    height: 24px;
    width: 48px;
    margin: 0 8px;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    border-radius: 24px;
    transition: .3s;
}

.theme-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

input:checked + .theme-slider {
    background-color: #3f51b5;
}

input:focus + .theme-slider {
    box-shadow: 0 0 1px #3f51b5;
}

input:checked + .theme-slider:before {
    transform: translateX(24px);
}

.theme-icon {
    font-size: 14px;
    color: #757575;
}

.theme-icon.sun {
    color: #ff9800;
}

.theme-icon.moon {
    color: #3f51b5;
}

body:not(.dark-mode) .theme-icon.moon {
    display: none;
}

body.dark-mode .theme-icon.sun {
    display: none;
}

/* Dropdown menüler */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 150px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 5px;
    z-index: 1000;
    top: 100%;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 5px;
}

.dropdown-menu:before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    margin-left: -8px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #fff;
}

.dropdown-item {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
}

.dropdown-item i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* Ana içerik */
.main-content {
    padding: 20px 0;
    display: flex !important;
    flex-direction: row !important;
    min-height: calc(100vh - 60px);
}

.main-content .container {
    display: flex !important;
    flex-direction: row !important;
    width: 100%;
    gap: 20px;
}

/* Sol menü */
.sidebar {
    width: 250px;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 15px;
    flex: 0 0 250px;
    height: fit-content;
    position: sticky;
    top: 80px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu-item {
    margin-bottom: 5px;
}

.sidebar-menu-link {
    display: block;
    padding: 10px 15px;
    border-radius: 5px;
    color: #424242;
    font-weight: 500;
    transition: all 0.3s;
}

.sidebar-menu-link:hover {
    background-color: #f5f5f5;
    color: #3f51b5;
}

.sidebar-menu-link.active {
    background-color: #3f51b5;
    color: #ffffff;
}

.sidebar-menu-link i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Menu Category Headers */
.menu-category {
    margin-top: 20px;
    margin-bottom: 10px;
    padding-left: 15px;
    color: #3f51b5;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 3px solid #3f51b5;
    display: block;
    list-style: none;
}

.sidebar-menu li.menu-category {
    margin-top: 20px;
    margin-bottom: 10px;
    padding-left: 15px;
    color: #3f51b5;
    font-weight: bold;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-left: 3px solid #3f51b5;
}

.sidebar-menu-item:first-child {
    margin-bottom: 15px;
}

/* Ana panel */
.content-panel {
    flex: 1;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    padding: 20px;
    max-width: calc(100% - 270px);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.panel-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #3f51b5;
}

.panel-actions {
    display: flex;
    gap: 10px;
}

/* Kartlar */
.card {
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

/* Bilgi kartları */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    grid-gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: #ffffff;
    font-size: 1.5rem;
}

.stat-card-content h3 {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 5px;
}

.stat-card-content p {
    color: #757575;
    font-size: 0.9rem;
}

.stat-card.primary {
    background-color: #e8eaf6;
}

.stat-card.primary .stat-card-icon {
    background-color: #3f51b5;
}

.stat-card.secondary {
    background-color: #e0f2f1;
}

.stat-card.secondary .stat-card-icon {
    background-color: #009688;
}

.stat-card.warning {
    background-color: #fff8e1;
}

.stat-card.warning .stat-card-icon {
    background-color: #ffc107;
}

.stat-card.danger {
    background-color: #ffebee;
}

.stat-card.danger .stat-card-icon {
    background-color: #f44336;
}

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

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.table th {
    background-color: #f5f5f5;
    font-weight: 500;
    color: #757575;
}

.table tbody tr:hover {
    background-color: #f5f5f5;
}

.table .actions {
    white-space: nowrap;
}

.table .status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8rem;
}

.status.active {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status.inactive {
    background-color: #ffebee;
    color: #c62828;
}

.status.pending {
    background-color: #fff8e1;
    color: #f57f17;
}

/* Formlar */
.form-row {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #424242;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3f51b5;
    box-shadow: 0 0 0 2px rgba(63, 81, 181, 0.1);
}

.form-control::placeholder {
    color: #bdbdbd;
}

.form-control:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.form-control.error {
    border-color: #f44336;
}

.form-error {
    color: #f44336;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* Butonlar */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

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

.btn-primary:hover {
    background-color: #303f9f;
}

.btn-secondary {
    background-color: #757575;
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: #616161;
}

.btn-success {
    background-color: #4caf50;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #388e3c;
}

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

.btn-danger:hover {
    background-color: #d32f2f;
}

.btn-warning {
    background-color: #ff9800;
    color: #ffffff;
}

.btn-warning:hover {
    background-color: #f57c00;
}

.btn-info {
    background-color: #00bcd4;
    color: #ffffff;
}

.btn-info:hover {
    background-color: #0097a7;
}

.btn-light {
    background-color: #f5f5f5;
    color: #424242;
}

.btn-light:hover {
    background-color: #e0e0e0;
}

.btn-link {
    background-color: transparent;
    color: #3f51b5;
    padding: 0;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 12px 20px;
    font-size: 1.1rem;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    padding: 0;
    font-size: 1rem;
}

/* Bildirimler */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    position: relative;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4caf50;
}

.alert-info {
    background-color: #e1f5fe;
    color: #0277bd;
    border-left: 4px solid #03a9f4;
}

.alert-warning {
    background-color: #fff8e1;
    color: #f57f17;
    border-left: 4px solid #ff9800;
}

.alert-danger {
    background-color: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

.alert-dismissible {
    padding-right: 40px;
}

.alert-dismissible .close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.alert-dismissible .close:hover {
    opacity: 1;
}

/* Sayfalama */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 5px;
}

.page-link {
    padding: 8px 12px;
    border-radius: 5px;
    background-color: #ffffff;
    color: #3f51b5;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s;
}

.page-link:hover {
    background-color: #f5f5f5;
}

.page-link.current {
    background-color: #3f51b5;
    color: #ffffff;
    border-color: #3f51b5;
}

.page-link.disabled {
    color: #bdbdbd;
    cursor: not-allowed;
}

.page-link.dots {
    padding: 8px 8px;
    border: none;
    background: none;
}

/* Modaller */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal {
    background-color: #ffffff;
    border-radius: 5px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-weight: 500;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #757575;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #f44336;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background-color: #3f51b5;
    color: #ffffff;
}

.badge-secondary {
    background-color: #757575;
    color: #ffffff;
}

.badge-success {
    background-color: #4caf50;
    color: #ffffff;
}

.badge-danger {
    background-color: #f44336;
    color: #ffffff;
}

.badge-warning {
    background-color: #ff9800;
    color: #ffffff;
}

.badge-info {
    background-color: #00bcd4;
    color: #ffffff;
}

/* Yükleme göstergesi */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #3f51b5;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Yardımcı sınıflar */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-muted {
    color: #757575;
}

.text-primary {
    color: #3f51b5;
}

.text-success {
    color: #4caf50;
}

.text-danger {
    color: #f44336;
}

.text-warning {
    color: #ff9800;
}

.text-info {
    color: #00bcd4;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 5px;
}

.mb-2 {
    margin-bottom: 10px;
}

.mb-3 {
    margin-bottom: 15px;
}

.mb-4 {
    margin-bottom: 20px;
}

.mb-5 {
    margin-bottom: 25px;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 5px;
}

.mt-2 {
    margin-top: 10px;
}

.mt-3 {
    margin-top: 15px;
}

.mt-4 {
    margin-top: 20px;
}

.mt-5 {
    margin-top: 25px;
}

.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.align-items-center {
    align-items: center;
}

.flex-column {
    flex-direction: column;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

/* Giriş ekranı */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f7f9fc;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo img {
    max-width: 150px;
    height: auto;
}

.login-title {
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.5rem;
    color: #3f51b5;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: #757575;
}

/* Responsive Tasarım - Geliştirilmiş Medya Sorguları */
@media (max-width: 992px) {
    .container {
        padding: 0 10px;
    }
    
    .stats-cards {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    
    .panel-title {
        font-size: 1.3rem;
    }
    
    .card-header, .card-body, .card-footer {
        padding: 15px;
    }
}

@media (max-width: 768px) {
    .main-content .container {
        flex-direction: column !important;
    }
    
    .sidebar {
        width: 100%;
        flex: auto;
        margin-bottom: 20px;
        position: relative;
        top: 0;
    }
    
    .content-panel {
        max-width: 100%;
    }
    
    .stats-cards {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    /* Responsive tables */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }
    
    .table {
        min-width: 650px; /* Ensures horizontal scrolling on small screens */
    }
    
    /* Adjust forms for better mobile experience */
    .form-row {
        display: flex;
        flex-direction: column;
    }
    
    /* Make buttons more touch-friendly */
    .btn {
        padding: 10px 16px;
        min-height: 44px; /* Better touch target */
    }
    
    .btn-sm {
        padding: 8px 12px;
        min-height: 38px;
    }
    
    /* Adjust modal for better mobile experience */
    .modal {
        max-height: 85vh;
    }
    
    /* Improve dropdown positioning */
    .dropdown-menu {
        right: 0;
        left: auto;
        transform: none;
    }
}

@media (max-width: 576px) {
    .header {
        padding: 10px 0;
    }
    
    .header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo {
        margin-bottom: 10px;
    }
    
    .user-info {
        width: 100%;
        margin-top: 10px;
        justify-content: space-between;
    }
    
    .user-name {
        max-width: 120px;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .panel-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .panel-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-start;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Fix for dashboard row layout - CRITICAL STOCK SECTION */
    .row {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .row .col {
        width: 100% !important;
        flex: none !important;
    }
    
    /* Fix for stock entry/exit buttons in quick actions */
    .quick-actions .d-flex {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    .quick-actions .btn {
        width: 100%;
        margin-bottom: 8px;
        text-align: left;
    }
    
    /* Fix for active projects text overlapping */
    .table td {
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        word-wrap: break-word;
    }
    
    /* Enhanced Active Projects Section Fixes */
    .active-projects .table,
    .project-list .table {
        display: block;
        width: 100%;
    }
    
    /* Ultra-specific fix for total amount display */
    .active-projects .project-total,
    .project-list .project-total,
    .project-total-row,
    td.total-amount,
    .total-row td,
    tr.total-row,
    td:contains("Toplam:"),
    [data-label="Toplam"],
    td[data-label*="Toplam"],
    td:last-child:contains("TL"),
    td:contains("Toplam"),
    td > strong:contains("Toplam"),
    .table td[style*="right"],
    td.text-right,
    .table .text-right {
        display: block !important;
        width: 100% !important;
        white-space: normal !important;
        word-break: break-all !important;
        word-wrap: break-word !important;
        text-overflow: clip !important;
        overflow: visible !important;
        text-align: left !important;
        font-weight: bold !important;
        clear: both !important;
        float: none !important;
        position: static !important;
        max-width: 100% !important;
        margin-top: 8px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 10px 5px !important;
        border-top: 2px solid #e0e0e0 !important;
        border-bottom: none !important;
        font-size: 14px !important;
        line-height: 1.5 !important;
        background-color: rgba(0,0,0,0.03) !important;
    }
    
    /* Specifically target the exact element */
    .active-projects .table tr > td:last-of-type,
    .project-list .table tr > td:last-of-type {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        margin-top: 5px !important;
    }
    
    .active-projects .table thead,
    .project-list .table thead {
        display: none; /* Hide headers on very small screens */
    }
    
    .active-projects .table tbody,
    .project-list .table tbody {
        display: block;
        width: 100%;
    }
    
    .active-projects .table tr,
    .project-list .table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 5px;
        padding: 10px;
    }
    
    .active-projects .table td,
    .project-list .table td {
        display: block;
        width: 100%;
        text-align: left;
        padding: 5px 10px;
        border: none;
        position: relative;
        overflow: visible;
        white-space: normal;
        word-break: break-word;
    }
    
    /* Add data labels for better context */
    .active-projects .table td:before,
    .project-list .table td:before {
        content: attr(data-label);
        display: inline-block;
        font-weight: bold;
        margin-right: 5px;
    }
    
    /* Project details cost summary fix */
    .project-cost-summary,
    .project-details-container {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .project-cost-item,
    .project-detail-item {
        width: 100% !important;
        flex: none !important;
        margin-bottom: 10px;
    }
    
    /* Ensure total cost appears at the bottom */
    .project-total-cost {
        order: 999 !important; /* Push to the end */
        margin-top: 15px !important;
        padding-top: 15px !important;
        border-top: 1px solid #e0e0e0 !important;
    }
    
    /* Project details page fixes */
    .project-detail-section {
        margin-bottom: 20px;
    }
    
    .project-detail-section h3 {
        font-size: 16px;
        margin-bottom: 10px;
        font-weight: 600;
    }
    
    /* Better table handling on very small screens */
    .table th, .table td {
        padding: 8px 10px;
        font-size: 13px;
    }
    
    /* Form adjustments */
    .form-control {
        font-size: 16px; /* Prevents auto-zoom on iOS */
        padding: 12px 15px;
    }
    
    /* Adjust buttons for better touch */
    .btn {
        width: 100%;
        margin-bottom: 5px;
        justify-content: center;
    }
    
    .btn-icon {
        width: 40px;
        height: 40px;
    }
    
    /* Modal adjustments */
    .modal {
        width: 95%;
    }
    
    .modal-header, .modal-footer {
        padding: 12px 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    /* Pagination adjustments */
    .pagination {
        flex-wrap: wrap;
    }
    
    .page-link {
        margin-bottom: 5px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 13px;
    }
    
    .container {
        padding: 0 8px;
    }
    
    .panel-title {
        font-size: 1.2rem;
    }
    
    .card-body {
        padding: 12px;
    }
    
    .sidebar-menu-link {
        padding: 8px 12px;
    }
    
    /* Stack the action buttons vertically */
    .actions {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    /* Smaller stat cards */
    .stat-card {
        padding: 15px;
    }
    
    .stat-card-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .stat-card-content h3 {
        font-size: 1.5rem;
    }
    
    /* Fix for active projects table and long text */
    .table {
        table-layout: fixed;
        width: 100%;
    }
    
    .table td {
        font-size: 12px;
        line-height: 1.3;
        padding: 6px 8px;
    }
    
    /* Enhanced fixes for dashboard layout */
    .row .col .card {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }
    
    /* Login panel adjustments */
    .login-container {
        width: 95%;
        padding: 20px 15px;
    }
}

@media (max-width: 360px) {
    .logo {
        font-size: 1.4rem;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
    }
    
    .user-name {
        max-width: 100px;
        font-size: 12px;
    }
    
    /* Smaller padding and margins */
    .card-header, .card-body, .card-footer {
        padding: 10px;
    }
    
    .sidebar-menu-link {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .form-label {
        font-size: 13px;
    }
    
    .btn {
        font-size: 13px;
    }
}

/* Yazdırma stilleri - Geliştirilmiş */
@media print {
    html, body {
        margin: 0;
        padding: 0;
        background-color: #ffffff;
        font-size: 12pt;
    }
    body {
        background-color: #ffffff;
    }
    
    .header, .sidebar, .panel-actions, .btn, .form-control, .pagination {
        display: none !important;
    }
    
    .main-content {
        display: block;
    }
    
    .content-panel {
        box-shadow: none;
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #e0e0e0;
    }
    
    a {
        color: #000000;
        text-decoration: none;
    }
    
    .table th, .table td {
        border: 1px solid #e0e0e0;
    }
}