@font-face {
    font-family: 'IRANSans';
    src: url('/templates/Font/IRANSans-Edit.ttf') format('truetype');
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: 'Tofigh';
    src: url('/static/fonts/Tofigh.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

* { box-sizing: border-box; }

.hub-network-status {
    position: fixed; bottom: 76px; left: 16px; right: 16px; z-index: 50;
    width: fit-content; max-width: calc(100% - 32px); margin-inline: auto;
    padding: 10px 14px; border: 1px solid var(--hub-line-2); border-radius: 10px;
    background: var(--hub-surface); color: var(--hub-text); font-size: 11px;
    line-height: 1.9; box-shadow: var(--hub-card-shadow);
}
.hub-network-status[hidden] { display: none; }

.hub-app {
    --hub-bg: #1e1e1e;
    --hub-header: #2a2a2a;
    --hub-side: #202020;
    --hub-surface: #2a2a2a;
    --hub-surface-2: #2c2c2c;
    --hub-elev: #2b2b2b;
    --hub-line: #141414;
    --hub-line-2: #3a3a3a;
    --hub-text: #e8e8e8;
    --hub-text-strong: #f3f3f3;
    --hub-muted: #8f8f8f;
    --hub-search: #1c1c1c;
    --hub-hover: #2c2c2c;
    --hub-active: #323232;
    --hub-card: #2c2c2c;
    --hub-ghost: #242424;
    --hub-ghost-line: #454545;
    --hub-accent: #0d66d0;
    --hub-shadow: rgba(0,0,0,.4);
    --hub-card-shadow: 0 3px 10px rgba(0, 0, 0, .22);
    --hub-card-shadow-hover: 0 14px 28px rgba(0, 0, 0, .36);
}

html { background: #1e1e1e; background-color: #1e1e1e; }
html[data-theme="light"] { background: #e6e6e6; background-color: #e6e6e6; }

html[data-theme="light"] .hub-app,
.hub-app[data-theme="light"] {
    --hub-bg: #e6e6e6;
    --hub-header: #f2f2f2;
    --hub-side: #ececec;
    --hub-surface: #f4f4f4;
    --hub-surface-2: #efefef;
    --hub-elev: #f7f7f7;
    --hub-line: #d0d0d0;
    --hub-line-2: #c6c6c6;
    --hub-text: #2a2a2a;
    --hub-text-strong: #161616;
    --hub-muted: #6a6a6a;
    --hub-search: #fafafa;
    --hub-hover: #e8e8e8;
    --hub-active: #dedede;
    --hub-card: #fafafa;
    --hub-ghost: #f0f0f0;
    --hub-ghost-line: #c4c4c4;
    --hub-accent: #0d66d0;
    --hub-shadow: rgba(0,0,0,.12);
    --hub-card-shadow: 0 3px 10px rgba(0, 0, 0, .08);
    --hub-card-shadow-hover: 0 12px 24px rgba(0, 0, 0, .14);
}

html, body.hub-app {
    margin: 0;
    height: 100%;
    background: var(--hub-bg);
    color: var(--hub-text);
    font-family: 'IRANSans', Tahoma, sans-serif;
    direction: rtl;
    touch-action: pan-x pan-y;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

button, a, input, select, textarea {
    touch-action: manipulation;
}

body.hub-app { overflow: hidden; }
body.hub-app.cad-phone-app { overflow: auto; height: auto; min-height: 100%; }

html,
.hub-app,
.hub-app * {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
.hub-app::-webkit-scrollbar,
.hub-app *::-webkit-scrollbar {
    width: 0 !important;
    height: 0 !important;
    display: none !important;
    background: transparent;
}

.hub-boot {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: grid;
    place-items: center;
    background: #1e1e1e;
    transition: opacity .38s ease, visibility .38s ease;
}

html[data-theme="light"] .hub-boot {
    background: #e6e6e6;
}

.hub-boot-logo {
    width: 168px;
    height: 168px;
    padding: 22px 22px 18px;
    display: grid;
    place-items: center;
    color: #ffffff;
    border: 1.25px solid currentColor;
    border-radius: 50%;
    overflow: visible;
}

html[data-theme="light"] .hub-boot-logo {
    color: #111111;
}

.hub-boot-logo svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.hub-boot-logo path {
    fill: currentColor;
}

.hub-boot-orbs {
    transform-box: fill-box;
    transform-origin: center;
    animation: hubBootSpin 1.5s linear infinite;
}

@keyframes hubBootSpin {
    to { transform: rotate(360deg); }
}

html.hub-ready .hub-boot {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

button, input, select, a {
    font-family: inherit;
}

.hub-top {
    height: 48px;
    background: var(--hub-header);
    border-bottom: 1px solid var(--hub-line);
    display: grid;
    grid-template-columns: 220px 1fr 220px;
    align-items: center;
    padding: 0 16px;
    z-index: 20;
}

.hub-logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--hub-text-strong);
    justify-self: start;
}

.hub-logo img {
    width: 18px;
    height: 18px;
    display: block;
}

.hub-logo span {
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.01em;
}

.hub-search-wrap {
    justify-self: center;
    width: min(420px, 46vw);
    height: 32px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--hub-search);
    border: 1px solid var(--hub-line-2);
    border-radius: 16px;
    padding: 0 12px;
    transition: width .28s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.hub-search-wrap.is-open {
    width: min(560px, 62vw);
    background: var(--hub-bg);
    border-color: var(--hub-muted);
    box-shadow: 0 0 0 3px rgba(13,102,208,.12);
}

.hub-search-ico { color: #9a9a9a; flex-shrink: 0; }

.hub-search {
    flex: 1;
    min-width: 0;
    border: none;
    background: transparent;
    color: var(--hub-text-strong);
    font-size: 13px;
    outline: none;
}

.hub-search::placeholder { color: #7d7d7d; }

.hub-top-tools {
    display: contents;
}

.hub-right-tools {
    display: inline-flex;
    align-items: center;
    justify-self: end;
    gap: 8px;
}

.hub-account-chip {
    display: none;
}

.hub-theme {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 16px;
    background: var(--hub-search);
    border: 1px solid var(--hub-line-2);
}

.hub-theme-btn {
    width: 28px;
    height: 26px;
    border: none;
    border-radius: 13px;
    background: transparent;
    color: var(--hub-muted);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.hub-theme-btn:hover { color: var(--hub-text-strong); }
.hub-theme-btn.is-on {
    background: var(--hub-surface);
    color: var(--hub-text-strong);
    box-shadow: 0 2px 8px var(--hub-shadow);
}

/* PWA install button (home page) */
.hub-install-pwa {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 32px;
    border-radius: 16px;
    background: var(--hub-search);
    border: 1px solid var(--hub-line-2);
    color: var(--hub-muted);
    cursor: pointer;
    user-select: none;
    transition: box-shadow .2s ease, color .2s ease, transform .2s ease;
}

.hub-install-pwa[hidden],
.hub-install-pwa.is-hidden {
    display: none !important;
}

.hub-install-pwa:hover {
    color: var(--hub-text-strong);
    box-shadow: 0 2px 8px var(--hub-shadow);
    transform: translateY(-1px);
}

.hub-install-pwa:disabled {
    opacity: .6;
    cursor: not-allowed;
    transform: none;
}

.hub-install-pwa-ico {
    display: inline-grid;
    place-items: center;
}

.hub-install-pwa-text {
    font-size: 12.5px;
    font-weight: 700;
    white-space: nowrap;
}

body.hub-app.dl-app .hub-install-pwa {
    display: none;
}

/* PWA install guide overlay */
.pwa-guide-card {
    text-align: right;
}

.pwa-guide-card h3 {
    text-align: center;
}

.pwa-guide-steps {
    list-style: none;
    counter-reset: pwa-step;
    padding: 0;
    margin: 14px 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pwa-guide-steps li {
    counter-increment: pwa-step;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--hub-text);
}

.pwa-guide-steps li::before {
    content: counter(pwa-step);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--hub-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin-top: 2px;
}

.pwa-g-svg {
    display: inline-block;
    vertical-align: middle;
    margin: 0 2px;
    opacity: .85;
    flex-shrink: 0;
}

.hub-shell {
    display: flex;
    height: calc(100vh - 48px);
}

.hub-side {
    width: 232px;
    flex-shrink: 0;
    background: var(--hub-side);
    border-left: 1px solid var(--hub-line);
    display: flex;
    flex-direction: column;
    padding: 18px 12px 12px;
}

.hub-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.hub-nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    border: none;
    background: transparent;
    color: var(--hub-text);
    font-size: 13.5px;
    padding: 9px 12px;
    border-radius: 8px;
    cursor: pointer;
    text-align: right;
    transition: background .18s ease, color .18s ease;
}

.hub-nav-item:hover { background: var(--hub-hover); color: var(--hub-text-strong); }
.hub-nav-item.is-active { background: var(--hub-active); color: var(--hub-text-strong); }

.hub-nav-fly { position: relative; }

.hub-fly-bridge {
    position: absolute;
    top: -10px;
    bottom: -10px;
    right: 100%;
    width: 28px;
    z-index: 39;
}

.hub-flyout {
    position: absolute;
    top: -6px;
    left: auto;
    right: calc(100% + 6px);
    width: 248px;
    background: var(--hub-elev);
    border: 1px solid var(--hub-line);
    border-radius: 10px;
    box-shadow: 0 16px 40px var(--hub-shadow);
    padding: 8px;
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(10px) scale(.98);
    transition: opacity .14s ease, transform .14s ease, visibility .14s ease;
}

.hub-nav-fly.is-open .hub-flyout,
.hub-nav-fly:focus-within .hub-flyout {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0) scale(1);
}

.hub-flyout button,
.hub-flyout a {
    display: block;
    width: 100%;
    text-align: right;
    background: none;
    border: none;
    color: var(--hub-text);
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 12.5px;
    text-decoration: none;
    cursor: pointer;
    transform: translateX(0);
    transition: background .16s ease, transform .16s ease, color .16s ease;
}

.hub-flyout button:hover,
.hub-flyout a:hover {
    background: var(--hub-hover);
    transform: translateX(-3px);
}

.hub-flyout .muted {
    color: #8d8d8d;
    font-size: 12px;
    padding: 10px;
}

.hub-account {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: var(--hub-surface);
    color: inherit;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    text-align: right;
    transition: background .18s ease;
}

.hub-account:hover { background: var(--hub-hover); }

.hub-account-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #444;
    color: #eee;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    font-size: 14px;
}

.hub-account-avatar.is-guest::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 1.5px;
    background: #ff6b6b;
    transform: rotate(-36deg);
}

.hub-account-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hub-account-text strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--hub-text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-account-text small {
    font-size: 11px;
    color: #9a9a9a;
    margin-top: 2px;
}

.hub-dock {
    display: none;
}

.hub-note-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(8, 10, 14, .58);
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.hub-note-overlay.is-open {
    display: flex;
}

.hub-note-card,
.cad-phone-card {
    position: relative;
    overflow: hidden;
    width: min(420px, 100%);
    background: var(--hub-elev);
    border: 1px solid var(--hub-line-2);
    border-radius: 20px;
    box-shadow: 0 22px 48px var(--hub-shadow);
    padding: 26px 22px 20px;
    text-align: center;
}

.hub-note-card::before,
.cad-phone-card::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -48px;
    width: 180px;
    height: 180px;
    transform: translateX(-50%);
    background: radial-gradient(circle, rgba(13, 102, 208, .28), transparent 68%);
    pointer-events: none;
}

.hub-note-ico,
.cad-phone-ico {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--hub-surface);
    border: 1px solid var(--hub-line-2);
    color: var(--hub-accent);
    box-shadow: inset 0 0 0 6px rgba(13, 102, 208, .08);
}

.hub-note-kicker,
.cad-phone-kicker {
    position: relative;
    margin: 0 0 8px;
    color: var(--hub-muted);
    font-size: 12px;
}

.hub-note-card h3,
.cad-phone-card h1 {
    position: relative;
    margin: 0 0 8px;
    font-size: 21px;
    color: var(--hub-text-strong);
}

.hub-note-card p,
.cad-phone-card p {
    position: relative;
    margin: 0 0 18px;
    line-height: 1.85;
    font-size: 13.5px;
}

.hub-note-card .hub-primary,
.cad-phone-card .hub-primary {
    position: relative;
    display: inline-flex;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    align-items: center;
    text-decoration: none;
}

.cad-phone {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 20px;
    gap: 22px;
}

.hub-main {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding: 18px 28px 20px;
    display: flex;
    flex-direction: column;
}

.hub-main.is-list { overflow: hidden; }

#pageLocal.is-active {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.hub-hero {
    flex: 0 0 auto;
    height: min(200px, 26vh);
    margin-bottom: 16px;
}

.hub-carousel {
    position: relative;
    height: 100%;
    background: var(--hub-surface);
    border-radius: 10px;
    overflow: hidden;
}

.hub-car-spark {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hub-car-logo {
    position: absolute;
    top: 50%;
    left: 4%;
    z-index: 2;
    width: 42%;
    height: 78%;
    display: grid;
    place-items: center;
    pointer-events: none;
    transform: translateY(-50%);
    transition: left .85s cubic-bezier(.22, .61, .36, 1);
}

.hub-carousel.is-mirror .hub-car-logo {
    left: 54%;
}

.hub-car-logo img {
    width: min(148px, 62%);
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 22px var(--hub-shadow));
    animation: carLogoFloat 5.6s ease-in-out infinite;
}

.hub-slides { height: 100%; position: relative; z-index: 2; }

.hub-slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    opacity: 0;
    pointer-events: none;
    transition: opacity .55s ease;
}

