
:root {
    /* RAK Infinity brand palette */
    --rak-primary: #0799CC;
    --rak-primary-dark: #067BA6;
    --rak-primary-light: #E8F6FC;

    --rak-secondary: #087D86;
    --rak-secondary-dark: #06646B;
    --rak-secondary-light: #E5F8F1;

    --rak-accent: #00A982;
    --rak-accent-light: #E5F8F1;

    /* Layout */
    --rak-background: #F4F8FB;
    --rak-surface: #FFFFFF;
    --rak-surface-soft: #FAFCFE;

    /* Text */
    --rak-text: #172B3A;
    --rak-text-secondary: #344A5E;
    --rak-text-muted: #718397;
    --rak-text-light: #91A3B5;

    /* Borders */
    --rak-border: #E1EAF0;
    --rak-border-light: #EAF0F4;
    --rak-border-dark: #D5E1E9;

    /* Status colors remain semantic */
    --rak-success: #159A72;
    --rak-success-bg: #E4F7EF;
    --rak-danger: #DC4545;
    --rak-danger-bg: #FFF0F0;
    --rak-warning: #E7A126;
    --rak-warning-bg: #FFF7E6;
    --rak-info: #0799CC;
    --rak-info-bg: #E8F6FC;

    /* Dimensions and shadows */
    --rak-radius-sm: 6px;
    --rak-radius: 8px;
    --rak-radius-lg: 13px;

    --rak-shadow-sm: 0 2px 8px rgba(30, 75, 110, .035);
    --rak-shadow: 0 4px 18px rgba(30, 75, 110, .05);
}


/* =========================================================
   GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--rak-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    background: var(--rak-background);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

::selection {
    background: color-mix(in srgb, var(--rak-primary) 16%, transparent);
}


/* =========================================================
   PAGE
   ========================================================= */

.rak-page {
    width: 100%;
    padding-bottom: 24px;
}

.rak-page-container {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-left: 24px;
    padding-right: 24px;
}

.rak-page-header {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 30px;
}

.rak-page-title {
    margin: 0;
    color: var(--rak-text);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.6px;
}

.rak-page-description {
    margin: 6px 0 0;
    color: var(--rak-text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.rak-page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* =========================================================
   BREADCRUMB
   ========================================================= */

.rak-breadcrumb {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    color: var(--rak-text-muted);
    font-size: 11px;
}

.rak-breadcrumb a {
    color: var(--rak-primary);
}

.rak-breadcrumb a:hover {
    color: var(--rak-primary-dark);
}

.rak-breadcrumb-separator {
    color: #aab7c5;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
    border-radius: var(--rak-radius);
    font-weight: 600;
    transition: .2s ease;
}

.btn:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rak-primary) 10%, transparent);
}

.btn-primary {
    min-height: 42px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--rak-radius);
    background: linear-gradient(135deg, var(--rak-primary), var(--rak-secondary));
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--rak-primary) 18%, transparent);
    transition: .2s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--rak-primary-dark), var(--rak-secondary-dark));
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--rak-primary) 25%, transparent);
}

.rak-btn-secondary,
.rak-btn-cancel {
    min-height: 42px;
    padding: 0 20px;
    border: 1px solid var(--rak-border-dark);
    border-radius: var(--rak-radius);
    background: #ffffff;
    color: #64748b;
    font-size: 13px;
    font-weight: 600;
}

.rak-btn-secondary:hover,
.rak-btn-cancel:hover {
    background: var(--rak-surface-soft);
    color: var(--rak-text-secondary);
}

.rak-btn-back {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 15px;
    border: 1px solid var(--rak-border-dark);
    border-radius: var(--rak-radius);
    background: #ffffff;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.rak-btn-back:hover {
    border-color: var(--rak-primary);
    background: var(--rak-primary-light);
    color: var(--rak-primary);
}

.rak-btn-danger {
    min-height: 42px;
    padding: 0 18px;
    border: 1px solid #ffb4b4;
    border-radius: var(--rak-radius);
    background: #ffffff;
    color: var(--rak-danger);
    font-size: 13px;
    font-weight: 600;
}

.rak-btn-danger:hover {
    background: var(--rak-danger);
    border-color: var(--rak-danger);
    color: #ffffff;
}


/* =========================================================
   CARD
   ========================================================= */

.rak-card,
.rak-form-card {
    background: var(--rak-surface);
    border: 1px solid var(--rak-border);
    border-radius: var(--rak-radius-lg);
    box-shadow: var(--rak-shadow);
    overflow: hidden;
}

.rak-card-header,
.rak-form-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 16px 22px;
    background: var(--rak-surface-soft);
    border-bottom: 1px solid var(--rak-border-light);
}

.rak-card-title {
    margin: 0;
    color: var(--rak-text);
    font-size: 15px;
    font-weight: 700;
}

.rak-card-description {
    margin: 3px 0 0;
    color: var(--rak-text-light);
    font-size: 11px;
}


/* =========================================================
   TABLE
   ========================================================= */

.rak-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.rak-card .table {
    width: 100%;
    margin: 0;
    color: var(--rak-text);
}

.rak-card .table thead th {
    height: 46px;
    padding: 0 20px;
    vertical-align: middle;
    background: var(--rak-secondary-light);
    border-bottom: 1px solid var(--rak-border);
    color: var(--rak-text);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.rak-card .table tbody td {
    height: 58px;
    padding: 0 20px;
    vertical-align: middle;
    border-bottom: 1px solid var(--rak-border-light);
    color: var(--rak-text);
    font-size: 13px;
}

.rak-card .table tbody tr:last-child td {
    border-bottom: none;
}

.rak-card .table-hover tbody tr {
    transition: background .15s ease;
}

.rak-card .table-hover tbody tr:hover {
    background: var(--rak-surface-soft);
}

.rak-table-primary {
    color: var(--rak-text);
    font-weight: 600;
}

.rak-table-secondary {
    color: var(--rak-text-muted);
    font-size: 12px;
}


/* =========================================================
   TABLE ACTIONS
   ========================================================= */

.rak-card .btn-outline-warning,
.rak-card .btn-outline-danger,
.rak-btn-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: var(--rak-radius);
    background: #ffffff;
    font-size: 15px;
    transition: .2s ease;
}

