/**
 * ============================================================================
 * D S CONSORTIUM - UNIFIED RESPONSIVE STYLESHEET (Custom.css)
 * Optimized for All Screen Resolutions:
 * - 4K / Ultra-wide (> 1400px)
 * - Standard Desktop (1200px - 1399px)
 * - Laptop / Small Desktop (992px - 1199px)
 * - Tablet / iPad (768px - 991px)
 * - Large Mobile (576px - 767px)
 * - Small Mobile / Phones (320px - 575px)
 * ============================================================================
 */

/* ============================================================================
   1. GLOBAL RESET & RESPONSIVE BASE FOUNDATION
   ============================================================================ */

:root {
    --ds-primary: #3c3c8e;
    --ds-primary-hover: #2e2e72;
    --ds-primary-light: #f0f0fa;
    --ds-teal: #3a7d6f;
    --ds-teal-light: #eaf4f2;
    --ds-border: #e2e8f0;
    --ds-bg: #f5f7fa;
    --ds-card-bg: #ffffff;
    --ds-card-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    --ds-card-shadow-hover: 0 4px 14px rgba(0, 0, 0, 0.09);
    --ds-radius: 8px;
    --ds-radius-sm: 6px;
    --ds-radius-lg: 12px;
}

html {
    box-sizing: border-box;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    font-family: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #4a5568;
    background-color: var(--ds-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Touch-friendly base */
button, 
a, 
input, 
select, 
textarea {
    touch-action: manipulation;
}

/* Responsive Images & Media */
img, svg, video, canvas {
    max-width: 100%;
    height: auto;
}

/* Smooth horizontal touch scroll containers */
.table-responsive,
.nav-tabs,
.quote-mobile-wrapper {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.table-responsive::-webkit-scrollbar,
.quote-mobile-wrapper::-webkit-scrollbar {
    height: 7px;
    width: 7px;
}

.table-responsive::-webkit-scrollbar-thumb,
.quote-mobile-wrapper::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-responsive::-webkit-scrollbar-thumb:hover,
.quote-mobile-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Cursor pointer utility */
.ctmCursor, .cursor-pointer {
    cursor: pointer;
}


/* ============================================================================
   2. NAVBAR & TOP HEADER RESPONSIVE
   ============================================================================ */

.layout-navbar {
    min-height: 60px;
    padding: 0.5rem 1rem !important;
}

.layout-navbar .navbar-nav-right {
    gap: 10px;
}

/* Master firm & department selects in header */
.layout-navbar select,
.layout-navbar .form-select {
    height: 34px;
    padding: 2px 28px 2px 10px;
    font-size: 13px;
    border-radius: var(--ds-radius-sm);
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    max-width: 180px;
    color: #374151;
    font-weight: 500;
}

.layout-navbar select:focus {
    border-color: var(--ds-primary);
    box-shadow: 0 0 0 2px rgba(60, 60, 142, 0.15);
    outline: none;
}

@media (max-width: 767.98px) {
    .layout-navbar {
        padding: 0.35rem 0.65rem !important;
    }

    .layout-navbar select,
    .layout-navbar .form-select {
        max-width: 120px;
        font-size: 11px;
        height: 30px;
        padding: 2px 20px 2px 6px;
    }

    .layout-navbar .avatar {
        width: 32px;
        height: 32px;
    }

    .layout-navbar .avatar i {
        font-size: 1.1rem !important;
    }

    .layout-navbar h6 {
        font-size: 12px;
    }

    .layout-navbar small {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .layout-navbar select,
    .layout-navbar .form-select {
        max-width: 95px;
        font-size: 10px;
        height: 28px;
        padding: 1px 16px 1px 4px;
    }
}


/* ============================================================================
   3. UNIFIED MANAGEMENT / CRUD PAGES (AccountType, Bank, City, Client, etc.)
   ============================================================================ */

/* Page container */
[class*="-management-page"],
.crud-management-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

[class*="-management-page"] .card,
.crud-management-page .card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto !important;
    border-radius: var(--ds-radius);
    border: 1px solid var(--ds-border);
    box-shadow: var(--ds-card-shadow);
    background: #fff;
    overflow: hidden;
    margin-bottom: 24px;
}

[class*="-management-page"] .card-body,
.crud-management-page .card-body {
    width: 100%;
    min-width: 0;
    padding: 1.25rem;
}

/* Management Header (Title, Search, Action Buttons) */
[class*="-management-header"],
.crud-management-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin-bottom: 1.25rem;
}

[class*="-management-header"] > div:first-child,
.crud-management-header > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

[class*="-management-header"] h4,
.crud-management-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
}

[class*="-management-actions"],
.crud-management-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    min-width: 0;
}

/* Search input */
.userSearchTextBox,
[class*="-management-page"] .userSearchTextBox,
.permission-search {
    width: 250px;
    min-width: 0;
    height: 38px;
    border-radius: var(--ds-radius-sm);
    border: 1px solid #d1d5db;
    padding: 6px 12px;
    font-size: 13.5px;
    transition: all 0.2s ease-in-out;
}

.userSearchTextBox:focus,
[class*="-management-page"] .userSearchTextBox:focus,
.permission-search:focus {
    border-color: var(--ds-primary);
    box-shadow: 0 0 0 3px rgba(60, 60, 142, 0.15);
    outline: none;
}

/* Action button (Add New, etc.) */
[class*="-management-actions"] .btn,
.crud-management-actions .btn {
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--ds-radius-sm);
    white-space: nowrap;
    padding: 0 16px;
}

/* Table container */
[class*="-management-page"] .table-responsive,
.crud-management-page .table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    border-radius: var(--ds-radius-sm);
    border: 1px solid var(--ds-border);
    margin-bottom: 1rem;
}

/* Management Tables */
[class*="-management-table"],
.crud-management-table {
    width: 100%;
    min-width: 800px;
    table-layout: auto;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

/* Wide tables that need more space */
.client-management-table,
.firm-management-table,
.service-management-table,
.product-management-table,
.inquirylist-management-table {
    min-width: 1100px;
}

/* Compact tables */
.accounttype-management-table,
.bank-management-table,
.city-management-table,
.country-management-table,
.department-management-table,
.doctype-management-table,
.gst-management-table,
.state-management-table,
.status-management-table,
.td-management-table,
.termscondition-management-table,
.uom-management-table,
.role-management-table {
    min-width: 750px;
}

[class*="-management-table"] th,
[class*="-management-table"] td,
.crud-management-table th,
.crud-management-table td {
    vertical-align: middle;
    white-space: nowrap;
    padding: 10px 14px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--ds-border);
}

[class*="-management-table"] thead th,
.crud-management-table thead th {
    background-color: #f8fafc;
    color: #475569;
    font-weight: 700;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-top: none;
    border-bottom: 2px solid var(--ds-border);
}

[class*="-management-table"] tbody tr:hover,
.crud-management-table tbody tr:hover {
    background-color: #f8fafc;
}

/* Sticky Action Column (Edit / Delete) */
[class*="-management-table"] th.sticky-action,
[class*="-management-table"] td.action-table-data,
.crud-management-table th.sticky-action,
.crud-management-table td.action-table-data {
    position: sticky;
    right: 0;
    width: 90px;
    min-width: 90px;
    white-space: nowrap !important;
    text-align: center;
    z-index: 3;
    box-shadow: -3px 0 6px rgba(0, 0, 0, 0.04);
}

[class*="-management-table"] th.sticky-action,
.crud-management-table th.sticky-action {
    background-color: #f1f5f9;
}

[class*="-management-table"] td.action-table-data,
.crud-management-table td.action-table-data {
    background-color: #ffffff;
}

[class*="-management-table"] tbody tr:hover td.action-table-data,
.crud-management-table tbody tr:hover td.action-table-data {
    background-color: #f8fafc;
}

/* Action button icons in table */
.action-buttons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    white-space: nowrap;
}

.action-buttons a,
.action-buttons button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--ds-radius-sm);
    color: inherit;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out, transform 0.1s ease-in-out;
}

.action-buttons a:hover,
.action-buttons button:hover {
    background-color: rgba(0, 0, 0, 0.06);
    transform: scale(1.1);
}

.action-buttons a.text-success:hover {
    background-color: rgba(16, 185, 129, 0.12);
}

.action-buttons a.text-danger:hover {
    background-color: rgba(239, 68, 68, 0.12);
}

/* Address column wrapped nicely */
[class*="-management-table"] th.address-column,
[class*="-management-table"] td.address-column,
.crud-management-table th.address-column,
.crud-management-table td.address-column {
    width: 240px;
    min-width: 200px;
    max-width: 280px;
    white-space: normal !important;
    word-break: normal;
    overflow-wrap: break-word;
    line-height: 1.45;
}

/* Logo thumbnail in table */
.firm-logo,
.accounttype-logo,
.service-logo,
.product-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: var(--ds-radius-sm);
    background: #f8fafc;
    border: 1px solid var(--ds-border);
    padding: 2px;
}

/* Bottom Pagination */
[class*="-management-pagination"],
.crud-management-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    width: 100%;
    margin-top: 1rem;
    padding-top: 0.5rem;
}

[class*="-management-pagination"] > div,
.crud-management-pagination > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

[class*="-management-pagination"] .pagination,
.crud-management-pagination .pagination {
    margin-bottom: 0;
    gap: 4px;
}

.pagination .page-item .page-link {
    border-radius: var(--ds-radius-sm);
    color: #475569;
    font-weight: 500;
    border: 1px solid #e2e8f0;
    padding: 6px 12px;
    min-width: 36px;
    text-align: center;
    transition: all 0.15s ease-in-out;
}

.pagination .page-item.active .page-link {
    background-color: var(--ds-primary);
    border-color: var(--ds-primary);
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(60, 60, 142, 0.3);
}

.pagination .page-item .page-link:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
}