.hub-slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

.hub-slide.is-leave {
    opacity: 0;
    z-index: 1;
}

.hub-slide-copy {
    grid-column: 1;
    padding: 28px 32px 28px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: translateX(18px);
    opacity: 0;
    transition:
        opacity .55s ease .12s,
        transform .7s cubic-bezier(.22, .61, .36, 1) .08s;
}

.hub-slide.is-mirror .hub-slide-copy {
    grid-column: 2;
    padding: 28px 24px 28px 32px;
    transform: translateX(-18px);
}

.hub-slide.is-active .hub-slide-copy {
    opacity: 1;
    transform: translateX(0);
}

.hub-slide-copy h3 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 600;
    color: var(--hub-text-strong);
}

.hub-slide-copy p {
    margin: 0 0 10px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--hub-muted);
    max-width: 420px;
}

.hub-slide-kicker {
    font-size: 12px;
    color: var(--hub-muted);
    margin: 0;
    letter-spacing: 0.01em;
}

.hub-car-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #c8c8c8;
    font-size: 22px;
    cursor: pointer;
    z-index: 4;
    transition: color .2s ease, transform .2s ease, background .2s ease;
}

.hub-car-btn:hover {
    color: #fff;
    background: rgba(255,255,255,.06);
    transform: translateY(-50%) scale(1.08);
}
.hub-car-btn.prev { right: 8px; }
.hub-car-btn.next { left: 8px; }