.rak-card .btn-outline-warning {
    border-color: var(--rak-info);
    color: var(--rak-info);
}

.rak-card .btn-outline-warning:hover {
    background: var(--rak-info);
    border-color: var(--rak-info);
    color: #ffffff;
}

.rak-card .btn-outline-danger {
    border-color: #ff9b9b;
    color: var(--rak-danger);
}

.rak-card .btn-outline-danger:hover {
    background: var(--rak-danger);
    border-color: var(--rak-danger);
    color: #ffffff;
}


/* =========================================================
   STATUS BADGES
   ========================================================= */

.rak-badge-success,
.rak-badge-inactive,
.rak-badge-warning,
.rak-badge-info,
.rak-badge-danger {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.rak-badge-success::before,
.rak-badge-inactive::before,
.rak-badge-warning::before,
.rak-badge-info::before,
.rak-badge-danger::before {
    content: "";
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
}

.rak-badge-success {
    background: var(--rak-success-bg);
    color: var(--rak-success);
}

.rak-badge-success::before {
    background: var(--rak-success);
}

.rak-badge-inactive {
    background: #edf3f5;
    color: var(--rak-text-muted);
}

.rak-badge-inactive::before {
    background: #7b8794;
}

.rak-badge-warning {
    background: var(--rak-warning-bg);
    color: #b77900;
}

.rak-badge-warning::before {
    background: var(--rak-warning);
}

.rak-badge-info {
    background: var(--rak-info-bg);
    color: var(--rak-secondary-dark);
}

.rak-badge-info::before {
    background: var(--rak-info);
}

.rak-badge-danger {
    background: var(--rak-danger-bg);
    color: var(--rak-danger);
}

.rak-badge-danger::before {
    background: var(--rak-danger);
}


/* =========================================================
   SEARCH / FILTER / TOOLBAR
   ========================================================= */

.rak-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: #ffffff;
    border-bottom: 1px solid var(--rak-border-light);
}

.rak-toolbar-left,
.rak-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rak-search {
    position: relative;
}

.rak-search input {
    min-height: 42px;
    padding: 9px 13px 9px 38px;
    border: 1px solid var(--rak-border-dark);
    border-radius: var(--rak-radius);
    background: #ffffff;
    color: var(--rak-text);
    font-size: 13px;
    outline: none;
}

.rak-search input::placeholder {
    color: #a5b3c2;
}

.rak-search input:focus {
    border-color: var(--rak-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rak-primary) 9%, transparent);
}

.rak-search-icon {
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: var(--rak-text-muted);
    font-size: 14px;
    pointer-events: none;
}

.rak-filter {
    min-height: 42px;
    padding: 9px 35px 9px 13px;
    border: 1px solid var(--rak-border-dark);
    border-radius: var(--rak-radius);
    background-color: #ffffff;
    color: var(--rak-text);
    font-size: 13px;
}

.rak-filter:focus {
    border-color: var(--rak-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rak-primary) 9%, transparent);
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.rak-empty-state {
    padding: 55px 20px !important;
    text-align: center;
    color: var(--rak-text-muted) !important;
}

.rak-empty-state-title {
    margin-bottom: 5px;
    color: var(--rak-text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.rak-empty-state-text {
    margin: 0;
    color: var(--rak-text-muted);
    font-size: 12px;
}


/* =========================================================
   FORM PAGE
   ========================================================= */

.rak-form-page {
    width: 100%;
    max-width: none;
    margin: 0;
}

.rak-form-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 24px;
}

.rak-form-header .rak-page-title {
    margin: 0;
}

.rak-form-header .rak-page-description {
    margin-top: 5px;
}

.rak-form-card-header {
    justify-content: flex-start;
    gap: 14px;
    padding: 20px 26px;
}

.rak-form-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--rak-secondary-light);
    color: var(--rak-secondary);
    font-size: 18px;
}

.rak-form-card-header h2,
.rak-form-card-header h3,
.rak-form-card-header h5 {
    margin: 0;
    color: var(--rak-text);
    font-size: 16px;
    font-weight: 700;
}

.rak-form-card-header p {
    margin: 3px 0 0;
    color: var(--rak-text-light);
    font-size: 11px;
}

.rak-form-card-body {
    padding: 28px;
}


/* =========================================================
   FORM FIELDS
   ========================================================= */

.rak-form-group {
    margin-bottom: 22px;
}

.rak-form-label {
    display: block;
    margin-bottom: 7px;
    color: var(--rak-text-secondary);
    font-size: 12px;
    font-weight: 600;
}

.rak-required {
    color: var(--rak-danger);
    margin-left: 2px;
}

.rak-form-control,
.form-control.rak-form-control,
.form-select.rak-form-control {
    width: 100%;
    min-height: 43px;
    padding: 8px 12px;
    border: 1px solid var(--rak-border-dark);
    border-radius: var(--rak-radius);
    background: #ffffff;
    color: var(--rak-text);
    font-size: 13px;
    box-shadow: none;
    transition: .2s ease;
}

.rak-form-control::placeholder {
    color: #a5b3c2;
}

.rak-form-control:focus,
.form-control.rak-form-control:focus,
.form-select.rak-form-control:focus {
    border-color: var(--rak-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rak-primary) 9%, transparent);
}

textarea.rak-form-control {
    min-height: 110px;
    resize: vertical;
}

.rak-form-help {
    margin-top: 5px;
    color: var(--rak-text-light);
    font-size: 10px;
    line-height: 1.4;
}

.rak-form-error {
    display: block;
    margin-top: 5px;
    color: var(--rak-danger);
    font-size: 11px;
}

.rak-status-field {
    max-width: 50%;
    margin-top: 2px;
}

.rak-form-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 43px;
}

.rak-form-switch .form-check-input {
    width: 21px;
    height: 21px;
    margin: 0;
    cursor: pointer;
    border-color: #cbd8e3;
}

.rak-form-switch .form-check-input:checked {
    background-color: var(--rak-primary);
    border-color: var(--rak-primary);
}

.rak-form-switch .form-check-input:focus {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rak-primary) 9%, transparent);
}

.rak-form-switch label {
    color: var(--rak-text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
}


/* =========================================================
   FORM ACTIONS
   ========================================================= */

.rak-form-divider {
    height: 1px;
    margin: 8px 0 20px;
    background: var(--rak-border-light);
}

.rak-form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}


