/*
 * YangJiii — customer workspace shell (Ofox-style console):
 * 256px sidebar, compact top bar, neutral canvas, white surfaces.
 * Also shared floating widgets (support dock, live chat, notifications).
 */

.customer-workspace-page { background: var(--dd-surface); --dd-sidebar: 256px; --dd-topbar: 56px; }
.customer-workspace-page .site-app-frame { min-height: 100vh; }

/* ---------- Sidebar ---------- */
.customer-sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 60; width: var(--dd-sidebar);
    display: flex; flex-direction: column;
    border-right: 1px solid var(--dd-border); background: var(--dd-surface);
}
.app-sidebar-head { padding: 12px 12px 8px; }
.customer-sidebar-brand {
    display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--dd-r);
    transition: background var(--dd-fast);
}
.customer-sidebar-brand:hover { background: var(--dd-hover); }
.customer-sidebar-brand .certificate-brand-mark { width: 30px; height: 30px; border-radius: 8px; font-size: 17px; }
.customer-sidebar-brand-text { display: grid; min-width: 0; line-height: 1.25; }
.customer-sidebar-brand-text strong { font-family: var(--dd-font-display); font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.customer-sidebar-brand-text small { font-size: 12px; color: var(--dd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-sidebar-brand > .bi { margin-left: auto; font-size: 13px; color: var(--dd-subtle); }
.customer-sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.customer-sidebar-group { display: grid; gap: 2px; }
.customer-sidebar-group + .customer-sidebar-group { margin-top: 18px; }
.customer-sidebar-group > p { padding: 0 8px 4px; font-size: 12px; font-weight: 500; color: var(--dd-subtle); }
.app-nav-link, .customer-sidebar-placeholder {
    display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 8px;
    border-radius: var(--dd-r); font-size: 14px; color: var(--dd-fg-2);
    transition: background var(--dd-fast), color var(--dd-fast);
}
.app-nav-link .bi, .customer-sidebar-placeholder .bi { flex: none; width: 18px; font-size: 16px; text-align: center; color: var(--dd-muted); transition: color var(--dd-fast); }
.app-nav-link:hover { background: var(--dd-hover); color: var(--dd-fg); }
.app-nav-link:hover .bi { color: var(--dd-fg); }
.app-nav-link[aria-current="page"] { background: var(--dd-active); color: var(--dd-fg); font-weight: 500; }
.app-nav-link[aria-current="page"] .bi { color: var(--dd-fg); }
.app-nav-count {
    margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: var(--dd-r-pill);
    background: var(--dd-accent); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
}
.customer-sidebar-placeholder { color: var(--dd-faint); cursor: default; }
.customer-sidebar-placeholder .bi { color: var(--dd-faint); }
.customer-sidebar-placeholder small { margin-left: auto; padding: 0 6px; border: 1px solid var(--dd-border); border-radius: var(--dd-r-xs); font-size: 10.5px; color: var(--dd-subtle); }
.customer-sidebar-footer { padding: 10px 12px 12px; border-top: 1px solid var(--dd-border-light); }
.customer-sidebar-profile { position: relative; }
.customer-sidebar-account {
    display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--dd-r); list-style: none;
    transition: background var(--dd-fast);
}
.customer-sidebar-account:hover, .customer-sidebar-profile[open] .customer-sidebar-account { background: var(--dd-hover); }
.customer-sidebar-account-text { display: grid; min-width: 0; line-height: 1.3; }
.customer-sidebar-account-text strong { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-sidebar-account-text small { font-size: 12px; color: var(--dd-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-sidebar-account > .bi { margin-left: auto; font-size: 13px; color: var(--dd-subtle); }
.customer-sidebar-profile-menu {
    position: absolute; left: 0; right: 0; bottom: calc(100% + 6px); z-index: 5; display: grid; gap: 2px; padding: 6px;
    border: 1px solid var(--dd-border); border-radius: var(--dd-r-lg); background: var(--dd-card); box-shadow: var(--dd-shadow-lg);
    transform-origin: bottom left !important;
}
.customer-sidebar-profile-menu a, .customer-sidebar-profile-menu button {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--dd-r-sm);
    font-size: 13.5px; color: var(--dd-fg-2); text-align: left;
}
.customer-sidebar-profile-menu a:hover, .customer-sidebar-profile-menu button:hover { background: var(--dd-hover); color: var(--dd-fg); }
.customer-sidebar-profile-menu form { border-top: 1px solid var(--dd-border-light); margin-top: 4px; padding-top: 4px; }
.customer-sidebar-profile-menu button { color: var(--dd-danger); }
.customer-sidebar-overlay { display: none; }

/* ---------- Main + topbar ---------- */
.app-main { min-width: 0; margin-left: var(--dd-sidebar); }
.app-topbar {
    position: sticky; top: 0; z-index: 40; height: var(--dd-topbar);
    border-bottom: 1px solid var(--dd-border-light);
    background: rgba(250, 250, 250, .86); -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px);
}
.app-topbar-inner { display: flex; align-items: center; gap: 12px; height: 100%; padding: 0 24px; }
.customer-sidebar-toggle, .customer-mobile-brand { display: none; }
.customer-sidebar-toggle {
    place-items: center; width: 34px; height: 34px; border-radius: var(--dd-r); color: var(--dd-fg-2); font-size: 17px;
}
.customer-sidebar-toggle:hover { background: var(--dd-hover); }
.customer-page-context { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; color: var(--dd-muted); }
.customer-page-context a:hover { color: var(--dd-fg); }
.customer-page-context .bi { font-size: 11px; color: var(--dd-faint); }
.customer-page-context strong { font-weight: 500; color: var(--dd-fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-topbar-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.app-topbar-link {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px; border-radius: var(--dd-r);
    font-size: 13px; font-weight: 500; color: var(--dd-fg-2);
}
.app-topbar-link:hover { background: var(--dd-hover); color: var(--dd-fg); }
.app-content { width: 100%; max-width: 1200px; margin: 0 auto; padding: 32px 32px 96px; }
.app-content > .shell { max-width: none; padding-inline: 0; }

@media (max-width: 991.98px) {
    .customer-sidebar {
        transform: translateX(-100%); box-shadow: none;
        transition: transform var(--dd-slow) var(--dd-ease), box-shadow var(--dd-slow) var(--dd-ease);
    }
    .customer-sidebar.is-open { transform: none; box-shadow: var(--dd-shadow-lg); }
    .customer-sidebar-overlay { position: fixed; inset: 0; z-index: 55; display: block; background: rgba(16, 16, 18, .36); opacity: 0; pointer-events: none; transition: opacity var(--dd-slow); }
    .customer-sidebar-overlay.is-open { opacity: 1; pointer-events: auto; }
    .customer-sidebar-open { overflow: hidden; }
    .app-main { margin-left: 0; }
    .customer-sidebar-toggle, .customer-mobile-brand { display: inline-grid; }
    .app-topbar-inner { padding: 0 12px; gap: 8px; }
    .app-content { padding: 24px 16px 96px; }
}
@media (max-width: 560px) {
    .app-topbar-cta span, .app-topbar-link span { display: none; }
    .app-topbar-cta { width: 34px; padding: 0; }
    .customer-page-context > a, .customer-page-context > .bi { display: none; }
}

/* ---------- Notification menu ---------- */
.notification-menu { position: relative; }
.notification-trigger {
    position: relative; display: grid; place-items: center; width: 34px; height: 34px; border-radius: var(--dd-r); list-style: none; color: var(--dd-fg-2);
}
.notification-trigger:hover, .notification-menu[open] .notification-trigger { background: var(--dd-hover); color: var(--dd-fg); }
.notification-trigger svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.notification-count {
    position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--dd-r-pill);
    background: var(--dd-accent); color: #fff; font-size: 10px; font-weight: 700; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--dd-surface);
}
.notification-popover {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: min(360px, calc(100vw - 24px));
    border: 1px solid var(--dd-border); border-radius: var(--dd-r-lg); background: var(--dd-card); box-shadow: var(--dd-shadow-lg); overflow: hidden;
}
.notification-popover > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--dd-border-light); }
.notification-popover > header div { display: grid; }
.notification-popover > header strong { font-size: 14px; }
.notification-popover > header span { font-size: 12px; color: var(--dd-muted); }
.notification-popover > header small { padding: 1px 8px; border-radius: var(--dd-r-pill); background: var(--dd-accent-soft); color: var(--dd-accent); font-size: 11.5px; font-weight: 600; }
.notification-popover-list { max-height: 360px; overflow-y: auto; }
.notification-popover-list article { display: flex; gap: 10px; padding: 12px 16px; }
.notification-popover-list article + article { border-top: 1px solid var(--dd-border-light); }
.notification-popover-marker { flex: none; width: 7px; height: 7px; margin-top: 7px; border-radius: 50%; background: var(--dd-border-strong); }
.notification-popover-list .is-unread .notification-popover-marker { background: var(--dd-accent); }
.notification-popover-list strong { display: block; font-size: 13.5px; }
.notification-popover-list p { font-size: 13px; color: var(--dd-muted); line-height: 1.5; }
.notification-popover-list time { font-size: 11.5px; color: var(--dd-subtle); }
.notification-popover-list a { display: inline-block; margin-top: 4px; font-size: 12.5px; font-weight: 500; color: var(--dd-accent); }
.notification-popover-empty { display: grid; gap: 4px; padding: 28px 16px; text-align: center; font-size: 13px; color: var(--dd-muted); }
.notification-popover-empty strong { color: var(--dd-fg); }
.notification-popover > footer { padding: 10px 16px; border-top: 1px solid var(--dd-border-light); background: var(--dd-surface); text-align: center; }
.notification-popover > footer a { font-size: 13px; font-weight: 500; }

/* ---------- Support dock & live chat ---------- */
.certificate-support-dock { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 80; }
.certificate-support-dock > summary {
    display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 6px; list-style: none;
    border-radius: var(--dd-r-pill); background: var(--dd-ink); color: #fff; font-size: 13.5px; font-weight: 500;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .4); transition: transform var(--dd-fast) var(--dd-ease);
}
.certificate-support-dock > summary:hover { transform: translateY(-1px); }
.certificate-support-dock-symbol { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--dd-accent); font-family: var(--dd-font-pixel); font-size: 15px; }
.certificate-support-panel {
    position: absolute; right: 0; bottom: calc(100% + 10px); width: 280px; display: grid; gap: 2px; padding: 8px;
    border: 1px solid var(--dd-border); border-radius: var(--dd-r-lg); background: var(--dd-card); box-shadow: var(--dd-shadow-lg);
    transform-origin: bottom right !important;
}
.certificate-support-panel header { display: grid; gap: 2px; padding: 8px 10px 10px; }
.certificate-support-panel header strong { font-size: 14px; }
.certificate-support-panel header span { font-size: 12.5px; color: var(--dd-muted); }
.certificate-support-panel a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--dd-r); }
.certificate-support-panel a:hover { background: var(--dd-hover); }
.certificate-support-panel a > span:first-child { display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: var(--dd-r); background: var(--dd-surface); border: 1px solid var(--dd-border-light); font-family: var(--dd-font-mono); font-size: 11px; font-weight: 700; }
.certificate-support-panel a > span:last-child { display: grid; line-height: 1.3; }
.certificate-support-panel a strong { font-size: 13.5px; }
.certificate-support-panel a small { font-size: 12px; color: var(--dd-muted); }
.certificate-support-dock.is-disclosure-open > summary { background: var(--dd-ink-hover); }
.certificate-support-dock.is-disclosure-closing > summary { background: var(--dd-ink); }

