/* ============================================================================
   so-forms-shared.css
   Shared "so-" design system for Quotation, Sales Order, and Sales Invoice
   forms. Extracted from three previously-identical Blazor component-scoped
   files (QuotationForm.razor.css, SalesOrderForm.razor.css,
   SalesInvoiceForm.razor.css) — those files were byte-identical in every
   rule, only their header comments differed. This file is the single
   source of truth going forward; reference it as a global stylesheet
   (not component-scoped) so all three forms — and any future form reusing
   the "so-" classes — pick it up automatically.

   No selectors, values, or logic were changed during extraction — this is
   a pure consolidation of the three original files.
   ============================================================================ */


/*.so-page {
    --so-blue: #2E7BC4;
    --so-blue-soft: #EAF3FC;
    --so-blue-soft-border: #CFE3F5;
    --so-blue-dark: #1D5FA0;
    --so-green: #6FAA3A;
    --so-green-soft: #EEF7E1;
    --so-green-soft-border: #D6ECC0;
    --so-green-dark: #5C9126;
    --so-clay: #C4732E;
    --so-clay-soft: #FBF0E6;
    --so-clay-soft-border: #F0D8C1;
    --so-red: #C0392B;
    --so-red-soft: #FDECEA;
    --so-red-soft-border: #F3C6C2;
    --so-surface: #FFFFFF;
    --so-border: #E4E9E6;
    --so-border-soft: #F3F6F4;
    --so-text: #33403A;
    --so-text-muted: #8B9A92;
    background: #F3F6F5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--so-text);
    padding: 20px 20px 76px;
}

.mono {
    font-family: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
    letter-spacing: 0.02em;
}

.so-required {
    color: var(--so-clay);
}

.so-crumb-current {
    color: var(--so-text-muted) !important;
    font-weight: 600;
}*/

/* ---------------- Top page header ---------------- */

/*.so-header-card {
    background: var(--so-surface);
    border: 1px solid var(--so-border);
    border-top: 3px solid var(--so-green-dark);
    border-radius: 12px;
    padding: 18px 22px;
}

.so-title {
    color: var(--so-text);
    letter-spacing: -0.01em;
    font-weight: 800;
}

.so-subtitle {
    color: var(--so-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.so-status-inline {
    font-size: 13px;
    font-weight: 600;
    color: var(--so-text-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.so-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--so-green-dark);
    display: inline-block;
    flex-shrink: 0;
}

.so-header-crumb {
    font-size: 13px;
    color: var(--so-text-muted);
}*/

/* ---------------- Card overrides ---------------- */

/*.so-card {
    background: var(--so-surface);
    border: 1px solid var(--so-border);
    border-radius: 12px;
    box-shadow: 0 4px 12px -10px rgba(29, 42, 38, 0.18);
}

.so-card-header {
    background: var(--so-surface);
    border-bottom: 1px solid var(--so-border);
    font-size: 13.5px;
    font-weight: 700;
    padding: 12px 16px;
}

.so-card-header-customer {
    color: var(--so-clay);
}

.so-card-header-doc {
    color: var(--so-green-dark);
}

.so-header-icon {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 12px;
}

    .so-header-icon.customer {
        background: var(--so-clay-soft);
        color: var(--so-clay);
    }

    .so-header-icon.doc {
        background: var(--so-green-soft);
        color: var(--so-green-dark);
    }

.so-card-edit {
    width: 26px;
    height: 26px;
    border-radius: 7px;
    background: var(--so-border-soft);
    border: 1px solid var(--so-border);
    color: var(--so-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    flex-shrink: 0;
}

    .so-card-edit:hover {
        background: var(--so-green-soft);
        border-color: var(--so-green-soft-border);
        color: var(--so-green-dark);
    }

.so-card-body {
    padding: 14px 16px;
}

.so-address-block {
    width: 100%;
}

.so-address-title {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--so-text);
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.so-address-line {
    font-size: 13px;
    font-weight: 500;
    color: var(--so-text);
    line-height: 1.6;
}

.so-address-gst {
    margin-top: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--so-text);
}

.so-address-empty-hint {
    font-size: 13px;
    font-weight: 600;
    color: var(--so-text-muted);
}

.so-empty-address {
    background: transparent;
    border: 1.5px dashed #D8E2DE;
    border-radius: 10px;
    padding: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--so-text-muted);
}

    .so-empty-address:hover {
        background: var(--so-green-soft);
        border-color: var(--so-green);
        color: var(--so-green-dark);
    }*/