/* =========================================================
   MODAL
   ========================================================= */

.rak-modal .modal-content {
    border: 1px solid var(--rak-border);
    border-radius: var(--rak-radius-lg);
    box-shadow: 0 18px 50px rgba(30, 75, 110, .15);
    overflow: hidden;
}

.rak-modal .modal-header {
    padding: 18px 22px;
    background: var(--rak-surface-soft);
    border-bottom: 1px solid var(--rak-border-light);
}

.rak-modal .modal-title {
    color: var(--rak-text);
    font-size: 16px;
    font-weight: 700;
}

.rak-modal .modal-body {
    padding: 24px;
}

.rak-modal .modal-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--rak-border-light);
    background: #ffffff;
}


/* =========================================================
   ALERTS
   ========================================================= */

.rak-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: var(--rak-radius);
    font-size: 13px;
}

.rak-alert-success {
    background: var(--rak-success-bg);
    border-color: #c9eddf;
    color: #11785c;
}

.rak-alert-danger {
    background: var(--rak-danger-bg);
    border-color: #ffd1d1;
    color: #c92e2e;
}

.rak-alert-warning {
    background: var(--rak-warning-bg);
    border-color: #f7dfaa;
    color: #996700;
}

.rak-alert-info {
    background: var(--rak-info-bg);
    border-color: var(--rak-border);
    color: var(--rak-secondary-dark);
}


/* =========================================================
   PAGINATION
   ========================================================= */

.rak-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-top: 1px solid var(--rak-border-light);
}

.rak-pagination-info {
    color: var(--rak-text-muted);
    font-size: 11px;
}

.rak-pagination .page-link {
    min-width: 34px;
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-color: var(--rak-border);
    color: var(--rak-text-secondary);
    font-size: 12px;
}

.rak-pagination .page-item.active .page-link {
    background: var(--rak-primary);
    border-color: var(--rak-primary);
    color: #ffffff;
}


/* =========================================================
   SUMMARY CARDS
   ========================================================= */

.rak-summary {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.rak-summary-card {
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid var(--rak-border);
    border-radius: var(--rak-radius-lg);
    box-shadow: var(--rak-shadow-sm);
}

.rak-summary-label {
    margin-bottom: 6px;
    color: var(--rak-text-muted);
    font-size: 11px;
    font-weight: 500;
}

.rak-summary-value {
    color: var(--rak-text);
    font-size: 24px;
    font-weight: 700;
}

.rak-summary-value.primary {
    color: var(--rak-primary);
}

.rak-summary-value.success {
    color: var(--rak-success);
}

.rak-summary-value.warning {
    color: var(--rak-warning);
}

.rak-summary-value.danger {
    color: var(--rak-danger);
}


/* =========================================================
   DETAIL INFORMATION
   ========================================================= */

.rak-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.rak-detail-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--rak-border-light);
}

.rak-detail-label {
    margin-bottom: 4px;
    color: var(--rak-text-muted);
    font-size: 11px;
}

.rak-detail-value {
    color: var(--rak-text);
    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   DIVIDER
   ========================================================= */

.rak-divider {
    height: 1px;
    margin: 20px 0;
    background: var(--rak-border-light);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 992px) {
    .rak-summary {
        grid-template-columns: repeat(2, 1fr);
    }

    .rak-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .rak-page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 18px;
    }

    .rak-page-title {
        font-size: 27px;
    }

    .rak-page-description {
        font-size: 13px;
    }

    .rak-form-page {
        max-width: 100%;
    }

    .rak-form-header {
        flex-direction: column;
        gap: 15px;
    }

    .rak-form-card-body {
        padding: 22px;
    }

    .rak-status-field {
        max-width: 100%;
    }

    .rak-form-actions {
        justify-content: stretch;
    }

    .rak-form-actions .btn,
    .rak-form-actions .rak-btn-cancel,
    .rak-form-actions .rak-btn-secondary {
        flex: 1;
    }

    .rak-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .rak-toolbar-left,
    .rak-toolbar-right {
        width: 100%;
    }

    .rak-summary {
        grid-template-columns: 1fr;
    }

    .rak-pagination {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 576px) {
    .rak-page-title {
        font-size: 24px;
    }

    .rak-form-card-header {
        padding: 18px 20px;
    }

    .rak-form-card-body {
        padding: 18px;
    }

    .rak-form-actions {
        flex-direction: column-reverse;
    }

    .rak-form-actions .btn,
    .rak-form-actions .rak-btn-cancel,
    .rak-form-actions .rak-btn-secondary {
        width: 100%;
    }
}


/* =========================================================
   PRODUCT PRICE PER SUPPLIER
   ========================================================= */

.product-list {
    height: calc(100vh - 400px);
    max-height: calc(100vh - 400px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.product-list-item {
    display: block;
    padding: 7px 14px;
    line-height: 1.2;
    color: var(--rak-text);
    border: 1px solid transparent;
    border-radius: var(--rak-radius);
    transition: background-color .15s ease, border-color .15s ease;
}

.product-list-item:hover {
    background: var(--rak-secondary-light);
    border-color: var(--rak-secondary) !important;
}

.product-list-item.selected {
    background: var(--rak-secondary-light) !important;
    border-color: var(--rak-secondary) !important;
    box-shadow: inset 3px 0 0 var(--rak-accent);
}

.product-list-item.selected .fw-semibold {
    color: var(--rak-secondary-dark);
}

.product-list-item .fw-semibold {
    font-size: 0.875rem;
}

.product-list-item .text-muted {
    font-size: 0.75rem;
}

.product-list-item .text-primary {
    color: var(--rak-secondary-dark) !important;
}

/* Shared RAK brand styling for page components */
.rak-badge-info {
    background: var(--rak-secondary-light);
    color: var(--rak-secondary-dark);
}

.rak-badge-info::before {
    background: var(--rak-accent);
}

.rak-alert-info {
    background: var(--rak-secondary-light);
    border-color: #c4eee1;
    color: var(--rak-secondary-dark);
}

/* Focus and selection use the RAK brand palette */
::selection {
    background: color-mix(in srgb, var(--rak-accent) 22%, transparent);
}

/*!* Prevent the page from scrolling vertically on the product-price screen.*/
/*   Remove this rule if the full page should scroll on smaller displays. *!*/
/*body:has(.product-list) {*/
/*    height: 100vh;*/
/*    overflow: hidden;*/
/*}*/

body:has(.product-list) .rak-page {
    min-height: 0;
}

/* Responsive product list */
@media (max-width: 991.98px) {
    .product-list {
        height: auto;
        max-height: 360px;
    }

    body:has(.product-list) {
        height: auto;
        overflow: auto;
    }
}
/* =========================================================
   GLOBAL RAK BRAND ALIGNMENT
   ========================================================= */

/* Consistent primary button palette */
.btn-primary {
    background: linear-gradient(135deg, var(--rak-primary), var(--rak-secondary));
    box-shadow: 0 4px 12px color-mix(in srgb, var(--rak-primary) 18%, transparent);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--rak-primary-dark), var(--rak-secondary-dark));
    box-shadow: 0 6px 16px color-mix(in srgb, var(--rak-primary) 22%, transparent);
}

/* Accessible focus styling */
.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.rak-search input:focus,
.rak-filter:focus,
.rak-form-control:focus {
    border-color: var(--rak-secondary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--rak-accent) 15%, transparent);
}

