/* ==========================================================
   ISoft ERP - layout.css
   NOTE:
   This is Part 1 starter generated file.
   Replace/extend in subsequent parts.
========================================================== */

/* ---------- RESET ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*html, body {
    height: 100%;
}*/

body {
    font-family: "Segoe UI",Arial,sans-serif;
    background: #F8FAFC;
    color: #111827;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.erp-scroll-panel {
    max-height: calc(100vh - 220px);
    overflow-y: auto;
    overflow-x: hidden;
}

/* ---------- HEADER ---------- */
.erp-header {
    min-height: 64px;
    background: #0D6EFD;
    color: #fff;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    box-shadow: 0 3px 12px rgba(0,0,0,.15);
}

.erp-header-left,
.erp-header-context,
.erp-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.erp-header-left {
    min-width: 145px;
}

.erp-logo {
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

.erp-header-context {
    flex: 1;
    justify-content: center;
    font-size: 14px;
}

.erp-company-name {
    font-weight: 700;
}

.erp-header-right {
    justify-content: flex-end;
    font-size: 13px;
    white-space: nowrap;
}

.erp-header-separator {
    color: rgba(255,255,255,.45);
}

.erp-wrapper {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.erp-sidebar {
    width: 250px;
    background: #0B1E2D;
    border-right: 1px solid rgba(255,255,255,.08);
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}

.erp-content {
    flex: 1;
    overflow: auto;
    padding: 24px;
    background: #F8FAFC;
}

.erp-page {
    background: transparent;
    padding: 0;
}

.module-launcher {
    min-height: calc(100vh - 130px);
    padding: 26px;
    background: #eef5f5;
    border-radius: 18px;
}

/* CTMS screens contain forms and grids, so their panels should follow the
   content height instead of inheriting the full-height module launcher. */
.ctms-page .module-launcher {
    min-height: 0;
    height: auto;
    padding: 18px;
    border-radius: 12px;
}

.ctms-page .module-launcher-header {
    margin-bottom: 16px;
}

.module-launcher-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
}

.module-launcher-header h2,
.module-launcher-header p {
    margin: 0;
}

.module-launcher-header p {
    color: #657572;
}

.module-launcher-icon,
.module-card-icon {
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg,#17615b,#2f8179);
}

.module-launcher-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    font-size: 24px;
}

.module-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(210px,1fr));
    gap: 16px;
}

.module-icon-card {
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 12px;
    min-height: 82px;
    padding: 16px;
    color: #223c39;
    text-decoration: none;
    background: #fff;
    border: 1px solid #d8e6e4;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(26,77,71,.07);
    transition: transform .18s,box-shadow .18s;
}

.module-icon-card:hover {
    color: #174f49;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(26,77,71,.13);
}

.module-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    font-size: 19px;
}

.module-card-title {
    font-weight: 600;
}

.module-card-arrow {
    color: #71908c;
}

.module-empty {
    padding: 70px 20px;
    text-align: center;
    color: #71817f;
}

.module-empty > i {
    font-size: 42px;
}

/* ---------- MASTER CARD ---------- */

.master-card {
    height: calc(100vh - 110px); /* adjust according to your header/breadcrumb */
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0,0,0,.08);
    margin: auto;
}

.w-500 {
    max-width: 500px;
}

.w-600 {
    max-width: 600px;
}

.w-700 {
    max-width: 700px;
}

.w-800 {
    max-width: 800px;
}

.w-900 {
    max-width: 900px;
}

.w-1000 {
    max-width: 1000px;
}

.w-1100 {
    max-width: 1100px;
}

.w-1200 {
    max-width: 1200px;
}

.w-1300 {
    max-width: 1300px;
}

.w-1400 {
    max-width: 1400px;
}

.master-page {
    width: 100%;
}

.master-summary {
    padding: 4px 2px 10px;
    font-size: .9rem;
}

.master-card-header {
    background: #CDEBE8;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
}

    .master-card-header h2 {
        font-size: 22px;
        line-height: 1.2;
        margin: 0;
    }

    .master-card-header span {
        margin-top: 2px;
        font-size: 14px;
        color: #5d6f6d;
    }

.master-card-body {
    padding: 30px;
    background: #EEF5F5;
}

/* ---------- ERP FORM ---------- */

.erp-form {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.erp-form-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: 5px;
    margin-bottom: 0;
}

    .erp-form-row label {
        font-size: 14px;
        line-height: 18px;
        margin-bottom: 0;
        font-weight: 500;
    }

.walkin-panel {
    border: 1px dashed #c6cbd4;
    border-radius: 8px;
    padding: 10px 12px 4px 12px;
    background: #f8fafc;
}

    .walkin-panel .erp-form-row {
        margin-bottom: 6px;
    }

.walkin-picker-toolbar {
    display: flex;
    gap: 6px;
    margin-bottom: 6px;
}

    .walkin-picker-toolbar .erp-input {
        flex: 1;
    }

    .walkin-picker-toolbar .btn-erp-secondary {
        white-space: nowrap;
    }

.master-inline-picker {
    display: flex;
    align-items: center;
    gap: 6px;
    width: min(100%, 440px);
}

    .master-inline-picker > .erp-select,
    .master-inline-picker > .select2-container {
        flex: 1 1 auto;
        min-width: 0;
        width: auto !important;
    }

    .master-inline-picker .master-inline-add {
        flex: 0 0 auto;
        white-space: nowrap;
        min-height: 30px;
    }

.form-label.required::after {
    content: " *";
    color: #d32f2f;
}

.service-customer-modal .modal-content {
    border: 1px solid #D8E3E3;
    border-radius: 18px 18px 0 0;
    overflow: hidden;
}

.service-customer-modal .modal-dialog {
    max-width: 600px;
}

.service-customer-modal .modal-header {
    min-height: 78px;
    padding: 14px 24px;
    align-items: flex-start;
    background: #CDEAE8;
    border-bottom: 0;
}

    .service-customer-modal .modal-title {
        color: #111;
        font-size: 22px;
        line-height: 27px;
        font-weight: 600;
    }

    .service-customer-modal-heading span {
        display: block;
        margin-top: 2px;
        color: #4f6f6d;
        font-size: 13px;
        line-height: 18px;
    }

    .service-customer-modal .modal-header .btn-close {
        padding: 8px;
        margin: 0;
        font-size: 11px;
    }

.service-customer-modal .modal-body {
    padding: 30px 30px 10px;
    background: #EEF5F5;
}

.service-customer-modal .modal-footer {
    justify-content: flex-start;
    gap: 12px;
    padding: 18px 30px 30px 198px;
    background: #EEF5F5;
    border-top: 0;
}

@media (max-width: 576px) {
    .service-customer-modal .modal-body {
        padding: 20px;
    }

    .service-customer-modal .modal-footer {
        padding: 16px 20px 24px;
    }
}

.erp-label {
    font-weight: 600;
    color: #333;
    padding-top: 0;
}

    .erp-label.required::after {
        content: " *";
        color: #d32f2f;
    }

.erp-input,
.erp-select,
.erp-textarea {
    border: 1px solid #D5DCE2;
    border-radius: 5px;
    padding: 4px 10px;
    font-size: 12px;
    transition: .2s;
}

