/* My Account. Same field and footer language as the platform modals. */

.wms-account {
    --wms-account-ink: #1f2937;
    --wms-account-muted: #5e6c84;
    --wms-account-line: #dde2eb;
    --wms-account-soft: #f4f6f8;
    --wms-account-green: #1b7a48;
    --wms-account-green-hover: #15663c;
    --wms-account-focus: rgba(31, 122, 77, 0.16);
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 0.9fr);
    gap: 0.75rem;
    align-items: stretch;
}

.wms-account__card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--wms-account-line);
    border-radius: 0.85rem;
    background: #fff;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.06);
}

.wms-account__title {
    margin: 0;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid #eef1f4;
    color: var(--wms-account-ink);
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
}

.wms-account__body {
    padding: 0.85rem 1.1rem 1rem;
}

.wms-account__body > fieldset {
    min-width: 0;
    margin: 0 !important;
    padding: 0;
    border: 0;
}

.wms-account__body .bg-white {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.wms-account__card--profile .bg-white {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.25rem !important;
}

.wms-account__card--profile .bg-white > .form-group:has(.wms-employee-avatar) {
    grid-column: 1 / -1;
}

.wms-account__card--password .bg-white {
    display: flex !important;
    flex-direction: column;
    gap: 0.75rem !important;
}

.wms-account .form-group {
    min-width: 0;
    margin-bottom: 0;
}

.wms-account .form-label {
    max-width: 100%;
    margin-bottom: 0.35rem;
    color: var(--wms-account-ink);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: anywhere;
}

.wms-account .form-text {
    margin-top: 0.35rem;
    color: var(--wms-account-muted);
    font-size: 0.75rem;
    line-height: 1.4;
}

.wms-account .input-group,
.wms-account .input-icon,
.wms-account .form-control {
    width: 100%;
    max-width: none;
}

.wms-account input.form-control,
.wms-account textarea.form-control,
.wms-account select.form-control {
    display: block;
    width: 100%;
    min-height: 2.25rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--wms-account-line);
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: none;
    color: var(--wms-account-ink);
    font-size: 0.875rem;
    line-height: 1.35;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.wms-account textarea.form-control {
    min-height: 5rem;
    padding: 0.5rem 0.75rem;
    line-height: 1.45;
    resize: vertical;
}

.wms-account .input-icon input.form-control {
    padding-right: 2.5rem;
}

.wms-account input.form-control::placeholder,
.wms-account textarea.form-control::placeholder {
    color: var(--wms-account-muted);
    font-weight: 500;
    opacity: 1;
}

.wms-account input.form-control:hover,
.wms-account textarea.form-control:hover,
.wms-account select.form-control:hover {
    border-color: #b7c2d0;
    background-color: #fff;
}

.wms-account input.form-control:focus,
.wms-account textarea.form-control:focus,
.wms-account select.form-control:focus {
    border-color: var(--wms-account-green);
    background-color: #fff;
    box-shadow: 0 0 0 3px var(--wms-account-focus);
    outline: 0;
}

.wms-account input.form-control.is-invalid,
.wms-account textarea.form-control.is-invalid,
.wms-account select.form-control.is-invalid {
    border-color: #dc3545;
}

.wms-account input.form-control.is-invalid:focus,
.wms-account textarea.form-control.is-invalid:focus,
.wms-account select.form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.16);
}

.wms-account__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-top: auto;
    padding: 0.75rem 1.1rem;
    border-top: 1px solid #eef1f4;
    background: var(--wms-account-soft);
}

.wms-account__footer > .form-group {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
}

.wms-account__footer .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 5.5rem;
    height: 2rem;
    padding: 0 0.9rem;
    border: 1px solid var(--wms-account-green);
    border-radius: 0.5rem;
    background: var(--wms-account-green);
    box-shadow: none;
    color: #fff;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}

.wms-account__footer .btn svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.wms-account__footer .btn:hover,
.wms-account__footer .btn:focus {
    border-color: var(--wms-account-green-hover);
    background: var(--wms-account-green-hover);
    color: #fff;
    text-decoration: none;
}

.workspace-head .command-bar button#wms-account-sign-out,
.workspace-head .command-bar button#wms-account-return {
    display: inline-flex;
    align-items: center;
    width: auto;
    padding: 0.55rem 1.15rem;
    border-radius: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
}

.workspace-head .command-bar button#wms-account-sign-out {
    border: 1px solid #912018;
    background: #b42318;
    box-shadow: 0 1px 2px rgba(120, 24, 18, 0.22);
    color: #fff;
}