.pagination .page-item.active .page-link:hover {
    background-color: var(--ds-primary-hover);
}


/* ============================================================================
   4. INQUIRY ORDER PAGE STYLES (Inquiry.cshtml)
   ============================================================================ */

.po-card {
    border-radius: var(--ds-radius);
    border: 1px solid var(--ds-border);
    box-shadow: var(--ds-card-shadow);
    background: #fff;
    margin-bottom: 20px;
    overflow: hidden;
}

.po-card-header {
    background: var(--ds-teal-light);
    border-bottom: 1px solid var(--ds-border);
    padding: 11px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.po-card-header h6 {
    margin: 0;
    font-size: 13.5px;
    font-weight: 700;
    color: #2d5a52;
    letter-spacing: .01em;
}

.po-card-body {
    padding: 16px 18px;
    font-size: 13.5px;
    line-height: 1.7;
    color: #3b4a55;
}

.po-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 5px;
    display: block;
}

.po-label .req {
    color: #e53e3e;
}

/* PO Table */
.po-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.po-table th,
.po-table td {
    padding: 9px 12px;
    vertical-align: middle;
    font-size: 13px;
    border: 1px solid #e2e8f0;
}

.po-table thead th {
    background: #f0f7f5;
    color: #2d5a52;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11.5px;
    letter-spacing: .03em;
}

.po-table input.form-control,
.po-table select.form-select {
    height: 34px;
    font-size: 12.5px;
    padding: 4px 8px;
}

/* Totals Box */
.totals-box {
    background: #fff;
    border: 1px solid var(--ds-border);
    border-radius: var(--ds-radius);
    padding: 18px;
    box-shadow: var(--ds-card-shadow);
}

.totals-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 13.5px;
    color: #4a5568;
    border-bottom: 1px dashed #edf2f7;
}

.totals-row:last-child {
    border-bottom: none;
}

.totals-row.grand {
    font-size: 15px;
    font-weight: 700;
    color: #1a202c;
    border-top: 2px solid var(--ds-teal);
    border-bottom: none;
    margin-top: 6px;
    padding-top: 10px;
}

/* Sticky Action Bar in Inquiry */
.action-bar {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
    border-top: 1px solid var(--ds-border);
    padding: 14px 22px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.07);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-po-save {
    background: #3a7d6f;
    color: #fff;
    border: none;
    border-radius: var(--ds-radius-sm);
    padding: 9px 26px;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all .15s;
}

.btn-po-save:hover:not(:disabled) {
    background: #2d5a52;
    color: #fff;
    transform: translateY(-1px);
}

.btn-po-save:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.btn-po-cancel {
    background: #fff;
    color: #718096;
    border: 1px solid #cbd5e0;
    border-radius: var(--ds-radius-sm);
    padding: 9px 20px;
    font-size: 13.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all .15s;
}

.btn-po-cancel:hover {
    background: #f7fafc;
    color: #4a5568;
}

.edit-btn {
    background: none;
    border: none;
    color: #3a7d6f;
    font-size: 15px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background-color 0.15s;
}

.edit-btn:hover {
    background: rgba(58, 125, 111, 0.12);
}


/* ============================================================================
   5. QUOTATION VIEW RESPONSIVE (Quote.cshtml)
   ============================================================================ */

.quote-page-wrapper {
    width: 100%;
    min-height: 100vh;
    background: #e2e8f0;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quote-mobile-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    justify-content: center;
    padding-bottom: 20px;
}

.quote-floating-container {
    display: flex !important;
    justify-content: center !important;
    position: fixed !important;
    bottom: 22px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 9999 !important;
    pointer-events: none !important;
    width: auto !important;
}

.quote-floating-actions {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 50px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.22), 0 8px 10px -6px rgba(0, 0, 0, 0.12) !important;
    padding: 6px 14px !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    pointer-events: auto !important;
    width: max-content !important;
    min-width: max-content !important;
    max-width: 95vw !important;
}

.quote-floating-actions a.quote-btn,
.quote-floating-actions button.quote-btn,
.quote-floating-actions .quote-btn,
.quote-floating-actions .po-icon-btn {
    width: auto !important;
    min-width: max-content !important;
    max-width: none !important;
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    padding: 0 18px !important;
    border-radius: 20px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: all 0.18s ease-in-out !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important;
    border: none !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    overflow: visible !important;
    line-height: normal !important;
    box-sizing: border-box !important;
}

.quote-floating-actions .btn-back {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
}
.quote-floating-actions .btn-back:hover {
    background: #e2e8f0 !important;
    color: #1e293b !important;
    transform: translateY(-1px);
}

.quote-floating-actions .btn-print {
    background: #3a7d6f !important;
    color: #ffffff !important;
    border: 1px solid #3a7d6f !important;
}
.quote-floating-actions .btn-print:hover {
    background: #2d6257 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.quote-floating-actions .btn-send {
    background: #2563eb !important;
    color: #ffffff !important;
    border: 1px solid #2563eb !important;
}
.quote-floating-actions .btn-send:hover {
    background: #1d4ed8 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.quote-floating-actions .quote-btn i,
.quote-floating-actions .po-icon-btn i {
    font-size: 15px !important;
    line-height: 1 !important;
}

.po-icon-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--ds-primary);
    color: #ffffff;
    border: none;
    border-radius: var(--ds-radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.po-icon-btn:hover {
    background: var(--ds-primary-hover);
    color: #ffffff;
    transform: translateY(-1px);
}

.po-icon-btn.btn-secondary {
    background: #64748b;
}

.po-icon-btn.btn-secondary:hover {
    background: #475569;
}


/* ============================================================================
   6. DASHBOARD RESPONSIVE (Dashboard.cshtml)
   ============================================================================ */

.dashboard-grid {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.dashboard-grid > [class*="col-"] {
    min-width: 0;
}

.dashboard-grid .card {
    width: 100%;
    min-width: 0;
    height: 100%;
}

.dashboard-grid #weeklyEarningReports,
.dashboard-grid #averageDailySales {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

.dashboard-grid .earning-summary {
    min-width: 0;
}

.dashboard-grid .earning-summary small {
    overflow-wrap: break-word;
}


/* ============================================================================
   7. PERMISSIONS & ROLES RESPONSIVE (Permission.cshtml, Role.cshtml)
   ============================================================================ */

.permission-page,
.role-management-page {
    width: 100%;
    min-width: 0;
}

.permission-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    margin-bottom: 1.25rem;
}

.permission-header-left {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 250px;
}

.permission-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 1 1 300px;
    min-width: 0;
}

.permission-table {
    width: 100%;
    min-width: 650px;
    margin-bottom: 0;
}

.permission-table th,
.permission-table td {
    padding: 10px 14px;
    vertical-align: middle;
}

.permission-table .form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}


/* ============================================================================
   8. USER & PROFILE RESPONSIVE (User.cshtml, Profile.cshtml)
   ============================================================================ */

.user-management-tabs {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-bottom: 1px solid var(--ds-border);
}

.user-management-tabs .nav-link {
    flex: 1 1 0;
    white-space: nowrap;
    padding: 10px 16px;
    text-align: center;
    font-size: 13.5px;
    font-weight: 600;
}

.profile-management-page .profile-form-row {
    width: 100%;
    margin: 0;
}


/* ============================================================================
   9. AUTH & REGISTRATION PAGES (Login / ClientRegistration)
   ============================================================================ */

.authentication-wrapper {
    display: flex;
    flex-basis: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.authentication-inner {
    width: 100%;
    max-width: 460px;
}

.authentication-inner.registration-wide {
    max-width: 1040px;
}


/* ============================================================================
   10. MODALS RESPONSIVENESS
   ============================================================================ */

.modal-dialog {
    margin: 1.75rem auto;
}

.modal-content {
    border-radius: var(--ds-radius-lg);
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid var(--ds-border);
    padding: 16px 20px;
    background-color: #f8fafc;
}

.modal-body {
    padding: 20px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-footer {
    border-top: 1px solid var(--ds-border);
    padding: 14px 20px;
    background-color: #f8fafc;
    flex-wrap: wrap;
    gap: 8px;
}


/* ============================================================================
   11. MEDIA QUERIES FOR LAPTOPS & TABLETS (max-width: 991.98px)
   ============================================================================ */

@media (max-width: 991.98px) {
    [class*="-management-header"],
    .crud-management-header {
        align-items: flex-start;
    }

    [class*="-management-actions"],
    .crud-management-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .userSearchTextBox,
    [class*="-management-page"] .userSearchTextBox,
    .permission-search {
        flex: 1 1 auto;
        width: auto;
    }

    .dashboard-grid {
        row-gap: 1rem;
    }

    .dashboard-grid .card-header {
        flex-wrap: wrap;
    }

    /* Modal adjustments */
    .modal-dialog {
        max-width: 90%;
        margin: 1.5rem auto;
    }
}


/* ============================================================================
   12. MEDIA QUERIES FOR MOBILES & PHONES (max-width: 575.98px)
   ============================================================================ */

@media (max-width: 575.98px) {
    /* Compact padding in cards */
    [class*="-management-page"] .card-body,
    .crud-management-page .card-body,
    .po-card-body {
        padding: 12px 14px;
    }

    /* Header stacks vertically */
    [class*="-management-header"],
    .crud-management-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 1rem;
    }

    [class*="-management-header"] h4,
    .crud-management-header h4 {
        font-size: 1.1rem;
    }

    [class*="-management-actions"],
    .crud-management-actions {
        flex-direction: column;
        width: 100%;
        align-items: stretch;
        gap: 8px;
    }

    .userSearchTextBox,
    [class*="-management-page"] .userSearchTextBox,
    .permission-search {
        width: 100%;
        flex: none;
    }

    [class*="-management-actions"] .btn,
    .crud-management-actions .btn {
        width: 100%;
    }

    /* Bottom pagination stacks vertically */
    [class*="-management-pagination"],
    .crud-management-pagination {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
        padding: 10px 0 !important;
    }

    [class*="-management-pagination"] > div,
    .crud-management-pagination > div {
        width: 100%;
        justify-content: center;
        font-size: 12.5px;
    }

    [class*="-management-pagination"] .pagination,
    .crud-management-pagination .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }

    .pagination .page-item .page-link {
        padding: 5px 10px;
        font-size: 12px;
        min-width: 32px;
    }

    /* Action bar on mobile in Inquiry */
    .action-bar {
        padding: 10px 14px;
        flex-direction: column;
        gap: 8px;
    }

    .action-bar button,
    .btn-po-save,
    .btn-po-cancel {
        width: 100% !important;
        justify-content: center;
        padding: 11px 16px;
        font-size: 14px;
    }

    /* Modals take full screen width */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-header {
        padding: 12px 16px;
    }

    .modal-body {
        padding: 14px 16px;
        max-height: calc(100vh - 140px);
    }

    .modal-footer {
        padding: 10px 16px;
        flex-direction: column;
    }

    .modal-footer button,
    .modal-footer .btn {
        width: 100%;
        margin: 4px 0 !important;
    }

    /* Inquiry Totals box on phone */
    .totals-box {
        padding: 14px;
    }

    .totals-row {
        font-size: 12.5px;
    }

    .totals-row.grand {
        font-size: 14px;
    }

    /* Quote view mobile toolbar */
    .quote-floating-actions {
        width: calc(100% - 24px);
        max-width: 420px;
        justify-content: center;
        border-radius: 50px;
        bottom: 12px;
        padding: 6px 10px;
        gap: 6px;
    }

    .quote-floating-actions .quote-btn,
    .quote-floating-actions .po-icon-btn {
        padding: 0 12px !important;
        font-size: 12px !important;
        height: 34px !important;
        min-height: 34px !important;
        gap: 5px !important;
    }
}


