/* Shared workspace standard for legacy master-data routes and help dialog. */
:root {
    --maikie-workspace-ink: #162433;
    --maikie-workspace-muted: #52677a;
    --maikie-workspace-line: #cbd9e3;
    --maikie-workspace-surface: #ffffff;
    --maikie-workspace-soft: #eef5f8;
    --maikie-workspace-primary: #006f91;
    --maikie-workspace-primary-hover: #005a75;
    --maikie-workspace-danger: #ad3b3b;
    --maikie-workspace-danger-hover: #8f2f2f;
}

/* The legacy stylesheet assigns blue to every generic button. Keep one portal-wide action system. */
body .btn,
body input[type="button"],
body input[type="submit"],
body input[type="reset"] {
    background: var(--maikie-workspace-primary) !important;
    border: 1px solid var(--maikie-workspace-primary) !important;
    border-radius: 6px;
    box-shadow: none;
    color: #fff !important;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    min-height: 44px;
    padding: 9px 13px;
    text-decoration: none;
    white-space: normal;
}

body .btn:hover,
body .btn:focus,
body input[type="button"]:hover,
body input[type="button"]:focus,
body input[type="submit"]:hover,
body input[type="submit"]:focus,
body input[type="reset"]:hover,
body input[type="reset"]:focus {
    background: var(--maikie-workspace-primary-hover) !important;
    border-color: var(--maikie-workspace-primary-hover) !important;
    color: #fff !important;
    text-decoration: none;
}

body .btn-primary,
body .btn-info,
body .btn-success {
    background: var(--maikie-workspace-primary) !important;
    border-color: var(--maikie-workspace-primary) !important;
    color: #fff !important;
}

body .btn-secondary,
body .btn-outline-primary,
body .btn-outline-info {
    background: #fff !important;
    border-color: #9eb3bf !important;
    color: var(--maikie-workspace-primary-hover) !important;
}

body .btn-secondary:hover,
body .btn-secondary:focus,
body .btn-outline-primary:hover,
body .btn-outline-primary:focus,
body .btn-outline-info:hover,
body .btn-outline-info:focus {
    background: var(--maikie-workspace-soft) !important;
    border-color: var(--maikie-workspace-primary) !important;
    color: var(--maikie-workspace-primary-hover) !important;
}

body .btn-danger,
body .btn-outline-danger {
    background: var(--maikie-workspace-danger) !important;
    border-color: var(--maikie-workspace-danger) !important;
    color: #fff !important;
}

body .btn-danger:hover,
body .btn-danger:focus,
body .btn-outline-danger:hover,
body .btn-outline-danger:focus {
    background: var(--maikie-workspace-danger-hover) !important;
    border-color: var(--maikie-workspace-danger-hover) !important;
    color: #fff !important;
}

body .btn:disabled,
body .btn.disabled,
body input[type="button"]:disabled,
body input[type="submit"]:disabled,
body input[type="reset"]:disabled {
    background: #71818a !important;
    border-color: #71818a !important;
    color: #fff !important;
    opacity: .7;
}

body .table .btn,
body .table input[type="button"],
body .table input[type="submit"],
body .table input[type="reset"] {
    margin: 2px;
    max-width: 100%;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

.custom-containter.content {
    padding-left: clamp(18px, 2vw, 40px);
    padding-right: clamp(18px, 2vw, 40px);
}

#page_address_book,
#page_object_management,
#page_employees,
#page_payroll,
#page_sales_overview,
#page_products,
#page_products_services {
    max-width: none;
    min-width: 0;
    width: 100%;
}