.workspace-head .command-bar button#wms-account-sign-out:hover,
.workspace-head .command-bar button#wms-account-sign-out:focus {
    border-color: #7a1b14;
    background: #912018;
    color: #fff;
    text-decoration: none;
}

.workspace-head .command-bar button#wms-account-return {
    border: 1px solid #1a5f8a;
    background: #1a5f8a;
    box-shadow: 0 1px 2px rgba(18, 50, 80, 0.22);
    color: #fff;
}

.workspace-head .command-bar button#wms-account-return:hover,
.workspace-head .command-bar button#wms-account-return:focus {
    border-color: #154f74;
    background: #154f74;
    color: #fff;
    text-decoration: none;
}

@media (max-width: 991.98px) {
    .wms-account {
        grid-template-columns: minmax(0, 1fr);
    }
}

.wms-account__lead,
.wms-account__devices-empty {
    margin: 0;
    color: var(--wms-account-muted);
    font-size: 0.75rem;
    line-height: 1.45;
}

.wms-account__lead {
    padding: 0.75rem 1.1rem 0;
}

.wms-account__devices-empty {
    padding: 0.85rem 1.1rem 1rem;
    font-size: 0.875rem;
}

.wms-account__device-list {
    margin: 0.75rem 0 0;
    padding: 0;
    list-style: none;
}

.wms-account__device {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1.1rem;
    border-top: 1px solid #eef1f4;
}

.wms-account__device-icon {
    display: inline-flex;
    flex: 0 0 2.25rem;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.65rem;
    background: var(--wms-account-soft);
    color: var(--wms-account-muted);
}

.wms-account__device-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.wms-account__device:has(.wms-account__device-badge) .wms-account__device-icon {
    background: #e5f6ec;
    color: #1b7a48;
}

.wms-account__device-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.wms-account__device-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    color: var(--wms-account-ink);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.wms-account__device-meta {
    color: var(--wms-account-muted);
    font-size: 0.75rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.wms-account__device-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #e5f6ec;
    color: #146c43;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.3;
}

.wms-account__device-logout {
    flex: 0 0 auto;
    height: 2rem;
    margin: 0;
    padding: 0 0.85rem;
    border: 1px solid #f1c2c6;
    border-radius: 0.5rem;
    background: #fff;
    color: #9b2c2c;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.wms-account__device-logout:hover,
.wms-account__device-logout:focus {
    border-color: #e7a8ae;
    background: #fdecec;
    color: #9b2c2c;
    outline: 0;
}

@media (max-width: 575.98px) {
    .wms-account__card--profile .bg-white {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .wms-account__device {
        flex-wrap: wrap;
    }

    .wms-account__device-logout {
        margin-left: calc(2.25rem + 0.85rem);
    }
}

.wms-account select.form-control {
    padding-right: 2rem;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%235e6c84' d='M3.2 5.7 8 10.5l4.8-4.8.9.9L8 12.3 2.3 6.6z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 0.7rem;
    appearance: none;
    cursor: pointer;
}

.wms-account__settings-card {
    container-type: inline-size;
}

.wms-account__settings {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 0.85rem 1.1rem 1rem;
}

.wms-account__field,
.wms-account__field--wide {
    min-width: 0;
}

.wms-account__field-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.25rem;
}

.wms-account__field-head .form-label {
    flex: 1 1 auto;
    min-width: 0;
    margin-bottom: 0;
}

.wms-account__settings select.form-control {
    width: 16.25rem;
    max-width: 100%;
    flex: 0 0 auto;
}

.wms-account__field .form-text {
    margin: 0.35rem 0 0;
}

.wms-account__note {
    margin: 0;
    color: var(--wms-account-muted);
    font-size: 0.75rem;
    line-height: 1.45;
}

.wms-account__qr-call {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--wms-account-line);
    border-radius: 0.65rem;
    background: var(--wms-account-soft);
}

.wms-account__qr-call-copy {
    min-width: 0;
}

.wms-account__qr-call-title,
.wms-account__qr-call-text {
    margin: 0;
}

.wms-account__qr-call-title {
    color: var(--wms-account-ink);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
}

.wms-account__qr-call-text {
    margin-top: 0.15rem;
    color: var(--wms-account-muted);
    font-size: 0.75rem;
    line-height: 1.45;
}

