/* Halo Mystic's backoffice layout, adapted only for Mithai Maharaja branding. */
:root {
    --bo-purple: #b42026;
    --bo-purple-dark: #611e24;
    --bo-gold: #f5c34c;
    --bo-ink: #33272a;
    --bo-muted: #7a6f73;
    --bo-bg: #f8f5f3;
    --bo-line: #e9dfe0;
    --surface-soft: #f8f1e5;
    --font-system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}

.backoffice-body {
    font-family: var(--font-system);
}

.bo-brand img {
    filter: none;
    width: 145px;
    height: auto;
}

.bo-brand a {
    width: auto;
}

.bo-brand {
    min-height: 122px;
}

.bo-topbar {
    min-height: 122px;
}

.bo-page-name {
    margin-top: 3px;
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    font-weight: 700;
    color: var(--bo-ink);
}

.bo-welcome h1 {
    margin: 0 0 0.35rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.bo-panel {
    border: 1px solid var(--bo-line);
    border-radius: 14px;
    background: white;
}

.bo-filter-bar {
    padding: 1rem;
    margin-left: 0;
    margin-right: 0;
    border: 1px solid var(--bo-line);
    border-radius: 12px;
    background: white;
}

.bo-table-wrap {
    border: 1px solid var(--bo-line);
    border-radius: 12px;
    background: white;
}

.bo-table {
    --bs-table-bg: transparent;
    white-space: normal;
}

.bo-table th {
    background: var(--bo-purple);
    color: white;
    white-space: nowrap;
}

.bo-table th:last-child,
.bo-table td:last-child {
    min-width: 100px;
}

.bo-table [data-field="body"],
.bo-table [data-field="message"] {
    max-width: 420px;
    white-space: pre-line;
}

.bo-table [data-field="status"] {
    font-weight: 600;
    color: var(--bo-purple);
}

.form-label {
    font-size: 0.86rem;
    font-weight: 600;
}

.form-control,
.form-select {
    border-color: var(--bo-line);
    padding: 0.7rem 0.85rem;
}

.bo-primary-button,
.bo-secondary-button {
    text-decoration: none;
}

.bo-quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.bo-time-zone {
    min-width: 115px;
}

.bo-metric-card::after {
    background: rgba(180, 32, 38, 0.06);
}

.large-order-note {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #ecd8ab;
    border-radius: 10px;
    background: #fff9ec;
    color: #8e7037;
    font-size: 0.86rem;
    line-height: 1.7;
}

[hidden] {
    display: none !important;
}

dialog {
    position: fixed;
    inset: 50% auto auto 50%;
    z-index: 2000;
    transform: translate(-50%, -50%);
    margin: 0;
    width: min(94vw, 480px);
    border: 1px solid var(--bo-line);
    border-radius: 15px;
    padding: 1.75rem;
    background: white;
    color: var(--bo-ink);
}

.dialog-open::after {
    position: fixed;
    inset: 0;
    z-index: 1900;
    background: #23151c88;
    content: "";
}

@media (max-width: 1280px) {
    .bo-time-zone:first-child,
    .bo-time-zone:first-child + .bo-topbar-divider {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .bo-time-zone,
    .bo-topbar-divider {
        display: none;
    }
}

/* BackOffice authentication and account consistency. */
.backoffice-body:not(.session-ready) .bo-shell {
    visibility: hidden;
}

.bo-topbar h1 {
    margin: 0.1rem 0 0;
}

.bo-nav-group.active-parent > .bo-group-trigger {
    background: rgba(245, 195, 76, 0.08);
    color: var(--bo-gold) !important;
}

.bo-auth-body {
    font-family: var(--font-system);
    background: radial-gradient(circle at 8% 12%, #f5c34c22, transparent 24rem), linear-gradient(135deg, #fbf7f4, #f3e9e5);
}

.bo-auth-layout {
    min-height: 100dvh;
}

.bo-auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.bo-auth-header .bo-store-link {
    align-self: center;
    color: white;
    white-space: nowrap;
    font-size: 0.85rem;
}

.bo-auth-brand img {
    width: 115px;
    filter: none;
}

.bo-auth-main {
    padding: clamp(1.5rem, 4vh, 3rem) 1rem;
}

.bo-auth-card-head {
    padding: 1.75rem 2rem;
}

.bo-auth-card h1 {
    font-size: 1.7rem;
}

.bo-auth-card-head p {
    margin: 0;
    line-height: 1.65;
    font-size: 0.9rem;
    opacity: 0.9;
}

.bo-auth-card-body a,
.bo-auth-footer a {
    color: var(--bo-purple);
    text-decoration: none;
}

.bo-auth-card-body a:hover,
.bo-auth-footer a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.bo-auth-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    color: white !important;
    text-decoration: none !important;
}

.bo-auth-back-link {
    display: block;
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
}

.bo-demo-note {
    display: grid;
    gap: 0.4rem;
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--bo-line);
    border-radius: 10px;
    background: var(--surface-soft);
    font-size: 0.77rem;
    overflow-wrap: anywhere;
}

.bo-demo-note > strong {
    font-size: 0.83rem;
    color: var(--bo-purple);
}

.bo-demo-note small {
    color: var(--bo-muted);
    line-height: 1.6;
}

.bo-footer a,
.bo-auth-footer > span a {
    color: var(--bo-purple);
    font-weight: 700;
}

.bo-footer {
    margin-top: auto;
}

.bo-profile-intro {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.bo-profile-intro h2 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.bo-profile-intro p {
    margin: 0;
    color: var(--bo-muted);
}

.bo-profile-avatar {
    display: grid;
    place-items: center;
    width: 70px;
    height: 70px;
    border-radius: 16px;
    background: var(--bo-purple);
    color: white;
    font-size: 1.3rem;
    font-weight: 700;
}

.bo-profile-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.25rem;
    padding: 1.2rem 0;
    border-top: 1px solid var(--bo-line);
}

.bo-profile-row > div {
    min-width: 0;
}

.bo-profile-row small {
    display: block;
    color: var(--bo-muted);
    font-size: 0.78rem;
}

.bo-profile-row p {
    margin: 0.4rem 0 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.bo-profile-row .bo-secondary-button {
    flex-shrink: 0;
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
}

.bo-profile-row:last-child {
    padding-bottom: 0;
}

.bo-panel-header h2 {
    font-size: 1.08rem;
    margin: 0;
}

#idle-warning-dialog {
    text-align: center;
}

#idle-warning-dialog h2 {
    margin: 1rem 0;
    font-size: 1.5rem;
    font-weight: 700;
}

#idle-warning-dialog p {
    color: var(--bo-muted);
    line-height: 1.7;
}

.bo-idle-icon {
    display: inline-grid;
    place-items: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--surface-soft);
    color: var(--bo-purple);
    font-size: 1.8rem;
}

.bo-countdown-label {
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.bo-idle-countdown {
    display: block;
    margin: 0;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 575.98px) {
    .bo-auth-header {
        padding: 1rem;
    }

    .bo-auth-brand img {
        width: 95px;
    }

    .bo-auth-header .bo-store-link {
        font-size: 0.75rem;
    }

    .bo-auth-card-head,
    .bo-auth-card-body {
        padding: 1.5rem;
    }

    .bo-auth-footer {
        justify-content: center;
        text-align: center;
    }

    .bo-profile-row {
        gap: 0.75rem;
    }
}