#page_address_book .form_center_container,
#page_address_book .form_center_container_400,
#page_address_book .form_center_container_850,
#page_address_book .form_center_container_900,
#page_address_book .form_center_container_1000,
#page_object_management .form_center_container,
#page_object_management .form_center_container_400,
#page_object_management .form_center_container_850,
#page_object_management .form_center_container_900,
#page_object_management .form_center_container_1000,
#page_employees .form_center_container,
#page_employees .form_center_container_400,
#page_employees .form_center_container_850,
#page_employees .form_center_container_900,
#page_employees .form_center_container_1000,
#page_payroll .form_center_container,
#page_payroll .form_center_container_400,
#page_payroll .form_center_container_850,
#page_payroll .form_center_container_900,
#page_payroll .form_center_container_1000,
#page_sales_overview .form_center_container,
#page_sales_overview .form_center_container_400,
#page_sales_overview .form_center_container_850,
#page_sales_overview .form_center_container_900,
#page_sales_overview .form_center_container_1000,
#page_products .form_center_container,
#page_products .form_center_container_400,
#page_products .form_center_container_850,
#page_products .form_center_container_900,
#page_products .form_center_container_1000,
#page_products_services .form_center_container,
#page_products_services .form_center_container_400,
#page_products_services .form_center_container_850,
#page_products_services .form_center_container_900,
#page_products_services .form_center_container_1000 {
    box-sizing: border-box;
    max-width: none;
    min-width: 0;
    width: 100%;
}

#page_address_book .row,
#page_object_management .row,
#page_employees .row,
#page_payroll .row,
#page_sales_overview .row,
#page_products .row,
#page_products_services .row {
    max-width: 100%;
}

#page_address_book .table-responsive,
#page_object_management .table-responsive,
#page_employees .table-responsive,
#page_payroll .table-responsive,
#page_sales_overview .table-responsive,
#page_products .table-responsive,
#page_products_services .table-responsive,
#page_sales_overview .table-container,
#page_products .table-container,
#page_products_services .table-container {
    max-width: 100%;
    overflow-x: auto;
}

#page_products .responsive_table_new {
    width: 100%;
}

#page_address_book table,
#page_object_management table,
#page_employees table,
#page_payroll table,
#page_sales_overview table,
#page_products table,
#page_products_services table {
    max-width: 100%;
}

#page_object_management .maikie-object-management {
    max-width: none;
    padding-left: 0;
    padding-right: 0;
    width: 100%;
}

#page_address_book .maikie-master-data {
    color: var(--maikie-workspace-ink);
    max-width: none;
    padding: 8px 0 48px;
    width: 100%;
}

#page_address_book .mmd-header {
    align-items: flex-end;
    border-bottom: 1px solid var(--maikie-workspace-line);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin: 0 0 18px;
    padding: 0 0 18px;
}

#page_address_book .mmd-context {
    color: var(--maikie-workspace-primary);
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 3px;
}

#page_address_book .mmd-header h1 {
    color: var(--maikie-workspace-ink);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

#page_address_book .mmd-primary-action {
    align-items: center;
    background: var(--maikie-workspace-primary);
    border: 1px solid var(--maikie-workspace-primary);
    border-radius: 7px;
    color: #fff;
    display: inline-flex;
    font-size: 15px;
    font-weight: 700;
    justify-content: center;
    min-height: 46px;
    padding: 10px 15px;
    text-decoration: none;
}

#page_address_book .mmd-primary-action:hover,
#page_address_book .mmd-primary-action:focus {
    background: var(--maikie-workspace-primary-hover);
    border-color: var(--maikie-workspace-primary-hover);
    color: #fff;
    text-decoration: none;
}

#page_address_book .mmd-toolbar {
    align-items: end;
    display: grid;
    grid-template-columns: minmax(260px, 520px) auto;
}

#page_address_book .mmd-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

#page_address_book .mmd-empty {
    border: 1px solid var(--maikie-workspace-line);
    border-radius: 7px;
    margin: 0;
    padding: 18px;
}

#page_address_book .heading.main,
#page_object_management .heading.main,
#page_employees .heading.main,
#page_payroll .heading.main,
#page_sales_overview .heading.main,
#page_products .heading.main,
#page_products_services .heading.main,
#page_sales_overview .head_class,
#page_products .head_class,
#page_products_services .head_class {
    align-items: center;
    background: var(--maikie-workspace-soft);
    border: 1px solid var(--maikie-workspace-line);
    border-radius: 7px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
    margin: 0 0 16px;
    min-height: 68px;
    padding: 13px 16px;
}

#page_address_book .heading.main h1,
#page_object_management .heading.main h1,
#page_employees .heading.main h1,
#page_payroll .heading.main h1,
#page_sales_overview .heading.main h1,
#page_products .heading.main h1,
#page_products_services .heading.main h1,
#page_sales_overview .head_class h1,
#page_products .head_class h1,
#page_products_services .head_class h1 {
    color: var(--maikie-workspace-ink);
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