.live-chat { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 80; font-size: 14px; }
.live-chat-launcher {
    position: relative; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 6px;
    border-radius: var(--dd-r-pill); background: var(--dd-ink); color: #fff; font-size: 13.5px; font-weight: 500;
    box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .4); transition: transform var(--dd-fast) var(--dd-ease);
}
.live-chat-launcher:hover { transform: translateY(-1px); }
.live-chat-launcher-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--dd-accent); font-family: var(--dd-font-pixel); font-size: 15px; }
.live-chat-unread { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--dd-r-pill); background: var(--dd-accent); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px #fff; }
.live-chat-panel {
    position: absolute; right: 0; bottom: calc(100% + 10px); display: flex; flex-direction: column;
    width: min(380px, calc(100vw - 24px)); height: min(560px, calc(100vh - 110px));
    border: 1px solid var(--dd-border); border-radius: var(--dd-r-xl); background: var(--dd-card); box-shadow: var(--dd-shadow-lg); overflow: hidden;
    animation: dd-dialog-in var(--dd-med) var(--dd-ease);
}
.live-chat-header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--dd-border-light); }
.live-chat-avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--dd-ink); color: #fff; font-weight: 700; }
.live-chat-header > span:nth-child(2) { display: grid; line-height: 1.3; }
.live-chat-header strong { font-size: 14px; }
.live-chat-header small { font-size: 12px; color: var(--dd-muted); }
.live-chat-close { margin-left: auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--dd-r); font-size: 20px; color: var(--dd-muted); }
.live-chat-close:hover { background: var(--dd-hover); color: var(--dd-fg); }
.live-chat-presence { display: flex; align-items: center; gap: 8px; padding: 8px 16px; background: var(--dd-success-soft); color: var(--dd-success); font-size: 12.5px; }
.live-chat-presence-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.live-chat-intro { display: grid; gap: 6px; padding: 16px; border-bottom: 1px solid var(--dd-border-light); background: var(--dd-surface); }
.live-chat-intro strong { font-size: 15px; }
.live-chat-intro p { font-size: 13px; color: var(--dd-muted); }
.live-chat-topics { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.live-chat-topics button { padding: 4px 10px; border: 1px solid var(--dd-border); border-radius: var(--dd-r-pill); background: var(--dd-card); font-size: 12.5px; }
.live-chat-topics button:hover { border-color: var(--dd-accent-line); color: var(--dd-accent); }
.live-chat-messages { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 16px; overflow-y: auto; }
.live-chat-message { display: grid; gap: 2px; max-width: 85%; padding: 8px 12px; border-radius: 14px 14px 14px 4px; background: var(--dd-surface); border: 1px solid var(--dd-border-light); font-size: 13.5px; line-height: 1.5; }
.live-chat-message small { font-size: 11px; font-weight: 600; color: var(--dd-muted); }
.live-chat-message time { font-size: 10.5px; color: var(--dd-subtle); }
.live-chat-message[data-sender="CUSTOMER"] { align-self: flex-end; border-radius: 14px 14px 4px 14px; background: var(--dd-ink); color: #fff; border-color: transparent; }
.live-chat-message[data-sender="CUSTOMER"] small, .live-chat-message[data-sender="CUSTOMER"] time { color: rgba(255, 255, 255, .6); }
.live-chat-message[data-sender="ADMIN"] { border-color: var(--dd-accent-line); background: rgba(255, 80, 0, .04); }
.live-chat-join-notice { align-self: center; padding: 3px 10px; border-radius: var(--dd-r-pill); background: var(--dd-success-soft); color: var(--dd-success); font-size: 11.5px; }
.live-chat-messages > .is-new { animation: dd-dialog-in var(--dd-med) var(--dd-ease); }
.live-chat-messages > .is-history { opacity: .9; }
.live-chat-status { padding: 0 16px; font-size: 12px; color: var(--dd-muted); }
.live-chat-status:empty { display: none; }
.live-chat-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; padding: 10px 12px; border-top: 1px solid var(--dd-border-light); }
.live-chat-name { display: grid; gap: 4px; width: 100%; font-size: 12px; color: var(--dd-muted); }
.live-chat-name input, .live-chat-form textarea { width: 100%; padding: 8px 12px; border: 1px solid var(--dd-border-strong); border-radius: var(--dd-r-lg); background: var(--dd-card); font-size: 14px; }
.live-chat-form textarea { flex: 1; width: auto; min-height: 40px; max-height: 120px; resize: none; }
.live-chat-form textarea:focus, .live-chat-name input:focus { outline: none; border-color: var(--dd-accent); box-shadow: var(--dd-ring); }
.live-chat-form button { display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--dd-accent); color: #fff; font-size: 14px; }
.live-chat-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--dd-border-light); background: var(--dd-surface); font-size: 12.5px; }
.live-chat-footer button { font-weight: 500; color: var(--dd-accent); }
.live-chat-footer a { color: var(--dd-muted); }
@media (max-width: 560px) {
    .certificate-support-dock, .live-chat { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
    .certificate-support-dock > summary > span:last-child, .live-chat-launcher > span:nth-child(2) { display: none; }
    .certificate-support-dock > summary, .live-chat-launcher { padding: 0 6px; }
}

/* ---------- Dashboard home ---------- */
.dd-dashboard { display: grid; gap: 24px; }
.dd-dash-hero { display: grid; justify-items: center; gap: 18px; padding: 24px 0 8px; text-align: center; }
.dd-dash-hero .dd-eyebrow { margin: 0; }
.dd-dash-hero h1 { font-size: clamp(26px, 3.2vw, 36px); font-weight: 700; line-height: 1.15; letter-spacing: -.025em; }
.dd-dash-hero h1 span { display: block; color: var(--dd-muted); font-weight: 600; }
.dd-dash-shortcuts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.dd-dash-shortcuts a {
    display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px;
    border: 1px solid var(--dd-border); border-radius: var(--dd-r-pill); background: var(--dd-card);
    font-size: 13.5px; font-weight: 500; color: var(--dd-fg-2); box-shadow: var(--dd-shadow-xs);
    transition: border-color var(--dd-fast), color var(--dd-fast), background var(--dd-fast);
}
.dd-dash-shortcuts a:hover { border-color: var(--dd-border-strong); color: var(--dd-fg); }
.dd-dash-shortcuts a.ofox-order-buy { background: var(--dd-ink); border-color: var(--dd-ink); color: #fff; }
.dd-dash-shortcuts a.ofox-order-buy:hover { background: var(--dd-ink-hover); }
.dd-composer, .ofox-order-search {
    position: relative; display: flex; align-items: center; gap: 10px; width: 100%; max-width: 800px; height: 54px; padding: 0 8px 0 20px;
    border: 1px solid #e5e5e5; border-radius: 24px; background: rgba(255, 255, 255, .8);
    -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .03), 0 8px 24px -12px rgba(0, 0, 0, .12);
    transition: border-color var(--dd-fast), box-shadow var(--dd-fast);
}
.dd-composer:focus-within, .ofox-order-search:focus-within { border-color: var(--dd-accent-line); box-shadow: var(--dd-ring), 0 8px 24px -12px rgba(0, 0, 0, .12); }
.ofox-order-search > .bi-search, .dd-composer > .bi-search { font-size: 16px; color: var(--dd-subtle); }
.ofox-order-search input[type="search"], .dd-composer input[type="search"] { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font-size: 15px; outline: none; }
.ofox-order-search input[type="search"]::-webkit-search-cancel-button { display: none; }
.dd-composer-clear { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--dd-muted); font-size: 12px; }
.dd-composer-clear:hover { background: var(--dd-hover); color: var(--dd-fg); }
.dd-composer-send { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--dd-ink); color: #fff; font-size: 16px; transition: background var(--dd-fast); }
.dd-composer-send:hover { background: var(--dd-accent); }
.dd-segmented {
    display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 2px; padding: 3px;
    border: 1px solid var(--dd-border); border-radius: var(--dd-r-pill); background: var(--dd-card); max-width: 100%;
}
.dd-segmented a {
    display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: var(--dd-r-pill);
    font-size: 13px; font-weight: 500; color: var(--dd-muted); white-space: nowrap; transition: background var(--dd-fast), color var(--dd-fast);
}
.dd-segmented a:hover { color: var(--dd-fg); }
.dd-segmented a strong { min-width: 18px; padding: 0 5px; border-radius: var(--dd-r-pill); background: var(--dd-active); font-size: 11px; font-weight: 600; line-height: 17px; text-align: center; }
.dd-segmented a.is-active { background: var(--dd-ink); color: #fff; }
.dd-segmented a.is-active strong { background: rgba(255, 255, 255, .2); }

.dd-dash-stats {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--dd-border); border-radius: var(--dd-r-lg); background: var(--dd-card); overflow: hidden;
}
.dd-dash-stats > div { display: grid; gap: 6px; padding: 16px 20px; }
.dd-dash-stats > div + div { border-left: 1px solid var(--dd-border-light); }
.dd-dash-stats dt { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--dd-muted); }
.dd-dash-stats dd { font-size: 28px; font-weight: 600; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dd-dash-stats dd.is-success { color: var(--dd-success); }
@media (max-width: 720px) {
    .dd-dash-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dd-dash-stats > div:nth-child(3) { border-left: 0; }
    .dd-dash-stats > div:nth-child(n+3) { border-top: 1px solid var(--dd-border-light); }
    .dd-segmented { border-radius: var(--dd-r-lg); }
}

.ofox-order-result-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ofox-order-result-row h2 { font-size: 16px; font-weight: 600; }
.ofox-order-result-row p { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--dd-muted); }
.ofox-order-result-row strong { color: var(--dd-fg); }
.ofox-order-sort { display: inline-flex; align-items: center; gap: 5px; margin-left: 8px; padding: 2px 9px; border: 1px solid var(--dd-border); border-radius: var(--dd-r-pill); background: var(--dd-card); font-size: 12px; }

