.profit-positive {
    color: #198754;
    font-weight: 500;
}

.profit-negative {
    color: #dc3545;
    font-weight: 500;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.navbar-brand {
    font-weight: 600;
}

.table th {
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.card-header h5 {
    font-weight: 600;
}

.alert {
    border-radius: 0.5rem;
}

.btn {
    font-weight: 500;
}

.min-vh-100 {
    min-height: 100vh;
}

.footer {
    margin-top: auto;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f8f9fa;
}

main {
    flex: 1;
}

.table-responsive {
    border-radius: 0.375rem;
}

.input-group-text {
    background-color: #e9ecef;
}

.display-6 {
    font-size: 2rem;
}

.purchase-row:hover {
    background-color: #e9ecef !important;
}

.purchase-row.table-warning {
    background-color: #fff3cd !important;
}

.purchase-row.status-beklemede {
    background-color: rgba(255, 193, 7, 0.2) !important;
}

.purchase-row.status-kargoya-verildi {
    background-color: rgba(25, 135, 84, 0.15) !important;
}

.purchase-row.status-iptal-edildi {
    background-color: rgba(220, 53, 69, 0.15) !important;
}

.purchase-row.status-iade-edildi {
    background-color: rgba(111, 66, 193, 0.15) !important;
}

.table > tbody > tr.purchase-row.status-beklemede > td {
    background-color: rgba(255, 193, 7, 0.2);
}

.table > tbody > tr.purchase-row.status-kargoya-verildi > td {
    background-color: rgba(25, 135, 84, 0.15);
}

.table > tbody > tr.purchase-row.status-iptal-edildi > td {
    background-color: rgba(220, 53, 69, 0.15);
}

.table > tbody > tr.purchase-row.status-iade-edildi > td {
    background-color: rgba(111, 66, 193, 0.15);
}

/* Order grouping - left border colors for same order numbers */
.order-group-border {
    border-left: 4px solid transparent;
}

.order-group-1, .order-color-1 { border-left-color: #0d6efd !important; }
.order-group-2, .order-color-2 { border-left-color: #198754 !important; }
.order-group-3, .order-color-3 { border-left-color: #dc3545 !important; }
.order-group-4, .order-color-4 { border-left-color: #ffc107 !important; }
.order-group-5, .order-color-5 { border-left-color: #6f42c1 !important; }
.order-group-6, .order-color-6 { border-left-color: #fd7e14 !important; }
.order-group-7, .order-color-7 { border-left-color: #20c997 !important; }
.order-group-8, .order-color-8 { border-left-color: #e83e8c !important; }
.order-group-9, .order-color-9 { border-left-color: #17a2b8 !important; }
.order-group-10, .order-color-10 { border-left-color: #6c757d !important; }

/* Single item orders - no border */
.order-single {
    border-left: 4px solid transparent !important;
}

/* Order sequence number badge - positioned on the left color border */
.order-sequence-num {
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
    z-index: 100;
}

/* Row with sequence number needs relative positioning */
tr.has-sequence-num {
    position: relative;
}

tr.has-sequence-num > td:first-child {
    position: relative;
    overflow: visible;
}

/* Sequence badge colors matching group colors */
.seq-color-1 { background-color: #0d6efd; }
.seq-color-2 { background-color: #198754; }
.seq-color-3 { background-color: #dc3545; }
.seq-color-4 { background-color: #ffc107; color: #333; }
.seq-color-5 { background-color: #6f42c1; }
.seq-color-6 { background-color: #fd7e14; }
.seq-color-7 { background-color: #20c997; }
.seq-color-8 { background-color: #e83e8c; }
.seq-color-9 { background-color: #17a2b8; }
.seq-color-10 { background-color: #6c757d; }
.seq-color-default { background-color: #adb5bd; }

/* Allow overflow for tables with sequence badges */
.table-responsive {
    overflow-x: auto;
    overflow-y: visible;
    padding-left: 15px;
    margin-left: -15px;
}

@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }
    
    .table-sm td, .table-sm th {
        padding: 0.4rem;
        font-size: 0.85rem;
    }
}