/* ============================================================================
   13. EXTRA SMALL PHONES (max-width: 360px)
   ============================================================================ */

@media (max-width: 360px) {
    [class*="-management-header"] h4,
    .crud-management-header h4 {
        font-size: 1rem;
    }

    [class*="-management-page"] .card-body,
    .crud-management-page .card-body {
        padding: 10px;
    }

    .pagination .page-item .page-link {
        padding: 4px 8px;
        font-size: 11px;
        min-width: 28px;
    }
}



/* ============================================================================
   SECTION: INQUIRY DETAIL & ORDER PAGE STYLES (Inquiry.cshtml)
   ============================================================================ */
/* ===== TOKENS ===== */

    :root {
        --clr-primary: #3a7d6f;
        --clr-primary-lt: #eaf4f2;
        --clr-border: #e2e8f0;
        --clr-header-bg: #f0f7f5;
        --clr-card-shadow: 0 1px 4px rgba(0,0,0,.06);
        --radius: 10px;
    }

    /* ===== PAGE ===== */

    body {
        background: #f5f7fa;
    }

    /* ===== CARDS ===== */

    .po-card {
        border-radius: var(--radius);
        border: 1px solid var(--clr-border);
        box-shadow: var(--clr-card-shadow);
        background: #fff;
        margin-bottom: 20px;
        overflow: hidden;
    }

    .po-card-header {
        background: var(--clr-header-bg);
        border-bottom: 1px solid var(--clr-border);
        padding: 11px 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

        .po-card-header h6 {
            margin: 0;
            font-size: 13.5px;
            font-weight: 700;
            color: #2d5a52;
            letter-spacing: .01em;
        }

    .po-card-body {
        padding: 16px 18px;
        font-size: 13.5px;
        line-height: 1.7;
        color: #3b4a55;
    }

    /* ===== FORM FIELDS ===== */

    .po-label {
        font-size: 12.5px;
        font-weight: 600;
        color: #4a5568;
        margin-bottom: 5px;
        display: block;
    }

        .po-label .req {
            color: #e53e3e;
        }

    .form-control, .form-select {
        height: 38px;
        border-radius: 7px;
        border: 1px solid #cbd5e0;
        font-size: 13.5px;
        transition: border-color .15s;
    }

        .form-control:focus, .form-select:focus {
            border-color: var(--clr-primary);
            box-shadow: 0 0 0 3px rgba(58,125,111,.12);
        }

    /* ===== SUPPLIER / FIRM ROW ===== */

    .top-select-row {
        background: #fff;
        border: 1px solid var(--clr-border);
        border-radius: var(--radius);
        padding: 16px 20px;
        margin-bottom: 22px;
        box-shadow: var(--clr-card-shadow);
    }

    /* ===== INFO CARDS (address blocks) ===== */

    .info-line {
        margin-bottom: 2px;
    }

    .info-name {
        font-weight: 700;
        font-size: 14px;
        color: #1a3c36;
        margin-bottom: 6px;
    }

    .info-badge {
        display: inline-block;
        background: var(--clr-primary-lt);
        color: var(--clr-primary);
        border-radius: 4px;
        font-size: 11px;
        font-weight: 600;
        padding: 1px 7px;
        margin-bottom: 6px;
    }

    .info-empty {
        color: #a0aec0;
        font-style: italic;
        font-size: 13px;
    }

    .edit-btn {
        border: none;
        background: transparent;
        color: var(--clr-primary);
        padding: 0;
        line-height: 1;
    }

        .edit-btn i {
            font-size: 16px;
        }

        .edit-btn:hover {
            color: #2d5a52;
        }

    /* ===== TABLE ===== */

    .po-table thead th {
        background: var(--clr-header-bg);
        font-size: 12.5px;
        font-weight: 700;
        color: #2d5a52;
        border-bottom: 2px solid #d1e8e4;
        white-space: nowrap;
        padding: 10px 14px;
    }

    .po-table tbody td {
        vertical-align: middle;
        font-size: 13.5px;
        padding: 9px 14px;
        color: #3b4a55;
    }

    .po-table tbody tr:hover {
        background: #f8fefd;
    }

    /* ===== TOTALS ===== */

    .totals-box {
        background: #fff;
        border: 1px solid var(--clr-border);
        border-radius: var(--radius);
        overflow: hidden;
        box-shadow: var(--clr-card-shadow);
    }

    .totals-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 20px;
        border-bottom: 1px solid #edf2f7;
        font-size: 13.5px;
    }

        .totals-row:last-child {
            border-bottom: none;
        }

        .totals-row.grand {
            background: var(--clr-primary-lt);
            font-weight: 700;
            font-size: 15px;
            color: var(--clr-primary);
        }

        .totals-row .lbl {
            color: #718096;
        }

        .totals-row.grand .lbl {
            color: var(--clr-primary);
        }

    /* ===== ACTION BAR ===== */

    .action-bar {
        position: sticky;
        bottom: 0;
        background: #fff;
        border-top: 1px solid var(--clr-border);
        padding: 14px 22px;
        box-shadow: 0 -4px 16px rgba(0,0,0,.05);
        z-index: 20;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
    }

    .btn-po-save {
        background: var(--clr-primary);
        border: none;
        color: #fff;
        padding: 9px 32px;
        border-radius: 7px;
        font-weight: 600;
        font-size: 14px;
        transition: background .15s;
    }

        .btn-po-save:hover {
            background: #2d5a52;
            color: #fff;
        }

        .btn-po-save:disabled {
            opacity: .55;
        }

    .btn-po-cancel {
        background: #fff;
        border: 1px solid #cbd5e0;
        color: #4a5568;
        padding: 9px 28px;
        border-radius: 7px;
        font-weight: 600;
        font-size: 14px;
        transition: background .15s;
    }

        .btn-po-cancel:hover {
            background: #f7fafc;
        }

    /* ===== ADD ITEM PANEL ===== */

    .add-item-panel {
        background: #fff;
        border: 1px solid var(--clr-border);
        border-radius: var(--radius);
        padding: 18px 20px;
        margin-bottom: 0;
        box-shadow: var(--clr-card-shadow);
    }

        .add-item-panel .panel-title {
            font-size: 13px;
            font-weight: 700;
            color: #2d5a52;
            margin-bottom: 14px;
            padding-bottom: 10px;
            border-bottom: 1px solid #edf2f7;
        }

    /* ===== SECTION LABEL ===== */

    .section-divider {
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: #a0aec0;
        margin: 24px 0 12px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

        .section-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: #e2e8f0;
        }

    /* ===== MODAL ===== */

    .modal-header {
        border-bottom: 1px solid var(--clr-border);
    }

    .modal-footer {
        border-top: 1px solid var(--clr-border);
    }

    .modal-title {
        font-size: 15px;
        font-weight: 700;
        color: #1a3c36;
    }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 991px) {
        .info-cards-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 16px;
        }

    }
    @media (max-width: 575px) {
        .info-cards-grid {
            grid-template-columns: 1fr;
        }

    }

    /* FORCE SWEETALERT TOAST STYLE */

    .swal2-popup.swal2-toast {
        width: 320px !important;
        font-size: 14px !important;
        padding: 10px 14px !important;
        box-shadow: 0 4px 14px rgba(0,0,0,0.15) !important;
    }

    .swal2-toast .swal2-title {
        font-size: 14px !important;
        margin: 0 !important;
    }

    .swal2-container.swal2-top-end {
        top: 15px !important;
        right: 15px !important;
    }

    /* =========================================================

       HEADER

    ========================================================= */

    .po-main-header {
        background: linear-gradient( 180deg, #f8fbfa 0%, #f3f7f6 100% );
        border: 1px solid #dde7e4;
        border-radius: 12px;
        padding: 18px 24px;
        margin-bottom: 22px;
        box-shadow: 0 1px 2px rgba(15, 23, 42, .03), 0 4px 14px rgba(15, 23, 42, .04);
        position: relative;
        overflow: hidden;
    }

        /* subtle top accent */

        .po-main-header::before {
            content: "";
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: linear-gradient( 90deg, var(--clr-primary), #6fa89d );
        }

    /* =========================================================

       TITLE

    ========================================================= */

    .po-page-title {
        font-size: 31px;
        font-weight: 700;
        color: #173c35;
        line-height: 1.1;
        letter-spacing: -.4px;
        margin-bottom: 4px;
    }

    .po-page-subtitle {
        font-size: 13px;
        color: #6c7a89;
        font-weight: 500;
    }

    /* =========================================================

       STATUS PILL

    ========================================================= */

    .po-status-pill {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 7px 14px;
        min-height: 38px;
        border-radius: 10px;
        font-size: 12.5px;
        font-weight: 600;
        border: 1px solid transparent;
        letter-spacing: .2px;
        transition: .18s ease;
        white-space: nowrap;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
    }

    .po-status-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: currentColor;
        opacity: .9;
    }

    /* =========================================================

       STATUS COLORS

    ========================================================= */

    /* Draft */

    .po-status-draft {
        background: #eef2f3;
        color: #60717d;
        border-color: #d8e0e4;
    }

    /* Pending */

    .po-status-pending {
        background: #fff7e8;
        color: #b7791f;
        border-color: #f1d7a3;
    }

    /* Approved */

    .po-status-approved {
        background: #edf7f3;
        color: #2f7d67;
        border-color: #cde6dc;
    }

    /* In Progress */

    .po-status-progress {
        background: #eef6ff;
        color: #2b6cb0;
        border-color: #cfe0f5;
    }

    /* Partial */

    .po-status-partial {
        background: #fff4ea;
        color: #c56a1a;
        border-color: #f3cfaa;
    }

    /* Completed */

    .po-status-completed {
        background: #ecfdf3;
        color: #15803d;
        border-color: #bfe7cc;
    }

    /* Cancelled */

    .po-status-cancelled {
        background: #fff1f2;
        color: #c53030;
        border-color: #f1c7cc;
    }

    /* =========================================================

       ACTION ICON BUTTONS

    ========================================================= */

    .po-icon-btn {
        width: 38px;
        height: 38px;
        border-radius: 9px;
        border: 1px solid #d9e3e1;
        background: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #3a7d6f;
        transition: .18s ease;
        box-shadow: 0 1px 2px rgba(0,0,0,.03);
    }

        .po-icon-btn i {
            font-size: 15px;
        }

        .po-icon-btn:hover {
            background: var(--clr-primary);
            color: #fff;
            border-color: var(--clr-primary);
            transform: translateY(-1px);
        }

    /* =========================================================

       BREADCRUMB

    ========================================================= */

    .breadcrumb {
        margin-bottom: 0;
    }

    .breadcrumb-item,
    .breadcrumb-item a {
        font-size: 13px;
        color: #718096;
        text-decoration: none;
        font-weight: 500;
    }

        .breadcrumb-item.active {
            color: #3d4f5c;
        }

    /* =========================================================

       MOBILE

    ========================================================= */
    @media (max-width:768px) {
        .po-main-header {
            padding: 16px;
        }

        .po-page-title {
            font-size: 24px;
        }

        .po-status-pill {
            padding: 6px 12px;
        }

    }

    .po-icon-btn:disabled {
        opacity: .5;
        cursor: not-allowed;
        background: #f1f5f9;
        color: #94a3b8;
        border-color: #e2e8f0;
    }

        .po-icon-btn:disabled:hover {
            background: #f1f5f9;
            color: #94a3b8;
            border-color: #e2e8f0;
            transform: none;
        }

.inquiry-header-row {
    margin-bottom: 16px;
}

.inquiry-header-row .po-card {
    height: 100%;
}

.inquiry-header-row .po-card-body {
    padding: 12px;
    overflow-wrap: anywhere;
}

.inquiry-header-row .info-line {
    margin-bottom: 4px;
}
@media (max-width: 991.98px) {
    .inquiry-header-row > div {
        margin-bottom: 0;
    }

}



/* ============================================================================
   SECTION: DASHBOARD PAGE STYLES (Dashboard.cshtml)
   ============================================================================ */
/* =====================================
       DASHBOARD RESPONSIVE LAYOUT
    ===================================== */

    .dashboard-grid {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .dashboard-grid > [class*="col-"] {
        min-width: 0;
    }

    .dashboard-grid .card {
        width: 100%;
        min-width: 0;
        height: 100%;
    }

    /* Prevent chart overflow */
    .dashboard-grid #weeklyEarningReports,
    .dashboard-grid #averageDailySales {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        overflow: hidden;
    }

    /* Earning report inner content */
    .dashboard-grid .earning-summary {
        min-width: 0;
    }

    .dashboard-grid .earning-summary small {
        overflow-wrap: break-word;
    }

    /* =====================================
       TABLET
    ===================================== */

    @media (max-width: 991.98px) {

        .dashboard-grid {
            row-gap: 1rem;
        }

        .dashboard-grid .card-header {
            flex-wrap: wrap;
        }

        .dashboard-grid .card-body {
            min-width: 0;
        }

    }

    /* =====================================
       MOBILE
    ===================================== */

    @media (max-width: 575.98px) {

        .dashboard-grid {
            --bs-gutter-x: 0.75rem;
            --bs-gutter-y: 0.75rem;
        }

        .dashboard-grid .card-header {
            padding: 1rem;
        }

        .dashboard-grid .card-body {
            padding: 1rem;
        }

        .dashboard-grid .card-title {
            font-size: 1rem;
        }

        .dashboard-grid h2 {
            font-size: 1.5rem;
        }

        .dashboard-grid h4 {
            font-size: 1.2rem;
        }

        .dashboard-grid h5 {
            font-size: 1rem;
        }

        .dashboard-grid .border.rounded {
            padding: 1rem !important;
        }

        /* Earnings metrics stack vertically */
        .dashboard-grid .earning-metrics {
            row-gap: 1rem;
        }

        /* Sales Overview */
        .dashboard-grid .sales-overview-content {
            min-width: 0;
        }

        .dashboard-grid .sales-overview-content p {
            font-size: 12px;
            overflow-wrap: anywhere;
        }

        .dashboard-grid .sales-overview-content h5 {
            font-size: 15px;
        }

        .dashboard-grid .sales-overview-content small {
            font-size: 11px;
        }

        /* Keep progress bars within cards */
        .dashboard-grid .progress {
            max-width: 100%;
        }

    }

    /* =====================================
       EXTRA SMALL MOBILE
    ===================================== */

    @media (max-width: 360px) {

        .dashboard-grid .card-header,
        .dashboard-grid .card-body {
            padding: 0.85rem;
        }

        .dashboard-grid .card-title {
            font-size: 0.95rem;
        }

        .dashboard-grid h4 {
            font-size: 1.1rem;
        }

        .dashboard-grid .earning-metrics {
            gap: 0.75rem;
        }

    }

/* =====================================
   DASHBOARD CARD RESPONSIVENESS
===================================== */

.dashboard-grid {
    align-items: flex-start !important;
}

.dashboard-grid > [class*="col-"] {
    min-width: 0;
    align-self: flex-start;
}

.dashboard-grid .card {
    width: 100%;
    height: auto !important;
    min-height: 0;
}

/* Desktop */
@media (min-width: 1200px) {

    .dashboard-grid > [class*="col-"] {
        height: auto;
    }

    .dashboard-grid .card {
        height: auto !important;
    }
}

/* Tablet and Mobile */
@media (max-width: 1199.98px) {

    .dashboard-grid > [class*="col-"] {
        width: 100%;
    }

    .dashboard-grid .card {
        width: 100%;
        height: auto !important;
    }
}



/* ============================================================================
   SECTION: PERMISSION MATRIX PAGE STYLES (Permission.cshtml)
   ============================================================================ */
/* =====================================
       ROLE PERMISSIONS RESPONSIVE
    ===================================== */

    .permission-page {
        width: 100%;
        min-width: 0;
    }

    .permission-page .card {
        width: 100%;
        height: auto !important;
        min-width: 0;
    }

    .permission-page .card-body {
        min-width: 0;
    }

    /* Header */
    .permission-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
        width: 100%;
    }

    .permission-header-left {
        display: flex;
        align-items: center;
        min-width: 0;
        flex: 1 1 250px;
    }

    .permission-header-left .page-title {
        min-width: 0;
    }

    .permission-header-left h4 {
        margin-bottom: 0;
    }

    .permission-header-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        flex: 1 1 300px;
        min-width: 0;
    }

    .permission-search {
        width: 240px;
        min-width: 0;
    }

    .permission-sync-btn {
        flex-shrink: 0;
        white-space: nowrap;
    }

    /* Breadcrumb */
    .permission-breadcrumb {
        overflow-wrap: anywhere;
        margin-bottom: 1rem;
    }

    /* Tables */
    .permission-table {
        width: 100%;
        min-width: 650px;
        margin-bottom: 0;
    }

    .permission-table th,
    .permission-table td {
        vertical-align: middle;
        white-space: nowrap;
    }

    .permission-table th {
        text-align: center;
    }

    /* Accordion */
    .permission-accordion {
        width: 100%;
        min-width: 0;
    }

    .permission-accordion .accordion-item {
        width: 100%;
        min-width: 0;
    }

    .permission-accordion .accordion-button {
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .permission-accordion .accordion-body {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .permission-action-list {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px 24px;
    }

    .permission-action-list label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .permission-action-list input[type="checkbox"] {
        flex-shrink: 0;
    }

    /* =====================================
       TABLET
    ===================================== */

    @media (max-width: 991.98px) {

        .permission-header {
            align-items: flex-start;
        }

        .permission-header-left {
            flex: 1 1 100%;
        }

        .permission-header-actions {
            flex: 1 1 100%;
            justify-content: flex-start;
        }

        .permission-search {
            flex: 1;
            width: auto;
        }
    }

    /* =====================================
       MOBILE
    ===================================== */

    @media (max-width: 575.98px) {

        .permission-page > .card > .card-body {
            padding: 12px;
        }

        .permission-header {
            flex-direction: column;
            align-items: stretch;
            gap: 10px;
        }

        .permission-header-left {
            width: 100%;
            flex: none;
        }

        .permission-header-left h4 {
            font-size: 18px;
        }

        .permission-header-actions {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            width: 100%;
            flex: none;
        }

        .permission-search {
            width: 100%;
            flex: none;
        }

        .permission-sync-btn {
            width: 100%;
        }

        .permission-breadcrumb {
            font-size: 13px;
        }

        .permission-table {
            min-width: 650px;
        }

        .permission-accordion .accordion-button {
            padding: 12px;
            font-size: 14px;
        }

        .permission-accordion .accordion-body {
            padding: 12px;
        }

        .permission-action-list {
            flex-direction: column;
            align-items: flex-start;
            gap: 12px;
        }

        .permission-action-list label {
            min-height: 28px;
        }
    }

    /* Extra small mobile */
    @media (max-width: 360px) {

        .permission-page > .card > .card-body {
            padding: 10px;
        }

        .permission-header-left h4 {
            font-size: 16px;
        }

        .permission-accordion .accordion-button {
            font-size: 13px;
        }
    }



/* ============================================================================
   SECTION: PROFILE PAGE STYLES (Profile.cshtml)
   ============================================================================ */
/* =====================================
       PROFILE MANAGEMENT RESPONSIVE
    ===================================== */

    .profile-management-page {
        width: 100%;
        min-width: 0;
    }

    .profile-management-page .card {
        width: 100%;
        height: auto !important;
        min-width: 0;
    }

    .profile-management-page .card-body {
        min-width: 0;
    }

    .profile-management-page .profile-form-row {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .profile-management-page .form-control {
        width: 100%;
        min-width: 0;
    }

    /* Password input and visibility button */
    .profile-management-page .input-group {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        min-width: 0;
    }

    .profile-management-page .input-group .form-control {
        flex: 1 1 auto;
        width: 1%;
        min-width: 0;
    }

    .profile-management-page .input-group .btn {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: nowrap;
    }

    /* Action buttons */
    .profile-management-actions {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
    }

    /* =====================================
       MOBILE
    ===================================== */

    @media (max-width: 575.98px) {

        .profile-management-page > .card > .card-body {
            padding: 16px;
        }

        .profile-management-page h4 {
            font-size: 18px;
            margin-bottom: 18px;
        }

        .profile-management-page .profile-form-row {
            margin-left: 0;
            margin-right: 0;
        }

        .profile-management-page .profile-form-row > [class*="col-"] {
            padding-left: 0;
            padding-right: 0;
        }

        .profile-management-page .input-blocks {
            width: 100%;
        }

        .profile-management-actions {
            display: flex;
            flex-direction: column;
            align-items: stretch;
            width: 100%;
            gap: 10px;
        }

        .profile-management-actions .btn {
            width: 100%;
            min-height: 42px;
            margin-right: 0 !important;
        }

    }

    /* =====================================
       EXTRA SMALL MOBILE
    ===================================== */

    @media (max-width: 360px) {

        .profile-management-page > .card > .card-body {
            padding: 12px;
        }

        .profile-management-page h4 {
            font-size: 17px;
        }

    }



/* ============================================================================
   SECTION: ROLE MANAGEMENT PAGE STYLES (Role.cshtml)
   ============================================================================ */
/* =====================================
       ROLE MANAGEMENT RESPONSIVE
    ===================================== */

    .role-management-page {
        width: 100%;
        min-width: 0;
    }

    .role-management-page .card {
        width: 100%;
        height: auto !important;
        min-width: 0;
    }

    /* Header */
    .role-management-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
    }

    .role-management-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        min-width: 0;
    }

    .role-management-page .userSearchTextBox {
        width: 240px;
        min-width: 0;
    }

    /* Table */
    .role-management-table {
        width: 100%;
        min-width: 600px;
        margin-bottom: 0;
    }

    .role-management-table th,
    .role-management-table td {
        white-space: nowrap;
        vertical-align: middle;
    }

    .role-management-table .sticky-action {
        white-space: nowrap;
    }

    .role-management-table .action-table-data {
        white-space: nowrap;
    }

    /* Pagination */
    .role-management-pagination {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
    }

    /* =====================================
       TABLET
    ===================================== */

    @media (max-width: 991.98px) {

        .role-management-header {
            align-items: flex-start;
        }

        .role-management-actions {
            width: 100%;
        }

        .role-management-page .userSearchTextBox {
            flex: 1;
            width: auto;
        }
    }

    /* =====================================
       MOBILE
    ===================================== */

    @media (max-width: 575.98px) {

        .role-management-page > .card > .card-body {
            padding: 12px;
        }

        .role-management-header {
            flex-direction: column;
            align-items: stretch;
            gap: 12px;
        }

        .role-management-header h4 {
            font-size: 18px;
            margin-bottom: 0;
        }

        .role-management-actions {
            display: flex;
            flex-direction: column;
            width: 100%;
            align-items: stretch;
        }

        .role-management-page .userSearchTextBox {
            width: 100%;
            flex: none;
        }

        .role-management-actions .btn {
            width: 100%;
        }

        .role-management-table {
            min-width: 600px;
        }

        .role-management-pagination {
            flex-direction: column;
            align-items: stretch !important;
            padding: 12px 0 !important;
        }

        .role-management-pagination > div {
            width: 100%;
            justify-content: center;
        }

        .role-management-pagination .pagination {
            justify-content: center;
        }
    }

    /* Extra small mobile */
    @media (max-width: 360px) {

        .role-management-header h4 {
            font-size: 16px;
        }

        .role-management-page > .card > .card-body {
            padding: 10px;
        }
    }



/* ============================================================================
   SECTION: USER MANAGEMENT PAGE STYLES (User.cshtml)
   ============================================================================ */
/* ==================================
       USER MANAGEMENT RESPONSIVE
    ================================== */

    .user-management-page {
        width: 100%;
        min-width: 0;
    }

    .user-management-page .card {
        width: 100%;
        min-width: 0;
    }

    /* Header */
    .user-management-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
    }

    .user-management-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        min-width: 0;
    }

    .userSearchTextBox {
        width: 240px;
        min-width: 0;
    }

    /* Tabs */
    .user-management-tabs {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
    }

    .user-management-tabs .nav-link {
        flex: 1 1 0;
        white-space: nowrap;
    }

    /* Table */
    .user-management-table {
        width: 100%;
        min-width: 850px;
        margin-bottom: 0;
    }

    .user-management-table th,
    .user-management-table td {
        vertical-align: middle;
        white-space: nowrap;
    }

    .user-management-table td:nth-child(6) {
        white-space: normal;
        min-width: 140px;
    }

    .user-management-table td:last-child {
        white-space: nowrap;
    }

    /* Pagination */
    .user-management-pagination {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 12px;
    }

    /* ==================================
       TABLET
    ================================== */

    @media (max-width: 991.98px) {

        .user-management-header {
            align-items: flex-start;
        }

        .user-management-actions {
            width: 100%;
        }

        .userSearchTextBox {
            flex: 1;
            width: auto;
        }

    }

    /* ==================================
       MOBILE
    ================================== */

    @media (max-width: 575.98px) {

        .user-management-page > .card > .card-body {
            padding: 12px;
        }

        .user-management-header {
            flex-direction: column;
            align-items: stretch;
            gap: 12px;
        }

        .user-management-header h4 {
            font-size: 18px;
            margin-bottom: 0;
        }

        .user-management-actions {
            display: flex;
            flex-direction: column;
            width: 100%;
            align-items: stretch;
        }

        .userSearchTextBox {
            width: 100%;
            flex: none;
        }

        .user-management-actions .btn {
            width: 100%;
        }

        .user-management-tabs {
            width: 100%;
        }

        .user-management-tabs .nav-link {
            padding: 9px 5px;
            font-size: 13px;
        }

        .user-management-table {
            min-width: 850px;
        }

        .user-management-pagination {
            flex-direction: column;
            align-items: stretch !important;
            padding: 12px 0 !important;
        }

        .user-management-pagination > div {
            width: 100%;
            justify-content: center;
        }

        .user-management-pagination .pagination {
            justify-content: center;
        }

    }

    /* Extra small mobile */
    @media (max-width: 360px) {

        .user-management-header h4 {
            font-size: 16px;
        }

        .user-management-tabs .nav-link {
            font-size: 12px;
            padding: 8px 3px;
        }

    }



