/* File Path: /20/acc6/public_assets/css/pages/sales-invoices.css */

.acc6-sales-page {
    display: grid;
    gap: 10px;
    direction: rtl;
}

.acc6-sales-toolbar,
.acc6-sales-panel {
    border: 1px solid #bdcfd3;
    border-radius: 7px;
    background: #fff;
    box-shadow: var(--acc6-shadow-sm);
}

.acc6-sales-toolbar {
    min-height: 54px;
    padding: 8px 10px;
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}

.acc6-sales-filter-form {
    display: flex !important;
    align-items: end !important;
    flex-wrap: wrap;
    gap: 6px !important;
}

.acc6-sales-field {
    min-width: 0;
}

.acc6-sales-field.span-2 {
    grid-column: span 2;
}

.acc6-sales-field label {
    display: block;
    margin: 0 0 3px !important;
    color: #2d454b !important;
    font-size: 10px !important;
    font-weight: 900 !important;
}

.acc6-sales-field label b {
    color: var(--acc6-danger);
}

.acc6-sales-field input,
.acc6-sales-field select,
.acc6-sales-lines-table input,
.acc6-sales-lines-table select {
    min-height: 33px !important;
    padding: 4px 7px !important;
    border: 1px solid #aebfc4 !important;
    border-radius: 4px !important;
    background: #fff !important;
    color: #18272d !important;
    font-size: 11px !important;
    font-weight: 700 !important;
}

.acc6-sales-field input:focus,
.acc6-sales-field select:focus,
.acc6-sales-lines-table input:focus,
.acc6-sales-lines-table select:focus {
    border-color: var(--acc6-teal-600) !important;
    box-shadow: 0 0 0 2px rgba(11,143,143,.12) !important;
}

.acc6-sales-filter-form .acc6-sales-field {
    width: 145px;
}

.acc6-sales-toolbar-info {
    min-width: 115px;
    min-height: 38px;
    padding: 5px 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #b8d1d2;
    border-radius: 5px;
    background: #f1f8f8;
    color: #40595f;
    font-size: 10px;
    font-weight: 800;
}

.acc6-sales-toolbar-info strong {
    min-width: 28px;
    color: var(--acc6-teal-900);
    font-size: 15px;
    font-weight: 900;
    text-align: center;
}

.acc6-sales-message {
    padding: 8px 10px;
    border: 1px solid;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 800;
}

.acc6-sales-message.danger {
    border-color: #e4b4b8;
    background: #fff1f2;
    color: #9f1f29;
}

.acc6-sales-message.success {
    border-color: #acd6bc;
    background: #effaf3;
    color: #17673b;
}

.acc6-sales-message.warning {
    border-color: #e1c38d;
    background: #fff8e8;
    color: #8d5900;
}

.acc6-sales-panel {
    overflow: hidden;
}

.acc6-sales-panel-title {
    min-height: 52px;
    padding: 8px 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #c8d7da;
    background: linear-gradient(180deg, #f7fbfb 0%, #edf5f5 100%);
}

.acc6-sales-panel-title.compact {
    min-height: 44px;
}

.acc6-sales-panel-title h2 {
    margin: 0;
    color: var(--acc6-teal-950);
    font-size: 14px;
    font-weight: 900;
}

.acc6-sales-panel-title p {
    margin: 2px 0 0;
    color: #667b81;
    font-size: 10px;
    font-weight: 700;
}

.acc6-sales-status {
    min-height: 28px;
    padding: 4px 9px;
    display: inline-flex;
    align-items: center;
    border: 1px solid #a8cbca;
    border-radius: 4px;
    background: #eaf7f5;
    color: var(--acc6-teal-900);
    font-size: 10px;
    font-weight: 900;
    white-space: nowrap;
}

#salesInvoiceForm {
    padding: 10px;
}

.acc6-sales-head-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    align-items: end;
    gap: 7px;
    margin-bottom: 9px;
}

.acc6-sales-period {
    min-height: 33px;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #a9d4b9;
    border-radius: 4px;
    background: #eefaf2;
    color: #17643b;
    font-size: 10px;
    font-weight: 900;
    text-align: center;
}

.acc6-sales-period.is-error {
    border-color: #e0afb4;
    background: #fff0f1;
    color: #9d222b;
}

.acc6-sales-lines-wrap,
.acc6-sales-list-wrap {
    width: 100%;
    overflow: auto;
}

.acc6-sales-lines-table,
.acc6-sales-list-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid #aabec2;
    background: #fff;
}

.acc6-sales-lines-table {
    min-width: 1120px;
}

.acc6-sales-list-table {
    min-width: 1100px;
    border: 0;
}

.acc6-sales-lines-table th,
.acc6-sales-list-table th {
    position: static !important;
    padding: 6px 6px !important;
    border-left: 1px solid rgba(255,255,255,.16) !important;
    background: var(--acc6-teal-800) !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    text-align: center !important;
    white-space: nowrap;
}