.hub-car-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.hub-car-dots button {
    width: 7px;
    height: 7px;
    border: none;
    border-radius: 50%;
    background: #5c5c5c;
    padding: 0;
    cursor: pointer;
}

.hub-car-dots button.is-active { background: var(--hub-text-strong); }

.hub-car-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: color-mix(in srgb, var(--hub-text-strong) 12%, transparent);
    z-index: 4;
    overflow: hidden;
}

.hub-car-progress span {
    display: block;
    height: 100%;
    width: 0;
    background: var(--hub-text-strong);
}

.hub-car-progress span.is-run {
    animation: carFill 5.6s linear forwards;
}

@keyframes carFill {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes carLogoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.hub-page {
    display: none;
    transform: scale(.96);
    opacity: 0;
}

.hub-page.is-active {
    display: block;
    animation: pageIn .32s ease forwards;
}

#pageHome.is-active {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

@keyframes pageIn {
    from { opacity: 0; transform: scale(.96); }
    to { opacity: 1; transform: scale(1); }
}

.hub-home-stack {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    align-items: start;
    min-height: 0;
}

.hub-block { margin-bottom: 28px; }

.hub-block.home {
    margin: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.hub-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.hub-block-head h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--hub-text-strong);
}

.hub-block-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hub-more {
    border: none;
    background: none;
    color: #a8a8a8;
    font-size: 12px;
    cursor: pointer;
    transition: color .18s ease, transform .18s ease;
}

.hub-more:hover { color: var(--hub-text-strong); transform: translateX(-2px); }

.hub-add-chip {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 7px;
    border: 1px solid var(--hub-line-2);
    border-radius: 13px;
    background: var(--hub-surface-2);
    color: var(--hub-text);
    cursor: pointer;
    overflow: hidden;
    max-width: 32px;
    transition: max-width .32s cubic-bezier(.22, .61, .36, 1), background .2s ease, border-color .2s ease;
}

.hub-add-chip:hover {
    max-width: 168px;
    background: var(--hub-hover);
    border-color: var(--hub-muted);
}

.hub-add-plus {
    width: 12px;
    flex-shrink: 0;
    font-size: 15px;
    line-height: 1;
    text-align: center;
}

.hub-add-label {
    max-width: 0;
    opacity: 0;
    overflow: hidden;
    white-space: nowrap;
    font-size: 11.5px;
    margin-right: 0;
    transition: max-width .32s cubic-bezier(.22, .61, .36, 1), opacity .22s ease, margin .32s ease;
}