/* ---------------- Inputs (Radzen controls) ---------------- */

/*.so-field-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--so-text);
    margin-bottom: 4px;
    display: block;
}

.so-input.rz-textbox,
.so-input.rz-inputtext,
.so-input textarea.rz-textarea,
.so-input .rz-dropdown,
.so-input.rz-dropdown,
.so-input .rz-datepicker input,
.so-input.rz-numeric .rz-spinner-input {
    background: #F8FAFC;
    border-color: #E2E8F0 !important;
    font-size: 13.5px;
    border-radius: 8px;
}

.so-input.rz-textbox:focus,
.so-input .rz-dropdown.rz-state-focus,
.so-input .rz-datepicker input:focus {
    border-color: var(--so-blue) !important;
    background: #FFFFFF;
    box-shadow: 0 0 0 0.2rem var(--so-blue-soft);
}

.so-input.so-readonly,
.so-input[readonly] {
    opacity: 0.65;
}

.so-customer-select {
    font-size: 14.5px;
    font-weight: 600;
}

    .so-customer-select.rz-dropdown {
        min-height: 42px;
    }*/

/* ---------------- Address grid: 2 columns x 2 rows ---------------- */

/*.so-address-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

@media (max-width: 991.98px) {
    .so-address-grid {
        grid-template-columns: 1fr;
    }
}

.so-address-grid-full {
    grid-column: 1 / -1;
}*/

/* ---------------- Line items section ---------------- */

/*.so-section-title {
    color: var(--so-text-muted);
    letter-spacing: 0.06em;
    font-size: 11.5px;
    font-weight: 700;
}

.so-btn-primary {
    background: var(--so-green-dark);
    border-color: var(--so-green-dark);
    color: white;
}

    .so-btn-primary:hover {
        background: #4C7A1F;
        border-color: #4C7A1F;
        color: white;
    }

    .so-btn-primary:disabled {
        opacity: 0.6;
    }

.so-btn-light {
    background: var(--so-surface);
    border-color: var(--so-border);
    color: var(--so-text);
}

    .so-btn-light:hover {
        background: var(--so-border-soft);
    }

.so-line-alert {
    background: var(--so-red-soft);
    color: var(--so-red);
    border: 1px solid var(--so-red-soft-border);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12.5px;
    font-weight: 600;
}

.so-line-confirm {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--so-green-soft);
    color: var(--so-green-dark);
    border: 1px solid var(--so-green-soft-border);
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
}

.so-line-confirm-close {
    border: none;
    background: transparent;
    color: var(--so-green-dark);
    line-height: 1;
    padding: 0;
    opacity: 0.7;
}

    .so-line-confirm-close:hover {
        opacity: 1;
    }

.so-table-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--so-border);
}

.so-table-wrap-flush {
    border: none;
    border-radius: 0 0 11px 11px;
    box-shadow: none;
}

.so-table-scroll {
    max-height: 360px;
    overflow-y: auto;
}

.so-table {
    min-width: 1080px;
}

.so-net-amount {
    font-weight: 700;
    color: var(--so-green-dark);
}

.so-count-badge {
    background: var(--so-green-dark);
    color: white;
    font-size: 10px;
}

.so-icon-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 7px;
    background: var(--so-green-soft);
    color: var(--so-green-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .so-icon-btn:hover {
        background: var(--so-green-soft-border);
    }

    .so-icon-btn:disabled {
        opacity: 0.5;
    }

    .so-icon-btn.danger {
        background: var(--so-red-soft);
        color: var(--so-red);
    }

        .so-icon-btn.danger:hover {
            background: var(--so-red-soft-border);
        }*/

/* ---------------- Footer: tabs (Terms & Conditions) ---------------- */