#page_address_book .filter_form_area,
#page_object_management .filter_form_area,
#page_employees .filter_form_area,
#page_payroll .filter_form_area,
#page_sales_overview .filter_form_area,
#page_products .filter_form_area,
#page_products_services .filter_form_area {
    align-items: flex-end;
    background: #f7fafb;
    border: 1px solid var(--maikie-workspace-line);
    border-radius: 7px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 16px;
    padding: 14px;
    width: 100%;
}

#page_address_book .filter_form_area .form-row,
#page_object_management .filter_form_area .form-row,
#page_employees .filter_form_area .form-row,
#page_payroll .filter_form_area .form-row,
#page_address_book .filter_form_area .d-flex,
#page_object_management .filter_form_area .d-flex,
#page_employees .filter_form_area .d-flex,
#page_payroll .filter_form_area .d-flex,
#page_sales_overview .filter_form_area .d-flex,
#page_products .filter_form_area .d-flex,
#page_products_services .filter_form_area .d-flex,
#page_address_book .filter_form_area .form-inline,
#page_object_management .filter_form_area .form-inline,
#page_employees .filter_form_area .form-inline,
#page_payroll .filter_form_area .form-inline,
#page_sales_overview .filter_form_area .form-inline,
#page_products .filter_form_area .form-inline,
#page_products_services .filter_form_area .form-inline,
#page_sales_overview .filter_form_area .form-row,
#page_products .filter_form_area .form-row,
#page_products_services .filter_form_area .form-row {
    align-items: flex-end;
    flex: 1 1 520px;
    flex-wrap: wrap;
    gap: 10px !important;
    max-width: 100%;
    min-width: 0;
}

#page_address_book .filter_form_area input,
#page_address_book .filter_form_area select,
#page_object_management .filter_form_area input,
#page_object_management .filter_form_area select,
#page_employees .filter_form_area input,
#page_employees .filter_form_area select,
#page_payroll .filter_form_area input,
#page_payroll .filter_form_area select,
#page_sales_overview .filter_form_area input,
#page_sales_overview .filter_form_area select,
#page_products .filter_form_area input,
#page_products .filter_form_area select,
#page_products_services .filter_form_area input,
#page_products_services .filter_form_area select {
    border-color: #aebfcb;
    border-radius: 5px;
    box-sizing: border-box;
    min-height: 44px;
}

#page_address_book .btn,
#page_object_management .btn,
#page_employees .btn,
#page_payroll .btn,
#page_sales_overview .btn,
#page_products .btn,
#page_products_services .btn {
    align-items: center;
    border-radius: 5px;
    display: inline-flex;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
}

#page_address_book table.table,
#page_object_management table.table,
#page_employees table.table,
#page_payroll table.table,
#page_sales_overview table.table,
#page_products table.table,
#page_products_services table.table {
    background: var(--maikie-workspace-surface);
    border: 1px solid var(--maikie-workspace-line);
    border-collapse: separate;
    border-radius: 7px;
    border-spacing: 0;
    margin: 0;
    overflow: hidden;
}

#page_address_book table.table th,
#page_object_management table.table th,
#page_employees table.table th,
#page_payroll table.table th,
#page_sales_overview table.table th,
#page_products table.table th,
#page_products_services table.table th {
    background: #eaf2f6;
    border-bottom: 1px solid var(--maikie-workspace-line);
    color: var(--maikie-workspace-ink);
    font-size: 13px;
    font-weight: 700;
    padding: 12px;
}

#page_address_book table.table td,
#page_object_management table.table td,
#page_employees table.table td,
#page_payroll table.table td,
#page_sales_overview table.table td,
#page_products table.table td,
#page_products_services table.table td {
    border-top: 1px solid #dce6ec;
    color: var(--maikie-workspace-ink);
    padding: 12px;
    vertical-align: middle;
}

#page_address_book table.table tbody tr:first-child td,
#page_object_management table.table tbody tr:first-child td,
#page_employees table.table tbody tr:first-child td,
#page_payroll table.table tbody tr:first-child td,
#page_sales_overview table.table tbody tr:first-child td,
#page_products table.table tbody tr:first-child td,
#page_products_services table.table tbody tr:first-child td {
    border-top: 0;
}

