.account-page {
    color: inherit;
    padding: 0 0 44px;
}

.account-heading {
    align-items: flex-end;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-bottom: 22px;
}

.account-heading__prefix {
    color: #59657a;
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.account-heading h1 {
    color: #07172f;
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
}

.account-user-card {
    align-items: flex-end;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 220px;
    text-align: right;
}

.account-user-card strong {
    color: #07172f;
    font-size: 0.98rem;
}

.account-user-card span {
    color: #64748b;
    font-size: 0.9rem;
}

.account-layout {
    align-items: flex-start;
    display: grid;
    gap: 0;
    grid-template-columns: 350px minmax(0, 1fr);
}

.account-nav {
    background: #fff;
    padding: 15px;
    align-self: stretch;
}

.account-nav__title {
    font-size: 18px;
    font-weight: 600;
    margin: 15px 15px 14px;
}

.account-nav__link,
.account-nav__child {
    align-items: center;
    color: inherit;
    display: flex;
    justify-content: space-between;
    min-height: 45px;
    padding: 12px 20px;
    text-decoration: none;
}

.account-nav__link {
    font-weight: 400;
    gap: 15px;
}

.account-nav__link > span {
    flex: 1;
}

.account-nav__link > i {
    flex: 0 0 20px;
    text-align: center;
}

.account-nav__child {
    justify-content: flex-start;
    gap: 10px;
    color: inherit;
    font-size: 14px;
    min-height: 30px;
    padding: 5px 20px 5px 48px;
}

.account-nav__link:hover,
.account-nav__child:hover,
.account-nav__link.active,
.account-nav__child.active {
    background: #eee;
    color: inherit;
    border-radius: 3px;
}

.account-nav__link strong {
    align-items: center;
    background: #d7f35f;
    border-radius: 999px;
    color: #172033;
    display: inline-flex;
    font-size: 0.76rem;
    height: 22px;
    justify-content: center;
    min-width: 22px;
    padding: 0 7px;
}

.account-nav__children {
    background: transparent;
}

.account-content {
    padding: 20px;    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
}

.account-metrics {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.account-metric,
.account-tool,
.account-order,
.account-capability {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.account-metric {
    color: #27364d;
    display: grid;
    gap: 10px;
    min-height: 108px;
    padding: 18px;
    text-decoration: none;
}

.account-metric span {
    color: #64748b;
    font-weight: 700;
}

.account-metric strong {
    color: #00606b;
    font-size: 2rem;
    line-height: 1;
}

.account-panel {
    background: #ffffff;
    border: 0;
    border-radius: 3px;
    padding: 20px;
}

.account-panel__heading {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 16px;
}

.account-panel__heading h2 {
    color: inherit;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.account-panel__heading a {
    color: #00606b;
    font-weight: 700;
    text-decoration: none;
}

.account-tool-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-tool {
    color: #172033;
    display: grid;
    gap: 8px;
    min-height: 92px;
    padding: 16px;
    text-decoration: none;
}

.account-tool strong {
    color: #07172f;
}

.account-tool span {
    color: #64748b;
    font-size: 0.92rem;
}

.account-order-list {
    display: grid;
    gap: 12px;
}

/* Order pads are working tables, not narrow account summary cards. */
.page-orderpad .account-page { padding: 0 0 44px; }
.page-orderpad .account-layout { grid-template-columns: 350px minmax(0, 1fr); }
.account-panel--orderpad { min-width: 0; }
.account-panel--orderpad .orderpad-table-scroll { overflow-x: auto; }
.account-panel--orderpad .orderpad-category-heading th {
    background: #e9eef2; padding: 12px 10px; text-align: left; font-weight: 500;
}
.account-panel--orderpad td[data-label="Details/Code"] { min-width: 220px; overflow-wrap: anywhere; }
.account-panel--orderpad .riSingle a i { display: none; }
.account-panel--orderpad .riSingle .riUp::after { content: "+"; }
.account-panel--orderpad .riSingle .riDown::after { content: "−"; }
.account-panel--orderpad table.orderpad { width: 100%; min-width: 800px; }
.account-panel--orderpad .table-image { width: 85px; }
.account-panel--orderpad .product-table-image img { width: 72px; height: 72px; object-fit: contain; }
.account-panel--orderpad td[data-label="Price"] { min-width: 150px; }
.account-panel--orderpad td[data-label="Price"] .product_price { white-space: nowrap; font-size: 14px; }
.account-panel--orderpad td[data-label="Unit Qty"] { min-width: 140px; }
.account-panel--orderpad .qty-picker-input-group .riSingle { display: flex; align-items: center; gap: 2px; }
.account-panel--orderpad .qty-picker-input-group .quantityTextBox {
    width: 60px !important; min-width: 50px; flex: 1 0 50px; height: 34px; padding: 4px;
    background: #fff; border: 1px solid #ccc; text-align: center;
}
.account-panel--orderpad .qty-picker-input-group .riSingle a {
    width: 30px !important; flex: 0 0 30px; min-height: 34px;
    color: #fff; text-align: center;
}
@media (max-width: 800px) {
    .page-orderpad .account-page { padding: 16px 10px; }
    .page-orderpad .account-layout { grid-template-columns: minmax(0, 1fr); }
}

.account-order-entry {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.account-order-entry__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.account-order-entry__actions form {
    margin: 0;
}

.account-order {
    align-items: center;
    color: #172033;
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(140px, 1fr) minmax(160px, 1fr) auto;
    padding: 16px;
    text-decoration: none;
}

.account-order--featured {
    grid-template-columns: 1fr auto;
}

.account-order div {
    display: grid;
    gap: 4px;
}

.account-order strong {
    color: #07172f;
}

.account-order span {
    color: #64748b;
}

.account-capability-list {
    display: grid;
    gap: 12px;
}

.account-capability {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 16px;
}

.account-capability div {
    display: grid;
    gap: 4px;
}

.account-capability span {
    color: #64748b;
}

.account-capability em {
    background: #fff5d6;
    border-radius: 999px;
    color: #7a5400;
    font-style: normal;
    font-weight: 800;
    padding: 5px 10px;
}

.account-migration-warning {
    background: #fff8e6;
    border: 1px solid #f4d27c;
    color: #5d4300;
    display: grid;
    gap: 4px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.account-migration-warning span {
    font-size: 0.9rem;
}

.account-authorisation-actions__form {
    display: grid;
    gap: 14px;
}

.account-authorisation-actions__form label {
    color: #27364d;
    display: grid;
    font-weight: 700;
    gap: 6px;
}

.account-authorisation-actions__form select,
.account-authorisation-actions__form textarea {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    color: #0f172a;
    padding: 9px 10px;
    width: 100%;
}

.account-authorisation-actions__form button {
    justify-self: start;
}

.account-empty {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    padding: 28px;
}

.account-empty--inline {
    box-shadow: none;
}

.account-empty h2,
.account-empty h3 {
    color: #07172f;
    margin: 0 0 8px;
}

.account-empty p {
    color: #64748b;
    margin: 0 0 18px;
}

.login-page {
    align-items: flex-start;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 260px);
    padding: 34px 16px 64px;
}

.login-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
    max-width: 430px;
    padding: 28px;
    width: 100%;
}

.login-panel__heading {
    margin-bottom: 22px;
}

.login-panel__heading span {
    color: #59657a;
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.login-panel__heading h1 {
    color: #07172f;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}

.login-alert {
    background: #fff8e6;
    border: 1px solid #f4d27c;
    color: #5d4300;
    margin-bottom: 16px;
    padding: 11px 12px;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-form label {
    color: #27364d;
    display: grid;
    font-weight: 700;
    gap: 6px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    color: #0f172a;
    min-height: 42px;
    padding: 8px 10px;
    width: 100%;
}

.login-form [data-valmsg-for] {
    color: #9f1d1d;
    font-size: 0.86rem;
    font-weight: 600;
}

.login-form__row {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
}

.login-form__row a {
    color: #00606b;
    font-weight: 700;
    text-decoration: none;
}

.login-check {
    align-items: center;
    display: inline-flex !important;
    gap: 8px !important;
    grid-template-columns: auto 1fr;
}

.login-check input {
    accent-color: #00606b;
}

.login-form button {
    min-height: 42px;
}

@media (max-width: 1100px) {
    .account-metrics,
    .account-tool-grid {
        grid-template-columns: 1fr 1fr;
    }

    .account-nav {
        position: static;
    }
}

@media (max-width: 760px) {
    .account-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .account-user-card {
        align-items: flex-start;
        text-align: left;
    }

    .account-layout,
    .account-metrics,
    .account-tool-grid,
    .account-order-entry,
    .account-order,
    .account-order--featured {
        grid-template-columns: 1fr;
    }

    .account-order-entry__actions {
        justify-content: flex-start;
    }

    .account-capability {
        align-items: flex-start;
        flex-direction: column;
    }


}
.account-order-filters {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.account-order-filters label {
    display: grid;
    flex: 1 1 10rem;
    min-width: 0;
    font-weight: 600;
    gap: .35rem;
}

.account-order-filters input,
.account-order-filters select {
    width: 100%;
    min-width: 0;
    /* Tenant theme input rules must not add padding outside the filter column. */
    box-sizing: border-box !important;
    border: 1px solid #d7dce1;
    border-radius: .25rem;
    min-height: 2.5rem;
    padding: .5rem .75rem;
}

.account-pagination {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

@media (max-width: 800px) {
    .account-order-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .account-order-filters label {
        flex-basis: auto;
    }
}

.account-address-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}

.account-address-card {
    border: 1px solid #e1e5e9;
    border-radius: .35rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: 1rem;
}

.account-address-card details,
.account-address-create {
    margin-top: .75rem;
}

.account-address-form {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1rem;
}

.account-address-form label {
    display: grid;
    font-weight: 600;
    gap: .25rem;
}

.account-address-form input,
.account-address-form textarea {
    border: 1px solid #d7dce1;
    border-radius: .25rem;
    padding: .5rem .75rem;
}

.account-form-wide {
    grid-column: 1 / -1;
}

.account-inline-form {
    margin-top: .5rem;
}

.account-profile-form {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr);
}

.account-profile-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 20px 30px;
}

.account-profile-grid > label { grid-column: span 5; }
.account-profile-grid > .account-profile-title { grid-column: span 2; }
.account-profile-grid > .account-profile-first-name { grid-column: span 3; }
.account-profile-grid > .account-profile-wide { grid-column: 1 / -1; }
.account-profile-form > button { justify-self: end; }
.account-profile-required { text-align: right; margin: 16px 0 0; font-size: 12px; }

@media (max-width: 760px) {
    .account-profile-grid { grid-template-columns: minmax(0, 1fr); }
    .account-profile-grid > label,
    .account-profile-grid > .account-profile-title,
    .account-profile-grid > .account-profile-first-name { grid-column: 1; }
}

.account-profile-form label {
    display: grid;
    font-weight: 600;
    gap: .25rem;
}

.account-profile-form input {
    border: 1px solid #d7dce1;
    border-radius: .25rem;
    padding: .5rem .75rem;
}

.account-customisation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.account-customisation-card {
    border: 1px solid #d7dce1;
    border-radius: .5rem;
    padding: 1rem;
    display: grid;
    gap: 1rem;
}

.account-customisation-card header div,
.account-customisation-card__parts > div {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.account-customisation-card__parts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: .75rem;
}

.account-customisation-card__parts img {
    width: 100%;
    height: 120px;
    object-fit: contain;
    background: #f5f5f5;
}

.account-customisation-card footer {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.account-order-history__nowrap { white-space: nowrap; }

.account-nav__disclosure > summary { cursor: pointer; }
@media (max-width: 900px) {
    .account-nav__disclosure > summary {
        margin: 0;
        padding: 12px 15px;
        min-height: 44px;
    }
    .account-nav__disclosure:not([open]) { margin-bottom: 0; }
}

@media (max-width: 800px) {
    .account-order-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .account-order-filters label:has(input:not([type="date"])),
    .account-order-filters label:has(select),
    .account-order-filters button[name="handler"] { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
    .account-nav__disclosure > summary::after { content: '\2304'; float: right; }
    .account-nav__disclosure[open] > summary::after { content: '\2303'; }
}

@media (max-width: 800px) {
    .account-order-filters > button { align-self: end; }
}
@media (max-width: 360px) {
    .account-order-filters { grid-template-columns: minmax(0, 1fr); }
}

/* Shared favourites/OrderPad filters must remain usable below the desktop layout. */
@media (max-width: 600px) {
    #vueOrderpad .favourite-ul {
        width: 100% !important;
        padding: 0;
        margin-left: 0;
        margin-right: 0;
    }
    #vueOrderpad .favourite-ul > li { width: 100%; }
    #vueOrderpad .input-group.search {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    #vueOrderpad .input-group.search > .form-control {
        flex: 1 0 100%;
        width: 100% !important;
        min-width: 0;
        box-sizing: border-box;
    }
    #vueOrderpad .input-group.search > .input-group-btn {
        display: flex;
        width: auto;
        align-items: center;
        gap: 10px;
    }
}