/* Shared active/selected navigation hooks.
   These selectors apply when the layout uses common active classes. */
.sidebar .nav-link.active,
.sidebar .nav-item.active > .nav-link,
.rak-sidebar .nav-link.active,
.rak-sidebar .nav-item.active > .nav-link,
.sidebar .submenu .active,
.rak-sidebar .submenu .active {
    background: var(--rak-secondary-light);
    color: var(--rak-secondary-dark);
}

.sidebar .nav-link.active::before,
.rak-sidebar .nav-link.active::before {
    background: var(--rak-accent);
}

/* Shared table headers use a soft brand-tinted surface */
.rak-card .table thead th {
    background: var(--rak-secondary-light);
    border-bottom-color: var(--rak-border);
}

/* Info alert and badge share the brand's teal/mint palette */
.rak-badge-info {
    background: var(--rak-secondary-light);
    color: var(--rak-secondary-dark);
}

.rak-badge-info::before {
    background: var(--rak-accent);
}

.rak-alert-info {
    background: var(--rak-secondary-light);
    border-color: #c4eee1;
    color: var(--rak-secondary-dark);
}

/* =========================================================
   PRODUCT PRICE PER SUPPLIER - REFINED LAYOUT
   ========================================================= */

.rak-page:has(.product-list) .rak-page-container {
    padding-top: 20px;
    padding-bottom: 20px;
}

.rak-page:has(.product-list) .rak-card {
    overflow: hidden;
    border: 1px solid var(--rak-border);
    border-radius: var(--rak-radius-lg);
    box-shadow: var(--rak-shadow-sm);
}

.rak-page:has(.product-list) .rak-card-header {
    min-height: 64px;
    padding: 14px 20px;
    background: var(--rak-surface-soft);
    border-bottom: 1px solid var(--rak-border-light);
}

/* Product list */

.rak-page:has(.product-list) .product-list {
    height: clamp(320px, calc(100vh - 300px), 680px);
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px !important;
    scrollbar-width: thin;
    scrollbar-color: #C4D7D8 transparent;
}

.rak-page:has(.product-list) .product-list-item {
    display: block;
    margin-bottom: 4px !important;
    padding: 11px 12px;
    color: var(--rak-text);
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--rak-radius);
    background: transparent;
    transition:
            background-color 0.15s ease,
            border-color 0.15s ease;
}

.rak-page:has(.product-list) .product-list-item:hover {
    background: var(--rak-primary-light);
    border-color: var(--rak-border);
}

.rak-page:has(.product-list) .product-list-item.selected {
    background: var(--rak-secondary-light);
    border-color: var(--rak-accent);
    box-shadow: inset 3px 0 0 var(--rak-accent);
}

.rak-page:has(.product-list) .product-list-item .fw-semibold {
    color: var(--rak-text);
    font-size: 13px;
    line-height: 1.4;
}

.rak-page:has(.product-list) .product-list-item .text-muted {
    color: var(--rak-text-muted) !important;
    font-size: 11px;
    line-height: 1.5;
}

.rak-page:has(.product-list) .product-list-item .text-primary {
    color: var(--rak-secondary) !important;
}

/* Selected product details */

.rak-product-details {
    padding: 20px 22px;
}

.rak-product-name {
    margin: 0 0 14px;
    color: var(--rak-text);
    font-size: 19px;
    font-weight: 700;
    line-height: 1.4;
}

.rak-page:has(.product-list) .rak-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 20px;
}

.rak-page:has(.product-list) .rak-detail-item {
    min-width: 0;
    padding: 10px 0;
    border-bottom: 1px solid var(--rak-border-light);
}

.rak-page:has(.product-list) .rak-detail-label {
    margin-bottom: 5px;
    font-size: 11px;
}

.rak-page:has(.product-list) .rak-detail-value {
    overflow-wrap: anywhere;
    font-size: 13px;
}

/* Supplier price comparison header */

.rak-price-comparison-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.rak-btn-add-price {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 14px;
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    background: var(--rak-secondary);
    border: 1px solid var(--rak-secondary);
    border-radius: var(--rak-radius);
    text-decoration: none;
    transition:
            background-color 0.15s ease,
            border-color 0.15s ease,
            box-shadow 0.15s ease;
}

.rak-btn-add-price:hover {
    color: #FFFFFF;
    background: var(--rak-secondary-dark);
    border-color: var(--rak-secondary-dark);
}

.rak-btn-add-price:focus-visible {
    outline: 3px solid var(--rak-accent-light);
    outline-offset: 2px;
}

.rak-btn-add-price span {
    font-size: 19px;
    font-weight: 400;
    line-height: 1;
}

/* Supplier price table */

.rak-page:has(.product-list) .rak-table-wrapper {
    overflow-x: auto;
}

.rak-page:has(.product-list) .rak-table-wrapper .table {
    margin-bottom: 0;
    vertical-align: middle;
}

.rak-page:has(.product-list) .rak-table-wrapper .table thead th {
    padding: 13px 18px;
    color: var(--rak-text);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    background: var(--rak-secondary-light);
    border-bottom: 1px solid var(--rak-border);
}