.hub-add-chip:hover .hub-add-label {
    max-width: 140px;
    opacity: 1;
    margin-right: 8px;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.hub-grid.pair {
    flex: none;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hub-grid.pair > * {
    min-height: 0;
    animation: cardPop .4s ease both;
}

.hub-grid.pair > *:nth-child(2) { animation-delay: .06s; }

@keyframes cardPop {
    from { opacity: 0; transform: translateY(8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.hub-grid.full {
    grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
}

#pageSheets.is-active {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hub-sheets-layout {
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 272px;
    gap: 18px;
    align-items: stretch;
}

.hub-sheets-main {
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.hub-sheets-list {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.hub-sheets-count {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--hub-muted);
}

.hub-sheets-aside {
    min-height: 0;
    overflow: auto;
    padding: 14px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-line);
    border-radius: 12px;
}

.hub-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.hub-mini {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 10px 9px;
    border: 1px solid var(--hub-line);
    border-radius: 10px;
    background: var(--hub-bg);
    color: inherit;
    font: inherit;
    text-align: right;
}

button.hub-mini {
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease;
}

button.hub-mini:hover,
button.hub-mini.is-pick {
    border-color: var(--hub-muted);
    background: var(--hub-hover);
}

.hub-mini b {
    font-size: 18px;
    font-weight: 600;
    color: var(--hub-text-strong);
    line-height: 1.2;
}

.hub-mini span {
    font-size: 11px;
    color: var(--hub-muted);
}

.hub-mini.is-on b { color: #3d8bfd; }
.hub-mini.is-off b { color: #e74c3c; }

.hub-seg {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 4px;
    margin-bottom: 12px;
    padding: 3px;
    background: var(--hub-bg);
    border-radius: 10px;
}

.hub-seg .hub-date-chip {
    margin: 0;
    width: 100%;
    text-align: center;
    border-radius: 8px;
}

.hub-date-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.hub-date-chip {
    border: 1px solid var(--hub-line-2);
    background: var(--hub-surface-2);
    color: var(--hub-text);
    border-radius: 14px;
    padding: 5px 10px;
    font-size: 11.5px;
    cursor: pointer;
    transition: background .16s ease, border-color .16s ease, color .16s ease;
}

.hub-date-chip:hover {
    background: var(--hub-hover);
    color: var(--hub-text-strong);
}

.hub-date-chip.is-on {
    background: #0d66d0;
    border-color: #0d66d0;
    color: #fff;
}

.hub-date-chip.is-link-off.is-on {
    background: #e74c3c;
    border-color: #e74c3c;
}

.hub-jfields {
    display: grid;
    gap: 8px;
}

.hub-jfield {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    border: 1px solid var(--hub-line-2);
    background: var(--hub-bg);
    color: inherit;
    border-radius: 10px;
    padding: 8px 10px;
    font: inherit;
    cursor: pointer;
    text-align: right;
}

.hub-jfield em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--hub-muted);
}

.hub-jfield strong {
    font-size: 13px;
    font-weight: 500;
    color: var(--hub-muted);
}

.hub-jfield.has-val strong,
.hub-jfield.is-open strong {
    color: var(--hub-text-strong);
}

.hub-jfield.is-open {
    border-color: #0d66d0;
    box-shadow: 0 0 0 3px rgba(13, 102, 208, .14);
}

.hub-jcal {
    margin-top: 10px;
    padding: 10px 8px 8px;
    border: 1px solid var(--hub-line);
    border-radius: 10px;
    background: var(--hub-bg);
}

.hub-jcal-backdrop {
    display: none;
}

.hub-jcal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.hub-jcal-head strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--hub-text-strong);
}

.hub-jcal-head button {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: var(--hub-surface);
    color: var(--hub-text-strong);
    cursor: pointer;
    font-size: 16px;
}

.hub-jcal-week,
.hub-jcal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.hub-jcal-week {
    margin-bottom: 4px;
    font-size: 11px;
    color: var(--hub-muted);
}

.hub-jcal-grid i { min-height: 28px; }

.hub-jcal-day {
    min-height: 28px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--hub-text-strong);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.hub-jcal-day:hover { background: var(--hub-hover); }
.hub-jcal-day.is-today { box-shadow: inset 0 0 0 1px var(--hub-line-2); }
.hub-jcal-day.is-on { background: #0d66d0; color: #fff; }

.hub-jcal-clear {
    display: block;
    width: 100%;
    margin-top: 8px;
    border: none;
    background: none;
    color: var(--hub-muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
    padding: 6px;
}

.hub-jcal-clear:hover { color: var(--hub-text-strong); }

.hub-sheets-empty {
    height: 100%;
    min-height: 240px;
    display: grid;
    place-items: center;
    color: var(--hub-muted);
    font-size: 13px;
    background: var(--hub-surface);
    border: 1px dashed var(--hub-line-2);
    border-radius: 10px;
}

.hub-card,
.hub-ghost-card {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
    text-align: right;
    cursor: pointer;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    transition: transform .32s cubic-bezier(.22, .61, .36, 1);
}

.hub-thumb {
    height: 168px;
    background: var(--hub-card);
    border-radius: 8px;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #6f6f6f;
    box-shadow: var(--hub-card-shadow);
    transition:
        transform .32s cubic-bezier(.22, .61, .36, 1),
        box-shadow .32s ease;
}

    .hub-grid.pair .hub-thumb,
    .hub-block.home .hub-thumb {
        flex: none;
        width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    min-height: 0;
}

.hub-card .hub-thumb { background: #ffffff; }
.hub-card.is-off .hub-thumb {
    position: relative;
    opacity: 1;
}
.hub-card.is-off .hub-thumb::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1.5px solid #e74c3c;
    border-radius: inherit;
    pointer-events: none;
    animation: hubOffPulse 1.6s ease-in-out infinite;
}
.hub-card.is-off .hub-card-name::after {
    content: ' · غیرفعال';
    color: #e74c3c;
    font-size: 11px;
    font-weight: 400;
}
.hub-flyout button.is-off {
    animation: hubOffRing 1.6s ease-in-out infinite;
}
@keyframes hubOffPulse {
    0%, 100% { opacity: .32; }
    50% { opacity: 1; }
}
@keyframes hubOffRing {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(231, 76, 60, .32); }
    50% { box-shadow: inset 0 0 0 1px #e74c3c; }
}

@media (hover: hover) and (pointer: fine) {
    .hub-card:hover,
    .hub-ghost-card:hover {
        transform: translateY(-4px);
    }

    .hub-card:hover .hub-thumb,
    .hub-ghost-card:hover .hub-thumb {
        transform: scale(1.02);
        box-shadow: var(--hub-card-shadow-hover);
    }

    .hub-card:hover .hub-card-name {
        color: var(--hub-text-strong);
    }
}

.hub-thumb > img:not(.hub-ghost-logo),
.hub-thumb > .hub-sheet-svg,
.hub-thumb > .hub-sheet-svg > svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #ffffff;
}

.hub-sheet-svg.is-loading {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #f7f8fa, #e8edf2);
}

.hub-sheet-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 0;
    color: #4b5563;
    font-size: 12px;
    text-align: center;
    direction: rtl;
}

.hub-sheet-loading img {
    width: 38px;
    height: 38px;
    opacity: .72;
    animation: hubSheetPreviewPulse 1.25s ease-in-out infinite;
}

.hub-sheet-loading.is-error img { animation: none; opacity: .42; }
.hub-sheet-loading.is-error { color: #6b7280; }

@keyframes hubSheetPreviewPulse {
    0%, 100% { transform: scale(.92); opacity: .48; }
    50% { transform: scale(1); opacity: .9; }
}

.hub-sheet-svg {
    display: block;
    pointer-events: none;
}

.hub-sheet-svg svg {
    display: block;
}

.hub-card-foot {
    flex-shrink: 0;
}

.hub-card-foot.is-ghost {
    visibility: hidden;
    pointer-events: none;
}

.hub-card-name {
    margin-top: 8px;
    font-size: 13px;
    color: var(--hub-text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hub-card-meta {
    margin-top: 3px;
    font-size: 12px;
    color: var(--hub-muted);
}

.hub-open-btn {
    margin-top: 6px;
    border: none;
    background: transparent;
    color: #bdbdbd;
    font-size: 12px;
    padding: 0;
    cursor: pointer;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .22s ease, transform .22s ease, color .18s ease;
}

.hub-card:hover .hub-open-btn {
    opacity: 1;
    transform: translateY(0);
}

.hub-open-btn:hover { color: #fff; }

.hub-ghost-card .hub-thumb.is-ghost {
    border: 1px dashed var(--hub-ghost-line);
    background: var(--hub-ghost);
}

.hub-ghost-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    text-align: center;
}

.hub-ghost-logo {
    width: 22px;
    height: 22px;
    max-width: 22px;
    max-height: 22px;
    opacity: .22;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
    object-fit: contain;
    transition: opacity .25s ease, transform .25s ease;
}

.hub-ghost-card:hover .hub-ghost-logo {
    opacity: .36;
    transform: scale(1.08);
}

html[data-theme="light"] .hub-ghost-logo,
.hub-app[data-theme="light"] .hub-ghost-logo {
    filter: none;
    opacity: .32;
}

.hub-ghost-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    max-width: 86%;
}

.hub-ghost-text strong {
    font-size: 12px;
    font-weight: 600;
    color: var(--hub-text);
}

.hub-ghost-text span {
    font-size: 11px;
    color: var(--hub-muted);
    line-height: 1.55;
}

.hub-tip {
    position: fixed;
    z-index: 80;
    min-width: 180px;
    max-width: 260px;
    background: var(--hub-elev);
    border: 1px solid var(--hub-line);
    border-radius: 10px;
    box-shadow: 0 14px 36px var(--hub-shadow);
    padding: 10px 12px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .18s ease, transform .18s ease;
}

.hub-tip.is-on {
    opacity: 1;
    transform: translateY(0);
}

.hub-tip strong {
    display: block;
    font-size: 13px;
    color: #fff;
    margin-bottom: 6px;
}

.hub-tip p {
    margin: 0 0 4px;
    font-size: 11.5px;
    color: #b0b0b0;
    line-height: 1.7;
}

.hub-tip p:last-child { margin-bottom: 0; }

.hub-empty {
    color: #8d8d8d;
    font-size: 13px;
    padding: 18px 4px;
}

.hub-locked {
    background: #262626;
    border-radius: 8px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #b0b0b0;
    font-size: 13px;
}

.hub-primary {
    border: none;
    background: var(--hub-accent);
    color: #fff;
    border-radius: 16px;
    padding: 8px 14px;
    font-size: 12.5px;
    cursor: pointer;
}

.hub-ghost {
    background: var(--hub-surface-2);
    color: var(--hub-text);
    border: 1px solid var(--hub-line);
    border-radius: 16px;
    padding: 7px 12px;
    font-size: 12.5px;
    cursor: pointer;
}

.hub-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.48);
    z-index: 11000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.hub-modal-overlay.is-open { display: flex; }

.hub-modal {
    width: min(400px, 100%);
    background: var(--hub-bg);
    border: 1px solid var(--hub-line);
    border-radius: 14px;
    box-shadow: 0 24px 64px var(--hub-shadow);
}

.hub-modal-body { padding: 4px 22px 22px; }

.hub-profile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px 0 16px;
}

.hub-profile-kicker {
    margin: 0;
    font-size: 11.5px;
    color: var(--hub-muted);
}

.hub-profile-close {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--hub-muted);
    cursor: pointer;
    transition: background .16s ease, color .16s ease;
}

.hub-profile-close:hover {
    background: var(--hub-hover);
    color: var(--hub-text-strong);
}

.hub-profile-guest {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 8px 8px;
}

.hub-profile-guest h3,
.hub-profile-who h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--hub-text-strong);
}

