﻿/* Fix for Kendo Font Icons */
@font-face {
    font-family: "WebComponentsIcons";
    font-style: normal;
    font-weight: normal;
    src: url("https://unpkg.com/@progress/kendo-font-icons@4.5.0/dist/kendo-font-icons.ttf") format("truetype");
}

/* Modern Typography - Inter Font */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #2e2e2e;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    margin: 0;
    padding: 0;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 22px;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 18px;
}

h5 {
    font-size: 16px;
}

h6 {
    font-size: 14px;
}

strong {
    font-weight: bold;
}

h4.header {
    border-bottom: solid 1px #ccc;
    margin-bottom: 5px;
}

h5.header {
    border-bottom: solid 1px #ccc;
    margin-bottom: 5px;
}

h6.header {
    border-bottom: solid 1px #ccc;
    margin-bottom: 5px;
}
/*Layout*/
div.header {
    height: 64px;
    background: linear-gradient(135deg, #006838 0%, #008542 100%);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
}


div.body {
    padding: 10px;
}

/* Login */
div.login-panel {
    width: 420px;
    margin: 8% auto 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid rgba(0, 104, 56, 0.1);
}

div.login-header {
    background: linear-gradient(135deg, #006838 0%, #008542 100%);
    color: #fff;
    font-size: 1.5em;
    font-weight: 600;
    padding: 24px 20px;
    text-align: center;
    position: relative;
    letter-spacing: 0.5px;
}

div.login-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00a651, #006838, #00a651);
}

div.login-form {
    padding: 32px 28px 28px;
    background: #fafbfc;
    position: relative;
}

/* Login Form Styling - Override Kendo 2025 global styles */
div.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2e2e2e;
    font-size: 0.95em;
}

div.login-form input[type=text],
div.login-form input[type=password],
div.login-form .k-input,
div.login-form .k-textbox {
    width: 100% !important;
    max-width: none !important;
    box-sizing: border-box;
    padding: 12px 16px !important;
    border: 2px solid #e1e5e9 !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    transition: all 0.2s ease !important;
    background: #fff !important;
    margin-bottom: 16px;
}

div.login-form input[type=text]:focus,
div.login-form input[type=password]:focus,
div.login-form .k-input:focus,
div.login-form .k-textbox:focus {
    border-color: #006838 !important;
    box-shadow: 0 0 0 3px rgba(0, 104, 56, 0.1) !important;
    outline: none !important;
}

div.login-form input[type=text]:hover,
div.login-form input[type=password]:hover,
div.login-form .k-input:hover,
div.login-form .k-textbox:hover {
    border-color: #006838 !important;
}

input.login-button {
    width: 100% !important;
    max-width: none !important;
    margin: 8px 0 0 0 !important;
    padding: 14px 20px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
}

input.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(0, 104, 56, 0.25) !important;
}

div.authentication-panel {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0;
    float: none;
    white-space: nowrap;
}

div.authentication-panel form {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
}