.rak-page:has(.product-list) .rak-table-wrapper .table tbody td {
    padding: 14px 18px;
    border-color: var(--rak-border-light);
}

.rak-page:has(.product-list) .rak-table-wrapper .table tbody tr:hover {
    background: var(--rak-surface-soft);
}

.rak-page:has(.product-list) .rak-empty-state {
    padding: 42px 20px;
    text-align: center;
}

.rak-page:has(.product-list) .rak-empty-state-title {
    color: var(--rak-text-secondary);
    font-size: 14px;
    font-weight: 600;
}

.rak-page:has(.product-list) .rak-empty-state-text {
    margin: 5px 0 0;
    color: var(--rak-text-muted);
    font-size: 12px;
}

/* Responsive layout */

@media (max-width: 991.98px) {
    .rak-page:has(.product-list) .product-list {
        height: 360px;
    }

    .rak-page:has(.product-list) .rak-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .rak-page:has(.product-list) .rak-page-container {
        padding: 12px;
    }

    .rak-page:has(.product-list) .rak-card-header {
        padding: 13px 15px;
    }

    .rak-price-comparison-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .rak-btn-add-price {
        width: 100%;
    }

    .rak-product-details {
        padding: 16px;
    }

    .rak-page:has(.product-list) .rak-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Compact, consistent action buttons */
.rak-btn-update-price {
    min-height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #079dcc, #00b894);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    transition: background .2s ease, box-shadow .2s ease;
}

.rak-btn-update-price:hover {
    color: #fff;
    box-shadow: 0 3px 8px rgba(0, 184, 148, .18);
}

.rak-btn-add-price {
    min-height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: #00b894;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.rak-btn-add-price:hover {
    background: #009f80;
    color: #fff;
}

/* Align price input and Update Price button */
.rak-price-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 190px;
    align-items: end;
    gap: 12px;
}

.rak-price-form-row .form-control {
    min-height: 38px;
}

/* Align Add Price with the section heading */
.rak-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Compact edit and delete controls */
.rak-table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rak-table-actions .btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 8px;
    font-size: 14px;
}

.rak-table-actions form {
    display: inline-flex;
    margin: 0;
}

@media (max-width: 768px) {
    .rak-price-form-row {
        grid-template-columns: 1fr;
    }
}


/* Add Supplier Price Modal */
#addSupplierPriceModal .modal-content {
    border: 1px solid #dce3eb;
    border-radius: 12px;
    box-shadow: 0 12px 36px rgba(15, 23, 42, 0.15);
    overflow: hidden;
}

#addSupplierPriceModal .modal-header {
    padding: 18px 20px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
}

#addSupplierPriceModal .modal-title {
    color: #1e293b;
    font-size: 20px;
    font-weight: 600;
}

#addSupplierPriceModal .modal-body {
    padding: 20px;
    background: #fff;
}

#addSupplierPriceModal .modal-footer {
    padding: 14px 20px;
    background: #fff;
    border-top: 1px solid #e2e8f0;
}

#addSupplierPriceModal .form-label {
    margin-bottom: 7px;
    color: #334155;
    font-size: 13px;
    font-weight: 500;
}

#addSupplierPriceModal .form-control,
#addSupplierPriceModal .form-select {
    min-height: 40px;
    border: 1px solid #dce3eb;
    border-radius: 6px;
    background-color: #fff;
    color: #334155;
    font-size: 14px;
    box-shadow: none;
}

#addSupplierPriceModal .form-control:focus,
#addSupplierPriceModal .form-select:focus {
    border-color: #002dac;
    box-shadow: 0 0 0 3px rgba(0, 45, 172, 0.10);
}

#addSupplierPriceModal .form-control[readonly] {
    background-color: #f8fafc;
}

#addSupplierPriceModal .required-indicator {
    color: #dc3545;
}

#addSupplierPriceModal .modal-description {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
}


/* =========================================================
   QUOTATION MODULE
   ========================================================= */

.quotation-page .rak-page-header {
    margin-bottom: 22px;
}

/* Summary cards */

.quotation-summary-card {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 100px;
    padding: 18px 20px;
}

.quotation-summary-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--rak-secondary-light);
    color: var(--rak-secondary);
    font-size: 19px;
}

.quotation-summary-icon.pending {
    background: var(--rak-warning-bg);
    color: var(--rak-warning);
}

.quotation-summary-icon.approved {
    background: var(--rak-success-bg);
    color: var(--rak-success);
}

.quotation-summary-label {
    margin-bottom: 4px;
    color: var(--rak-text-muted);
    font-size: 11px;
}

.quotation-summary-value {
    color: var(--rak-text);
    font-size: 22px;
    font-weight: 700;
}

.quotation-summary-value small {
    color: var(--rak-text-muted);
    font-size: 12px;
    font-weight: 500;
}

/* Header */

.quotation-page .rak-card-header {
    min-height: 64px;
}

/* Toolbar */

.quotation-search input {
    width: 320px;
    max-width: 100%;
}

.quotation-page .rak-toolbar {
    min-height: 70px;
}

/* Table */

.quotation-number {
    color: var(--rak-secondary-dark);
    font-weight: 700;
    text-decoration: none;
}

.quotation-number:hover {
    color: var(--rak-accent);
}

.quotation-customer {
    color: var(--rak-text);
    font-weight: 500;
}

.quotation-amount {
    color: var(--rak-text);
    font-weight: 600;
    white-space: nowrap;
}

/* Pagination */

.quotation-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 20px;
    border-top: 1px solid var(--rak-border-light);
}

.quotation-pagination-info {
    color: var(--rak-text-muted);
    font-size: 12px;
}

.quotation-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    margin-left: 4px;
    border: 1px solid var(--rak-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--rak-text-secondary);
    font-size: 12px;
}

.quotation-pagination .page-item.active .page-link {
    border-color: var(--rak-secondary);
    background: var(--rak-secondary);
    color: #ffffff;
}

.quotation-pagination .page-link:hover {
    border-color: var(--rak-secondary);
    color: var(--rak-secondary);
}

.quotation-pagination .page-item.active .page-link:hover {
    color: #ffffff;
}