.erp-select {
    line-height: 1.2;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3e%3cpath fill='%231E4F4A' d='M1 1l5 5 5-5'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px 8px;
    padding-right: 36px;
    cursor: pointer;
}

.erp-input,
.erp-select {
    height: 30px;
}

/* ==========================================================
   SELECT2 (searchable dropdown) - themed to match .erp-select
========================================================== */

.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    height: 30px;
}

.select2-container--default .select2-selection--single {
    border: 1px solid #D5DCE2;
    border-radius: 5px;
    font-size: 12px;
    transition: .2s;
}

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 28px;
        padding-left: 10px;
        color: #333;
        font-size: 12px;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 28px;
        right: 6px;
    }

.select2-container--default.select2-container--focus .select2-selection--single {
    outline: none;
    border-color: #1E4F4A;
    box-shadow: 0 0 0 .2rem rgba(30, 79, 74, .15);
}

.select2-dropdown {
    border: 1px solid #D5DCE2;
    border-radius: 5px;
    font-size: 12px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #D5DCE2;
    border-radius: 5px;
    font-size: 12px;
    padding: 3px 8px;
}

.select2-container--default .select2-results__option {
    font-size: 12px;
    padding: 4px 10px;
}

.select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
    background-color: #1E4F4A;
}

/* ==========================================================
   ERP CONTROL SIZE STANDARD
========================================================== */

.erp-input-sm,
.erp-select-sm,
.erp-textarea-sm {
    width: 160px;
}

.erp-input-md,
.erp-select-md,
.erp-textarea-md {
    width: 240px;
}

.erp-input-lg,
.erp-select-lg,
.erp-textarea-lg {
    width: 340px;
}

.erp-input-xl,
.erp-select-xl,
.erp-textarea-xl {
    width: 450px;
}

.erp-textarea {
    min-height: 80px;
    resize: vertical;
}

.erp-textarea-lg {
    height: 100px;
}

.erp-textarea-xl {
    height: 130px;
}

.erp-input:focus,
.erp-select:focus,
.erp-textarea:focus {
    outline: none;
    border-color: #1E4F4A;
    box-shadow: 0 0 0 .2rem rgba(30,79,74,.15);
}

@media (max-width:768px) {

    .erp-input,
    .erp-select,
    .erp-textarea,
    .erp-input-sm,
    .erp-input-md,
    .erp-input-lg,
    .erp-input-xl,
    .erp-select-sm,
    .erp-select-md,
    .erp-select-lg,
    .erp-select-xl,
    .erp-textarea-sm,
    .erp-textarea-md,
    .erp-textarea-lg,
    .erp-textarea-xl {
        width: 100%;
    }
}

.erp-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
}

.erp-form-actions {
    margin-top: 28px;
    padding-left: 168px;
    display: flex;
    gap: 12px;
}

/* ==========================================================
   SEARCH PANEL
========================================================== */

.search-card {
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: 0 8px 25px rgba(0,0,0,.06);
}

.search-title {
    font-size: 18px;
    font-weight: 700;
    color: #1E4F4A;
    margin-bottom: 18px;
}

.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 18px;
}

.search-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .search-item label {
        font-weight: 600;
        color: #444;
    }

.search-actions {
    display: flex;
    gap: 12px;
    align-items: end;
}

/* ==========================================================
   TOOLBAR
========================================================== */

.erp-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.erp-toolbar-left,
.erp-toolbar-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* ==========================================================
   BUTTONS
========================================================== */

.btn-erp,
.btn-erp-secondary,
.btn-erp-danger,
.btn-erp-light {
    height: 42px;
    padding: 0 22px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: .25s;
}

.btn-erp {
    background: linear-gradient(135deg,#1E4F4A,#26655E);
    color: white;
}

    .btn-erp:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(30,79,74,.25);
    }

.btn-erp-secondary {
    background: #CDEBE8;
    color: #1E4F4A;
}

    .btn-erp-secondary:hover {
        background: #BEDFDC;
    }

.btn-erp-danger {
    background: #DC3545;
    color: white;
}

    .btn-erp-danger:hover {
        background: #C82333;
    }

.btn-erp-light {
    background: #F3F4F6;
    color: #333;
    border: 1px solid #D9D9D9;
}

    .btn-erp-light:hover {
        background: #ECECEC;
    }

/* ==========================================================
   ERP GRID
========================================================== */

.erp-grid {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,.06);
}

    .erp-grid thead {
        background: var(--erp-grid-header-bg, #0D6EFD);
    }

        .erp-grid thead th {
            padding: 14px 16px;
            text-align: left;
            color: var(--erp-grid-header-text, #FFFFFF);
            font-weight: 700;
            border-bottom: 1px solid var(--erp-grid-header-border, #0A58CA);
            white-space: nowrap;
        }

    .erp-grid tbody td {
        padding: 12px 16px;
        border-bottom: 1px solid #EEEEEE;
        vertical-align: middle;
    }

    .erp-grid tbody tr {
        transition: .20s;
    }

        .erp-grid tbody tr:hover {
            background: #F8FCFC;
        }

        .erp-grid tbody tr:last-child td {
            border-bottom: none;
        }

/* ==========================================================
   GRID ACTIONS
========================================================== */

.grid-actions {
    display: flex;
    gap: 8px;
}

.grid-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: .20s;
}

    .grid-btn:hover {
        transform: translateY(-1px);
    }

.grid-btn-edit {
    background: #CDEBE8;
    color: #1E4F4A;
}

.grid-btn-delete {
    background: #FDE2E2;
    color: #C62828;
}

.grid-btn-view {
    background: #E8F1FF;
    color: #1565C0;
}

/* ==========================================================
   STATUS
========================================================== */

.status-active,
.status-inactive {
    display: inline-block;
    min-width: 90px;
    text-align: center;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
}

.status-active {
    background: #D9F5E4;
    color: #137333;
}

.status-inactive {
    background: #FDE7E7;
    color: #C62828;
}

/* ==========================================================
   PAGINATION
========================================================== */

.erp-pagination {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

    .erp-pagination a,
    .erp-pagination span {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        display: flex;
        justify-content: center;
        align-items: center;
        background: white;
        border: 1px solid #D8D8D8;
        text-decoration: none;
        color: #444;
    }

    .erp-pagination .active {
        background: #1E4F4A;
        color: white;
        border-color: #1E4F4A;
    }

/* ==========================================================
   EMPTY DATA
========================================================== */

.erp-empty {
    padding: 50px;
    text-align: center;
    color: #888;
    font-size: 16px;
}

/* ==========================================================
   DASHBOARD
========================================================== */

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.dashboard-header h2 {
        color: #0D6EFD;
        font-size: 30px;
        font-weight: 700;
    }

.dashboard-header p {
        color: #6B7280;
        margin-top: 4px;
    }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(260px,1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.kpi-card {
    background: white;
    border-radius: 18px;
    padding: 24px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 6px 18px rgba(15,23,42,.05);
    transition: .25s;
}

    .kpi-card:hover {
        transform: translateY(-4px);
    }

.kpi-title {
    color: #6B7280;
    font-size: 14px;
}

.kpi-value {
    font-size: 34px;
    font-weight: 700;
    margin-top: 10px;
    color: #111827;
}

.dashboard-card {
    background: white;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid #E5E7EB;
    box-shadow: 0 6px 18px rgba(15,23,42,.05);
}

.dashboard-card-header {
    padding: 16px 22px;
    background: #CDEBE8;
    color: #1E4F4A;
    font-size: 18px;
    font-weight: 700;
}

.dashboard-card-body {
    padding: 24px;
}

/* ==========================================================
   STATISTICS
========================================================== */

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(180px,1fr));
    gap: 18px;
}

.stat-card {
    background: #F9FBFC;
    border: 1px solid #E5ECEC;
    border-radius: 14px;
    padding: 18px;
}

.stat-highlight {
    background: #CDEBE8;
    border-color: #9FD4CE;
}

.stat-title {
    color: #777;
    font-size: 13px;
}

.stat-value {
    margin-top: 8px;
    color: #1E4F4A;
    font-size: 28px;
    font-weight: 700;
}

/* ==========================================================
   BADGES
========================================================== */

.badge-success,
.badge-warning,
.badge-danger,
.badge-info {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
}

.badge-success {
    background: #D9F5E4;
    color: #137333;
}

.badge-warning {
    background: #FFF4D6;
    color: #B26A00;
}

.badge-danger {
    background: #FDE7E7;
    color: #C62828;
}

.badge-info {
    background: #E5F3FF;
    color: #1565C0;
}

/* ==========================================================
   MESSAGE BOX
========================================================== */

.erp-message {
    border-radius: 12px;
    padding: 15px 18px;
    margin-bottom: 20px;
}

.erp-message-success {
    background: #D9F5E4;
    color: #137333;
}

.erp-message-warning {
    background: #FFF4D6;
    color: #B26A00;
}

.erp-message-error {
    background: #FDE7E7;
    color: #C62828;
}

.erp-message-info {
    background: #E5F3FF;
    color: #1565C0;
}

/* ==========================================================
   LOADING
========================================================== */

.erp-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 180px;
}

.erp-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #DDE8E6;
    border-top-color: #1E4F4A;
    border-radius: 50%;
    -webkit-animation: spin .8s linear infinite;
    animation: spin .8s linear infinite;
}