.wms-account__qr-open {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    height: 2rem;
    margin: 0;
    padding: 0 0.9rem;
    border: 1px solid #154e73;
    border-radius: 0.5rem;
    background: #1a5f8a;
    box-shadow: 0 1px 2px rgba(16, 52, 78, 0.22);
    color: #fff;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.wms-account__qr-open:hover,
.wms-account__qr-open:focus {
    border-color: #114263;
    background: #154f74;
    color: #fff;
    outline: 0;
}

.wms-account__qr-open svg {
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.wms-account__error {
    margin: 0.35rem 0 0;
    color: #9b2c2c;
    font-size: 0.75rem;
    line-height: 1.4;
}

#wms-account-qr-modal .modal-dialog {
    max-width: 26rem;
}

.wms-account-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    padding-bottom: 0.35rem;
    text-align: center;
}

.wms-account-qr__image {
    width: 220px;
    max-width: 100%;
    height: auto;
    border-radius: 0.65rem;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(31, 41, 55, 0.06);
}

.wms-account-qr__timer {
    margin: 0;
    color: #1f2937;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.35;
}

.wms-account-qr__note {
    margin: 0;
    max-width: 22rem;
    color: #5e6c84;
    font-size: 0.75rem;
    line-height: 1.45;
}

@media (max-width: 767.98px) {
    .wms-account__qr-call {
        flex-direction: column;
        align-items: stretch;
    }

    .wms-account__qr-open {
        width: 100%;
    }
}

@container (max-width: 34rem) {
    .wms-account__field-head {
        flex-direction: column;
        align-items: stretch;
    }

    .wms-account__field-head .form-label {
        margin-bottom: 0.35rem;
    }

    .wms-account__settings select.form-control {
        width: 100%;
    }

    .wms-account__qr-open {
        width: 100%;
    }
}

.wms-account__links {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eef1f4;
}

.wms-account__links-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
}

.wms-account__links-copy {
    min-width: 0;
}

.wms-account__links-title {
    margin: 0;
    color: var(--wms-account-ink);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.3;
}

.wms-account__links-lead {
    margin: 0.1rem 0 0;
    color: var(--wms-account-muted);
    font-size: 0.75rem;
    line-height: 1.35;
}

.wms-account__link {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.4rem;
}

.wms-account__link-fields {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
}

.wms-account select.form-control.wms-account__link-kind {
    flex: 0 0 8rem;
    width: 8rem;
    padding-right: 1.65rem;
    background-position: right 0.5rem center;
}

.wms-account input.form-control.wms-account__link-label {
    flex: 0 0 6.5rem;
    width: 6.5rem;
}

.wms-account input.form-control.wms-account__link-value {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}

.wms-account__link-label[hidden] {
    display: none !important;
}

.wms-account__link-open,
.wms-account__link-remove,
.wms-account__link-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    border: 1px solid var(--wms-account-line);
    border-radius: 0.5rem;
    background: #fff;
    color: var(--wms-account-ink);
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.wms-account__link-open,
.wms-account__link-remove {
    flex: 0 0 2.25rem;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    text-decoration: none;
}

.wms-account__link-open {
    color: #1a5f8a;
}

.wms-account__link-remove {
    color: var(--wms-account-muted);
}

.wms-account__link-add {
    flex: 0 0 auto;
    gap: 0.35rem;
    height: 2rem;
    padding: 0 0.75rem;
    white-space: nowrap;
}

.wms-account__link-open:hover,
.wms-account__link-open:focus,
.wms-account__link-remove:hover,
.wms-account__link-remove:focus,
.wms-account__link-add:hover,
.wms-account__link-add:focus {
    border-color: #c5ceda;
    background: var(--wms-account-soft);
    color: var(--wms-account-ink);
    outline: 0;
    text-decoration: none;
}

.wms-account__link-open:hover,
.wms-account__link-open:focus {
    color: #154f74;
}

.wms-account__link-add:disabled {
    opacity: 0.55;
    cursor: default;
}

.wms-account__link-open svg,
.wms-account__link-remove svg,
.wms-account__link-add svg {
    width: 0.95rem;
    height: 0.95rem;
    fill: currentColor;
}

@media (max-width: 575.98px) {
    .wms-account__links-head {
        align-items: stretch;
        flex-direction: column;
    }

    .wms-account__link-add {
        align-self: flex-start;
    }

    .wms-account__link-fields {
        flex-wrap: wrap;
    }

    .wms-account select.form-control.wms-account__link-kind,
    .wms-account input.form-control.wms-account__link-label {
        flex: 1 1 100%;
        width: 100%;
    }
}