@media (max-width: 768px) {

    .quotation-page .rak-page-header {
        flex-direction: column;
        gap: 15px;
    }

    .quotation-summary-card {
        min-height: 85px;
    }

    .quotation-search,
    .quotation-search input {
        width: 100%;
    }

    .quotation-page .rak-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .quotation-page .rak-toolbar-left,
    .quotation-page .rak-toolbar-right {
        width: 100%;
    }

    .quotation-page .rak-filter {
        width: 100%;
    }

    .quotation-pagination {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* Quotation page - simplified header */

.quotation-page-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.quotation-page .rak-card {
    margin-top: 0;
}


/* =========================================================
   QUOTATION LIST
   ========================================================= */

.quotation-page-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 24px;
}

.quotation-page .rak-card {
    margin-top: 0;
}

.quotation-search input {
    width: 320px;
    max-width: 100%;
}

.quotation-number {
    color: var(--rak-secondary-dark);
    font-weight: 600;
    text-decoration: none;
}

.quotation-number:hover {
    color: var(--rak-accent);
}

.quotation-customer {
    color: var(--rak-text);
    font-weight: 500;
}

.quotation-amount {
    color: var(--rak-text);
    font-weight: 600;
    white-space: nowrap;
}

.quotation-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 16px 20px;
    border-top: 1px solid var(--rak-border-light);
}

.quotation-pagination-info {
    color: var(--rak-text-muted);
    font-size: 12px;
}

.quotation-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    margin-left: 4px;
    border: 1px solid var(--rak-border);
    border-radius: 6px;
    background: #ffffff;
    color: var(--rak-text-secondary);
    font-size: 12px;
}

.quotation-pagination .page-item.active .page-link {
    border-color: var(--rak-secondary);
    background: var(--rak-secondary);
    color: #ffffff;
}

.quotation-pagination .page-link:hover {
    border-color: var(--rak-secondary);
    color: var(--rak-secondary);
}

.quotation-pagination .page-item.active .page-link:hover {
    color: #ffffff;
}

@media (max-width: 768px) {

    .quotation-page-actions {
        margin-bottom: 16px;
    }

    .quotation-page .rak-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .quotation-page .rak-toolbar-left,
    .quotation-page .rak-toolbar-right {
        width: 100%;
    }

    .quotation-search,
    .quotation-search input {
        width: 100%;
    }

    .quotation-page .rak-filter {
        width: 100%;
    }

    .quotation-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

}

/* Quotation card header actions */

.quotation-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.quotation-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

@media (max-width: 576px) {

    .quotation-card-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .quotation-header-actions {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

}


/* =========================================================
   QUOTATION CREATE PAGE
   ========================================================= */

.quotation-create-page .rak-card {
    overflow: hidden;
}

.quotation-create-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.quotation-card-body {
    padding: 20px;
}

.quotation-create-page .form-label {
    margin-bottom: 7px;
    color: var(--rak-text);
    font-size: 12px;
    font-weight: 600;
}

.quotation-create-page .form-control,
.quotation-create-page .form-select {
    min-height: 40px;
    border-color: var(--rak-border);
    border-radius: 7px;
    color: var(--rak-text);
    font-size: 13px;
}

.quotation-create-page .form-control:focus,
.quotation-create-page .form-select:focus {
    border-color: var(--rak-secondary);
    box-shadow: 0 0 0 3px rgba(0, 184, 156, 0.10);
}

.rak-cancel-button {
    border: 1px solid var(--rak-border);
    background: #ffffff;
    color: var(--rak-text-secondary);
}

/* ITEM ENTRY */

.quotation-empty-items {
    padding: 35px 15px;
    text-align: center;
    color: var(--rak-text-muted);
}

.quotation-empty-items > i {
    display: block;
    margin-bottom: 12px;
    color: var(--rak-secondary);
    font-size: 32px;
}

.quotation-empty-title {
    margin-bottom: 5px;
    color: var(--rak-text);
    font-size: 14px;
    font-weight: 600;
}

.quotation-empty-items p {
    margin-bottom: 0;
    font-size: 12px;
}

.quotation-item-card {
    margin-bottom: 16px;
    padding: 18px;
    border: 1px solid var(--rak-border);
    border-radius: 9px;
    background: #ffffff;
}

.quotation-item-card:last-child {
    margin-bottom: 0;
}

.quotation-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.quotation-item-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--rak-text);
    font-size: 13px;
}

.quotation-item-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 25px;
    padding: 0 9px;
    border-radius: 5px;
    background: var(--rak-secondary-light);
    color: var(--rak-secondary-dark);
    font-size: 11px;
    font-weight: 600;
}

.quotation-remove-item {
    color: #dc6262;
}

.quotation-remove-item:hover {
    background: #fff0f0;
    color: #c83c3c;
}

.quotation-item-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-radius: 7px;
    background: #f3f8f8;
}

.quotation-item-total span {
    color: var(--rak-text-secondary);
    font-size: 12px;
}

.quotation-item-total strong {
    color: var(--rak-text);
    font-size: 15px;
}

.quotation-item-message {
    margin-top: 12px;
    font-size: 12px;
}

.quotation-information-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid #dcefe9;
    border-radius: 8px;
    background: #f0faf6;
    color: #527c70;
    font-size: 11px;
    line-height: 1.6;
}

.quotation-information-note i {
    color: var(--rak-secondary);
    font-size: 15px;
}


/* SUMMARY PANEL */

.quotation-summary-card {
    overflow: hidden;
    position: sticky;
    top: 20px;
    border: 1px solid var(--rak-border);
    border-radius: 11px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(30, 65, 85, 0.04);
}

.quotation-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--rak-border);
    background: #ffffff;
}

.quotation-summary-header h2 {
    margin: 0 0 4px;
    color: var(--rak-text);
    font-size: 15px;
    font-weight: 700;
}

.quotation-summary-header p {
    margin: 0;
    color: var(--rak-text-muted);
    font-size: 11px;
}

.quotation-summary-header > i {
    color: var(--rak-secondary);
    font-size: 23px;
}

.quotation-summary-content {
    padding: 20px;
}

.quotation-summary-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--rak-text-secondary);
    font-size: 12px;
}

.quotation-summary-row strong {
    color: var(--rak-text);
    font-size: 13px;
    font-weight: 600;
}

.quotation-summary-divider {
    height: 1px;
    margin: 17px 0;
    background: var(--rak-border);
}

.quotation-adjustment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
}

.quotation-adjustment label {
    color: var(--rak-text-secondary);
    font-size: 12px;
}