@-webkit-keyframes spin {
    to {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes spin {
    to {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

/* ==========================================================
   UTILITIES
========================================================== */

.text-left {
    text-align: left;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mt-30 {
    margin-top: 30px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.w-100 {
    width: 100%;
}

/* ==========================================================
   ANIMATION
========================================================== */

.fade-in {
    animation: fadeIn .35s ease;
}

@keyframes fadeIn {

    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================
   PRINT
========================================================== */

@media print {

    .erp-header,
    .erp-sidebar,
    .erp-toolbar,
    .erp-form-actions,
    .search-card {
        display: none !important;
    }

    .erp-content {
        padding: 0;
        background: white;
    }

    .master-card {
        box-shadow: none;
        border-radius: 0;
    }

    body {
        background: white;
    }
}

/* ==========================================================
   RESPONSIVE
========================================================== */

/* ---------- MOBILE MENU TOGGLE ---------- */
.erp-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    border: 0;
    background: rgba(255,255,255,.14);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.erp-menu-toggle:hover {
    background: rgba(255,255,255,.26);
}

.erp-sidebar-overlay {
    display: none;
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width:992px) {

    .erp-menu-toggle {
        display: inline-flex;
    }

    .erp-sidebar {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 280px;
        max-width: 85vw;
        z-index: 1045;
        background: #0B1E2D;
        box-shadow: 4px 0 22px rgba(0,0,0,.35);
    }

    .erp-sidebar.open {
        display: block;
    }

    .erp-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 1044;
        background: rgba(11,30,45,.5);
    }

    .erp-sidebar-overlay.open {
        display: block;
    }

    .erp-wrapper {
        display: block;
    }

    .erp-content {
        padding: 15px;
    }

    .master-card {
        width: 100%;
    }

    .erp-form-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .erp-label {
        padding-top: 0;
    }

    .erp-form-actions {
        padding-left: 0;
        flex-wrap: wrap;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width:576px) {

    .master-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .erp-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .grid-actions {
        justify-content: center;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

.erp-section {
    background: #F7FAFA;
    border: 1px solid #D8E3E3;
    border-radius: 5px;
    padding: 5px;
    margin-bottom: 5px;
}

.erp-section-title {
    margin: +2px -12px 12px;
    padding: 5px 14px;
    background: #EAF4F3;
    color: #0670b6;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #D8E3E3;
    border-radius: 10px 10px 0 0;
}

.voucher-card { max-width: 100%; }
.voucher-header-grid { display:grid; grid-template-columns:repeat(6,minmax(140px,1fr)); gap:12px; margin-bottom:14px; }
.voucher-header-grid > div, .bill-grid > div { display:flex; flex-direction:column; gap:4px; }
.entry-mode-bar { display:flex; align-items:end; gap:20px; padding:10px 12px; margin-bottom:12px; background:#f2f8f8; border:1px solid #d8e3e3; border-radius:5px; }
.entry-mode-bar > label { padding-bottom:7px; white-space:nowrap; }
.voucher-lines-wrap { border:1px solid #d8e3e3; }
.voucher-line.primary-line td { background:#f7fbfb; }.voucher-line.primary-line td:first-child { box-shadow: inset 3px 0 0 #176d67; }
.voucher-line .drcr { width:100%; min-width:64px; }
.voucher-totals-bar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 22px; padding:10px 14px; background:#f2f8f8; border-top:1px solid #d8e3e3; }
.voucher-totals-bar #balanceMessage { margin-left:auto; font-weight:600; }
.voucher-total { color:#315c59; }.voucher-total strong { color:#075b58; font-size:15px; }
.voucher-lines { min-width:1250px; margin-bottom:0; }
.voucher-lines .amount { min-width:105px; }
.voucher-lines select { min-width:145px; }
.allocation-line td { background:#fafcfc !important; padding:4px 12px !important; }
.allocation-line summary { cursor:pointer; color:#0670b6; font-weight:600; }
.bill-grid { display:grid; grid-template-columns:repeat(4,minmax(170px,1fr)); gap:12px; padding:10px 0; }
.voucher-footer { display:grid; grid-template-columns:2fr 1fr; gap:20px; margin-top:14px; }
.voucher-help { align-self:end; padding:12px; color:#4c6666; background:#f7fafa; border-radius:5px; }
@media (max-width:1100px) { .voucher-header-grid { grid-template-columns:repeat(3,1fr); } }
@media (max-width:700px) { .voucher-header-grid,.bill-grid,.voucher-footer { grid-template-columns:1fr; } .entry-mode-bar { align-items:flex-start; flex-direction:column; gap:8px; } }
/* ---------- COMPACT DOCUMENT HEADER STRIP (Purchase Entry / Sales Bill) ---------- */
.doc-header { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem .75rem; padding:.25rem 0; }
.doc-header .field { display:flex; align-items:center; gap:.4rem; min-width:0; }
.doc-header .field>label { margin:0; font-size:.8rem; font-weight:600; color:#315c59; white-space:nowrap; }
.doc-header .field>.form-control, .doc-header .field>.form-select { height:30px; min-width:60px; flex:1 1 auto; width:auto; padding:.2rem .55rem; font-size:.85rem; }
.doc-header .field>.form-select { padding-right:1.9rem; }
.doc-header .field-grow { flex:1 1 280px; }
@media (max-width:700px) { .doc-header .field { flex:1 1 100% !important; width:auto !important; } }
/* Purchase entry uses one grid for every row so controls cannot shift column tracks. */
.purchase-entry-page { width:auto; margin:-18px -18px 0; padding:4px 6px 10px; }
.purchase-entry-toolbar { display:flex; align-items:center; justify-content:space-between; height:38px; max-height:40px; padding:3px 6px 3px 10px; background:linear-gradient(90deg,#d9ecea 0%,#edf6f5 100%); border:1px solid #c7ddda; border-radius:4px; }
.purchase-entry-toolbar h2 { margin:0; color:#174f49; font-size:18px; line-height:1; font-weight:600; }
.purchase-entry-toolbar .no-print { display:flex; align-items:center; gap:.35rem; }
.purchase-entry-toolbar .btn { min-height:30px; padding:.25rem .65rem; font-size:12px; line-height:1.2; }
.purchase-entry-toolbar .btn-outline-secondary { color:#fff; background:#176d67; border-color:#176d67; }
.purchase-entry-toolbar .btn-outline-secondary:hover,
.purchase-entry-toolbar .btn-outline-secondary:focus { color:#fff; background:#105b56; border-color:#105b56; }
.purchase-header-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:2px 1rem; padding:4px 0; align-items:start; }
.purchase-header-grid .field { display:grid; grid-template-columns:112px minmax(0,1fr); align-items:center; min-width:0; column-gap:.5rem; }
.purchase-header-grid .field > label { margin:0; font-size:13px; line-height:1.2; font-weight:600; color:#294d4a; white-space:nowrap; }
.purchase-header-grid .field > .form-control,
.purchase-header-grid .field > .form-select,
.purchase-header-grid .field > .select2-container { width:100% !important; max-width:100%; min-width:0; }
.purchase-header-grid .field > .form-control,
.purchase-header-grid .field > .form-select { height:29px; min-height:29px; padding:.15rem .5rem; font-size:12px; line-height:1.25; }
.purchase-header-grid .field > .form-select { padding-right:1.9rem; }
.purchase-header-grid .select2-selection--single { height:29px; font-size:12px; }
.purchase-header-grid .select2-selection--single .select2-selection__rendered { line-height:27px; font-size:12px; }
.purchase-header-grid .select2-selection--single .select2-selection__arrow { height:27px; }
.sales-entry-page .purchase-header-grid .field > .d-flex { min-width:0; }
.sales-entry-page .purchase-header-grid .field > .d-flex .form-control { min-width:0; height:29px; min-height:29px; padding:2px 5px; font-size:12px; }
.sales-entry-page .purchase-header-grid .field > .d-flex .btn { height:29px; min-height:29px; padding:2px 7px; font-size:11px; }
.purchase-grid thead th { height:27px; padding:3px 6px; vertical-align:middle; font-size:10.5px; line-height:1.1; }
.purchase-grid tbody td { padding:3px 5px; vertical-align:middle; }
.purchase-grid .form-control,
.purchase-grid .form-select { height:28px; min-height:28px; padding:2px 5px; font-size:12px; line-height:1.2; }
.purchase-grid textarea.form-control { height:auto; min-height:42px; }
.purchase-entry-footer { margin-top:2px; }
.purchase-entry-footer .summary { margin-bottom:2px; font-size:12px; }
.purchase-entry-footer .summary th,
.purchase-entry-footer .summary td { padding:2px 5px; height:25px; vertical-align:middle; }
.purchase-entry-footer .form-control { min-height:27px; padding:2px 5px; font-size:12px; }
.purchase-entry-footer textarea.form-control { min-height:54px; }
.purchase-entry-actions { margin-top:2px; }
.purchase-entry-actions .btn { min-height:29px; padding:3px 10px; font-size:12px; }
@media (max-width:600px) {
    .purchase-header-grid { grid-template-columns:minmax(0,1fr); }
    .purchase-header-grid .field { grid-template-columns:120px minmax(0,1fr); }
}
@media (max-width:992px) { .purchase-entry-page { margin:-10px -10px 0; } }
/* ---------- STOCK TRANSFER ENTRY ---------- */
.stock-transfer-page{width:auto;margin:-18px -18px 0;padding:4px 6px 10px;color:#17233a}.stock-transfer-toolbar{display:flex;align-items:center;justify-content:space-between;height:38px;padding:3px 6px 3px 10px;background:linear-gradient(90deg,#dbe9ff,#eef4ff);border:1px solid #c8d8f3;border-radius:4px}.stock-transfer-toolbar h2{margin:0;color:#174ea6;font-size:18px;line-height:1;font-weight:600}.stock-transfer-toolbar>div{display:flex;gap:5px}.stock-transfer-toolbar .btn{height:29px;padding:3px 10px;font-size:12px}.stock-transfer-section{margin-top:2px;border:1px solid #d9e1ec;background:#fff}.stock-transfer-section-title{display:flex;align-items:center;gap:6px;min-height:25px;color:#1452bd;font-size:12px;font-weight:600}.stock-transfer-section-title span{display:inline-grid;place-items:center;width:17px;height:17px;color:#fff;background:#145ee0;border-radius:50%;font-size:10px}.stock-transfer-info-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:2px 14px;padding:3px 10px 6px}.stock-transfer-field{display:grid;grid-template-columns:100px minmax(0,1fr);align-items:center;gap:6px;min-width:0}.stock-transfer-field label{margin:0;color:#29445f;font-size:12px;font-weight:600;white-space:nowrap}.stock-transfer-field b{color:#c62828}.stock-transfer-field .form-control,.stock-transfer-field .form-select{height:29px;min-height:29px;padding:2px 6px;font-size:12px}.stock-transfer-span-all{grid-column:1/-1}.stock-transfer-route{position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) 280px;margin-top:2px;border:1px solid #d9e1ec;background:#fff}.stock-transfer-location{display:grid;gap:3px;padding:5px 10px;border-right:1px solid #d9e1ec}.stock-transfer-direction{position:absolute;left:calc((100% - 280px)/2);top:50%;z-index:2;display:grid;place-items:center;width:28px;height:28px;transform:translate(-50%,-50%);color:#145ee0;background:#fff;border:1px solid #8db1f5;border-radius:50%;font-size:20px}.stock-transfer-stock{display:flex;justify-content:space-between;padding:4px 6px;color:#476078;background:#f3f7fc;border:1px solid #dce6f2;border-radius:3px;font-size:11px}.stock-transfer-stock strong{color:#174ea6}.stock-transfer-summary{margin:6px;padding:7px 10px;background:#f1faf6;border:1px solid #b9dfca;border-radius:4px}.stock-transfer-summary h3{margin:0 0 5px;color:#217346;font-size:13px}.stock-transfer-summary>div{display:grid;grid-template-columns:90px 1fr;gap:5px;padding:3px 0;font-size:11px}.stock-transfer-summary>div span{color:#4c6458}.stock-transfer-summary>div strong{font-weight:600}.stock-transfer-items-heading{display:flex;align-items:center;justify-content:space-between;padding:2px 8px}.stock-transfer-items-heading .btn{height:27px;padding:2px 9px;font-size:11px}.stock-transfer-grid{min-width:1050px;margin:0}.stock-transfer-grid thead th{height:27px;padding:3px 6px;vertical-align:middle;color:#203a63;background:#eaf0fa;font-size:10.5px;line-height:1.1;white-space:nowrap}.stock-transfer-grid tbody td{height:30px;padding:2px 5px;vertical-align:middle;font-size:12px}.stock-transfer-grid .form-control,.stock-transfer-grid .form-select{height:26px;min-height:26px;padding:1px 5px;font-size:11.5px}.stock-transfer-grid .remove-transfer-row{height:24px;padding:0 7px;line-height:1}.stock-transfer-footer{display:grid;grid-template-columns:1fr 360px;gap:12px;padding:3px 8px 5px}.stock-transfer-footer>.stock-transfer-field{align-items:start}.stock-transfer-footer textarea.form-control{height:54px}.stock-transfer-footer table{width:100%;border-collapse:collapse;font-size:11px}.stock-transfer-footer th,.stock-transfer-footer td{height:23px;padding:2px 7px;border:1px solid #d9e1ec}.stock-transfer-footer td{text-align:right;font-weight:600}.validation-summary-valid{display:none}.stock-transfer-page .alert ul{margin:0;padding-left:18px;font-size:11px}
@media(max-width:1100px){.stock-transfer-info-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.stock-transfer-route{grid-template-columns:1fr 1fr}.stock-transfer-summary{grid-column:1/-1}.stock-transfer-direction{left:50%}.stock-transfer-footer{grid-template-columns:1fr 320px}}
@media(max-width:700px){.stock-transfer-page{margin:-10px -10px 0}.stock-transfer-info-grid,.stock-transfer-route,.stock-transfer-footer{grid-template-columns:1fr}.stock-transfer-span-all{grid-column:auto}.stock-transfer-direction{display:none}.stock-transfer-location{border-right:0;border-bottom:1px solid #d9e1ec}.stock-transfer-summary{grid-column:auto}}
/* ---------- JOB CARD COMPACT RESPONSIVE ENTRY ---------- */
.job-card-page .master-card-header{min-height:44px;padding:6px 12px;background:linear-gradient(90deg,#d9ecea,#edf6f5)}.job-card-page .master-card-header h2{font-size:19px}.job-card-page .master-card-header span{font-size:11px}.job-card-page .master-card-body{padding:6px 10px}.job-card-page .erp-section-title{margin:2px 0;padding:5px 8px;font-size:12px}.job-card-details-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px 14px}.job-card-details-grid .erp-form-row{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:center;gap:6px;min-width:0;margin:0}.job-card-details-grid .erp-label{margin:0;padding:0;font-size:12px;white-space:nowrap}.job-card-details-grid .erp-input,.job-card-details-grid .erp-select{width:100%;height:29px;min-height:29px;padding:2px 6px;font-size:12px}.job-card-details-grid .select2-container .select2-selection--single{height:29px}.job-card-details-grid .select2-selection__rendered{line-height:27px!important;font-size:12px!important}.job-card-details-grid .select2-selection__arrow{height:27px!important}.job-card-details-grid .job-card-wide{grid-column:1/-1}.job-card-details-grid .erp-textarea{width:100%;min-height:44px;padding:4px 6px;font-size:12px;resize:vertical}.job-card-details-grid .master-inline-picker{min-width:0}.job-card-details-grid .master-inline-add{height:29px;min-height:29px;padding:2px 8px;font-size:11px}.job-card-page .erp-table{margin-bottom:2px;font-size:11.5px}.job-card-page .erp-table thead th{height:27px;padding:3px 5px;font-size:10.5px;line-height:1.1;vertical-align:middle}.job-card-page .erp-table tbody td{padding:2px 4px;vertical-align:middle}.job-card-page .erp-table .form-control,.job-card-page .erp-table .form-select{height:27px;min-height:27px;padding:2px 5px;font-size:11.5px}.job-card-page .erp-form-actions{margin-top:3px;padding-top:3px}.job-card-page .erp-form-actions .btn-erp,.job-card-page .erp-form-actions .btn-erp-secondary{min-height:29px;padding:3px 10px;font-size:11.5px}
@media(max-width:1200px){.job-card-details-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.job-card-details-grid{grid-template-columns:minmax(0,1fr)}.job-card-details-grid .job-card-wide{grid-column:auto}.job-card-details-grid .erp-form-row{grid-template-columns:105px minmax(0,1fr)}.job-card-page .master-card-body{padding:5px}}
/* ---------- SERVICE INWARD COMPACT RESPONSIVE ENTRY ---------- */
.service-inward-page .master-card-header{min-height:44px;padding:6px 12px;background:linear-gradient(90deg,#d9ecea,#edf6f5)}.service-inward-page .master-card-header h2{font-size:19px}.service-inward-page .master-card-header span{font-size:11px}.service-inward-page .master-card-body{padding:6px 10px}.service-inward-page .erp-section-title{margin:2px 0;padding:5px 8px;font-size:12px}.service-inward-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px 14px}.service-inward-grid>.erp-form-row,.service-inward-walkin>.erp-form-row{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:center;gap:6px;min-width:0;margin:0}.service-inward-grid .erp-label{margin:0;padding:0;font-size:12px;white-space:nowrap}.service-inward-grid .erp-input,.service-inward-grid .erp-select{width:100%;height:29px;min-height:29px;padding:2px 6px;font-size:12px}.service-inward-grid .select2-container .select2-selection--single{height:29px}.service-inward-grid .select2-selection__rendered{line-height:27px!important;font-size:12px!important}.service-inward-grid .select2-selection__arrow{height:27px!important}.service-inward-grid .service-inward-wide{grid-column:1/-1}.service-inward-grid .erp-textarea{width:100%;min-height:44px;padding:4px 6px;font-size:12px;resize:vertical}.service-inward-grid .master-inline-picker{min-width:0}.service-inward-grid .master-inline-add{height:29px;min-height:29px;padding:2px 8px;font-size:11px}.service-inward-walkin{grid-column:1/-1;grid-template-columns:repeat(3,minmax(0,1fr));gap:3px 14px}.service-inward-page .erp-table{margin-bottom:2px;font-size:11.5px}.service-inward-page .erp-table thead th{height:27px;padding:3px 5px;font-size:10.5px;line-height:1.1;vertical-align:middle}.service-inward-page .erp-table tbody td{padding:2px 4px;vertical-align:middle}.service-inward-page .erp-table .form-control,.service-inward-page .erp-table .form-select{height:27px;min-height:27px;padding:2px 5px;font-size:11.5px}.service-inward-page .erp-form-actions{margin-top:3px;padding-top:3px}.service-inward-page .erp-form-actions .btn-erp,.service-inward-page .erp-form-actions .btn-erp-secondary{min-height:29px;padding:3px 10px;font-size:11.5px}
@media(max-width:1200px){.service-inward-grid,.service-inward-walkin{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.service-inward-grid,.service-inward-walkin{grid-template-columns:minmax(0,1fr)}.service-inward-grid .service-inward-wide{grid-column:auto}.service-inward-grid>.erp-form-row,.service-inward-walkin>.erp-form-row{grid-template-columns:105px minmax(0,1fr)}.service-inward-page .master-card-body{padding:5px}}
/* ---------- SERVICE BILLING FORM ---------- */
.service-billing-page .master-card-header{min-height:44px;padding:6px 12px;background:linear-gradient(90deg,#d9ecea,#edf6f5)}.service-billing-page .master-card-header h2{font-size:19px}.service-billing-page .master-card-header span{font-size:11px}.service-billing-page .master-card-body{padding:6px 12px}.service-billing-page .erp-section-title{margin:2px 0 6px;padding:5px 8px;font-size:12px}
.service-billing-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 14px}.service-billing-grid .erp-form-row{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:center;gap:6px;min-width:0;margin:0}.service-billing-grid .erp-label{margin:0;padding:0;font-size:12px;white-space:nowrap}.service-billing-grid .erp-input,.service-billing-grid .erp-select{width:100%;height:29px;min-height:29px;padding:2px 6px;font-size:12px}.service-billing-grid .select2-container .select2-selection--single{height:29px}.service-billing-grid .select2-selection__rendered{line-height:27px!important;font-size:12px!important}.service-billing-grid .select2-selection__arrow{height:27px!important}.service-billing-grid .billing-wide{grid-column:1/-1}.service-billing-grid .billing-job-wide{grid-column:1/-1}
.service-billing-charges{display:grid;grid-template-columns:repeat(2,1fr);gap:4px 16px;padding:10px 14px;border:1px solid #c6cbd4;border-radius:6px;background:#f8fafc;margin-top:8px}.service-billing-charges .charge-item{display:flex;align-items:center;justify-content:flex-end;gap:6px}.service-billing-charges .charge-item label{margin:0;font-size:12px;font-weight:500;color:#29445f;white-space:nowrap;min-width:80px;text-align:right}.service-billing-charges .charge-item input{width:80px;height:28px;min-height:28px;padding:2px 6px;font-size:12px;font-weight:600;text-align:right;border:1px solid #c6cbd4;border-radius:4px;background:#fff}.service-billing-charges .charge-total{grid-column:1/-1;display:flex;align-items:center;justify-content:flex-end;gap:6px;padding-top:6px;border-top:2px solid #0d6efd}.service-billing-charges .charge-total label{margin:0;font-size:13px;font-weight:700;color:#0d6efd;white-space:nowrap;min-width:80px;text-align:right}.service-billing-charges .charge-total input{width:100px;height:30px;min-height:30px;padding:2px 6px;font-size:13px;font-weight:700;text-align:right;border:1px solid #0d6efd;border-radius:4px;background:#e8f0fe;color:#0d6efd}
@media(max-width:700px){.service-billing-grid{grid-template-columns:minmax(0,1fr)}.service-billing-grid .billing-wide,.service-billing-grid .billing-job-wide{grid-column:auto}.service-billing-grid .erp-form-row{grid-template-columns:105px minmax(0,1fr)}.service-billing-page .master-card-body{padding:5px}.service-billing-charges{grid-template-columns:1fr}}
.voucher-simple-grid { min-width:900px; margin:0; }
.voucher-simple-grid th:nth-child(1) { width:28%; }.voucher-simple-grid th:nth-child(2) { width:44%; }.voucher-simple-grid th:nth-child(3) { width:18%; }.voucher-simple-grid th:nth-child(4) { width:10%; }
.particulars-cell { display:flex; align-items:center; gap:6px; }.particulars-cell .particular { flex:1; }
.allocation-view { display:none; align-items:center; gap:4px; border:1px solid #8db9b6; background:#edf7f6; color:#096b68; border-radius:4px; padding:6px 8px; white-space:nowrap; font-size:12px; }
.allocation-modal { position:fixed; inset:0; z-index:1060; display:none; align-items:center; justify-content:center; padding:24px; background:rgba(15,35,35,.48); }
.allocation-modal.open { display:flex; }.allocation-dialog { width:min(1050px,96vw); max-height:88vh; overflow:auto; background:#fff; border-radius:8px; box-shadow:0 20px 60px rgba(0,0,0,.25); }
.allocation-modal-header { display:flex; align-items:center; justify-content:space-between; padding:14px 18px; border-bottom:1px solid #d8e3e3; background:#f2f8f8; }
.allocation-modal-header h3 { margin:0; font-size:19px; color:#075b58; }.allocation-modal-header span { color:#5a7473; }
.modal-close { border:0; background:transparent; color:#536867; font-size:28px; line-height:1; }
.allocation-toolbar { display:flex; align-items:center; gap:10px; padding:12px 18px; }.allocation-toolbar #allocationBalance { margin-left:auto; font-weight:600; }
.allocation-dialog .table-responsive { margin:0 18px; border:1px solid #d8e3e3; }.allocation-dialog .erp-table { margin:0; }
.validation-summary-valid { display:none !important; }
.ledger-entry-cell { display:flex; align-items:center; gap:7px; }.ledger-entry-cell .ledger-select { flex:1; }.posting-cue { min-width:24px; color:#8a3429; font-weight:700; }
.tally-shortcuts { display:flex; flex-wrap:wrap; justify-content:center; gap:8px 18px; padding:9px 12px; margin-top:12px; color:#244; background:#d8eeee; border-top:1px solid #9fc9c6; border-bottom:1px solid #9fc9c6; }
.tally-shortcuts kbd { padding:2px 5px; color:#fff; background:#176e69; border-radius:2px; box-shadow:none; }
.warehouse-create-panel{padding:16px;background:#f8fbfb;border:1px solid #c9dddd;border-radius:8px}.warehouse-step-heading{display:flex;align-items:center;gap:10px;margin-bottom:12px}.warehouse-step-heading>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:#176d67;color:#fff;font-weight:700}.warehouse-step-heading>div{display:flex;flex-direction:column}.warehouse-step-heading strong{font-size:16px}.warehouse-step-heading small{color:#607876}.warehouse-details-heading{margin-top:20px}.warehouse-level-picker{display:grid;grid-template-columns:repeat(7,minmax(105px,1fr));gap:9px}.warehouse-level-option{display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 8px;border:1px solid #bdd6d3;border-radius:7px;background:#fff;color:#315c59;cursor:pointer;font-weight:600}.warehouse-level-option i{font-size:22px}.warehouse-level-option:hover{border-color:#2b817a;background:#f0f8f7}.warehouse-level-option.active{color:#fff;background:#176d67;border-color:#176d67;box-shadow:0 3px 8px rgba(23,109,103,.2)}
.warehouse-entry-form { display:grid; grid-template-columns:repeat(4,minmax(160px,1fr)); gap:12px; padding:14px; background:#eef7f6; border:1px solid #c9dddd; border-radius:6px; }.warehouse-entry-form>div{display:flex;flex-direction:column;gap:4px}.warehouse-checks{flex-direction:row!important;align-items:center;gap:14px!important}.warehouse-checks label{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}.warehouse-save-box{justify-content:end}.warehouse-save-box .btn-erp{min-height:42px}
.warehouse-summary{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;margin:16px 0}.warehouse-summary>div{text-align:center;padding:10px;background:#e5f3f2;border-radius:5px}.warehouse-summary strong{display:block;font-size:22px;color:#076c67}.warehouse-summary span{color:#53706e}
.warehouse-help{margin:0 0 20px;padding:16px;border:1px solid #b8d8d5;border-radius:9px;background:#f1f9f8}.warehouse-help-title{display:flex;gap:10px;align-items:center}.warehouse-help-title>i{font-size:25px;color:#bd7a00}.warehouse-help-title div{display:flex;flex-direction:column}.warehouse-help-title span{color:#607876}.warehouse-help-flow{display:flex;align-items:center;justify-content:center;gap:16px;margin:17px 0}.warehouse-help-flow>div{display:flex;min-width:180px;flex-direction:column;align-items:center;padding:12px;border-radius:7px;background:#fff;border:1px solid #c9dddd}.warehouse-help-flow>div>i{margin-bottom:5px;font-size:24px;color:#176d67}.warehouse-help-flow small{color:#607876}.warehouse-help-rules{display:grid;gap:6px}.warehouse-help-rules span{display:flex;align-items:center;gap:7px}.warehouse-help-rules i{color:#198754}.warehouse-context-help{display:flex;gap:10px;align-items:flex-start;margin-bottom:14px;padding:11px 14px;border-left:4px solid #176d67;border-radius:5px;background:#e8f5f4}.warehouse-context-help>i{font-size:20px;color:#176d67}.warehouse-context-help>div{display:flex;flex-direction:column}.warehouse-context-help span{color:#526d6a}
.warehouse-tree{border:1px solid #cbdedd;border-radius:6px;padding:8px;background:#fff}.warehouse-tree details{margin:5px 0 5px 18px}.warehouse-tree>details{margin-left:0}.warehouse-tree summary{cursor:pointer;padding:7px 10px;background:#f3f9f8;border-radius:4px}.warehouse-tree summary>span:last-child{float:right;color:#6a7d7c}.bin-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:7px;padding:8px 0 8px 24px}.bin-tile{display:grid;grid-template-columns:auto 1fr;gap:2px 7px;padding:8px;border:1px solid #bcd6d3;border-radius:4px}.bin-tile i{grid-row:1/4;font-size:20px;color:#08746e}.bin-tile span,.bin-tile small{grid-column:2}.bin-tile.inactive{opacity:.5}
.tally-inward-page{height:calc(100vh - 150px);min-height:420px;overflow-y:auto;overflow-x:hidden;border:1px solid #9dbfbc;background:#fff;scrollbar-gutter:stable}.tally-inward-page form{min-width:980px}.tally-voucher-header{position:sticky;top:0;z-index:4;display:flex;align-items:center;justify-content:space-between;padding:7px 12px;color:#fff;background:#176d67}.tally-voucher-header h3{margin:0;font-size:18px}.tally-voucher-header small{opacity:.85}.tally-voucher-no{padding:3px 12px;border:1px solid rgba(255,255,255,.5)}.tally-entry-block{display:grid;grid-template-columns:repeat(6,minmax(120px,1fr));gap:5px 10px;padding:7px 10px;border-bottom:1px solid #c9dddd}.tally-field{display:grid;grid-template-columns:92px minmax(0,1fr);align-items:center;gap:5px}.tally-field.tally-wide{grid-column:span 2}.tally-ledger-field{grid-column:span 3}.tally-field label{margin:0;font-size:12px;font-weight:600;color:#315c59}.tally-field input,.tally-field select,.tally-cargo-grid input,.tally-cargo-grid select{width:100%;height:27px;padding:2px 5px;font-size:13px;border:0;border-bottom:1px solid #82aaa7;border-radius:0;background:#fff}.tally-field input:focus,.tally-field select:focus,.tally-cargo-grid input:focus,.tally-cargo-grid select:focus{outline:2px solid #f0b429;outline-offset:-1px;background:#fffde8}.tally-more{border-bottom:1px solid #9dbfbc}.tally-more summary{padding:5px 10px;font-size:13px;font-weight:700;color:#176d67;background:#eef7f6;cursor:pointer}.tally-bond summary{color:#805400;background:#fff4d7}.tally-grid-wrap{overflow-x:auto}.tally-cargo-grid{width:100%;border-collapse:collapse;font-size:12.5px;color:#243b38;font-family:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,"Helvetica Neue",Arial,sans-serif;letter-spacing:.1px}.tally-cargo-grid th{position:static;padding:6px 8px;text-align:left;background:var(--erp-grid-header-bg,#0D6EFD);border:1px solid var(--erp-grid-header-border,#0A58CA);white-space:nowrap;font-weight:600;color:var(--erp-grid-header-text,#FFFFFF);font-size:11.5px;letter-spacing:.5px;text-transform:uppercase}.tally-cargo-grid td{height:auto;min-height:32px;padding:3px 6px;vertical-align:middle;border:1px solid #c9dddd}.tally-cargo-grid tbody tr:nth-child(even) td{background:#f5fbfa}.tally-cargo-grid tbody tr:hover td{background:var(--erp-grid-row-hover,#EFF6FF)}.line-no{text-align:center}.remove-line{border:0;background:none;color:#b42318;font-size:18px}.tally-add-line{border:0;color:#176d67;background:none;font-weight:700}.tally-voucher-footer{position:sticky;bottom:0;z-index:4;display:flex;align-items:center;justify-content:space-between;padding:6px 10px;border-top:1px solid #9dbfbc;background:#eef7f6}.tally-voucher-footer span{font-size:12px;color:#526d6a}.tally-voucher-footer .btn-erp{min-width:150px;padding:6px 12px}.tally-recent .tally-cargo-grid{width:max-content;min-width:100%;table-layout:auto}.tally-recent .tally-cargo-grid th,.tally-recent .tally-cargo-grid td{white-space:nowrap}.tally-recent .tally-cargo-grid td{height:36px;padding:7px 12px}.tally-recent .tally-cargo-grid tbody tr:nth-child(even) td{background:#f4f9f8}.inline-form{display:inline-block;margin:0}.txn-actions{white-space:nowrap;max-width:120px;width:120px;display:flex;align-items:center;justify-content:flex-end;gap:2px}.txn-actions .btn{padding:1px 5px;font-size:11px;line-height:1.35}.txn-actions .inline-form{flex:none;min-width:0}.txn-status{display:inline-block;padding:2px 9px;border-radius:20px;font-size:11px;font-weight:600;letter-spacing:.3px;color:#fff;background:#7a8a88}.txn-status-draft{background:#b58317}.txn-status-posted{background:#176d67}.txn-status-cancelled{background:#8b1f12}
/* CTMS transaction headers follow the compact Purchase/Sales entry rhythm. */
.ctms-start-form { min-width:0 !important; padding:18px; }
.ctms-start-card { width:min(560px,100%); margin:24px auto; }
.ctms-start-card .master-card-body { padding:12px; }
.ctms-start-card .erp-form { grid-template-columns:1fr; }
.ctms-start-card .erp-form-row { grid-template-columns:150px minmax(0,1fr); margin-bottom:5px; }
.tally-inward-page form { min-width:0; }
.tally-entry-block {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:2px 1rem;
    padding:4px 10px;
    align-items:start;
}
.tally-field {
    grid-template-columns:112px minmax(0,1fr);
    align-items:center;
    min-width:0;
    column-gap:.5rem;
}
.tally-field label {
    margin:0;
    font-size:13px;
    line-height:1.2;
    font-weight:600;
    color:#294d4a;
    white-space:nowrap;
}
.tally-field input,
.tally-field select {
    width:100%;
    max-width:100%;
    min-width:0;
    height:29px;
    min-height:29px;
    padding:.15rem .5rem;
    font-size:12px;
    line-height:1.25;
}
@media(max-width:600px) {
    .tally-entry-block { grid-template-columns:minmax(0,1fr); }
    .tally-field { grid-template-columns:120px minmax(0,1fr); }
    .tally-field.tally-wide,
    .tally-ledger-field { grid-column:auto; }
}

/* CTMS voucher layout mirrors the Accounting Voucher visual language. */
.tally-inward-page #txnForm {
    margin:10px 22px 24px;
    overflow:hidden;
    border:1px solid #d6e4e4;
    border-radius:18px 18px 8px 8px;
    background:#eef5f5;
    box-shadow:0 6px 18px rgba(25,67,66,.06);
}
.tally-inward-page #txnForm .tally-voucher-header {
    position:relative;
    min-height:78px;
    padding:15px 24px;
    color:#071b2a;
    background:#cdeaea;
}
.tally-inward-page #txnForm .tally-voucher-header h3 {
    font-size:22px;
    font-weight:650;
    color:#071b2a;
}
.tally-inward-page #txnForm .tally-voucher-header small {
    display:block;
    margin-top:3px;
    color:#4f7372;
    opacity:1;
}
.tally-inward-page #txnForm .tally-voucher-no {
    border:0;
    color:#0b5552;
    font-weight:650;
    text-decoration:underline;
}
.tally-inward-page #txnForm .tally-entry-block {
    grid-template-columns:repeat(5,minmax(140px,1fr));
    gap:10px 12px;
    padding:30px 30px 14px;
    border:0;
    background:#eef5f5;
}
.tally-inward-page #txnForm .tally-field {
    display:flex;
    flex-direction:column;
    align-items:stretch;
    gap:5px;
}
.tally-inward-page #txnForm .tally-field.tally-wide { grid-column:span 2; }
.tally-inward-page #txnForm .tally-ledger-field { grid-column:span 2; }
.tally-inward-page #txnForm .tally-field label {
    min-height:16px;
    font-size:13px;
    font-weight:650;
    color:#102d2c;
}
.tally-inward-page #txnForm .tally-field input,
.tally-inward-page #txnForm .tally-field select,
.tally-inward-page #txnForm .tally-cargo-grid input,
.tally-inward-page #txnForm .tally-cargo-grid select {
    height:31px;
    min-height:31px;
    padding:4px 10px;
    border:1px solid #ccd8de;
    border-radius:5px;
    background:#fff;
}
.tally-inward-page #txnForm .tally-field input:focus,
.tally-inward-page #txnForm .tally-field select:focus,
.tally-inward-page #txnForm .tally-cargo-grid input:focus,
.tally-inward-page #txnForm .tally-cargo-grid select:focus {
    outline:2px solid rgba(23,109,103,.2);
    border-color:#176d67;
    background:#fff;
}
.tally-inward-page #txnForm .select2-container { width:100%!important; }
.tally-inward-page #txnForm .select2-container .select2-selection--single {
    height:31px;
    border:1px solid #ccd8de;
    border-radius:5px;
}
.tally-inward-page #txnForm .select2-selection__rendered { line-height:29px!important; padding-left:10px!important; font-size:12px; }
.tally-inward-page #txnForm .select2-selection__arrow { height:29px!important; }
.ctms-lines-toolbar {
    display:flex;
    align-items:center;
    gap:8px;
    margin:0 30px;
    padding:8px 14px;
    border:1px solid #b9cece;
    border-bottom:0;
    background:#dceeee;
}
.ctms-lines-toolbar strong { color:#123c3a; }
.ctms-lines-toolbar span { color:#617a79; font-size:12px; }
.ctms-lines-toolbar button { margin-left:auto; padding:6px 14px; border-color:#b7dddd; background:#cdeaea; }
.tally-inward-page #txnForm .tally-grid-wrap {
    margin:0 30px;
    border:1px solid #9eb6b6;
    background:#fff;
}
.tally-inward-page #txnForm .tally-cargo-grid th {
    padding:10px 11px;
    font-size:12px;
    text-transform:none;
    letter-spacing:0;
    background:#0d6efd;
    border-color:#0759cf;
}
.tally-inward-page #txnForm .tally-cargo-grid td {
    height:44px;
    padding:5px 10px;
    background:#f3f9f9;
    border-color:#c4d5d5;
}
.tally-inward-page #txnForm .tally-cargo-grid tbody tr:nth-child(even) td { background:#fff; }
.tally-inward-page #txnForm .tally-cargo-grid tbody tr:hover td { background:#eaf4f4; }
.tally-inward-page #txnForm .tally-cargo-grid tfoot td { background:#eef6f6; font-weight:650; }
.tally-inward-page #txnForm .tally-voucher-footer {
    position:relative;
    margin:0 30px 24px;
    padding:12px 14px;
    border:1px solid #b9cece;
    border-top:0;
    background:#eef5f5;
}
@media(max-width:1200px) {
    .tally-inward-page #txnForm .tally-entry-block { grid-template-columns:repeat(3,minmax(150px,1fr)); }
}
@media(max-width:760px) {
    .tally-inward-page #txnForm { margin:6px; border-radius:12px 12px 5px 5px; }
    .tally-inward-page #txnForm .tally-entry-block { grid-template-columns:1fr; padding:18px 12px 10px; }
    .tally-inward-page #txnForm .tally-field.tally-wide,
    .tally-inward-page #txnForm .tally-ledger-field { grid-column:auto; }
    .ctms-lines-toolbar,
    .tally-inward-page #txnForm .tally-grid-wrap,
    .tally-inward-page #txnForm .tally-voucher-footer { margin-left:12px; margin-right:12px; }
}
@media(max-width:1100px){.warehouse-level-picker{grid-template-columns:repeat(4,1fr)}.warehouse-inward-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:1000px){.warehouse-entry-form{grid-template-columns:repeat(2,1fr)}.warehouse-summary{grid-template-columns:repeat(3,1fr)}}@media(max-width:700px){.warehouse-help-flow{align-items:stretch;flex-direction:column}.warehouse-help-flow>i{transform:rotate(90deg)}.warehouse-help-flow>div{min-width:0}}@media(max-width:600px){.warehouse-create-panel{padding:11px}.warehouse-level-picker{grid-template-columns:repeat(2,1fr)}.warehouse-entry-form,.warehouse-inward-grid{grid-template-columns:1fr}.warehouse-summary{grid-template-columns:repeat(2,1fr)}}
.accessory-inline-picker{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px;min-width:230px}.accessory-inline-picker>.select2-container{width:100%!important;min-width:0}.accessory-inline-picker .accessory-inline-add{height:27px;min-height:27px;padding:2px 7px;font-size:11px;white-space:nowrap}.service-inward-page .accessory-inline-picker .select2-selection--single{height:27px}.service-inward-page .accessory-inline-picker .select2-selection__rendered{line-height:25px!important;font-size:11.5px!important}.service-inward-page .accessory-inline-picker .select2-selection__arrow{height:25px!important}
.job-card-page .erp-table .select2-container{width:100%!important;min-width:120px}.job-card-page .erp-table .select2-selection--single{height:27px}.job-card-page .erp-table .select2-selection__rendered{line-height:25px!important;font-size:11.5px!important}.job-card-page .erp-table .select2-selection__arrow{height:25px!important}
