﻿.main-wrapper {
    margin-left: 126px;
    margin-top: 26px;
    min-height: calc(100vh - var(--header-height));
    padding: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.page-title p {
    color: var(--text-secondary);
}

.tabs-container {
    background: white;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    box-shadow: var(--shadow-sm);
    margin-bottom: 0;
}

.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color);
}

.tab {
    padding: 1rem 2rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
    transition: all 0.3s;
}

    .tab:hover {
        background: #f8f9fa;
    }

    .tab.active {
        color: var(--primary-color);
    }

        .tab.active::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--primary-color);
        }

.filter-section {
    background: white;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
}

    .form-control:focus {
        outline: none;
        border-color: var(--primary-color);
    }

.card {
    background: white;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

    .data-table thead {
        background: linear-gradient(135deg, #2d5f7f 0%, #1e4159 100%);
        color: white;
    }

    .data-table th {
        padding: 1rem;
        text-align: left;
        font-weight: 600;
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .data-table td {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .data-table tbody tr:hover {
        background: #f8f9fa;
    }

.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-primary {
    background: #2d5f7f;
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-supplier {
    background: #cfe2ff;
    color: #084298;
}

.badge-customer {
    background: #d1e7dd;
    color: #0f5132;
}

.badge-both {
    background: #e7e7ff;
    color: #4a00ff;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    padding: 2rem 0;
}

    .modal.show {
        display: flex;
    }

.modal-dialog {
    background: white;
    border-radius: var(--radius-md);
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    margin: auto;
}

.modal-header {
    background: linear-gradient(135deg, #2d5f7f 0%, #1e4159 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

    .modal-close:hover {
        background: rgba(255, 255, 255, 0.2);
    }

.modal-body {
    padding: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

    .form-group.full-width {
        grid-column: 1 / -1;
    }

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.95rem;
}

    .form-label.required::after {
        content: ' *';
        color: var(--danger-color);
    }

textarea.form-control {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    position: sticky;
    bottom: 0;
    background: white;
}

.section-divider {
    grid-column: 1 / -1;
    margin: 1rem 0;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}