.quotation-adjustment .input-group {
    width: 135px;
}

.quotation-adjustment .input-group-text {
    border-color: var(--rak-border);
    background: #f8fafc;
    color: var(--rak-text-muted);
    font-size: 12px;
}

.quotation-adjustment-input {
    min-height: 34px !important;
    padding: 5px 8px;
    text-align: right;
    font-size: 12px !important;
}

.quotation-grand-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 15px;
    border-radius: 8px;
    background: #e5f8f1;
}

.quotation-grand-total span {
    color: #367765;
    font-size: 13px;
    font-weight: 600;
}

.quotation-grand-total strong {
    color: #087e68;
    font-size: 20px;
    font-weight: 700;
}

.quotation-summary-footer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 16px;
    color: var(--rak-text-muted);
    font-size: 10px;
    line-height: 1.5;
}

.quotation-summary-footer i {
    color: var(--rak-secondary);
    font-size: 14px;
}


/* QUICK GUIDE */

.quotation-guide-card {
    margin-top: 16px;
}

.quotation-guide-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
}

.quotation-guide-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--rak-text-secondary);
    font-size: 11px;
}

.quotation-guide-item span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 23px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--rak-secondary-light);
    color: var(--rak-secondary-dark);
    font-size: 10px;
    font-weight: 700;
}


/* BOTTOM ACTIONS */

.quotation-bottom-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding: 16px 0;
    border-top: 1px solid var(--rak-border);
}


@media (max-width: 1199px) {

    .quotation-summary-card {
        position: static;
    }

}


@media (max-width: 576px) {

    .quotation-create-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .quotation-create-actions > * {
        width: 100%;
    }

    .quotation-create-actions .btn {
        width: 100%;
    }

    .quotation-card-body {
        padding: 14px;
    }

    .quotation-item-card {
        padding: 13px;
    }

    .quotation-adjustment .input-group {
        width: 125px;
    }

    .quotation-grand-total strong {
        font-size: 17px;
    }

}


/* =========================================================
   QUOTATION ITEMS TABLE AND MODAL
   ========================================================= */

.quotation-items-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.quotation-items-table {
    min-width: 950px;
    font-size: 12px;
}

.quotation-items-table thead th {
    padding: 13px 14px;
    border-bottom: 1px solid var(--rak-border);
    background: #e5f7f1;
    color: var(--rak-text);
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.quotation-items-table tbody td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--rak-border-light);
    color: var(--rak-text);
    vertical-align: middle;
}

.quotation-items-table tbody tr:last-child td {
    border-bottom: 0;
}

.quotation-items-table tbody td strong {
    font-weight: 600;
}

.quotation-table-amount {
    color: var(--rak-secondary-dark) !important;
    font-weight: 700;
    white-space: nowrap;
}

.quotation-table-empty {
    padding: 45px 15px !important;
    text-align: center;
    color: var(--rak-text-muted) !important;
}

.quotation-table-empty i {
    display: block;
    margin-bottom: 10px;
    color: var(--rak-secondary);
    font-size: 28px;
}

.quotation-table-empty div {
    margin-bottom: 4px;
    color: var(--rak-text);
    font-size: 13px;
    font-weight: 600;
}

.quotation-table-empty small {
    font-size: 11px;
}

.quotation-table-remove {
    width: 32px;
    height: 32px;
    border: 1px solid #f3caca;
    border-radius: 6px;
    background: #ffffff;
    color: #d85d5d;
}

.quotation-table-remove:hover {
    background: #fff0f0;
    color: #b83b3b;
}


/* MODAL */

.quotation-modal {
    overflow: hidden;
    border: 1px solid var(--rak-border);
    border-radius: 12px;
}

.quotation-modal .modal-header {
    padding: 20px 22px;
    border-bottom: 1px solid var(--rak-border);
}

.quotation-modal .modal-title {
    color: var(--rak-text);
    font-size: 16px;
    font-weight: 700;
}

.quotation-modal-description {
    margin: 5px 0 0;
    color: var(--rak-text-muted);
    font-size: 11px;
}

.quotation-modal .modal-body {
    padding: 22px;
}

.quotation-modal .form-label {
    margin-bottom: 7px;
    color: var(--rak-text);
    font-size: 12px;
    font-weight: 600;
}

.quotation-modal .form-control,
.quotation-modal .form-select {
    min-height: 40px;
    border-color: var(--rak-border);
    border-radius: 7px;
    font-size: 12px;
}

.quotation-modal .form-control:focus,
.quotation-modal .form-select:focus {
    border-color: var(--rak-secondary);
    box-shadow: 0 0 0 3px rgba(0, 184, 156, 0.10);
}

.quotation-modal .form-select:disabled {
    background-color: #f1f4f7;
    cursor: not-allowed;
}

.quotation-modal-preview {
    margin-top: 22px;
    padding: 16px;
    border-radius: 8px;
    background: #e5f8f1;
}

.quotation-modal-preview > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.quotation-modal-preview span {
    color: #367765;
    font-size: 12px;
    font-weight: 600;
}

.quotation-modal-preview strong {
    color: #087e68;
    font-size: 20px;
    font-weight: 700;
}

.quotation-modal-message {
    margin-top: 12px;
    font-size: 12px;
}

.quotation-modal .modal-footer {
    padding: 15px 22px;
    border-top: 1px solid var(--rak-border);
}


/* REMOVE QUICK GUIDE STYLES IF NO LONGER USED */

.quotation-guide-card {
    display: none;
}


@media (max-width: 576px) {

    .quotation-modal .modal-body {
        padding: 16px;
    }

    .quotation-modal .modal-header,
    .quotation-modal .modal-footer {
        padding: 14px 16px;
    }

}



/* =========================================================
   GLOBAL PAGE SPACING - CONSISTENT ACROSS ALL MODULES
   ========================================================= */

.rak-page-container {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    padding-left: 24px;
    padding-right: 24px;
}

/* Form pages use the same content width as list and detail pages. */
.rak-form-page {
    width: 100%;
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

@media (max-width: 991.98px) {
    .rak-page-container {
        padding-left: 18px;
        padding-right: 18px;
    }
}

@media (max-width: 575.98px) {
    .rak-page-container {
        padding-left: 12px;
        padding-right: 12px;
    }
}


/* =========================================================
   QUOTATION CREATE - SUMMARY PANEL LAYOUT FIX
   ========================================================= */

.quotation-create-page .quotation-summary-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    width: 100%;
    min-width: 0;
    min-height: 0;
    height: auto;
    padding: 0;
    position: sticky;
    top: 20px;
    overflow: hidden;
}