#model_help .modal-dialog {
    margin: clamp(16px, 5vh, 56px) auto;
    max-width: 880px;
    width: calc(100vw - 32px);
}

#model_help .modal-content {
    background: var(--maikie-workspace-surface);
    border: 1px solid var(--maikie-workspace-line);
    border-radius: 8px;
    box-shadow: 0 18px 46px rgba(22, 36, 51, 0.22);
    color: var(--maikie-workspace-ink);
    overflow: hidden;
}

#model_help .modal-header {
    align-items: center;
    background: var(--maikie-workspace-soft);
    border-bottom: 1px solid var(--maikie-workspace-line);
    display: flex;
    justify-content: space-between;
    padding: 18px 22px;
}

#model_help .modal-title {
    color: var(--maikie-workspace-ink);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

#model_help .close {
    align-items: center;
    background: #fff;
    border: 1px solid #9db4c3;
    border-radius: 6px;
    color: var(--maikie-workspace-ink);
    display: inline-flex;
    font-size: 22px;
    height: 36px;
    justify-content: center;
    line-height: 1;
    margin: 0;
    min-width: 44px;
    opacity: 1;
    padding: 0;
}

#model_help .modal-body {
    padding: 22px;
}

#send_customer_support {
    display: grid;
    gap: 16px;
}

#send_customer_support .row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -8px;
    margin-right: -8px;
}

#send_customer_support .col-sm-6,
#send_customer_support .col-md-6 {
    box-sizing: border-box;
    flex: 0 0 50%;
    max-width: 50%;
    min-width: 0;
    padding-left: 8px;
    padding-right: 8px;
}

#send_customer_support .form-group {
    margin-bottom: 14px;
}

#send_customer_support label {
    color: var(--maikie-workspace-ink);
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 6px;
}

#send_customer_support input,
#send_customer_support select,
#send_customer_support textarea {
    background: #fff;
    border: 1px solid #aebfcb;
    border-radius: 5px;
    box-shadow: none;
    box-sizing: border-box;
    color: var(--maikie-workspace-ink);
    font-size: 15px;
    max-width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    width: 100%;
}

#send_customer_support textarea {
    min-height: 176px;
    resize: vertical;
}

#send_customer_support input:focus,
#send_customer_support select:focus,
#send_customer_support textarea:focus {
    border-color: var(--maikie-workspace-primary);
    box-shadow: 0 0 0 3px rgba(0, 111, 145, 0.16);
    outline: 0;
}

#model_help .modal-footer {
    border-top: 1px solid var(--maikie-workspace-line);
    display: flex;
    justify-content: flex-end;
    padding: 16px 22px;
}

#model_help .send_customer_request {
    background: var(--maikie-workspace-primary);
    border: 1px solid var(--maikie-workspace-primary);
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    min-height: 44px;
    min-width: 44px;
    padding: 10px 18px;
}

#model_help .send_customer_request:hover,
#model_help .send_customer_request:focus {
    background: var(--maikie-workspace-primary-hover);
    border-color: var(--maikie-workspace-primary-hover);
    color: #fff;
}

@media (max-width: 640px) {
    .custom-containter.content {
        padding-left: 12px;
        padding-right: 12px;
    }

    #model_help .modal-dialog {
        margin: 12px auto;
        width: calc(100vw - 20px);
    }

    #model_help .modal-header,
    #model_help .modal-body,
    #model_help .modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    #send_customer_support .col-sm-6,
    #send_customer_support .col-md-6 {
        flex-basis: 100%;
        max-width: 100%;
    }

    #model_help .modal-footer {
        display: block;
    }

    #model_help .send_customer_request {
        width: 100%;
    }

    #page_address_book .heading.main,
    #page_object_management .heading.main,
    #page_employees .heading.main,
    #page_payroll .heading.main {
        align-items: stretch;
    }

    #page_address_book .heading.main .btn,
    #page_object_management .heading.main .btn,
    #page_employees .heading.main .btn,
    #page_payroll .heading.main .btn {
        width: 100%;
    }

    #page_address_book .mmd-header {
        align-items: stretch;
        flex-direction: column;
    }

    #page_address_book .mmd-primary-action {
        width: 100%;
    }

    #page_address_book .mmd-toolbar {
        display: flex;
    }
}