/* ============================================================================
   SECTION: CLIENT MANAGEMENT DETAILED STYLES (Client.cshtml)
   ============================================================================ */
/* =====================================
   CLIENT MANAGEMENT
===================================== */

.client-management-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.client-management-page .card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    height: auto !important;
    overflow: hidden;
}

.client-management-page .card-body {
    width: 100%;
    min-width: 0;
}


/* =====================================
   HEADER / SEARCH
===================================== */

.client-management-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    min-width: 0;
}

.client-management-header > div:first-child {
    flex: 1 1 auto;
    min-width: 0;
}

.client-management-header h4 {
    margin: 0;
    white-space: nowrap;
}

.client-management-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 1 auto;
    min-width: 0;
}

.client-management-page .userSearchTextBox {
    width: 240px;
    max-width: 100%;
    min-width: 180px;
}


/* =====================================
   TABLE CONTAINER
===================================== */

.client-management-page .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}


/* =====================================
   TABLE
===================================== */

.client-management-table {
    width: 100%;
    min-width: 1250px;
    table-layout: auto;
    margin-bottom: 0;
}

.client-management-table th,
.client-management-table td {
    vertical-align: middle;
    white-space: nowrap;
}


/* =====================================
   COLUMN WIDTHS
===================================== */

/* # */
.client-management-table th:nth-child(1),
.client-management-table td:nth-child(1) {
    width: 45px;
    min-width: 45px;
}