.quotation-create-page .quotation-summary-header {
    display: flex;
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 18px 20px;
    border-bottom: 1px solid var(--rak-border);
}

.quotation-create-page .quotation-summary-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding: 20px;
}

.quotation-create-page .quotation-summary-row,
.quotation-create-page .quotation-adjustment,
.quotation-create-page .quotation-grand-total {
    width: 100%;
}

.quotation-create-page .quotation-adjustment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.quotation-create-page .quotation-adjustment .input-group {
    width: 135px;
    max-width: 55%;
    flex: 0 0 135px;
}

.quotation-create-page .quotation-grand-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.quotation-create-page .quotation-summary-footer {
    display: flex;
    width: 100%;
    align-items: flex-start;
}

@media (max-width: 1199.98px) {
    .quotation-create-page .quotation-summary-card {
        position: static;
    }
}


/* =========================================================
   QUOTATION CREATE - TABLE WIDTH AND SPACING
   ========================================================= */

.quotation-create-page .quotation-items-table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.quotation-create-page .quotation-items-table {
    width: 100%;
    min-width: 850px;
    table-layout: auto;
}

.quotation-create-page .quotation-items-table thead th,
.quotation-create-page .quotation-items-table tbody td {
    padding-left: 10px;
    padding-right: 10px;
}

.quotation-create-page .quotation-items-table tbody td:first-child {
    min-width: 160px;
    max-width: 240px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.quotation-create-page .quotation-items-table tbody td:nth-child(2) {
    min-width: 120px;
    max-width: 180px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.quotation-create-page .quotation-items-table tbody td:nth-child(n+3) {
    white-space: nowrap;
}


/* =========================================================
   QUOTATION CREATE - SINGLE TOP ACTION BAR
   ========================================================= */

.quotation-create-page .quotation-bottom-actions {
    display: none !important;
}

.quotation-create-page .quotation-create-actions {
    margin-bottom: 18px;
}

@media (max-width: 575.98px) {
    .quotation-create-page .quotation-create-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .quotation-create-page .quotation-create-actions > *,
    .quotation-create-page .quotation-create-actions .btn {
        width: 100%;
    }

    .quotation-create-page .quotation-card-body {
        padding: 14px;
    }
}


/* =====================================================
   QUOTATION SUMMARY - COMPACT LAYOUT
   ===================================================== */

.quotation-create-page .quotation-summary-header {
    display: flex !important;
    justify-content: flex-start !important;
    align-items: center;
    gap: 12px;
}

.quotation-create-page .quotation-summary-header > i {
    margin-left: auto;
}

.quotation-create-page .quotation-summary-content {
    padding: 18px !important;
}

/* Summary rows */
.quotation-create-page .quotation-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

/* Adjustment rows: label + fixed-width input */
.quotation-create-page .quotation-adjustment {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 125px;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.quotation-create-page .quotation-adjustment label {
    margin: 0;
    white-space: nowrap;
}

.quotation-create-page .quotation-adjustment .input-group {
    width: 125px !important;
    min-width: 0;
}

.quotation-create-page .quotation-adjustment .form-control {
    min-width: 0;
    text-align: right;
}

/* Grand total */
.quotation-create-page .quotation-grand-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 16px;
}

/* Footer */
.quotation-create-page .quotation-summary-footer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 14px;
}

/* Smaller screens */
@media (max-width: 575px) {
    .quotation-create-page .quotation-adjustment {
        grid-template-columns: minmax(0, 1fr) 125px;
    }
}


/* =====================================================
   QUOTATION SUMMARY - ADJUSTMENT INPUT FIX
   ===================================================== */

.quotation-create-page .quotation-adjustment {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 150px !important;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-bottom: 12px;
}

.quotation-create-page .quotation-adjustment .input-group {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 150px !important;
    min-width: 150px !important;
    flex: none !important;
}

.quotation-create-page .quotation-adjustment .input-group-text {
    flex: 0 0 34px;
    justify-content: center;
    padding: 6px;
}

.quotation-create-page .quotation-adjustment .form-control {
    display: block;
    flex: 1 1 auto !important;
    width: 1% !important;
    min-width: 0 !important;
    text-align: right;
    padding: 6px 10px;
}

.quotation-create-page .quotation-adjustment label {
    white-space: nowrap;
    margin: 0;
}

/* Responsive */
@media (max-width: 575px) {
    .quotation-create-page .quotation-adjustment {
        grid-template-columns: minmax(0, 1fr) 140px !important;
    }

    .quotation-create-page .quotation-adjustment .input-group {
        width: 140px !important;
        min-width: 140px !important;
    }
}


/* =====================================================
   QUOTATION WORKSPACE - 75/25 LAYOUT
   ===================================================== */

@media (min-width: 1200px) {

    .quotation-create-page .row.g-3 > .col-xl-9 {
        flex: 0 0 75%;
        max-width: 75%;
    }

    .quotation-create-page .row.g-3 > .col-xl-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

}

/* SUMMARY */
.quotation-create-page .quotation-summary-card {
    width: 100%;
    min-width: 0;
}

.quotation-create-page .quotation-summary-content {
    padding: 16px !important;
}

/* Adjustment fields */
.quotation-create-page .quotation-adjustment {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 125px !important;
    align-items: center;
    gap: 8px;
}

.quotation-create-page .quotation-adjustment .input-group {
    display: flex !important;
    width: 125px !important;
    min-width: 125px !important;
    flex: none !important;
}

.quotation-create-page .quotation-adjustment .input-group-text {
    flex: 0 0 32px;
    justify-content: center;
}

.quotation-create-page .quotation-adjustment .form-control {
    min-width: 0 !important;
    text-align: right;
}

/* Grand total */
.quotation-create-page .quotation-grand-total {
    padding: 14px;
}

/* Responsive */
@media (max-width: 1199px) {
    .quotation-create-page .row.g-3 > .col-xl-9,
    .quotation-create-page .row.g-3 > .col-xl-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