.hub-profile-guest p {
    margin: 8px 0 16px;
    max-width: 28ch;
    font-size: 13px;
    line-height: 1.8;
    color: var(--hub-muted);
}

.hub-profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    background: var(--hub-accent);
    color: #fff;
    font-size: 22px;
    font-weight: 600;
}

.hub-profile-avatar.is-guest {
    background: var(--hub-surface);
    color: var(--hub-muted);
    box-shadow: inset 0 0 0 1px var(--hub-line);
    margin-bottom: 12px;
}

.hub-profile-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 0 18px;
}

.hub-profile-who p {
    margin: 4px 0 0;
    font-size: 12.5px;
    color: var(--hub-muted);
}

.hub-profile-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.hub-profile-stat {
    padding: 12px 12px 11px;
    border-radius: 12px;
    background: var(--hub-surface);
}

.hub-profile-stat b {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: var(--hub-text-strong);
    line-height: 1.2;
}

.hub-profile-stat span {
    display: block;
    margin-top: 3px;
    font-size: 11.5px;
    color: var(--hub-muted);
}

.hub-profile-meta {
    margin-top: 14px;
}

.hub-profile-meta div {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    padding: 10px 0;
    border-top: 1px solid var(--hub-line);
    font-size: 13px;
}

.hub-profile-meta span:first-child { color: var(--hub-muted); }
.hub-profile-meta span:last-child { color: var(--hub-text-strong); }

.hub-profile-note {
    margin: 14px 0 0;
    font-size: 12px;
    line-height: 1.7;
    color: var(--hub-muted);
}

.hub-profile-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

.hub-profile-pass,
.hub-profile-out {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 12.5px;
    color: var(--hub-muted);
    text-decoration: none;
    cursor: pointer;
}