span.username {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

span.username a {
    color: #fff;
    text-decoration: none;
    padding: 6px 12px 6px 0;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
}

span.username a:hover {
    background: rgba(255, 255, 255, 0.15);
    text-decoration: none;
    transform: translateY(-1px);
}

a.logout-link {
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
}

a.logout-link:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

/* Forms */
span.required {
    font-style: italic;
}

input[type=text].long-input {
    width: 20em !important;
}

textarea.k-textbox {
    padding: .178em;
}

div.editor-label {
    padding-top: .5em;
    padding-bottom: .2em;
    font-size: 1.2em;
}

div.editor-field {
    padding-bottom: .5em
}

div.display-label {
    padding-top: .5em;
    padding-bottom: .2em;
    font-size: 1.2em;
}

div.display-field {
    font-size: 1.2em;
    font-weight: bold;
}

.field-validation-error {
    color: #ff0000;
}

.field-validation-valid {
    display: none;
}

.input-validation-error {
    border: 1px solid #ff0000 !important;
}

span.success {
    color: #008000;
    padding: 3px 0;
    display: block;
}

span.failure {
    color: #ff0000;
    padding: 3px 0;
    display: block;
}

fieldset.section {
    border: solid 1px #ccc;
    border-radius: 5px;
    padding: 0 10px 10px 10px;
}

    fieldset.section legend {
        padding: 0 5px;
        line-height: 1.2em;
        font-size: 1.2em;
        font-weight: bold;
    }

/*Search Form*/
.search {
    width: 630px;
    padding: 10px 0 15px 0;
}

.search-label {
    padding: 2px 0;
    font-size: 1.2em;
}

.search-value {
    padding: 0 8px 4px 0;
}

.search-actions {
    padding-top: 10px;
}

    .search-actions a {
    }

span.check {
    background-image: url('../Images/check.png') !important;
    background-repeat: no-repeat;
    width: 26px;
    height: 26px;
    vertical-align: text-top;
    border-color: transparent;
    display: inline-block;
    overflow: hidden;
    cursor: help;
}

span.info {
    background-image: url('../Images/info.png') !important;
    background-repeat: no-repeat;
    width: 26px;
    height: 26px;
    vertical-align: text-top;
    border-color: transparent;
    display: inline-block;
    overflow: hidden;
    cursor: help;
}

/*Menu*/
.menu-item {
    font-size: 1.1em;
    font-weight: 500;
    color: #2e2e2e !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
}

/* Modern Kendo Menu Styling */
.k-menu {
    background: #f8f9fa !important;
    border: none !important;
    margin: 0 !important;
    padding: 8px 24px !important;
    border-radius: 0 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.k-menu .k-item {
    background: transparent !important;
    border: none !important;
}

.k-menu .k-link {
    color: #6c757d !important;
    background: transparent !important;
    border: none !important;
    padding: 12px 18px !important;
    font-weight: 500 !important;
    font-size: 1em !important;
    border-radius: 6px !important;
    margin: 0 2px !important;
    transition: all 0.2s ease !important;
    text-decoration: none !important;
}

.k-menu .k-link:hover {
    background: #e9ecef !important;
    color: #495057 !important;
}

.k-menu .k-state-hover > .k-link {
    background: #e9ecef !important;
    color: #495057 !important;
}

/* Active/Selected Page - Simple Styling */
.k-menu .k-state-selected > .k-link,
.k-menu .k-state-highlight > .k-link {
    color: #006838 !important;
    font-weight: 700 !important;
    font-size: 1.1em !important;
}

.k-menu .k-state-selected > .k-link:hover,
.k-menu .k-state-highlight > .k-link:hover {
    color: #006838 !important;
}

/* Dropdown Menu Styling */
.k-menu .k-group {
    background: #fff !important;
    border: 1px solid rgba(0, 104, 56, 0.1) !important;
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
    margin-top: 4px !important;
    overflow: hidden !important;
}

.k-menu .k-group .k-link {
    color: #2e2e2e !important;
    background: transparent !important;
    padding: 12px 16px !important;
    border-radius: 0 !important;
    margin: 0 !important;
    font-weight: 400 !important;
}

.k-menu .k-group .k-link:hover {
    background: #f8f9fa !important;
    color: #006838 !important;
    transform: none !important;
    box-shadow: none !important;
}

.k-menu .k-group .k-state-hover > .k-link {
    background: #f8f9fa !important;
    color: #006838 !important;
}

/* Sub-menu (nested) styling */
.k-menu .k-group .k-group {
    margin-top: 0 !important;
    margin-left: 4px !important;
    border-radius: 6px !important;
}

.k-menu .k-group .k-group .k-link {
    padding-left: 24px !important;
    font-size: 0.95em !important;
}

/* Menu arrow indicators */
.k-menu .k-icon {
    color: inherit !important;
}

.k-menu .k-group .k-icon {
    color: #666 !important;
}

.k-menu .k-item > .k-link > .k-icon {
    position: absolute !important;
    right: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
}

.k-menu .k-item > .k-link {
    position: relative !important;
    padding-right: 32px !important;  
}

.k-menu .k-group .k-item > .k-link > .k-icon {
    right: 12px !important;
}

.export-img {
    background-image: url('../Images/export.png') !important;
    background-repeat: no-repeat;
}

table.form td {
    padding-right: 5px;
}


table.inv-reserve {
    width: 100%;
}

td.inv-reserve-header {
    border-color: #c5c5c5;
    border-style: solid;
    border-width: 1px 1px;
    overflow: hidden;
    padding: .5em .6em .4em .6em;
    font-weight: normal;
    white-space: nowrap;
    text-overflow: ellipsis;
    background-color: #e3e3e3;
}

td.inv-reserve-cell {
    border-color: #c5c5c5;
    border-style: solid;
    border-width: 1px 1px;
    padding: .4em .6em;
    overflow: hidden;
    line-height: 1.6em;
    vertical-align: middle;
    text-overflow: ellipsis;
}

.clear {
    clear: both;
}

div.chart-wrapper {
}

table.kpi-table {
    width: 100%;
}

td.kpi-value {
    text-align: center;
    padding: 8px 4px 2px 4px;
    font-size: 16px;
}

td.kpi-label {
    text-align: center;
    padding: 0px 4px 4px 4px;
    color: #5e5e5e;
}

label.page-size {
    margin-left: 5px;
}


.dashboard-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px 0;
    font-size: 1.8em;
    font-weight: 600;
    color: #2e2e2e;
}

.dashboard-icon {
    font-size: 1.2em;
}

.dashboard-subtitle {
    margin: 0;
    color: #6c757d;
    font-size: 1.1em;
    font-weight: 400;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

@media (min-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1600px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.chart-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.2s ease;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f1f3f4;
    background: #fafbfc;
}

.chart-card-header h6 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #2e2e2e;
}

.chart-type-badge {
    font-size: 0.75em;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.chart-type-badge.pie {
    background: #e3f2fd;
    color: #1976d2;
}

.chart-type-badge.bar {
    background: #e8f5e8;
    color: #006838;
}

.chart-type-badge.line {
    background: #fff3e0;
    color: #f57c00;
}

.chart-type-badge.area {
    background: #f3e5f5;
    color: #7b1fa2;
}

.chart-card-content {
    padding: 20px 24px 24px;
}

.chart-card-content .chart-wrapper {
    margin: 0;
    padding: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .chart-card-header {
        padding: 16px 20px 12px;
    }
    
    .chart-card-content {
        padding: 16px 20px 20px;
    }
}

/* Modern Page Layout */
.page-header {
    margin-bottom: 32px;
    padding: 24px 0;
    border-bottom: 1px solid #e9ecef;
}

.page-title {
    margin: 0 0 8px 0;
    font-size: 1.8em;
    font-weight: 600;
    color: #2e2e2e;
}

.page-subtitle {
    margin: 0;
    color: #6c757d;
    font-size: 1.1em;
    font-weight: 400;
}

/* Inventory Layout */
.inventory-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.search-panel {
    min-width: 0;
}

.chart-panel {
    min-width: 0;
}

.search-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.search-card-header {
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f1f3f4;
    background: #fafbfc;
}

.search-card-header h6 {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #2e2e2e;
}

.search-card-content {
    padding: 24px;
}

.search-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 16px;
    margin-bottom: 20px;
}

.search-field {
    display: flex;
    flex-direction: column;
}

.search-field-full {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.search-label {
    font-weight: 600;
    color: #2e2e2e;
    font-size: 0.95em;
    margin-bottom: 8px;
    display: block;
}

.search-input {
    flex: 1;
}

.search-input-group {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.search-input-group .k-autocomplete {
    flex: 1;
}

.search-actions {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
}

/* Kendo Grid Toolbar Styling */
.k-grid-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px !important;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toolbar-right {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* Clickable Grid Values */
.k-grid td a:not(.k-button) {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: fit-content;
}

.k-grid td a:not(.k-button):hover {
    background: rgba(25, 118, 210, 0.1);
    color: #1565c0;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(25, 118, 210, 0.15);
}

.k-grid td a:not(.k-button):active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(25, 118, 210, 0.2);
}

/* Button Icon Colors */
.k-button .k-svg-icon,
.k-button .k-button-icon {
    color: #000 !important;
    fill: #000 !important;
}

.k-button .k-svg-icon svg,
.k-button .k-button-icon svg {
    fill: #000 !important;
}

/* Ensure icons are visible in all button states */
.k-button:hover .k-svg-icon,
.k-button:hover .k-button-icon,
.k-button:active .k-svg-icon,
.k-button:active .k-button-icon {
    color: #000 !important;
    fill: #000 !important;
}

/* Responsive adjustments for inventory */
@media (max-width: 1200px) {
    .inventory-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .chart-panel {
        order: -1;
    }
}

@media (max-width: 768px) {
    .search-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .search-card-content {
        padding: 20px;
    }
    
    .search-input-group {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Modern Grid Styling */
.modern-grid {
    height: auto !important;
    min-height: 200px !important;
    max-height: calc(100vh - 300px) !important;
    margin-bottom: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modern-grid .k-grid-header-wrap {
    flex-shrink: 0;
}

.modern-grid .k-grid-content {
    background: #fff;
    height: auto !important;
    max-height: none !important;
    flex: 1 1 auto;
    overflow-y: auto;
}

.modern-grid .k-pager-wrap {
    flex-shrink: 0;
}

.modern-grid .k-grid-header {
    background: #fafbfc;
    border-bottom: 2px solid #e9ecef;
}

.modern-grid .k-grid-header th {
    font-weight: 600;
    color: #2e2e2e;
    border-color: #e9ecef;
    padding: 18px 12px;
}



.modern-grid .k-grid-content td {
    padding: 16px 12px;
    border-color: #f1f3f4;
    vertical-align: middle;
    line-height: 1.5;
}

.modern-grid tr:hover {
    background: #f8f9fa !important;
}

/* Modern Pagination */
.modern-grid .k-pager-wrap {
    background: #fafbfc;
    border-top: 2px solid #e9ecef;
    padding: 16px 20px;
    border-radius: 0 0 12px 12px;
}

.modern-grid .k-pager-numbers .k-link {
    border-radius: 6px;
    margin: 0 2px;
    padding: 8px 12px;
    color: #6c757d;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.modern-grid .k-pager-numbers .k-link:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #dee2e6;
}

.modern-grid .k-pager-numbers .k-state-selected {
    background: #006838 !important;
    color: #fff !important;
    border-color: #006838 !important;
    font-weight: 600;
}

.modern-grid .k-pager-info {
    color: #6c757d;
    font-size: 0.95em;
}

.modern-grid .k-pager-nav .k-link {
    border-radius: 6px;
    padding: 8px 12px;
    color: #6c757d;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease;
}

.modern-grid .k-pager-nav .k-link:hover {
    background: #e9ecef;
    color: #495057;
}

/* Grid Toolbar Modern Styling */
.modern-grid .k-grid-toolbar {
    background: #fafbfc;
    border-bottom: 2px solid #e9ecef;
    border-radius: 12px 12px 0 0;
}

/* Generic Modern Popup Form Styling - Use for all popup forms */
/* Body styling for dialog layouts loaded in iframes */
body:has(.modern-edit-form),
body:has(.modern-popup-form) {
    margin: 0 !important;
    padding: 0 !important;
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
}

.modern-popup-form,
.modern-edit-form {
    max-width: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    color: #2c3e50;
    background: #ffffff;
    padding: 12px;
    margin: 0;
    box-sizing: border-box;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
}

.modern-popup-form .form-group,
.modern-edit-form .form-group {
    margin-bottom: 12px;
}

.modern-popup-form .form-row,
.modern-edit-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.modern-popup-form .form-label,
.modern-edit-form .form-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    font-size: 0.95em;
    min-height: 1.5em;
}

.modern-popup-form .form-label.required::after,
.modern-edit-form .form-label.required::after {
    content: " *";
    color: #e74c3c;
    font-weight: bold;
    flex-shrink: 0;
}

.modern-popup-form .form-label small,
.modern-edit-form .form-label small {
    font-weight: normal;
    color: #6c757d;
    font-size: 0.85em;
}

.modern-popup-form .form-field,
.modern-edit-form .form-field {
    position: relative;
}

.modern-popup-form .form-display,
.modern-edit-form .form-display {
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    font-size: 0.95em;
    color: #2c3e50;
}

.modern-popup-form .form-input,
.modern-popup-form .form-dropdown,
.modern-popup-form .form-textarea,
.modern-edit-form .form-input,
.modern-edit-form .form-dropdown,
.modern-edit-form .form-textarea {
    width: 100% !important;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.95em;
    transition: all 0.3s ease;
    background: #ffffff;
    box-sizing: border-box;
}

.modern-popup-form .form-input:focus,
.modern-popup-form .form-dropdown:focus,
.modern-popup-form .form-textarea:focus,
.modern-edit-form .form-input:focus,
.modern-edit-form .form-dropdown:focus,
.modern-edit-form .form-textarea:focus {
    outline: none;
    border-color: #006838;
    box-shadow: 0 0 0 3px rgba(0, 104, 56, 0.1);
    background: #fefffe;
}

.modern-popup-form .form-textarea,
.modern-edit-form .form-textarea {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.modern-popup-form .form-textarea::placeholder,
.modern-edit-form .form-textarea::placeholder {
    color: #94a3b8;
    font-style: italic;
}

.modern-popup-form .form-section,
.modern-edit-form .form-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    transition: all 0.3s ease;
}

.modern-popup-form .form-section:hover,
.modern-edit-form .form-section:hover {
    border-color: #dee2e6;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.modern-popup-form .form-section-header,
.modern-edit-form .form-section-header {
    margin-bottom: 8px;
}

.modern-popup-form .form-section-header h4,
.modern-edit-form .form-section-header h4 {
    color: #2c3e50;
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modern-popup-form .form-actions,
.modern-edit-form .form-actions {
    display: flex !important;
    justify-content: center !important;
    padding: 24px 0 24px;
    border-top: 1px solid #f1f3f4;
    margin-top: auto !important;
}

.modern-popup-form .submit-button,
.modern-edit-form .submit-button {
    background: linear-gradient(135deg, #006838, #007d40) !important;
    border: none !important;
    color: white !important;
    padding: 14px 32px !important;
    font-size: 1em !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 104, 56, 0.2) !important;
    cursor: pointer;
    min-width: 180px;
}

.modern-popup-form .submit-button:hover,
.modern-edit-form .submit-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 104, 56, 0.3) !important;
    background: linear-gradient(135deg, #007d40, #006838) !important;
}

.modern-popup-form .submit-button:active,
.modern-edit-form .submit-button:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 8px rgba(0, 104, 56, 0.2) !important;
}

/* Ensure all popup forms use full width */
.k-window .k-window-content {
    width: 100% !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.k-window .k-window-content .modern-edit-form,
.k-window .k-window-content .modern-popup-form {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
}

.k-popup-edit-form,
.k-edit-form-container {
    width: 100% !important;
}

.k-window .k-window-content form {
    width: 100% !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
}

.modern-edit-form form,
.modern-popup-form form {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    min-height: 0 !important;
}

/* Totals Section Styling for Invoice Edit */
.totals-section {
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
    margin-top: 20px;
}

.totals-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 10px;
    gap: 15px;
}

.totals-row.grand-total {
    font-weight: bold;
    font-size: 1.1em;
    border-top: 1px solid #ccc;
    padding-top: 10px;
    margin-top: 15px;
}

.totals-label {
    min-width: 150px;
    text-align: right;
    margin: 0;
}

.totals-field {
    min-width: 120px;
}

.totals-input {
    width: 120px !important;
}

.totals-display {
    min-width: 120px;
    text-align: right;
    font-size: 1.1em;
}

/* Additional popup form styles for invoice cancellation */
.info-message {
    background-color: #e7f3ff;
    border-left: 4px solid #2196F3;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-style: italic;
}

.reserves-list {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 15px;
    margin-top: 10px;
}

.no-reserves {
    color: #6c757d;
    font-style: italic;
}

.reserve-item {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.reserve-item:last-child {
    border-bottom: none;
}

/* Modern Invoice View Styling */
.modern-invoice-view {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.4;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #006838;
    color: white;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.invoice-title {
    font-size: 28px;
    font-weight: bold;
}

.invoice-logo img {
    height: 40px;
}

.invoice-info-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    gap: 40px;
}

.company-info {
    flex: 1;
}

.company-name {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.company-address, .company-contact {
    margin-bottom: 3px;
}

.invoice-details {
    flex: 1;
    text-align: right;
}

.invoice-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    min-width: 300px;
}

.detail-label {
    font-weight: bold;
    margin-right: 15px;
}

.detail-value {
    text-align: right;
}

.invoice-billing-section {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.billing-header {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    color: #006838;
}

.billing-line {
    margin-bottom: 3px;
}

.invoice-insurance-section {
    margin-bottom: 25px;
}

.insurance-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    border: 2px solid #006838;
    border-radius: 4px;
    overflow: hidden;
}

.insurance-header {
    background-color: #DBEFD3;
    padding: 12px 8px;
    font-weight: bold;
    text-align: center;
    border-right: 1px solid #006838;
    font-size: 12px;
}

.insurance-header:last-child {
    border-right: none;
}

.insurance-value {
    padding: 12px 8px;
    border-right: 1px solid #006838;
    border-top: 1px solid #006838;
    text-align: center;
}

.insurance-value:last-child {
    border-right: none;
}

.invoice-products-section {
    margin-bottom: 25px;
}

.products-header {
    background-color: #006838;
    color: white;
    padding: 10px 15px;
    text-align: center;
    border-radius: 4px 4px 0 0;
}

.products-header h3 {
    margin: 0;
    font-size: 16px;
}

.products-table {
    border: 2px solid #006838;
    border-top: none;
    border-radius: 0 0 4px 4px;
    overflow: hidden;
}

.products-table-header {
    display: grid;
    grid-template-columns: 100px 1fr 120px 120px 120px;
    background-color: #DBEFD3;
}

.products-table-header > div {
    padding: 12px 8px;
    font-weight: bold;
    text-align: center;
    border-right: 1px solid #006838;
    font-size: 12px;
}

.products-table-header > div:last-child {
    border-right: none;
}

.products-table-row {
    display: grid;
    grid-template-columns: 100px 1fr 120px 120px 120px;
    border-top: 1px solid #006838;
}

.products-table-row > div {
    padding: 10px 8px;
    border-right: 1px solid #006838;
}

.products-table-row > div:last-child {
    border-right: none;
}

.col-quantity, .col-unit {
    text-align: center;
}

.col-price, .col-total {
    text-align: right;
}

.products-table-totals {
    border-top: 2px solid #006838;
    padding: 15px;
    background-color: #f9f9f9;
}

.total-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    padding: 5px 0;
    margin-right: 0px;
}

.total-row.balance-due {
    font-weight: bold;
    background-color: #DBEFD3;
    padding: 10px 15px;
    margin: 10px -15px -15px -15px;
    border-top: 1px solid #006838;
}

.total-label {
    font-weight: bold;
    text-align: right;
    padding-right: 15px;
    grid-column: 2;
}

.total-value {
    font-weight: bold;
    min-width: 120px;
    text-align: left;
    padding-left: 15px;
    grid-column: 3;
}

/* Grid structure for totals provides better control */
.modern-invoice-view .products-table-totals .total-row,
.modern-quote-view .products-table-totals .total-row,
.modern-return-authorization-view .products-table-totals .total-row,
.modern-purchase-order-view .products-table-totals .total-row {
    grid-template-columns: 1fr 200px 120px;
}

.invoice-notes-section {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.notes-header {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
}

.notes-content {
    line-height: 1.5;
}

.invoice-notices-section {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.notices-header {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 15px;
}

.notices-list {
    margin-bottom: 20px;
    padding-left: 20px;
}

.notices-list li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.signature-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.signature-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.signature-label, .date-label {
    font-weight: bold;
    white-space: nowrap;
}

.signature-line {
    flex: 1;
    min-width: 300px;
}

.date-line {
    min-width: 100px;
}

.return-instructions {
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    padding: 15px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.invoice-footer {
    background-color: #006838;
    color: white;
    text-align: center;
    padding: 8px;
    font-weight: bold;
    font-size: 14px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.invoice-actions {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

/* Modern Purchase Order View Styling */
.modern-purchase-order-view {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.4;
}

.po-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #006838;
    color: white;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.po-title {
    font-size: 28px;
    font-weight: bold;
}

.po-logo img {
    height: 40px;
}

.po-info-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    gap: 40px;
}

.po-company-info {
    flex: 1;
}

.po-details {
    flex: 1;
    text-align: right;
}

.po-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    min-width: 250px;
}

.po-addresses-section {
    display: flex;
    gap: 40px;
    margin-bottom: 25px;
}

.po-vendor-section, .po-shipto-section {
    flex: 1;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.address-header {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 10px;
    color: #006838;
}

.address-line {
    margin-bottom: 3px;
}

.po-ordered-by-section, .po-shipping-section {
    margin-bottom: 25px;
}

.po-ordered-grid, .po-shipping-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border: 2px solid #006838;
    border-radius: 4px;
    overflow: hidden;
}

.ordered-header, .shipping-header {
    background-color: #DBEFD3;
    padding: 12px 8px;
    font-weight: bold;
    text-align: center;
    border-right: 1px solid #006838;
    font-size: 12px;
}

.ordered-header:last-child, .shipping-header:last-child {
    border-right: none;
}

.ordered-value, .shipping-value {
    padding: 12px 8px;
    border-right: 1px solid #006838;
    border-top: 1px solid #006838;
    text-align: center;
}

.ordered-value:last-child, .shipping-value:last-child {
    border-right: none;
}

.po-line-items-section {
    margin-bottom: 25px;
}

.po-line-items-table {
    border: 2px solid #006838;
    border-radius: 4px;
    overflow: hidden;
}

.po-table-header {
    display: grid;
    grid-template-columns: 100px 1fr 120px 125px 125px;
    background-color: #DBEFD3;
}

.po-table-header > div {
    padding: 12px 8px;
    font-weight: bold;
    text-align: center;
    border-right: 1px solid #006838;
    font-size: 12px;
}

.po-table-header > div:last-child {
    border-right: none;
}

.po-table-row {
    display: grid;
    grid-template-columns: 100px 1fr 120px 125px 125px;
    border-top: 1px solid #006838;
}

.po-table-row > div {
    padding: 10px 8px;
    border-right: 1px solid #006838;
}

.po-table-row > div:last-child {
    border-right: none;
}

.po-table-total {
    border-top: 2px solid #006838;
    padding: 15px;
    background-color: #f9f9f9;
    display: flex;
    justify-content: flex-end;
}

.po-notes-section {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.po-actions {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

/* Modern Quote View Styling */
.modern-quote-view {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.4;
}

.quote-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #006838;
    color: white;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.quote-title {
    font-size: 28px;
    font-weight: bold;
}

.quote-logo img {
    height: 40px;
}

.quote-info-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    gap: 40px;
}

.quote-company-info {
    flex: 1;
}

.quote-details {
    flex: 1;
    text-align: right;
}

.quote-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    min-width: 250px;
}

.quote-billing-section {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.quote-insurance-section {
    margin-bottom: 25px;
}

.quote-insurance-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    border: 2px solid #006838;
    border-radius: 4px;
    overflow: hidden;
}

.quote-products-section, .quote-pricing-section, .quote-invoice-section {
    margin-bottom: 25px;
}

.quote-products-table, .quote-pricing-table, .quote-invoice-table {
    border: 2px solid #006838;
    border-radius: 4px;
    overflow: hidden;
}

.quote-products-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    background-color: #DBEFD3;
}

.quote-pricing-header, .quote-invoice-header {
    display: grid;
    grid-template-columns: 100px 1fr 175px 175px;
    background-color: #DBEFD3;
}

.quote-products-header > div,
.quote-pricing-header > div,
.quote-invoice-header > div {
    padding: 12px 8px;
    font-weight: bold;
    text-align: center;
    border-right: 1px solid #006838;
    font-size: 12px;
}

.quote-products-header > div:last-child,
.quote-pricing-header > div:last-child,
.quote-invoice-header > div:last-child {
    border-right: none;
}

.quote-products-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    border-top: 1px solid #006838;
}

.quote-pricing-row, .quote-invoice-row {
    display: grid;
    grid-template-columns: 100px 1fr 175px 175px;
    border-top: 1px solid #006838;
}

.quote-products-row > div,
.quote-pricing-row > div,
.quote-invoice-row > div {
    padding: 10px 8px;
    border-right: 1px solid #006838;
}

.quote-products-row > div:last-child,
.quote-pricing-row > div:last-child,
.quote-invoice-row > div:last-child {
    border-right: none;
}

.col-manufacturer, .col-product, .col-color {
    text-align: center;
}

.quote-pricing-total, .quote-invoice-totals {
    border-top: 2px solid #006838;
    padding: 15px;
    background-color: #f9f9f9;
}

.quote-pricing-total {
    display: flex;
    justify-content: flex-end;
}

.total-row.material-cost {
    background-color: #DBEFD3;
    padding: 10px 15px;
    border-radius: 4px;
    font-weight: bold;
}

.total-row.total-due {
    font-weight: bold;
    background-color: #DBEFD3;
    padding: 10px 15px;
    margin: 5px -15px -15px -15px;
    border-top: 1px solid #006838;
}

.quote-notes-section {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.quote-footer {
    background-color: #006838;
    color: white;
    text-align: center;
    padding: 8px;
    font-weight: bold;
    font-size: 14px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.quote-actions {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

/* Modern Return Authorization View Styling */
.modern-return-authorization-view {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.4;
}

.ra-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #006838;
    color: white;
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.ra-title {
    font-size: 28px;
    font-weight: bold;
}

.ra-logo img {
    height: 40px;
}

.ra-info-section {
    display: flex;
    justify-content: space-between;
    margin-bottom: 25px;
    gap: 40px;
}

.ra-company-info {
    flex: 1;
}

.ra-details {
    flex: 1;
    text-align: right;
}

.ra-detail-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    min-width: 250px;
}

.ra-addresses-section {
    display: flex;
    gap: 40px;
    margin-bottom: 25px;
}

.ra-from-section, .ra-shipto-section {
    flex: 1;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.ra-authorization-section {
    margin-bottom: 25px;
}

.ra-authorization-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border: 2px solid #006838;
    border-radius: 4px;
    overflow: hidden;
}

.auth-header {
    background-color: #DBEFD3;
    padding: 12px 8px;
    font-weight: bold;
    text-align: center;
    border-right: 1px solid #006838;
    font-size: 12px;
}

.auth-header:last-child {
    border-right: none;
}

.auth-value {
    padding: 12px 8px;
    border-right: 1px solid #006838;
    border-top: 1px solid #006838;
    text-align: center;
}

.auth-value:last-child {
    border-right: none;
}

.ra-products-section {
    margin-bottom: 25px;
}

.ra-products-table {
    border: 2px solid #006838;
    border-radius: 4px;
    overflow: hidden;
}

.ra-table-header {
    display: grid;
    grid-template-columns: 100px 1fr 120px 135px 135px;
    background-color: #DBEFD3;
}

.ra-table-header > div {
    padding: 12px 8px;
    font-weight: bold;
    text-align: center;
    border-right: 1px solid #006838;
    font-size: 12px;
}

.ra-table-header > div:last-child {
    border-right: none;
}

.ra-table-row {
    display: grid;
    grid-template-columns: 100px 1fr 120px 135px 135px;
    border-top: 1px solid #006838;
}

.ra-table-row > div {
    padding: 10px 8px;
    border-right: 1px solid #006838;
}

.ra-table-row > div:last-child {
    border-right: none;
}

.ra-table-totals {
    border-top: 2px solid #006838;
    padding: 15px;
    background-color: #f9f9f9;
}

.ra-table-totals .total-row.grand-total {
    font-weight: bold;
    background-color: #DBEFD3;
    padding: 10px 15px;
    margin: 10px -15px -15px -15px;
    border-top: 1px solid #006838;
}

.ra-notes-section, .ra-notices-section {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.ra-footer {
    background-color: #006838;
    color: white;
    text-align: center;
    padding: 8px;
    font-weight: bold;
    font-size: 14px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.ra-actions {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

/* Print styles for return authorization */
@media print {
    .modern-return-authorization-view {
        padding: 0;
        margin: 0;
        max-width: none;
    }
    
    .ra-header, .ra-footer {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* Print styles for quote */
@media print {
    .modern-quote-view {
        padding: 0;
        margin: 0;
        max-width: none;
    }
    
    .quote-header, .quote-footer {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* Print styles for purchase order */
@media print {
    .modern-purchase-order-view {
        padding: 0;
        margin: 0;
        max-width: none;
    }
    
    .po-header {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* Print styles for invoice */
@media print {
    .modern-invoice-view {
        padding: 0;
        margin: 0;
        max-width: none;
    }
    
    .invoice-header, .invoice-footer {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* Fix auto-generated Kendo edit forms */
.k-window .k-window-content .k-edit-form-container {
    max-width: 100% !important;
    padding: 20px !important;
    box-sizing: border-box !important;
}

.k-window .k-window-content .k-edit-form-container .k-edit-field {
    margin-bottom: 16px !important;
}

.k-window .k-window-content .k-edit-form-container .k-textbox,
.k-window .k-window-content .k-edit-form-container .k-input {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Kendo UI Component Overrides for Modern Form */
.modern-popup-form .k-dropdown,
.modern-popup-form .k-numeric-textbox,
.modern-edit-form .k-dropdown,
.modern-edit-form .k-numeric-textbox {
    border: 2px solid #e1e5e9 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    width: 100% !important;
}

.modern-popup-form .k-dropdown:focus-within,
.modern-popup-form .k-numeric-textbox:focus-within,
.modern-edit-form .k-dropdown:focus-within,
.modern-edit-form .k-numeric-textbox:focus-within {
    border-color: #006838 !important;
    box-shadow: 0 0 0 3px rgba(0, 104, 56, 0.1) !important;
}

.modern-popup-form .k-dropdown .k-dropdown-wrap,
.modern-popup-form .k-numeric-textbox .k-numeric-wrap,
.modern-edit-form .k-dropdown .k-dropdown-wrap,
.modern-edit-form .k-numeric-textbox .k-numeric-wrap {
    border: none !important;
    border-radius: 6px !important;
    padding: 12px 16px !important;
    background: transparent !important;
}

.modern-popup-form .k-dropdown .k-input,
.modern-popup-form .k-numeric-textbox .k-input,
.modern-edit-form .k-dropdown .k-input,
.modern-edit-form .k-numeric-textbox .k-input {
    font-size: 0.95em !important;
    color: #2c3e50 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
}

.modern-popup-form .k-dropdown .k-select,
.modern-edit-form .k-dropdown .k-select {
    border: none !important;
    background: transparent !important;
    border-radius: 0 6px 6px 0 !important;
}

/* Kendo Window Controls Fix */
.k-window-titlebar {
    background: linear-gradient(135deg, #006838, #007d40) !important;
    color: white !important;
    border: none !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 12px 16px !important;
}

.k-window-title {
    color: white !important;
    font-weight: 600 !important;
    font-size: 1.1em !important;
}

.k-window-actions {
    position: relative !important;
    z-index: 10 !important;
}

.k-window-action {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 4px !important;
    color: white !important;
    width: 24px !important;
    height: 24px !important;
    margin-left: 4px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.k-window-action:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: scale(1.05) !important;
}

.k-window-action:active {
    transform: scale(0.95) !important;
}

.k-window-action .k-icon {
    color: white !important;
    font-size: 14px !important;
}

.k-window {
    border-radius: 8px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15) !important;
    border: none !important;
    width: 75vw !important;
    height: 95vh !important;
}

.k-window-content {
    padding: 0 !important;
    border-radius: 0 0 8px 8px !important;
    overflow: auto !important;
}

/* For iframe-based Kendo windows, ensure iframe fills the content area */
.k-window-content iframe {
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    display: block !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modern-edit-form .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .modern-edit-form .form-section {
        padding: 16px;
        margin: 16px 0;
    }
    
    .modern-edit-form .form-header {
        padding: 12px 16px;
    }
}


/* Global input styling to match Kendo UI components */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4285714286 !important;
    padding: 8px 12px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    color: #3d3d3d !important;
    outline: none !important;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out !important;
    box-sizing: border-box !important;
    width: 100%;
    min-height: 36px;
}

input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
input[type="number"]:hover,
textarea:hover,
select:hover {
    border-color: rgba(0, 0, 0, 0.16) !important;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #006838 !important;
    box-shadow: 0 0 0 3px rgba(0, 104, 56, 0.1) !important;
}

input[type="text"]:disabled,
input[type="password"]:disabled,
input[type="email"]:disabled,
input[type="number"]:disabled,
textarea:disabled,
select:disabled {
    background-color: #f5f5f5 !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
    color: #999 !important;
    cursor: not-allowed !important;
}

/* Override all Kendo UI components to use Inter font */
.k-widget,
.k-button,
.k-input,
.k-textbox,
.k-dropdown,
.k-grid,
.k-menu,
.k-window,
.k-dialog,
.k-notification,
.k-tooltip,
.k-autocomplete,
.k-datepicker,
.k-numerictextbox,
.k-combobox,
.k-multiselect,
.k-editor,
.k-upload,
.k-chart,
.k-gauge,
.k-scheduler,
.k-splitter,
.k-tabstrip,
.k-panelbar,
.k-treeview,
.k-listview,
.k-gantt {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
}

/* Specific Kendo Grid Font Overrides */
.k-grid,
.k-grid *,
.k-grid-header,
.k-grid-header *,
.k-grid-content,
.k-grid-content *,
.k-grid-toolbar,
.k-grid-toolbar *,
.k-pager-wrap,
.k-pager-wrap * {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
}

/* Specific Kendo Chart Font Overrides */
.k-chart,
.k-chart *,
.k-chart-surface,
.k-chart-surface *,
.k-chart-legend,
.k-chart-legend *,
.k-chart-tooltip,
.k-chart-tooltip *,
.k-svg-text,
text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
}

/* SVG text elements in charts */
svg text,
.k-chart svg text,
.k-stockchart svg text,
.k-treemap svg text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
}

/* ===== INVENTORY SUCCESS PAGE STYLING ===== */

/* Success Message */
.success-message {
    padding: 16px 20px;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #c3e6cb;
    border-radius: 12px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.15);
    text-align: center;
}

.success-text {
    color: #155724;
    font-weight: 600;
    font-size: 16px;
}

/* Info Cards */
.info-card {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 14px 20px;
    border-bottom: 1px solid #e1e5e9;
}

.card-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.card-content {
    padding: 20px;
}

.info-row {
    display: flex;
    gap: 24px;
    margin-bottom: 16px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-label {
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 15px;
    font-weight: 500;
    color: #2c3e50;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    min-height: 20px;
    display: flex;
    align-items: center;
}

/* Special badges */
.location-badge {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border-color: #ffeaa7;
    font-weight: 600;
    text-align: center;
}

.quantity-badge {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-color: #bee5eb;
    font-weight: 600;
    text-align: center;
}

.price-badge {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #c3e6cb;
    font-weight: 600;
    text-align: center;
    font-size: 16px;
}

/* Responsive design */
@media (max-width: 768px) {
    .info-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .success-message {
        flex-direction: column;
        text-align: center;
    }
    
    .card-content {
        padding: 16px;
    }
}

/* Modern table styling for readonly views */
.modern-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
}

.modern-table th {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 1px solid #e1e5e9;
    border-right: 1px solid #e1e5e9;
}

.modern-table th:last-child {
    border-right: none;
}

.modern-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f3f4;
    border-right: 1px solid #f1f3f4;
    color: #2c3e50;
}

.modern-table td:last-child {
    border-right: none;
}

.modern-table tr:last-child td {
    border-bottom: none;
}

.modern-table tr:nth-child(even) {
    background-color: #f8f9fa;
}

.modern-table tr:hover {
    background-color: #e3f2fd;
}

/* Fix for all Line Items Grids - Edit and Delete buttons side by side */
[id*="LineItems"] .k-command-cell,
[id*="LineItemsGrid"] .k-command-cell {
    white-space: nowrap !important;
    padding: 4px !important;
    text-align: center !important;
}

[id*="LineItems"] .k-command-cell .k-button,
[id*="LineItemsGrid"] .k-command-cell .k-button {
    display: inline-block !important;
    margin-right: 4px !important;
    margin-bottom: 0 !important;
    vertical-align: middle !important;
    font-size: 11px !important;
    padding: 2px 6px !important;
}

[id*="LineItems"] .k-command-cell .k-button:last-child,
[id*="LineItemsGrid"] .k-command-cell .k-button:last-child {
    margin-right: 0 !important;
}

/* ===== COMPREHENSIVE PRINT STYLES FOR COMPACT PRINTING ===== */
@media print {
    /* Global print settings */
    * {
        font-size: 11px !important;
        line-height: 1.2 !important;
    }

    body {
        margin: 0 !important;
        padding: 10px !important;
    }

    /* Hide non-essential elements */
    .quote-actions,
    .invoice-actions,
    .ra-actions,
    .po-actions {
        display: none !important;
    }

    /* Compact headers */
    h1, h2, h3, h4, h5, h6 {
        font-size: 13px !important;
        margin: 8px 0 4px 0 !important;
        font-weight: bold !important;
    }

    /* Compact sections */
    .quote-info-section,
    .invoice-info-section,
    .ra-info-section,
    .po-info-section {
        margin-bottom: 15px !important;
    }

    .quote-billing-section,
    .invoice-billing-section,
    .ra-billing-section,
    .po-billing-section {
        margin-bottom: 12px !important;
    }

    .quote-insurance-section,
    .invoice-insurance-section,
    .ra-insurance-section {
        margin-bottom: 12px !important;
    }

    /* Compact tables */
    .quote-products-table,
    .quote-pricing-table,
    .quote-invoice-table,
    .products-table,
    .ra-products-table,
    .po-line-items-table {
        margin-bottom: 12px !important;
    }

    .quote-products-header,
    .quote-pricing-header,
    .quote-invoice-header,
    .products-table-header,
    .ra-table-header,
    .po-table-header {
        font-size: 10px !important;
        padding: 4px !important;
    }

    /* Fix products header section in print */
    .products-header {
        background-color: #006838 !important;
        color: white !important;
        padding: 6px 10px !important;
        margin-bottom: 0 !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    .products-header h3 {
        font-size: 12px !important;
        margin: 0 !important;
    }

    .invoice-products-section {
        margin-bottom: 10px !important;
    }

    .quote-products-row,
    .quote-pricing-row,
    .quote-invoice-row,
    .products-table-row,
    .ra-table-row,
    .po-table-row {
        font-size: 10px !important;
        padding: 3px !important;
    }

    /* Compact totals section */
    .quote-pricing-total,
    .quote-invoice-totals,
    .products-table-totals,
    .ra-table-totals,
    .po-table-totals {
        margin-top: 8px !important;
    }

    .total-row {
        padding: 2px 0 !important;
        margin-right: 0px !important;
        font-size: 10px !important;
        grid-template-columns: 1fr 140px 80px !important;
    }

    .total-row.balance-due,
    .total-row.material-cost,
    .total-row.total-due,
    .total-row.grand-total {
        padding: 6px 10px !important;
        margin: 5px -10px -10px -10px !important;
        font-size: 12px !important;
    }

    .total-label {
        font-size: 10px !important;
        text-align: right !important;
        padding-right: 10px !important;
        grid-column: 2 !important;
    }

    .total-value {
        min-width: 60px !important;
        font-size: 10px !important;
        text-align: left !important;
        padding-left: 10px !important;
        grid-column: 3 !important;
    }

    /* Compact notes and notices */
    .quote-notes-section,
    .invoice-notes-section,
    .invoice-notices-section,
    .ra-notes-section,
    .po-notes-section {
        margin-bottom: 12px !important;
        padding: 8px !important;
    }

    .notices-list li {
        font-size: 9px !important;
        margin-bottom: 2px !important;
    }

    /* Compact signature section */
    .signature-section {
        margin-top: 10px !important;
        font-size: 10px !important;
    }

    /* Compact footer */
    .quote-footer,
    .invoice-footer,
    .ra-footer,
    .po-footer {
        margin-top: 8px !important;
        font-size: 10px !important;
        font-weight: bold !important;
        padding: 4px 0 !important;
    }

    /* Company info */
    .quote-company-info,
    .invoice-company-info,
    .ra-company-info,
    .po-company-info {
        font-size: 10px !important;
        line-height: 1.1 !important;
    }

    /* Insurance grid */
    .quote-insurance-grid,
    .invoice-insurance-grid,
    .ra-insurance-grid {
        font-size: 10px !important;
        gap: 8px !important;
    }

    .insurance-header {
        font-size: 9px !important;
        padding: 2px !important;
    }

    .insurance-value {
        font-size: 10px !important;
        padding: 2px !important;
    }

    /* Page breaks */
    .quote-products-section,
    .quote-pricing-section,
    .invoice-products-section,
    .ra-products-section,
    .po-line-items-section {
        page-break-inside: avoid;
    }

    /* Logo sizing */
    .quote-logo img,
    .invoice-logo img,
    .ra-logo img,
    .po-logo img {
        max-height: 25px !important;
        width: auto !important;
    }

    /* Compact headers */
    .quote-header,
    .invoice-header,
    .ra-header,
    .po-header {
        margin-bottom: 8px !important;
        padding: 5px 15px !important;
    }

    .quote-title,
    .invoice-title,
    .ra-title,
    .po-title {
        font-size: 14px !important;
        margin: 0 !important;
    }

    /* More aggressive spacing reductions */
    .quote-info-section,
    .invoice-info-section,
    .ra-info-section,
    .po-info-section {
        margin-bottom: 4px !important;
        padding: 2px 0 !important;
    }

    .quote-billing-section,
    .invoice-billing-section,
    .ra-billing-section,
    .po-billing-section {
        margin-bottom: 4px !important;
        padding: 2px 0 !important;
    }

    .quote-insurance-section,
    .invoice-insurance-section,
    .ra-insurance-section {
        margin-bottom: 4px !important;
        padding: 2px 0 !important;
    }

    /* Ultra compact detail rows */
    .quote-detail-row,
    .invoice-detail-row,
    .ra-detail-row,
    .po-detail-row {
        margin-bottom: 2px !important;
        line-height: 1.1 !important;
    }

    .detail-label {
        font-size: 9px !important;
        font-weight: bold !important;
    }

    .detail-value {
        font-size: 10px !important;
    }

    /* Billing address compression */
    .billing-address,
    .shipping-address {
        line-height: 1.1 !important;
    }

    .billing-line {
        margin-bottom: 1px !important;
        font-size: 10px !important;
    }

    /* Company info compression */
    .company-name {
        font-size: 11px !important;
        font-weight: bold !important;
        margin-bottom: 2px !important;
    }

    .company-address,
    .company-contact {
        font-size: 9px !important;
        margin-bottom: 1px !important;
    }
}

/* Profile Page Styles */
.profile-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-avatar {
    flex-shrink: 0;
}

.avatar-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #006838 0%, #4CAF50 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 104, 56, 0.3);
}

.profile-info {
    flex: 1;
}

.profile-name {
    margin: 0 0 6px 0;
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
}

.profile-username {
    margin: 0 0 4px 0;
    font-size: 16px;
    color: #006838;
    font-weight: 500;
}

.profile-email {
    margin: 0;
    font-size: 14px;
    color: #6c757d;
}

.profile-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;
}

.profile-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #e9ecef;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.card-icon {
    width: 32px;
    height: 32px;
    background: #006838;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
}

.card-icon.security {
    background: #dc3545;
}

.card-title h3 {
    margin: 0 0 2px 0;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
}

.card-title p {
    margin: 0;
    font-size: 12px;
    color: #6c757d;
}

.profile-form {
    padding: 6px 18px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.form-grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
    margin-top: 0;
}

.form-group {
    position: relative;
    margin-bottom: 16px;
}

.form-group:first-child {
    margin-top: 0;
}

.form-grid-2col:first-child {
    margin-top: 0;
}

.form-label {
    display: inline-block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.label-wrapper {
    display: block;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #006838;
    box-shadow: 0 0 0 3px rgba(0, 104, 56, 0.1);
}

.required-indicator {
    color: #dc3545;
    font-weight: bold;
    margin-left: 4px;
    display: inline;
}

.form-help {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

.security-info {
    margin-bottom: 16px;
    order: -1;
}

.security-tip {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: #fff3cd;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
}

.security-tip .k-icon {
    color: #856404;
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.security-tip strong {
    color: #856404;
    margin-bottom: 6px;
    display: block;
    font-size: 14px;
}

.security-tip p {
    margin: 0;
    font-size: 13px;
    color: #856404;
    line-height: 1.4;
}

.form-actions {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #e9ecef;
    display: flex;
    justify-content: flex-end;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn-primary:active {
    background: #dee2e6;
}

.profile-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
}

.profile-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.profile-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .profile-header {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .profile-content {
        grid-template-columns: 1fr;
    }

    .form-grid-2col {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .profile-container {
        padding: 12px;
    }
}


/* Action buttons in grids - tighter spacing for AutoFit */
.modern-grid .k-grid-content td .k-button {
    margin: 0 1px !important;
}

.modern-grid .k-grid-content td .k-button:first-child {
    margin-left: 0 !important;
}

.modern-grid .k-grid-content td .k-button:last-child {
    margin-right: 0 !important;
}


/* Override flexbox gap in action button containers */
.modern-grid .k-grid-content td div[style*='gap: 8px'] {
    gap: 2px !important;
}


/* More specific gap override for inventory grid action buttons */
#InventoryMasterGrid .k-grid-content td div {
    gap: 3px !important;
}

/* Apply to all modern grids with flexbox containers */
.modern-grid .k-grid-content td div[style] {
    gap: 3px !important;
}

/* Line Items Grid Global Styling - Compact Design */
/* Target all grids with "LineItemsGrid" in their name or class */
[id*="LineItemsGrid"], [id*="LineItems"], .line-items-grid {
    --kendo-font-size: 12px !important;
    --kendo-spacing-2: 0.375rem !important;
    --kendo-spacing-3: 0.5rem !important;
    font-size: 12px !important;
}

/* Make all line items grids more compact with higher specificity */
[id*="LineItemsGrid"].k-grid,
[id*="LineItemsGrid"].k-grid *,
[id*="LineItemsGrid"] .k-table,
[id*="LineItemsGrid"] .k-table *,
[id*="LineItems"].k-grid,
[id*="LineItems"].k-grid *,
[id*="LineItems"] .k-table,
[id*="LineItems"] .k-table * {
    font-size: 12px !important;
}

[id*="LineItemsGrid"] .k-grid-header .k-table-th,
[id*="LineItemsGrid"] .k-grid-content .k-table-td,
[id*="LineItemsGrid"] .k-table-th,
[id*="LineItemsGrid"] .k-table-td,
[id*="LineItems"] .k-grid-header .k-table-th,
[id*="LineItems"] .k-grid-content .k-table-td,
[id*="LineItems"] .k-table-th,
[id*="LineItems"] .k-table-td {
    padding: 4px 6px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    vertical-align: middle !important;
}

[id*="LineItemsGrid"] .k-grid-content input,
[id*="LineItemsGrid"] .k-grid-content .k-textbox,
[id*="LineItemsGrid"] .k-grid-content .k-numerictextbox input,
[id*="LineItemsGrid"] .k-grid-content .k-dropdown-wrap,
[id*="LineItems"] .k-grid-content input,
[id*="LineItems"] .k-grid-content .k-textbox,
[id*="LineItems"] .k-grid-content .k-numerictextbox input,
[id*="LineItems"] .k-grid-content .k-dropdown-wrap {
    font-size: 11px !important;
    padding: 3px 4px !important;
    min-height: 24px !important;
    height: 24px !important;
}

[id*="LineItemsGrid"] .k-button,
[id*="LineItemsGrid"] .k-grid-toolbar .k-button,
[id*="LineItems"] .k-button,
[id*="LineItems"] .k-grid-toolbar .k-button {
    font-size: 11px !important;
    padding: 4px 6px !important;
    min-height: 22px !important;
    height: 22px !important;
}

/* Force smaller row heights for line items grids */
[id*="LineItemsGrid"] tbody tr,
[id*="LineItemsGrid"] .k-table-tbody .k-table-row,
[id*="LineItems"] tbody tr,
[id*="LineItems"] .k-table-tbody .k-table-row {
    height: 28px !important;
}

/* Target all text content in line items grids */
[id*="LineItemsGrid"] .k-grid-content,
[id*="LineItemsGrid"] .k-grid-header,
[id*="LineItemsGrid"] td,
[id*="LineItemsGrid"] th,
[id*="LineItemsGrid"] span,
[id*="LineItemsGrid"] div,
[id*="LineItems"] .k-grid-content,
[id*="LineItems"] .k-grid-header,
[id*="LineItems"] td,
[id*="LineItems"] th,
[id*="LineItems"] span,
[id*="LineItems"] div {
    font-size: 12px !important;
}

/* Note editor popup styles */
.k-edit-form-container {
    padding: 20px;
    width: 100%;
}

.k-edit-form-container .k-edit-label {
    width: 100%;
    text-align: left;
    margin-bottom: 8px;
    color: #000000 !important;
    font-weight: 500;
}

.k-edit-form-container .k-edit-field {
    width: 100%;
}

.k-edit-form-container textarea,
textarea#Description,
textarea.text-box.multi-line {
    width: 100% !important;
    height: 50vh !important;
    border: 1px solid #9ca3af !important;
    border-radius: 4px !important;
    padding: 10px !important;
    font-size: 14px !important;
    box-sizing: border-box !important;
}