/* Name */
.client-management-table th:nth-child(2),
.client-management-table td:nth-child(2) {
    width: 130px;
    min-width: 130px;
}

/* Mobile */
.client-management-table th:nth-child(3),
.client-management-table td:nth-child(3) {
    width: 110px;
    min-width: 110px;
}

/* Email */
.client-management-table th:nth-child(4),
.client-management-table td:nth-child(4) {
    width: 190px;
    min-width: 190px;
}

/* Address */
.client-management-table th.address-column,
.client-management-table td.address-column,
.client-management-table th:nth-child(5),
.client-management-table td:nth-child(5) {
    width: 250px;
    min-width: 220px;
    max-width: 250px;
    white-space: normal !important;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.4;
}

/* Product */
.client-management-table th:nth-child(6),
.client-management-table td:nth-child(6) {
    width: 150px;
    min-width: 150px;
}

/* Investment */
.client-management-table th:nth-child(7),
.client-management-table td:nth-child(7) {
    width: 150px;
    min-width: 150px;
}

/* Status */
.client-management-table th:nth-child(8),
.client-management-table td:nth-child(8) {
    width: 150px;
    min-width: 150px;
}

/* Services */
.client-management-table th:nth-child(9),
.client-management-table td:nth-child(9) {
    width: 180px;
    min-width: 180px;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

/* Requirement */
.client-management-table th:nth-child(10),
.client-management-table td:nth-child(10) {
    width: 220px;
    min-width: 220px;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

/* Updated By */
.client-management-table th:nth-child(11),
.client-management-table td:nth-child(11) {
    width: 120px;
    min-width: 120px;
}

/* Updated At */
.client-management-table th:nth-child(12),
.client-management-table td:nth-child(12) {
    width: 110px;
    min-width: 110px;
}


/* =====================================
   STICKY ACTION COLUMN
===================================== */

.client-management-table th.sticky-action,
.client-management-table td.action-table-data {
    position: sticky;
    right: 0;
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    white-space: nowrap !important;
    text-align: center;
    z-index: 3;
}

.client-management-table th.sticky-action {
    background: #fff;
}

.client-management-table td.action-table-data {
    background: #f8f8f8;
}

.client-management-table .action-buttons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    white-space: nowrap;
}


/* =====================================
   PAGINATION
===================================== */

.client-management-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    max-width: 100%;
}