.hub-profile-who { flex: 1; min-width: 0; }
.hub-profile-who h3 { overflow-wrap: anywhere; }
.hub-profile-avatar-wrap { position: relative; flex-shrink: 0; }
.hub-profile-verified-icon { position: absolute; inset-inline-end: -5px; bottom: -3px; display: grid; place-items: center; color: #3299f5; background: var(--hub-bg, #111); border-radius: 50%; padding: 2px; }
.hub-profile-verified-label { display: inline-block; margin-top: 4px; color: #3299f5; font-size: 11px; font-weight: 600; }
.hub-profile-actions { display: grid; gap: 7px; flex-shrink: 0; }
.hub-profile-pass, .hub-profile-out { display: inline-flex; align-items: center; justify-content: center; padding: 9px 12px; border: 1px solid var(--hub-line); border-radius: 9px; font-weight: 600; line-height: 1.5; background: var(--hub-surface); color: var(--hub-text-strong); transition: background .15s, border-color .15s; }
.hub-profile-pass:hover { border-color: var(--hub-accent); color: var(--hub-accent); }
.hub-profile-actions #profileEditBtn { background:var(--hub-accent); border-color:var(--hub-accent); color:#fff; }
.hub-profile-links { flex-direction: column; align-items: stretch; gap: 8px; }
.hub-profile-out { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.3); color: #ef4444; }
.hub-profile-out:hover { background: rgba(239,68,68,.2); border-color: #ef4444; color: #ef4444; }
.hub-profile-pass:focus-visible, .hub-profile-out:focus-visible { outline: 2px solid var(--hub-accent); outline-offset: 3px; }
@media (max-width: 380px) { .hub-profile-hero { flex-wrap: wrap; } .hub-profile-actions { grid-template-columns: 1fr 1fr; width: 100%; } }

.hub-ctx {
    position: fixed;
    z-index: 90;
    min-width: 176px;
    background: var(--hub-elev);
    border: 1px solid var(--hub-line);
    border-radius: 10px;
    box-shadow: 0 14px 32px var(--hub-shadow);
    padding: 6px;
    animation: cardPop .18s ease;
}

.hub-ctx button,
.hub-ctx a {
    display: block;
    width: 100%;
    text-align: right;
    background: none;
    border: none;
    color: var(--hub-text);
    padding: 8px 12px;
    font-size: 12.5px;
    text-decoration: none;
    cursor: pointer;
    border-radius: 7px;
}

.hub-ctx button:hover,
.hub-ctx a:hover { background: var(--hub-hover); color: var(--hub-text-strong); }

body.hub-app .ac-auth-card { background: #2a2a2a; color: #eee; border-radius: 10px; }
body.hub-app .ac-auth-head { border-bottom-color: #171717; }
body.hub-app .ac-auth-head h2 { color: #fff; }
body.hub-app .ac-auth-head p,
body.hub-app .ac-auth-field label { color: #b3b3b3; }
body.hub-app .ac-auth-field input,
body.hub-app .ac-auth-field select {
    background: #1b1b1b;
    border-color: #444;
    color: #fff;
    font-family: inherit;
}
body.hub-app .ac-auth-tab { background: #222; border-color: #333; color: #ddd; }
body.hub-app .ac-auth-tab.active { background: #0d66d0; border-color: #0d66d0; color: #fff; }
body.hub-app .ac-auth-btn.primary { background: #0d66d0; }
body.hub-app .ac-auth-btn.ghost { background: #3d3d3d; color: #eee; }
body.hub-app .ac-auth-link { color: #8ec0ff; }

.hub-sheet-page {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: stretch;
    padding: 18px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
    overscroll-behavior: contain;
}

.hub-sheet-page.is-open {
    opacity: 1;
    pointer-events: auto;
}

.hub-sheet-page-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .48);
}

.hub-sheet-panel {
    position: relative;
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: var(--hub-bg);
    border: 1px solid var(--hub-line);
    border-radius: 12px;
    box-shadow: 0 24px 64px var(--hub-shadow);
    overflow: hidden;
    transform: translateY(18px) scale(.98);
    opacity: 0;
    transition:
        transform .4s cubic-bezier(.22, .61, .36, 1),
        opacity .32s ease;
}

.hub-sheet-page.is-open .hub-sheet-panel {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.hub-sheet-panel-head {
    flex-shrink: 0;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 16px;
    border-bottom: 1px solid var(--hub-line);
    background: var(--hub-header);
}

.hub-sheet-panel-head h2 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--hub-text-strong);
}

.hub-sheet-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: var(--hub-surface);
    color: var(--hub-text);
    border-radius: 16px;
    padding: 7px 12px 7px 10px;
    font-size: 12.5px;
    cursor: pointer;
    transition: background .18s ease, transform .18s ease;
}

.hub-sheet-back:hover {
    background: var(--hub-hover);
    transform: translateX(2px);
}

.hub-sheet-panel-body {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
    padding: 8px 8px 8px 12px;
    container-type: size;
}

.hub-sheet-preview-slot {
    flex: 0 0 auto;
    align-self: stretch;
    width: auto;
    height: 100%;
    max-width: calc(100% - 280px);
    display: flex;
    justify-content: flex-start;
    align-items: stretch;
}

@supports (width: 1cqw) {
    .hub-sheet-preview-slot {
        width: min(29.7cm, calc(100cqh * 297 / 210), calc(100cqw - 280px - 10px));
        max-width: none;
    }
}

.hub-sheet-preview {
    position: relative;
    width: auto;
    height: 100%;
    max-width: 100%;
    aspect-ratio: 297 / 210;
    background: #ffffff;
    border: 1px solid var(--hub-line);
    border-radius: 8px;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

@supports (width: 1cqw) {
    .hub-sheet-preview {
        width: 100%;
        height: auto;
        max-height: 100%;
    }
}

.hub-sheet-preview.is-panning { cursor: grabbing; }

.hub-sheet-preview.is-off {
    box-shadow: inset 0 0 0 1.5px #e74c3c;
}

.hub-sheet-view {
    position: absolute;
    inset: 0;
    transform-origin: 0 0;
    will-change: transform;
}

.hub-sheet-preview .hub-sheet-svg,
.hub-sheet-preview > img {
    position: absolute;
    inset: 0;
    width: auto;
    height: auto;
    pointer-events: none;
}

.hub-sheet-preview .hub-sheet-svg > svg,
.hub-sheet-preview svg.hub-sheet-map {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.hub-sheet-preview.is-empty {
    display: grid;
    place-items: center;
}

.hub-sheet-preview.is-empty > svg {
    position: static;
    width: 48px;
    height: 48px;
    color: #b0b0b0;
}

.hub-sheet-info {
    flex: 1 1 auto;
    min-width: 220px;
    max-width: none;
    min-height: 0;
    overflow: auto;
    padding: 2px 4px 2px 2px;
    display: flex;
    flex-direction: column;
}

.hub-sheet-kicker {
    font-size: 11.5px;
    color: var(--hub-muted);
    margin-bottom: 6px;
}

.hub-sheet-info h3 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--hub-text-strong);
}

.hub-sheet-fields {
    display: grid;
    gap: 2px;
}

.hub-sheet-field {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--hub-line);
    animation: cardPop .4s ease both;
}

.hub-sheet-field:nth-child(1) { animation-delay: .04s; }
.hub-sheet-field:nth-child(2) { animation-delay: .08s; }
.hub-sheet-field:nth-child(3) { animation-delay: .12s; }
.hub-sheet-field:nth-child(4) { animation-delay: .16s; }
.hub-sheet-field:nth-child(5) { animation-delay: .2s; }
.hub-sheet-field:nth-child(6) { animation-delay: .24s; }

.hub-sheet-field span:first-child {
    flex-shrink: 0;
    color: var(--hub-muted);
    font-size: 12.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.hub-field-ico {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--hub-muted);
}

.hub-sheet-field span:last-child {
    text-align: left;
    color: var(--hub-text-strong);
    font-size: 13px;
    line-height: 1.7;
}

.hub-sheet-status {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--hub-surface);
    border: 1px solid var(--hub-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    animation: cardPop .4s ease both;
    animation-delay: .28s;
}

.hub-sheet-status.is-off {
    box-shadow: inset 0 0 0 1px rgba(231, 76, 60, .55);
}

.hub-sheet-status-text strong {
    display: block;
    font-size: 13px;
    color: var(--hub-text-strong);
}

.hub-sheet-status-text span {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: var(--hub-muted);
}

.hub-switch {
    flex-shrink: 0;
    width: 42px;
    height: 24px;
    border: none;
    border-radius: 99px;
    background: #5a5a5a;
    position: relative;
    cursor: pointer;
    transition: background .22s ease;
}

.hub-switch.is-on { background: #0d66d0; }
.hub-switch:not(.is-on) { background: #e74c3c; }

.hub-switch i {
    position: absolute;
    top: 3px;
    right: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    transition: transform .22s cubic-bezier(.22, .61, .36, 1);
}

.hub-switch.is-on i { transform: translateX(-18px); }

.hub-sheet-toolbar {
    display: flex;
    align-items: stretch;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 12px;
    flex: 1 1 auto;
    min-height: 160px;
    container-type: size;
    animation: cardPop .4s ease both;
    animation-delay: .34s;
}

.hub-sheet-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    flex: 1 1 auto;
    min-width: 200px;
    width: auto;
    max-width: none;
    align-self: flex-start;
}

.hub-sheet-share {
    flex: 0 0 auto;
    display: flex;
}

.hub-sheet-share.is-off {
    opacity: .45;
}

.hub-sheet-qr {
    display: block;
    width: min(100cqh, calc(100cqw - 212px));
    height: min(100cqh, calc(100cqw - 212px));
    padding: 8px;
    box-sizing: border-box;
    background: #fff;
    border: 1px solid var(--hub-line);
    border-radius: 10px;
}

.hub-sheet-qr svg {
    display: block;
    width: 100%;
    height: 100%;
}

@supports not (width: 1cqw) {
    .hub-sheet-qr {
        width: auto;
        height: 100%;
        max-width: 42%;
        aspect-ratio: 1;
    }
}

.hub-sheet-actions .hub-primary,
.hub-sheet-actions .hub-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    padding: 6px 8px;
    font-size: 11.5px;
    border-radius: 12px;
    white-space: nowrap;
    transition: transform .18s ease, background .18s ease;
}

.hub-sheet-actions .hub-primary:hover,
.hub-sheet-actions .hub-ghost:hover {
    transform: translateY(-1px);
}

.hub-sheet-actions .hub-primary:disabled,
.hub-sheet-actions .hub-ghost:disabled {
    opacity: .55;
    cursor: wait;
    transform: none;
}

@media (max-width: 900px) {
    html,
    body.hub-app,
    body.hub-app * {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    html::-webkit-scrollbar,
    body.hub-app::-webkit-scrollbar,
    body.hub-app *::-webkit-scrollbar {
        width: 0 !important;
        height: 0 !important;
        display: none !important;
    }
    html {
        overscroll-behavior: none;
    }
    html,
    html[data-theme="dark"],
    body.hub-app {
        background-color: #1e1e1e;
    }
    html[data-theme="light"],
    html[data-theme="light"] body.hub-app,
    body.hub-app[data-theme="light"] {
        background-color: #e6e6e6;
    }
    /* Keep the document viewport stationary; only the Hub content scrolls. */
    body.hub-app {
        overflow: hidden;
        overscroll-behavior: none;
    }
    body.hub-app:not(.dl-app) {
        min-height: 100dvh;
        background: var(--hub-bg);
    }
    body.hub-app:not(.dl-app) .hub-shell,
    body.hub-app:not(.dl-app) .hub-main,
    body.hub-app:not(.dl-app) .hub-page {
        background: var(--hub-bg);
    }
    body.hub-app:not(.dl-app) .hub-top {
        position: sticky;
        top: 0;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 10px;
        padding: 0 10px 0 8px;
        height: 52px;
    }
    body.hub-app:not(.dl-app) .hub-top-tools {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        min-width: 0;
        justify-self: stretch;
    }
    body.hub-app:not(.dl-app) .hub-theme,
    body.hub-app:not(.dl-app) .hub-account-chip {
        transition: opacity .24s ease, transform .28s ease, width .28s ease, min-width .28s ease, padding .28s ease, border-width .28s ease, margin .28s ease;
    }
    body.hub-app:not(.dl-app) .hub-search-wrap,
    body.hub-app:not(.dl-app) .hub-search-wrap.is-open {
        direction: ltr;
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        align-items: center;
        width: 36px;
        height: 36px;
        padding: 0;
        border-radius: 18px;
        flex: 0 0 36px;
        overflow: hidden;
        box-shadow: none;
        background: var(--hub-search);
        z-index: 2;
        transition: width .34s cubic-bezier(.22, 1, .36, 1), flex-basis .34s cubic-bezier(.22, 1, .36, 1), padding .34s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
    }
    body.hub-app:not(.dl-app) .hub-search-ico {
        width: 16px;
        height: 16px;
        display: block;
        justify-self: center;
        pointer-events: none;
    }
    body.hub-app:not(.dl-app) .hub-search-wrap .hub-search {
        width: 100%;
        min-width: 0;
        opacity: 0;
        pointer-events: none;
        padding: 0;
        font-size: 16px;
        line-height: 1.2;
        -webkit-text-size-adjust: 100%;
        transition: opacity .2s ease .08s;
    }
    body.hub-app:not(.dl-app) .hub-top.is-searching .hub-theme,
    body.hub-app:not(.dl-app) .hub-top.is-searching .hub-account-chip,
    body.hub-app:not(.dl-app) .hub-top.is-searching .hub-install-pwa {
        opacity: 0;
        transform: translateX(-10px) scale(.86);
        width: 0;
        min-width: 0;
        flex: 0 0 0;
        padding: 0;
        margin: 0;
        border-width: 0;
        overflow: hidden;
        pointer-events: none;
    }
    body.hub-app:not(.dl-app) .hub-top.is-searching .hub-search-wrap,
    body.hub-app:not(.dl-app) .hub-top.is-searching .hub-search-wrap.is-open {
        flex: 1 1 auto;
        width: auto;
        max-width: none;
        padding: 0 12px 0 0;
        box-shadow: none;
    }
    body.hub-app:not(.dl-app) .hub-top.is-searching .hub-search {
        opacity: 1;
        pointer-events: auto;
    }
    body.hub-app:not(.dl-app) .hub-account-chip {
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        padding: 0;
        border: 1px solid var(--hub-line-2);
        background: var(--hub-search);
        border-radius: 18px;
        cursor: pointer;
        overflow: hidden;
        flex: 0 0 36px;
    }
    body.hub-app:not(.dl-app) .hub-theme {
        overflow: hidden;
        flex: 0 0 auto;
    }
    body.hub-app:not(.dl-app) .hub-account-chip .hub-account-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    body.hub-app:not(.dl-app) .hub-side { display: none; }
    body.hub-app:not(.dl-app) .hub-dock {
        display: flex;
        position: fixed !important;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 25;
        box-sizing: border-box;
        transform: translateZ(0);
        will-change: transform;
        background: var(--hub-header);
        border-top: 1px solid var(--hub-line);
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px));
        justify-content: space-around;
        gap: 4px;
    }
    body.hub-app:not(.dl-app) .hub-dock-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        border: none;
        background: transparent;
        color: var(--hub-muted);
        font-size: 11px;
        padding: 6px 4px 4px;
        border-radius: 10px;
        cursor: pointer;
    }
    body.hub-app:not(.dl-app) .hub-dock-item.is-active {
        color: var(--hub-text-strong);
        background: var(--hub-active);
    }
    .hub-top-spacer { display: none; }
    .hub-shell {
        display: block;
        height: calc(100vh - 52px);
        height: calc(100dvh - 52px);
    }
    .hub-side { width: 100%; border-left: none; }
    .hub-main {
        overflow: auto;
        height: 100%;
        box-sizing: border-box;
        overscroll-behavior-y: contain;
    }
    body.hub-app:not(.dl-app) .hub-main {
        padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    }
    .hub-hero { height: 180px; }
    .hub-home-stack { display: block; }
    .hub-grid.full .hub-thumb {
        flex: none;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
        min-height: 0;
    }
    .hub-block.home { margin-bottom: 22px; }
    .hub-slide { grid-template-columns: 1fr; }
    .hub-slide-copy,
    .hub-slide.is-mirror .hub-slide-copy {
        grid-column: 1;
        padding: 18px 18px 28px;
        max-width: none;
        transform: none;
        z-index: 3;
    }
    .hub-slide.is-active .hub-slide-copy {
        transform: none;
    }
    .hub-slide-copy p { max-width: none; }
    .hub-car-logo,
    .hub-carousel.is-mirror .hub-car-logo {
        left: 0;
        top: 0;
        z-index: 0;
        width: 100%;
        height: 100%;
        transform: none;
        opacity: 1;
        transition: none;
    }
    .hub-car-logo img {
        width: min(220px, 58%);
        opacity: .42;
        filter: blur(11px) saturate(1.15);
        animation: none;
        transform: scale(1.18);
    }
    .hub-carousel::after {
        content: '';
        position: absolute;
        inset: 0;
        z-index: 2;
        pointer-events: none;
        background: linear-gradient(180deg, color-mix(in srgb, var(--hub-surface) 18%, transparent), color-mix(in srgb, var(--hub-surface) 62%, transparent) 100%);
        backdrop-filter: blur(7px) saturate(1.2);
        -webkit-backdrop-filter: blur(7px) saturate(1.2);
    }
    .hub-slides { z-index: 3; }
    .hub-main.is-list { overflow: auto; }
    #pageSheets.is-active {
        flex: 0 0 auto;
        min-height: auto;
        overflow: visible;
        /* A transformed ancestor turns fixed children into page-relative
           elements on Android. The calendar must be viewport-relative. */
        animation: none;
        transform: none;
        opacity: 1;
    }
    .hub-sheets-layout {
        flex: 0 0 auto;
        min-height: auto;
        grid-template-columns: 1fr;
        height: auto;
    }
    .hub-sheets-list { overflow: visible; }
    .hub-sheets-aside {
        position: static;
        order: -1;
        min-height: auto;
        overflow: visible;
    }
    /* The inline desktop calendar gets clipped by the short mobile viewport.
       Present it above the bottom dock instead, so every date stays tappable. */
    .hub-jcal-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 70;
        border: 0;
        padding: 0;
        background: rgba(0, 0, 0, .36);
        cursor: default;
    }
    .hub-jcal {
        position: fixed;
        z-index: 71;
        left: max(12px, env(safe-area-inset-left, 0px));
        right: max(12px, env(safe-area-inset-right, 0px));
        bottom: calc(68px + env(safe-area-inset-bottom, 0px));
        max-width: 520px;
        margin: 0 auto;
        padding: 12px 10px 10px;
        border-radius: 16px;
        box-shadow: 0 18px 50px rgba(0, 0, 0, .34);
        max-height: calc(100dvh - 136px);
        overflow: auto;
        -webkit-overflow-scrolling: touch;
    }
    .hub-jcal-head { margin-bottom: 10px; }
    .hub-jcal-head button {
        width: 36px;
        height: 36px;
        font-size: 21px;
    }
    .hub-jcal-week { margin-bottom: 6px; }
    .hub-jcal-grid { gap: 4px; }
    .hub-jcal-grid i,
    .hub-jcal-day { min-height: 36px; }
    .hub-jcal-day { font-size: 13px; }
    .hub-jcal-clear { min-height: 38px; margin-top: 10px; }
    .hub-fly-bridge { display: none; }
    .hub-flyout { left: 12px; right: auto; top: calc(100% + 6px); }
    .hub-sheet-page { padding: 6px; }
    .hub-sheet-panel-body {
        flex-direction: column;
        padding: 8px;
        gap: 8px;
        overflow: auto;
    }
    .hub-sheet-preview-slot {
        flex: 0 0 auto;
        width: 100%;
        height: auto;
        max-width: none;
        align-self: stretch;
    }
    .hub-sheet-preview {
        width: 100%;
        height: auto;
        max-height: none;
        aspect-ratio: 297 / 210;
    }
    .hub-sheet-info { flex: 1 1 auto; min-width: 0; max-width: none; padding: 0; }
    .hub-sheet-share { display: none; }
    .hub-sheet-toolbar { flex: 0 0 auto; min-height: 0; }
    .hub-sheet-actions { flex: 1 1 auto; width: auto; max-width: none; }
}

@media (max-width: 900px) and (orientation: landscape) {
    .hub-sheet-page { padding: 4px; }
    .hub-sheet-panel-head { height: 44px; }
    .hub-sheet-panel-body {
        flex-direction: row;
        padding: 6px 6px 6px 8px;
        gap: 8px;
        overflow: hidden;
    }
    .hub-sheet-preview-slot {
        flex: 0 0 auto;
        width: min(70vw, calc((100vh - 60px) * 297 / 210));
        height: 100%;
        max-width: calc(100% - 200px);
    }
    .hub-sheet-preview {
        width: 100%;
        height: auto;
        max-height: 100%;
    }
    .hub-sheet-info { min-width: 180px; }
    .hub-sheet-share { display: none; }
    .hub-sheet-actions { flex: 1 1 auto; width: auto; max-width: none; }
}
/* Versioned sheet-seal consent, also usable on mobile. */
.hub-card .hub-thumb { position: relative; }
.hub-seal-badge { position: absolute; top: 8px; inset-inline-end: 8px; z-index: 2; display: inline-flex; padding: 0; border-radius: 50%; background: none; box-shadow: 0 1px 4px #0002; pointer-events: none; }
.hub-seal-badge img { display: block; width: 24px; height: 24px; object-fit: contain; }
.hub-seal-dialog { width: min(640px, calc(100vw - 32px)); max-height: 90dvh; overflow: auto; padding: 24px; border: 1px solid #7775; border-radius: 16px; background: #25282e; color: #f3f4f6; font-family: Tahoma, sans-serif; box-sizing: border-box; }
.hub-seal-dialog::backdrop { background: #000a; }
.hub-seal-dialog h3 { margin: 0 0 14px; font-size: 18px; }
.hub-seal-dialog p { font-size: 13px; line-height: 1.9; }
.hub-seal-terms { white-space: pre-wrap; max-height: 45dvh; overflow: auto; padding: 16px; border: 1px solid #7775; border-radius: 10px; font-size: 13px; line-height: 2.1; }
.hub-seal-check { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; font-size: 13px; line-height: 1.9; }
.hub-seal-check input { margin-top: 5px; flex: none; }
.hub-seal-dialog footer { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.hub-seal-dialog button:disabled, .hub-sheet-actions button:disabled, .hub-signature-status button:disabled { opacity: .45; cursor: not-allowed; }
.hub-seal-error { color: #fca5a5; }
.hub-signature-status code { display: block; margin-top: 6px; font-size: 10px; overflow-wrap: anywhere; }
.hub-seal-history { max-height: 60dvh; overflow: auto; }
.hub-seal-history-item { border-bottom: 1px solid #7775; padding: 12px 0; }
.hub-seal-history-item time { font-size: 12px; opacity: .7; }
[data-theme="light"] .hub-seal-dialog { background: #fff; color: #222; }