/*.so-tab-nav {
    background: #F3F6F5;
    border-radius: 12px;
    display: inline-flex;
    flex-wrap: wrap;
}

.so-tab {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--so-text-muted) !important;
    background: transparent !important;
    border: none;
    border-radius: 9px !important;
}

    .so-tab:hover {
        color: var(--so-green-dark) !important;
    }

    .so-tab.active {
        background: #FFFFFF !important;
        color: var(--so-green-dark) !important;
        box-shadow: 0 2px 6px -1px rgba(92, 145, 38, 0.22);
    }

.so-tab-badge {
    background: var(--so-green-dark);
    color: white;
    font-size: 10px;
}

.so-tab-panel {
    min-height: 72px;
    justify-content: center;
}*/

/* ---------------- Totals panel ---------------- */

/*.so-totals-card {
    background: var(--so-surface);
    border: 1px solid var(--so-border);
    border-radius: 12px;
}

.so-totals-row {
    font-size: 13.5px;
    color: var(--so-text-muted);
    font-weight: 500;
    padding: 9px 18px;
    border-bottom: 1px solid var(--so-border-soft);
}

.so-totals-row:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.so-grand-total {
    background: var(--so-green-soft);
    color: var(--so-green-dark);
    font-size: 14.5px;
    font-weight: 800;
    border-bottom: none;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

    .so-grand-total .mono {
        font-size: 16px;
    }*/

/* ---------------- Line items grid (Radzen) ---------------- */

/*.so-linegrid ::deep .rz-data-grid {
    border: none;
    font-size: 13.5px;
    color: var(--so-text);
}

.so-linegrid ::deep .rz-grid-table thead.rz-header th {
    background: var(--so-border-soft);
    color: var(--so-text-muted);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--so-border);
}

.so-linegrid ::deep .rz-grid-table tbody tr:hover {
    background: var(--so-green-soft);
}

.so-linegrid ::deep .rz-grid-table tbody tr.rz-datatable-edit {
    background: var(--so-blue-soft);
}

.so-linegrid ::deep .rz-cell-data {
    padding: 10px 12px;
}

.so-linegrid ::deep .rz-data-grid-data td {
    border-bottom: 1px solid var(--so-border-soft);
}

.so-linegrid ::deep .rz-paginator {
    border-top: 1px solid var(--so-border);
}

.rz-dropdown-data-grid .rz-grid-table thead.rz-header th {
    background: var(--so-border-soft, #F3F6F4);
    color: var(--so-green-dark, #5C9126);
    font-weight: 700;
}*/

/* ---------------- Sticky action bar ---------------- */

/*.so-actionbar {
    background: white;
    border-top: 1px solid var(--so-border);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.04);
    z-index: 1030;
}

.so-gst-slab-block {
    background: var(--so-surface);
    border: 1px solid var(--so-border);
    border-radius: 12px;
    box-shadow: 0 4px 12px -10px rgba(29, 42, 38, 0.18);
    height: 100%;
    overflow: hidden;
}

.so-gst-slab-title {
    background: var(--so-surface);
    border-bottom: 1px solid var(--so-border);
    color: var(--so-green-dark);
    font-size: 13.5px;
    font-weight: 700;
    padding: 12px 16px;
}

.so-gst-slab-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
    color: var(--so-text-muted);
}

    .so-gst-slab-table th,
    .so-gst-slab-table td {
        padding: 9px 16px;
        border-bottom: 1px solid var(--so-border-soft);
    }

    .so-gst-slab-table thead th {
        background: var(--so-border-soft);
        color: var(--so-text-muted);
        font-weight: 700;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        border-bottom: 1px solid var(--so-border);
    }

    .so-gst-slab-table tbody td:first-child {
        color: var(--so-text);
        font-weight: 600;
    }

    .so-gst-slab-table tbody tr:last-child td {
        border-bottom: none;
    }

    .so-gst-slab-table tbody tr:hover {
        background: var(--so-green-soft);
    }


    .so-detail-row {
    line-height: 1.4;
    align-items: flex-start;
}*/

/* Default: label + value inline */
/*.so-detail-label {
    flex: 0 0 auto;
    font-weight: 500;
    color: #6b7280;
    min-width: 90px;
}

.so-detail-value {
    flex: 1 1 auto;
    min-width: 0;
    color: #111827;
    word-break: break-word;
}*/

/* Narrow-card variant: stack label above value */
/*.so-detail-row.so-detail-stacked {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

    .so-detail-row.so-detail-stacked .so-detail-label {
        min-width: 0;
    }*/