.ofox-order-list { display: grid; gap: 12px; }
.ofox-order-card {
    border: 1px solid var(--dd-border); border-radius: var(--dd-r-lg); background: var(--dd-card); box-shadow: var(--dd-shadow-xs);
    transition: border-color var(--dd-fast), box-shadow var(--dd-fast);
}
.ofox-order-card:hover { border-color: var(--dd-border-strong); box-shadow: var(--dd-shadow-sm); }
.ofox-order-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; }
.ofox-order-provider { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ofox-order-provider > span { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--dd-r); background: var(--dd-ink); color: #fff; font-size: 16px; }
.ofox-order-provider h2 { font-size: 15px; font-weight: 600; }
.ofox-order-provider p { font-family: var(--dd-font-mono); font-size: 12px; color: var(--dd-muted); word-break: break-all; }
.ofox-order-card-facts {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.1fr .9fr; gap: 0;
    margin: 0 18px; border-top: 1px solid var(--dd-border-light); border-bottom: 1px solid var(--dd-border-light);
}
.ofox-order-card-facts > div { display: grid; align-content: start; gap: 3px; min-width: 0; padding: 12px 14px 12px 0; }
.ofox-order-card-facts > div + div { padding-left: 14px; border-left: 1px solid var(--dd-border-light); }
.ofox-order-card-facts dt { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dd-subtle); }
.ofox-order-card-facts dd { display: grid; gap: 2px; font-size: 13.5px; font-weight: 500; min-width: 0; }
.ofox-order-card-facts dd small { font-size: 12px; font-weight: 400; color: var(--dd-muted); overflow-wrap: anywhere; }
.ofox-order-udid { font-family: var(--dd-font-mono); font-size: 11.5px !important; }
[data-certificate-password] { font-family: var(--dd-font-mono); }
.ofox-order-card > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 18px 14px; }
.ofox-order-card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.ofox-order-card-tags > span {
    display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border: 1px solid var(--dd-border); border-radius: var(--dd-r-pill);
    font-size: 12px; color: var(--dd-fg-2);
}
.certificate-warranty-active { color: var(--dd-success) !important; background: var(--dd-success-soft); border-color: rgba(22, 163, 74, .2) !important; }
.certificate-warranty-pending, .certificate-warranty-upcoming { color: var(--dd-amber) !important; background: var(--dd-amber-soft); border-color: rgba(217, 119, 6, .2) !important; }
.certificate-warranty-expired { color: var(--dd-danger) !important; background: var(--dd-danger-soft); border-color: rgba(220, 38, 38, .2) !important; }
.certificate-warranty-unavailable { color: var(--dd-muted) !important; }
.ofox-order-card-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.ofox-order-card-actions > a, .ofox-order-card-actions > button {
    display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
    border: 1px solid var(--dd-border); border-radius: var(--dd-r); background: var(--dd-card);
    font-size: 13px; font-weight: 500; color: var(--dd-fg); transition: background var(--dd-fast), border-color var(--dd-fast);
}
.ofox-order-card-actions > a:hover { border-color: var(--dd-border-strong); background: var(--dd-surface); }
.ofox-order-card-actions > .is-primary { background: var(--dd-ink); border-color: var(--dd-ink); color: #fff; }
.ofox-order-card-actions > .is-primary:hover { background: var(--dd-accent); border-color: var(--dd-accent); }
.ofox-order-card-actions > button:disabled { color: var(--dd-faint); background: var(--dd-surface); }
.ofox-order-empty { display: grid; justify-items: center; gap: 8px; padding: 56px 24px; border: 1px dashed var(--dd-border-strong); border-radius: var(--dd-r-lg); background: var(--dd-card); text-align: center; }
.ofox-order-empty > .bi { display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--dd-r-lg); background: var(--dd-surface); border: 1px solid var(--dd-border); font-size: 20px; color: var(--dd-muted); }
.ofox-order-empty h2 { font-size: 16px; }
.ofox-order-empty p { max-width: 380px; font-size: 13.5px; color: var(--dd-muted); }
.ofox-order-empty a { margin-top: 6px; font-size: 13.5px; font-weight: 500; color: var(--dd-accent); }
.ofox-order-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ofox-order-pagination a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--dd-border); border-radius: var(--dd-r); background: var(--dd-card); font-size: 13px; font-weight: 500; }
.ofox-order-pagination strong { font-size: 13px; font-weight: 500; color: var(--dd-muted); }
@media (max-width: 900px) {
    .ofox-order-card-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ofox-order-card-facts > div { padding: 10px 0 !important; border-left: 0 !important; }
    .ofox-order-card-facts > div:nth-child(even) { padding-left: 14px !important; border-left: 1px solid var(--dd-border-light) !important; }
    .ofox-order-card-facts > div:nth-child(n+3) { border-top: 1px solid var(--dd-border-light); }
}
@media (max-width: 560px) {
    .ofox-order-card > header { align-items: flex-start; flex-direction: column; }
    .ofox-order-card-actions { width: 100%; }
    .ofox-order-card-actions > a, .ofox-order-card-actions > button { flex: 1 1 auto; justify-content: center; }
}
