/* /Shared/ItemsTable.razor.rz.scp.css */
/* Compact styling for all editable fields */
[b-r3v2i74h1k] .compact-field {
    font-size: 0.875rem;
}

/* Description field auto-grow styling */
[b-r3v2i74h1k] .description-field textarea {
    resize: none;
    overflow-y: auto;
    line-height: 1.5;
}

[b-r3v2i74h1k] .description-field .mud-input-root {
    min-height: 40px;
}

/* Autocomplete item styling */
[b-r3v2i74h1k] .item-autocomplete .mud-input-slot input {
    font-size: 0.8125rem !important;
}

/* Multiline autocomplete item */
[b-r3v2i74h1k] .autocomplete-item-multiline {
    padding: 6px 12px;
    width: 100%;
}

/* First line: Item name */
[b-r3v2i74h1k] .item-name {
    font-size: 0.8125rem !important;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

/* Second line: Description */
[b-r3v2i74h1k] .item-desc-line {
    font-size: 0.6875rem !important;
    color: #666;
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Stock chip on first line */
[b-r3v2i74h1k] .item-stock-chip {
    font-size: 0.625rem !important;
    padding: 2px 8px !important;
    height: 20px !important;
}

[b-r3v2i74h1k] .item-stock-chip .mud-chip-content {
    font-size: 0.625rem !important;
}

/* Cost-related fields styling (red accent) */
[b-r3v2i74h1k] .cost-field input {
    color: #d32f2f !important;
    font-weight: 500;
}

/* Margin fields styling (green accent) */
[b-r3v2i74h1k] .margin-field input {
    color: #2e7d32 !important;
    font-weight: 500;
}

/* Price fields styling (blue accent) */
[b-r3v2i74h1k] .price-field input {
    color: #1976d2 !important;
    font-weight: 500;
}

/* Quantity fields styling (purple accent) */
[b-r3v2i74h1k] .quantity-field input {
    color: #7b1fa2 !important;
    font-weight: 500;
}

/* Total field styling (bold primary) */
[b-r3v2i74h1k] .total-field input {
    font-weight: 700 !important;
    color: var(--mud-palette-primary) !important;
    background-color: #f5f5f5;
}

/* Read-only field styling */
[b-r3v2i74h1k] .readonly-field {
    opacity: 0.7;
}

[b-r3v2i74h1k] .readonly-field input {
    background-color: #fafafa;
    color: #666 !important;
}

/* Better focus states */
[b-r3v2i74h1k] .mud-input-outlined:focus-within {
    box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
}

/* Improve autocomplete dropdown */
[b-r3v2i74h1k] .mud-popover-paper {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

/* Improve autocomplete list items */
[b-r3v2i74h1k] .mud-list-item {
    padding: 6px 12px !important;
    min-height: 32px !important;
}

/* Ensure table takes full width */
[b-r3v2i74h1k] .mud-table {
    width: 100% !important;
}

[b-r3v2i74h1k] .mud-table-root {
    width: 100% !important;
    table-layout: fixed !important;
}

/* Ensure rows take full width */
[b-r3v2i74h1k] .mud-table-row {
    width: 100% !important;
    display: table-row !important;
}

[b-r3v2i74h1k] tbody,
[b-r3v2i74h1k] thead {
    width: 100%;
    display: table-row-group;
}

[b-r3v2i74h1k] thead {
    display: table-header-group;
}

/* Reduce table cell padding for better compactness */
[b-r3v2i74h1k] .mud-table-cell {
    padding: 8px 12px !important;
    overflow: hidden;
    box-sizing: border-box;
    min-width: 0;
}

/* Ensure input fields fit within cells */
[b-r3v2i74h1k] .mud-table-cell .mud-input-root,
[b-r3v2i74h1k] .mud-table-cell .mud-input-control,
[b-r3v2i74h1k] .mud-table-cell .mud-input-slot,
[b-r3v2i74h1k] .mud-table-cell .mud-input,
[b-r3v2i74h1k] .mud-table-cell .mud-input-control-input-container {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Note: Striped table styling and editing row highlight are in inline styles */

/* Action cell styling */
[b-r3v2i74h1k] .action-cell {
    text-align: center !important;
    padding: 2px !important;
    width: 3% !important;
    min-width: 50px !important;
}

/* Note: .action-buttons and hover effect are in inline styles due to CSS isolation limitations */

[b-r3v2i74h1k] .action-btn {
    padding: 4px !important;
    min-width: 28px !important;
    width: 28px !important;
    height: 28px !important;
}

[b-r3v2i74h1k] .action-btn .mud-icon-root {
    font-size: 1.125rem !important;
}

/* Edit mode save button styling */
[b-r3v2i74h1k] .edit-action-cell {
    text-align: center !important;
    padding: 2px !important;
    width: 3% !important;
    min-width: 50px !important;
}

[b-r3v2i74h1k] .save-btn {
    padding: 4px !important;
    min-width: 28px !important;
    width: 28px !important;
    height: 28px !important;
}

[b-r3v2i74h1k] .save-btn .mud-icon-root {
    font-size: 1.125rem !important;
}

/* Note: Editing row highlight is in inline styles */
/* /Shared/MainLayout.razor.rz.scp.css */
.page[b-5v9ea9m1vc] {
    position: relative;
    display: flex;
    flex-direction: column;
}

.main[b-5v9ea9m1vc] {
    flex: 1;
}

.sidebar[b-5v9ea9m1vc] {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row[b-5v9ea9m1vc] {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

    .top-row[b-5v9ea9m1vc]  a, .top-row .btn-link[b-5v9ea9m1vc] {
        white-space: nowrap;
        margin-left: 1.5rem;
    }

    .top-row a:first-child[b-5v9ea9m1vc] {
        overflow: hidden;
        text-overflow: ellipsis;
    }

@media (max-width: 640.98px) {
    .top-row:not(.auth)[b-5v9ea9m1vc] {
        display: none;
    }

    .top-row.auth[b-5v9ea9m1vc] {
        justify-content: space-between;
    }

    .top-row a[b-5v9ea9m1vc], .top-row .btn-link[b-5v9ea9m1vc] {
        margin-left: 0;
    }
}

@media (min-width: 641px) {
    .page[b-5v9ea9m1vc] {
        flex-direction: row;
    }

    .sidebar[b-5v9ea9m1vc] {
        width: 250px;
        height: 100vh;
        position: sticky;
        top: 0;
    }

    .top-row[b-5v9ea9m1vc] {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .main > div[b-5v9ea9m1vc] {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}