.acc6-sales-lines-table td,
.acc6-sales-list-table td {
    height: 38px;
    padding: 3px 4px !important;
    border-left: 1px solid #d8e1e3 !important;
    border-bottom: 1px solid #d8e1e3 !important;
    background: #fff;
    color: #26383d;
    font-size: 10px !important;
    font-weight: 700;
    vertical-align: middle;
    text-align: center;
}

.acc6-sales-lines-table tbody tr:nth-child(even) td,
.acc6-sales-list-table tbody tr:nth-child(even) td {
    background: #f4f9f9;
}

.acc6-sales-lines-table tbody tr:hover td,
.acc6-sales-list-table tbody tr:hover td {
    background: #eaf6f5;
}

.acc6-sales-lines-table input,
.acc6-sales-lines-table select {
    width: 100%;
    min-height: 30px !important;
}

.acc6-sales-lines-table .col-no { width: 42px; }
.acc6-sales-lines-table .col-item { width: 260px; }
.acc6-sales-lines-table .col-description { width: 250px; }
.acc6-sales-lines-table .col-number { width: 110px; }
.acc6-sales-lines-table .col-account { width: 220px; }
.acc6-sales-lines-table .col-total { width: 105px; }
.acc6-sales-lines-table .col-action { width: 54px; }

.acc6-sales-lines-table .acc6-line-no {
    color: var(--acc6-teal-900);
    font-weight: 900;
}

.acc6-sales-lines-table .line-total,
.acc6-sales-list-table .money-cell,
.acc6-sales-list-table .code-cell {
    color: var(--acc6-teal-900);
    font-weight: 900;
    direction: ltr;
}

.acc6-sales-lines-table tfoot th {
    background: #e7f2f2 !important;
    color: var(--acc6-teal-950) !important;
    border-top: 2px solid var(--acc6-teal-700) !important;
}

.acc6-sales-lines-table tfoot th:first-child {
    text-align: left !important;
}

#salesInvoiceTotal {
    font-size: 13px !important;
    direction: ltr;
}

.acc6-sales-remove {
    width: 28px;
    min-width: 28px;
    min-height: 28px !important;
    padding: 0 !important;
    border: 1px solid #d5a6aa !important;
    border-radius: 4px !important;
    background: #fff1f2 !important;
    color: #ad2731 !important;
    font-size: 17px !important;
    font-weight: 900 !important;
    line-height: 1;
}

.acc6-sales-form-actions {
    min-height: 44px;
    padding-top: 8px;
    display: flex;
    align-items: center;
    gap: 7px;
}

.acc6-sales-form-note {
    margin-left: auto;
    color: #6c7e84;
    font-size: 10px;
    font-weight: 700;
}

.acc6-sales-button {
    min-height: 32px !important;
    padding: 5px 11px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid !important;
    border-radius: 4px !important;
    text-decoration: none;
    font-size: 10px !important;
    font-weight: 900 !important;
    white-space: nowrap;
    cursor: pointer;
}

.acc6-sales-button.primary {
    border-color: var(--acc6-teal-900) !important;
    background: var(--acc6-teal-800) !important;
    color: #fff !important;
}

.acc6-sales-button.primary:hover {
    background: var(--acc6-teal-950) !important;
}

.acc6-sales-button.muted {
    border-color: #aebfc4 !important;
    background: #f4f8f8 !important;
    color: #355158 !important;
}

.acc6-sales-button.danger {
    border-color: #c98f95 !important;
    background: #fff0f1 !important;
    color: #a61f2a !important;
}

.acc6-sales-button.small {
    min-height: 27px !important;
    padding: 3px 7px !important;
    font-size: 9px !important;
}

.acc6-sales-maintenance-actions,
.acc6-sales-row-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
}

.acc6-sales-maintenance-actions form,
.acc6-sales-row-actions form {
    margin: 0;
}

.acc6-sales-list-wrap {
    max-height: 430px;
}

.acc6-sales-list-table thead th {
    position: sticky !important;
    top: 0;
    z-index: 2;
}

.acc6-sales-list-table td {
    height: 34px;
}

.acc6-sales-list-table .badge {
    min-height: 23px;
    padding: 3px 7px;
    border-radius: 4px;
    font-size: 9px;
    font-weight: 900;
}

@media (max-width: 1180px) {
    .acc6-sales-head-grid {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }
}

@media (max-width: 760px) {
    .acc6-sales-toolbar,
    .acc6-sales-panel-title,
    .acc6-sales-form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .acc6-sales-toolbar-info {
        width: 100%;
    }

    .acc6-sales-head-grid {
        grid-template-columns: 1fr;
    }

    .acc6-sales-field.span-2 {
        grid-column: auto;
    }

    .acc6-sales-form-note {
        margin-left: 0;
        order: 3;
    }
}