.client-management-pagination > div {
    display: flex;
    align-items: center;
}

.client-management-pagination .pagination {
    margin-bottom: 0;
}


/* =====================================
   LARGE TABLET
===================================== */

@media (max-width: 1199.98px) {

    .client-management-page .card-body {
        padding: 18px;
    }

    .client-management-actions {
        flex: 1 1 100%;
        justify-content: flex-end;
    }

    .client-management-page .userSearchTextBox {
        width: 280px;
    }
}


/* =====================================
   TABLET
===================================== */

@media (max-width: 991.98px) {

    .client-management-header {
        align-items: flex-start;
    }

    .client-management-header > div:first-child {
        flex: 1 1 100%;
    }

    .client-management-actions {
        width: 100%;
        justify-content: stretch;
    }

    .client-management-page .userSearchTextBox {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .client-management-actions .btn {
        flex: 0 0 auto;
    }

    /*
       Important:
       Keep the table wide enough,
       but let ONLY the table scroll.
    */
    .client-management-table {
        min-width: 1250px;
    }

    .client-management-pagination {
        gap: 15px;
    }
}


/* =====================================
   MOBILE
===================================== */

@media (max-width: 767.98px) {

    .client-management-page {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .client-management-page .card {
        border-radius: 10px;
    }

    .client-management-page .card-body {
        padding: 14px;
    }

    /* Header */
    .client-management-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 15px !important;
    }

    .client-management-header > div:first-child {
        width: 100%;
    }

    .client-management-header h4 {
        font-size: 20px;
    }

    /* Search + button */
    .client-management-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .client-management-page .userSearchTextBox {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .client-management-actions .btn {
        width: 100%;
    }

    /* Table */
    .client-management-page .table-responsive {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .client-management-table {
        min-width: 1250px;
    }

    /*
       Do NOT set width: 100% here.
       The table must remain scrollable horizontally.
    */

    /* Pagination */
    .client-management-pagination {
        flex-direction: column;
        align-items: stretch !important;
        padding: 12px 0 !important;
        gap: 12px;
    }

    .client-management-pagination > div {
        width: 100%;
        justify-content: center;
    }

    .client-management-pagination > div:nth-child(2) {
        order: 1;
    }

    .client-management-pagination > div:nth-child(1) {
        order: 2;
    }

    .client-management-pagination > div:nth-child(3) {
        order: 3;
    }

    .client-management-pagination .pagination {
        justify-content: center;
    }
}


/* =====================================
   SMALL MOBILE
===================================== */

@media (max-width: 575.98px) {

    .client-management-page .card-body {
        padding: 12px;
    }

    .client-management-header h4 {
        font-size: 18px;
    }

    .client-management-table {
        min-width: 1250px;
    }

    .client-management-pagination {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .client-management-pagination > div {
        flex-wrap: wrap;
    }
}


/* =====================================
   EXTRA SMALL
===================================== */

@media (max-width: 360px) {

    .client-management-page .card-body {
        padding: 10px;
    }

    .client-management-header h4 {
        font-size: 17px;
    }

    .client-management-table {
        min-width: 1250px;
    }
}


/* =====================================
   CLIENT MANAGEMENT - LAYOUT FIX
   Add after the existing CSS
===================================== */

/* Keep the page within the available content width */
.client-management-page {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.client-management-page .card,
.client-management-page .card-body {
    min-width: 0;
}

/* Keep search and Add New Client aligned on desktop */
.client-management-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.client-management-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

/* Scroll only the table, not the entire page */
.client-management-page .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Give each column enough space */
.client-management-table {
    width: 100%;
    min-width: 1250px;
    table-layout: auto;
    margin-bottom: 0;
}

.client-management-table th,
.client-management-table td {
    vertical-align: middle;
    white-space: nowrap;
}

/* Address: show the complete text on multiple lines */
.client-management-table th:nth-child(6),
.client-management-table td:nth-child(6) {
    width: 250px;
    min-width: 250px;
    max-width: 250px;
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: normal;
    line-height: 1.5;
}

/* Wrap long service names */
.client-management-table th:nth-child(10),
.client-management-table td:nth-child(10) {
    width: 180px;
    min-width: 180px;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

/* Wrap long requirement descriptions */
.client-management-table th:nth-child(11),
.client-management-table td:nth-child(11) {
    width: 220px;
    min-width: 220px;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

/* Keep Action at the right edge during horizontal scrolling */
.client-management-table th.sticky-action,
.client-management-table td.action-table-data {
    position: sticky;
    right: 0;
    width: 90px;
    min-width: 90px;
    max-width: 90px;
    white-space: nowrap !important;
    text-align: center;
    z-index: 3;
}

.client-management-table th.sticky-action {
    background: #fff;
}

.client-management-table td.action-table-data {
    background: #f8f8f8;
}

.client-management-table .action-buttons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    white-space: nowrap;
}

/* Keep bottom controls in the same row on desktop */
.client-management-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
}

.client-management-pagination > div {
    display: flex;
    align-items: center;
}

.client-management-pagination .pagination {
    margin-bottom: 0;
}

/* Tablet */
@media (max-width: 991.98px) {
    .client-management-actions {
        flex: 1 1 100%;
        justify-content: flex-end;
    }

    .client-management-page .userSearchTextBox {
        flex: 1 1 auto;
        width: auto;
        min-width: 0;
    }

    .client-management-table {
        min-width: 1250px;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .client-management-header {
        flex-direction: column;
        align-items: stretch;
    }

    .client-management-actions {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .client-management-page .userSearchTextBox,
    .client-management-actions .btn {
        width: 100%;
        max-width: none;
    }

    .client-management-pagination {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 0 !important;
    }

    .client-management-pagination > div {
        width: 100%;
        justify-content: center;
    }
}


 .nav-style {
        color: blue !important;
    }

        .nav-style:hover {
            cursor: pointer;
            text-decoration: underline;
        }


/* ============================================================================
   SECTION: QUOTATION DOCUMENT STYLES (Quote.cshtml)
   ============================================================================ */
* {
            box-sizing: border-box;
        }

        @page {
            size: A4;
            margin: 0;
        }

        html,
        body {
            margin: 0;
            padding: 0;
            background: #fff;
            font-family: Arial, Helvetica, sans-serif;
            color: #111;
            font-size: 9px;
        }

        .page {
            width: 210mm;
            height: 297mm;
            position: relative;
            margin: 0 auto;
            padding: 8mm 13.5mm 8mm 13.5mm;
            background: #fff;
            overflow: hidden;
            page-break-after: auto;
        }

        .page:last-child {
            page-break-after: auto;
        }

        /* OUTER BORDER */
        .invoice-border {
            position: absolute;
            left: 13.5mm;
            right: 13.5mm;
            top: 8mm;
            bottom: 9mm;
            border: 1px solid #aaa;
            pointer-events: none;
        }

        .invoice-content {
            position: relative;
            z-index: 1;
        }

        /* HEADER */
        .header {
            height: 25mm;
            border: 1px solid #aaa;
            display: flex;
            position: relative;
        }

        .company-logo-area {
            width: 39mm;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .company-logo {
            width: 25mm;
            height: 25mm;
            object-fit: contain;
        }

        .company-information {
            width: 84mm;
            padding: 4mm 1mm 0 0;
        }

        .company-name {
            font-size: 15px;
            font-weight: 700;
            margin-bottom: 3px;
        }

        .company-details {
            font-size: 8px;
            line-height: 1.35;
        }

        .invoice-title {
            flex: 1;
            display: flex;
            align-items: flex-end;
            justify-content: flex-end;
            padding: 0 3mm 3mm 0;
            font-size: 25px;
            font-weight: 400;
        }

        /* INVOICE INFORMATION */
        .invoice-info {
            height: 14mm;
            border-left: 1px solid #aaa;
            border-right: 1px solid #aaa;
            border-bottom: 1px solid #aaa;
            display: grid;
            grid-template-columns: 50% 50%;
        }

        .invoice-info-left {
            border-right: 1px solid #aaa;
        }

        .info-row {
            display: grid;
            grid-template-columns: 42mm 1fr;
            min-height: 4.5mm;
            padding-left: 2mm;
            align-items: center;
        }

        .info-label {
            font-weight: 400;
        }

        .info-value {
            font-weight: 700;
        }

        .place-of-supply {
            padding: 2mm;
            font-size: 9px;
        }

        /* BILL TO / SHIP TO */
        .section-heading {
            height: 5mm;
            background: #eeeeee;
            border-bottom: 1px solid #aaa;
            font-weight: 700;
            display: grid;
            grid-template-columns: 50% 50%;
            align-items: center;
        }

        .section-heading > div {
            padding-left: 2mm;
        }

        .section-heading > div:first-child {
            border-right: 1px solid #aaa;
            height: 100%;
            display: flex;
            align-items: center;
        }

        .customer-section {
            height: 30mm;
            border-left: 1px solid #aaa;
            border-right: 1px solid #aaa;
            border-bottom: 1px solid #aaa;
            display: grid;
            grid-template-columns: 50% 50%;
        }

        .customer-box {
            padding: 2mm;
            line-height: 1.35;
        }

        .customer-box:first-child {
            border-right: 1px solid #aaa;
        }

        .customer-name {
            font-weight: 700;
            font-size: 9px;
            margin-bottom: 1mm;
        }

        .customer-gstin {
            margin-top: 1mm;
        }

        /* GEM / LUT */
        .registration-info {
            height: 13mm;
            border-left: 1px solid #aaa;
            border-right: 1px solid #aaa;
            border-bottom: 1px solid #aaa;
            padding: 2.5mm;
            line-height: 1.6;
        }

        /* ITEMS TABLE */
        table {
            width: 100%;
            border-collapse: collapse;
        }

        .items-table {
            border-left: 1px solid #aaa;
            border-right: 1px solid #aaa;
            border-bottom: 1px solid #aaa;
        }

        .items-table th,
        .items-table td {
            border-right: 1px solid #aaa;
            border-bottom: 1px solid #aaa;
            padding: 1.7mm 1.5mm;
            vertical-align: middle;
        }

        .items-table th:last-child,
        .items-table td:last-child {
            border-right: none;
        }

        .items-table th {
            background: #eeeeee;
            text-align: center;
            font-weight: 700;
            height: 11mm;
        }

        .items-table td {
            height: 14mm;
        }

        .item-number {
            width: 7mm;
            text-align: center;
        }

        .description {
            width: 46mm;
        }

        .hsn {
            width: 17mm;
            text-align: center;
        }

        .qty {
            width: 16mm;
            text-align: center;
        }

        .rate {
            width: 21mm;
            text-align: right;
        }

        .taxable {
            width: 25mm;
            text-align: right;
        }

        .tax {
            width: 18mm;
            text-align: center;
        }

        .total {
            width: 25mm;
            text-align: right;
        }

        .description-text {
            line-height: 1.25;
        }

        .description-title {
            margin-bottom: 1mm;
        }

        .right {
            text-align: right;
        }

        .center {
            text-align: center;
        }

        .subtotal-row td {
            height: 6mm !important;
            padding-top: 1mm;
            padding-bottom: 1mm;
            font-weight: 700;
        }

        .subtotal-label {
            text-align: right;
        }

        /* SUMMARY AREA */
        .summary-area {
            min-height: 106mm;
            display: grid;
            grid-template-columns: 54% 46%;
            border-left: 1px solid #aaa;
            border-right: 1px solid #aaa;
            border-bottom: 1px solid #aaa;
        }

        /* LEFT SIDE */
        .summary-left {
            padding: 2.5mm;
            border-right: 1px solid #aaa;
            min-height: 106mm;
            font-size: 9px;
            line-height: 1.25;
        }

        .items-total {
            margin-bottom: 3mm;
            font-weight: 400;
        }

        .total-words-title {
            margin-bottom: 1mm;
        }

        .total-words {
            font-weight: 700;
            font-style: italic;
            margin-bottom: 4mm;
        }

        .notes-title {
            margin-bottom: 1mm;
        }

        .notes {
            line-height: 1.3;
            margin-bottom: 4mm;
        }

        .bank-details {
            line-height: 1.35;
            margin-bottom: 4mm;
        }

        .bank-title {
            margin-bottom: 1mm;
        }

        .bank-line {
            line-height: 1.35;
        }

        .bank-line strong {
            font-weight: 700;
        }

        .upi-details {
            line-height: 1.35;
            margin-bottom: 4mm;
        }

        .upi-title {
            margin-bottom: 1mm;
        }

        .upi-line {
            line-height: 1.35;
        }

        .upi-line strong {
            font-weight: 700;
        }

        .payment-terms {
            line-height: 1.35;
        }

        .payment-title {
            margin-bottom: 1mm;
        }

        /* RIGHT SIDE */
        .summary-right {
            position: relative;
            min-height: 106mm;
        }

        .calc-summary-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 8.5px;
            margin-bottom: 2mm;
        }

        .calc-summary-table td {
            padding: 1.5mm 0;
            border: none;
        }

        .calc-summary-table .calc-label {
            text-align: left;
            color: #333;
            font-weight: 600;
        }

        .calc-summary-table .calc-value {
            text-align: right;
            font-weight: 700;
            color: #111;
        }

        .calc-summary-table .calc-divider td {
            border-top: 1px solid #111;
            border-bottom: 1px solid #111;
            padding: 1.8mm 0;
        }

        .calc-summary-table .calc-tds-row td {
            font-weight: 700;
        }

        .balance-due {
            height: 9mm;
            border-bottom: 1px solid #aaa;
            padding: 2mm;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-weight: 700;
            font-size: 10px;
        }

        .authorized-signature {
            position: absolute;
            bottom: 3mm;
            left: 0;
            right: 0;
            text-align: center;
            font-size: 9px;
        }

        /* HSN SUMMARY */
        .hsn-summary-title {
            height: 6mm;
            display: flex;
            align-items: flex-end;
            padding-left: 0;
            padding-bottom: 1mm;
        }

        .hsn-summary {
            border: 1px solid #aaa;
        }

        .hsn-summary th,
        .hsn-summary td {
            border-right: 1px solid #aaa;
            border-bottom: 1px solid #aaa;
            padding: 1.4mm 1.5mm;
        }

        .hsn-summary th:last-child,
        .hsn-summary td:last-child {
            border-right: none;
        }

        .hsn-summary tr:last-child td {
            border-bottom: none;
        }

        .hsn-summary th {
            background: #eeeeee;
            text-align: center;
            font-weight: 700;
        }

        .hsn-summary td {
            text-align: right;
        }

        .hsn-summary td:first-child {
            text-align: left;
        }

        /* FOOTER */
        .footer {
            position: absolute;
            left: 13.5mm;
            right: 13.5mm;
            bottom: 5mm;
            height: 5mm;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 7px;
            z-index: 5;
        }

        .powered-by {
            font-size: 8px;
            color: #707080;
            font-weight: 700;
        }

        .powered-logo {
            display: inline-flex;
            align-items: center;
            gap: 1px;
            margin-left: 2px;
        }

        .powered-logo span {
            display: inline-block;
            width: 8px;
            height: 5px;
            border: 1px solid #777;
            border-radius: 2px;
        }

        .page-number {
            font-size: 7px;
            font-weight: 400;
        }

        /* PRINT */
        @media print {
            html,
            body {
                width: 210mm;
                height: 297mm;
                margin: 0;
                padding: 0;
                background: #fff;
            }

            .page {
                margin: 0;
                box-shadow: none;
            }
        }

/* ============================================================================
   SECTION: Index.cshtml
   ============================================================================ */
/* ================================
           LOGIN PAGE BASE
        ================================= */

        html,
        body {
            width: 100%;
            min-height: 100%;
            margin: 0;
        }

        body.account-page {
            min-height: 100vh;
            min-height: 100dvh;
            overflow-x: hidden;
            background: #f5f5f9;
        }

        /* ================================
           MAIN WRAPPER
        ================================= */

        .authentication-wrapper {
            min-height: 100vh;
            min-height: 100dvh;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .authentication-inner {
            width: 100%;
            min-height: 100vh;
            min-height: 100dvh;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0;
        }

        /* ================================
           LOGIN SECTION
        ================================= */

        .login-section {
            width: 100%;
            min-height: 100vh;
            min-height: 100dvh;

            display: flex;
            align-items: center;
            justify-content: center;

            padding: 32px 20px !important;
            box-sizing: border-box;
        }

        /* ================================
           LOGIN CARD
        ================================= */

        .login-card {
            width: 100%;
            max-width: 420px;

            margin: 0 auto;
            padding: 38px 34px;

            background: #ffffff;
            border-radius: 16px;

            box-shadow: 0 8px 35px rgba(0, 0, 0, 0.07);

            box-sizing: border-box;
        }

        /* ================================
           LOGO
        ================================= */

        .login-logo-wrapper {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;

            margin-bottom: 25px;
        }

        .login-logo {
            display: block;

            width: 100%;
            max-width: 300px;
            height: auto;

            max-height: 120px;
            object-fit: contain;
        }

        /* ================================
           LOGIN HEADING
        ================================= */

        .login-heading {
            text-align: center;
            margin-bottom: 28px;
        }

        .login-heading h4 {
            font-size: 22px;
            font-weight: 600;
            line-height: 1.4;
            margin-bottom: 8px;
        }

        .login-heading p {
            font-size: 14px;
            margin-bottom: 0;
        }

        /* ================================
           FORM
        ================================= */

        .login-form {
            width: 100%;
            margin-bottom: 0 !important;
        }

        .login-form .form-control {
            width: 100%;
            min-width: 0;
            box-sizing: border-box;
        }

        .login-form .form-label {
            font-weight: 500;
        }

        .login-form .input-group {
            width: 100%;
        }

        .login-button {
            width: 100%;
            min-height: 44px;

            display: flex;
            align-items: center;
            justify-content: center;

            font-weight: 600;
        }

        /* ================================
           TABLET
        ================================= */

        @media (max-width: 991.98px) {

            .login-card {
                max-width: 400px;
                padding: 34px 28px;
            }

            .login-logo {
                max-width: 280px;
            }

        }

        /* ================================
           MOBILE
        ================================= */

        @media (max-width: 575.98px) {

            .login-section {
                padding: 18px 14px !important;
                align-items: center;
            }

            .login-card {
                width: 100%;
                max-width: 100%;

                padding: 28px 22px;

                border-radius: 12px;

                box-shadow: 0 5px 22px rgba(0, 0, 0, 0.06);
            }

            .login-logo-wrapper {
                margin-bottom: 20px;
            }

            .login-logo {
                width: 100%;
                max-width: 240px;
                max-height: 95px;
            }

            .login-heading {
                margin-bottom: 24px;
            }

            .login-heading h4 {
                font-size: 19px;
            }

            .login-heading p {
                font-size: 13px;
            }

            .login-form .mb-6 {
                margin-bottom: 1.25rem !important;
            }

        }

        /* ================================
           SMALL MOBILE
        ================================= */

        @media (max-width: 360px) {

            .login-section {
                padding: 12px !important;
            }

            .login-card {
                padding: 24px 18px;
            }

            .login-logo {
                max-width: 210px;
            }

            .login-heading h4 {
                font-size: 18px;
            }

        }

        /* ================================
           SHORT HEIGHT SCREENS
        ================================= */

        @media (max-height: 600px) {

            .login-section {
                align-items: flex-start;
                padding-top: 16px !important;
                padding-bottom: 16px !important;
            }

            .login-card {
                padding-top: 22px;
                padding-bottom: 22px;
            }

            .login-logo-wrapper {
                margin-bottom: 12px;
            }

            .login-logo {
                max-height: 75px;
            }

            .login-heading {
                margin-bottom: 18px;
            }

        }


        /* Fix password input and show-password icon alignment */
.login-form .input-group.input-group-merge {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    width: 100%;
}

.login-form .input-group.input-group-merge .form-control {
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.login-form .input-group.input-group-merge .input-group-text {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* ============================================================================
   SECTION: Clientregistration.cshtml
   ============================================================================ */
/* =====================================
   PAGE BASE
===================================== */

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body.account-page {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    background: #f5f5f9;
}


/* =====================================
   MAIN WRAPPER
===================================== */

.authentication-wrapper {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px 20px;
    box-sizing: border-box;
}

.authentication-inner {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 !important;
}


/* =====================================
   REGISTRATION SECTION
===================================== */

.login-section {
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    padding: 30px 20px !important;

    box-sizing: border-box;
}


/* =====================================
   REGISTRATION CARD
===================================== */

.client-registration-card {
    width: 100%;
    max-width: 1040px;

    margin: 0 auto !important;

    padding: 38px 40px;

    background: #ffffff;

    border-radius: 16px;

    box-shadow: 0 8px 35px rgba(0, 0, 0, 0.07);

    box-sizing: border-box;
}


/* =====================================
   LOGO
===================================== */

.client-registration-card .login-logo-wrapper {
    width: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 22px;
}

.client-registration-card .login-logo {
    display: block;

    width: 100%;
    max-width: 300px;

    height: auto;
    max-height: 120px;

    object-fit: contain;
}


/* =====================================
   HEADING
===================================== */

.client-registration-card .login-heading {
    text-align: center;

    margin-bottom: 30px;
}

.client-registration-card .login-heading h4 {
    font-size: 24px;
    font-weight: 600;

    line-height: 1.4;

    margin-bottom: 8px;
}

.client-registration-card .login-heading p {
    font-size: 14px;

    margin-bottom: 0;
}


/* =====================================
   FORM
===================================== */

.client-registration-card .login-form {
    width: 100%;
    margin-bottom: 0 !important;
}

.client-registration-card .form-control {
    width: 100%;
    min-width: 0;

    box-sizing: border-box;
}

.client-registration-card .form-label {
    font-weight: 500;
}


/* =====================================
   INPUTS
===================================== */

.client-registration-card input.form-control {
    min-height: 44px;
}

.client-registration-card textarea.form-control {
    min-height: 90px;
    resize: vertical;
}


/* =====================================
   SERVICES
===================================== */

.service-container {
    width: 100%;

    padding: 14px 16px;

    border: 1px solid #d9dee3;
    border-radius: 6px;

    background: #fff;

    box-sizing: border-box;
}

.service-checkbox {
    display: flex;

    align-items: center;

    min-height: 32px;
}

.service-checkbox .form-check-input {
    margin-top: 0;

    cursor: pointer;
}

.service-checkbox .form-check-label {
    margin-left: 6px;

    cursor: pointer;
}


/* =====================================
   REGISTER BUTTON
===================================== */

.client-registration-card .login-button {
    width: 100%;
    min-height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-weight: 600;
}


/* =====================================
   TABLET
===================================== */

@media (max-width: 991.98px) {

    .authentication-wrapper {
        padding: 25px 16px;
    }

    .login-section {
        padding: 25px 16px !important;
    }

    .client-registration-card {
        max-width: 750px;

        padding: 32px 30px;
    }

    .client-registration-card .login-logo {
        max-width: 280px;
    }
}


/* =====================================
   MOBILE
===================================== */

@media (max-width: 767.98px) {

    .authentication-wrapper {
        align-items: flex-start;

        padding: 20px 12px;
    }

    .authentication-inner {
        min-height: auto;
    }

    .login-section {
        min-height: auto;

        padding: 20px 10px !important;

        align-items: flex-start !important;
    }

    .client-registration-card {
        width: 100%;
        max-width: 100%;

        padding: 28px 22px;

        border-radius: 14px;
    }

    .client-registration-card .login-logo {
        max-width: 240px;
        max-height: 100px;
    }

    .client-registration-card .login-heading h4 {
        font-size: 21px;
    }

    /*
       Make every field full width on mobile
    */

    .client-registration-card .row > [class*="col-md-6"] {
        width: 100%;
    }

    .service-container {
        padding: 12px;
    }
}


/* =====================================
   SMALL MOBILE
===================================== */

@media (max-width: 575.98px) {

    .authentication-wrapper {
        padding: 12px 8px;
    }

    .login-section {
        padding: 12px 6px !important;
    }

    .client-registration-card {
        padding: 25px 18px;

        border-radius: 12px;
    }

    .client-registration-card .login-logo {
        max-width: 220px;
        max-height: 90px;
    }

    .client-registration-card .login-heading {
        margin-bottom: 24px;
    }

    .client-registration-card .login-heading h4 {
        font-size: 19px;
    }

    .client-registration-card .login-heading p {
        font-size: 13px;
    }
}


/* =====================================
   EXTRA SMALL MOBILE
===================================== */

@media (max-width: 360px) {

    .client-registration-card {
        padding: 22px 15px;
    }

    .client-registration-card .login-logo {
        max-width: 200px;
    }

    .client-registration-card .login-heading h4 {
        font-size: 18px;
    }
}


/* ============================================================================
   SECTION: GLOBAL OVERLAYS & STATUS SCREENS (Layout, Error, ThankYou)
   ============================================================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1056 !important;
}

.loader {
    width: 100px;
    padding: 5px;
    background: black;
    aspect-ratio: 1;
    border-radius: 50%;
    mask: conic-gradient(#0000,#000) subtract, linear-gradient(#000 0 0) content-box;
    -webkit-mask: conic-gradient(#0000,#000) subtract, linear-gradient(#000 0 0) content-box;
    box-sizing: border-box;
    animation: load 1s linear infinite;
}

@keyframes load {
    to {
        transform: rotate(1turn);
    }
}

/* Error & Thankyou standalone screens */
body.account-page {
    min-height: 100vh;
}

body.account-page .card {
    min-height: 100vh;
    box-sizing: border-box;
    margin: 0;
}

body.account-page .card img {
    max-height: 80vh;
    object-fit: contain;
}


/* ============================================================================
   SECTION: CLIENT DETAILS SWITCH & CREDENTIALS
   ============================================================================ */

.form-check.form-switch.default-address-switch {
    min-height: 32px;
    padding-left: 0 !important;
    display: inline-flex;
    align-items: center;
    margin-bottom: 0;
}

.form-check.form-switch.default-address-switch .form-check-input {
    float: none !important;
    width: 3.25rem !important;
    height: 1.75rem !important;
    margin: 0 !important;
    cursor: pointer;
    border-radius: 2rem !important;
    border: 2px solid #94a3b8 !important;
    background-color: #cbd5e1 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.12);
    transition: background-position 0.2s ease-in-out, background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.form-check.form-switch.default-address-switch .form-check-input:checked {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    box-shadow: 0 0 0 0.18rem rgba(13, 110, 253, 0.25) !important;
}

.form-check.form-switch.default-address-switch .form-check-input:disabled {
    opacity: 0.95 !important;
    cursor: default;
}

.credential-dept-badge {
    background-color: #eef2ff;
    color: #3730a3;
    font-weight: 600;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid #c7d2fe;
    display: inline-flex;
    align-items: center;
}

