/* =========================================================
   Operations mobile hub — tile launcher
   ========================================================= */

.mobile-layout .mobile-body:has(.ops-hub) > .page-container,
.tablet-layout .mobile-body:has(.ops-hub) > .page-container {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    overflow: hidden;
}

.ops-hub {
    --ops-navy: #002245;
    --ops-navy-deep: #00182f;
    --ops-orange: #ff6600;
    --ops-ink: #10233a;
    --ops-muted: #5b6b80;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0.7rem 0.85rem 1.25rem;
    box-sizing: border-box;
    background:
        radial-gradient(120% 70% at 108% -8%, rgba(255, 102, 0, 0.16), transparent 52%),
        radial-gradient(90% 55% at -12% 0%, rgba(0, 34, 69, 0.12), transparent 48%),
        linear-gradient(180deg, #e8eef6 0%, #f3f6fa 42%, #eef2f7 100%);
}

.ops-hub__intro {
    margin: 0 0 0.75rem;
    padding: 0.05rem 0.1rem 0.15rem;
}

.ops-hub__kicker {
    margin: 0 0 0.12rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ops-orange);
}

.ops-hub__title {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.035em;
    color: var(--ops-navy);
    line-height: 1.08;
}

.ops-hub__subtitle {
    margin: 0.2rem 0 0;
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--ops-muted);
    line-height: 1.3;
}

.ops-hub__section {
    margin-bottom: 0.85rem;
}

.ops-hub__section:last-child {
    margin-bottom: 0.15rem;
}

.ops-hub__section-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.42rem 0.05rem;
}

.ops-hub__section-icon {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.78rem;
    flex-shrink: 0;
}

.ops-hub__section--invoices .ops-hub__section-icon { background: #dbe7f5; color: var(--ops-navy); }
.ops-hub__section--assembly .ops-hub__section-icon { background: #dbeafe; color: #0369a1; }
.ops-hub__section--backoffice .ops-hub__section-icon { background: #ffedd5; color: #c2410c; }
.ops-hub__section--inventory .ops-hub__section-icon { background: #ede9fe; color: #6d28d9; }
.ops-hub__section--dispatch .ops-hub__section-icon { background: #dcfce7; color: #15803d; }
.ops-hub__section--admin .ops-hub__section-icon { background: #dbeafe; color: #1d4ed8; }
.ops-hub__section--account .ops-hub__section-icon { background: #e0e7ff; color: #4338ca; }

.ops-hub__section-title {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--ops-navy);
}

.ops-hub__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.ops-tile {
    --tile-accent: #002245;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr) 2.15rem;
    grid-template-rows: auto;
    column-gap: 0;
    row-gap: 0;
    align-items: stretch;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(15, 35, 58, 0.08);
    border-radius: 1.1rem;
    background: #fff;
    box-shadow: 0 8px 20px rgba(16, 35, 58, 0.08);
    color: var(--ops-ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    isolation: isolate;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.ops-tile::before {
    display: none;
}

.ops-tile::after {
    content: "";
    position: absolute;
    right: -1.2rem;
    bottom: -1.2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: var(--tile-accent);
    opacity: 0.1;
    pointer-events: none;
    z-index: 0;
}

.ops-tile:hover:not(:disabled),
.ops-tile:focus-visible:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(16, 35, 58, 0.14);
}

.ops-tile:focus-visible {
    outline: 2px solid var(--ops-orange);
    outline-offset: 2px;
}

.ops-tile:active:not(:disabled) {
    transform: scale(0.98);
}

.ops-tile.is-locked,
.ops-tile:disabled {
    cursor: not-allowed;
    filter: grayscale(0.28);
    opacity: 0.78;
    box-shadow: 0 4px 12px rgba(16, 35, 58, 0.05);
}

.ops-tile__icon,
.ops-tile__copy,
.ops-tile__label,
.ops-tile__desc,
.ops-tile__go {
    position: relative;
    z-index: 1;
}

.ops-tile__icon {
    grid-column: 1;
    grid-row: 1;
    width: 50px;
    height: 100%;
    min-height: 50px;
    margin: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    align-self: stretch;
    box-shadow: none;
}

.ops-tile__icon i {
    font-size: 1.75rem;
    line-height: 1;
}

.ops-tile__copy {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.2rem;
    min-width: 0;
    min-height: 0;
    height: 100%;
    padding: 0.7rem 0.45rem 0.75rem 0.55rem;
}

.ops-tile__label {
    width: 100%;
    padding: 0;
    font-size: 1.075rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--ops-navy);
    line-height: 1.25;
    text-align: center;
}

.ops-tile__desc {
    width: 100%;
    padding: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--ops-muted);
    line-height: 1.35;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ops-tile__go {
    grid-column: 3;
    grid-row: 1;
    position: static;
    justify-self: end;
    align-self: end;
    margin: 0 0.4rem 0.4rem 0;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    background: var(--tile-accent);
    color: #fff;
}

.ops-tile.is-locked .ops-tile__go,
.ops-tile:disabled .ops-tile__go {
    background: #fecaca;
    color: #b91c1c;
}

/* ── Tones ─────────────────────────────────────────────── */
.ops-tile--invoices { --tile-accent: #ff6600; }
.ops-tile--assembly { --tile-accent: #0284c7; background: linear-gradient(160deg, #f0f9ff 0%, #ffffff 58%); }
.ops-tile--paints { --tile-accent: #db2777; background: linear-gradient(160deg, #fdf2f8 0%, #ffffff 58%); }
.ops-tile--walkins { --tile-accent: #16a34a; background: linear-gradient(160deg, #f0fdf4 0%, #ffffff 58%); }
.ops-tile--receivables { --tile-accent: #ea580c; background: linear-gradient(160deg, #fff7ed 0%, #ffffff 58%); }
.ops-tile--returns { --tile-accent: #d97706; background: linear-gradient(160deg, #fffbeb 0%, #ffffff 58%); }
.ops-tile--purchase { --tile-accent: #7c3aed; background: linear-gradient(160deg, #f5f3ff 0%, #ffffff 58%); }
.ops-tile--usage { --tile-accent: #4f46e5; background: linear-gradient(160deg, #eef2ff 0%, #ffffff 58%); }
.ops-tile--audit { --tile-accent: #475569; background: linear-gradient(160deg, #f1f5f9 0%, #ffffff 58%); }
.ops-tile--board { --tile-accent: #0d9488; background: linear-gradient(160deg, #f0fdfa 0%, #ffffff 58%); }
.ops-tile--logs { --tile-accent: #16a34a; background: linear-gradient(160deg, #f0fdf4 0%, #ffffff 58%); }
.ops-tile--users { --tile-accent: #4f46e5; background: linear-gradient(160deg, #eef2ff 0%, #ffffff 58%); }
.ops-tile--security { --tile-accent: #1d4ed8; background: linear-gradient(160deg, #eff6ff 0%, #ffffff 58%); }
.ops-tile--profile { --tile-accent: #0d9488; background: linear-gradient(160deg, #f0fdfa 0%, #ffffff 58%); }
.ops-tile--notify { --tile-accent: #64748b; background: linear-gradient(160deg, #f1f5f9 0%, #ffffff 58%); }

.ops-tile--assembly .ops-tile__icon { background: #e0f2fe; color: #0369a1; }
.ops-tile--paints .ops-tile__icon { background: #fce7f3; color: #be185d; }
.ops-tile--walkins .ops-tile__icon { background: #dcfce7; color: #15803d; }
.ops-tile--receivables .ops-tile__icon { background: #ffedd5; color: #c2410c; }
.ops-tile--returns .ops-tile__icon { background: #fef3c7; color: #b45309; }
.ops-tile--purchase .ops-tile__icon { background: #ede9fe; color: #6d28d9; }
.ops-tile--usage .ops-tile__icon { background: #e0e7ff; color: #4338ca; }
.ops-tile--audit .ops-tile__icon { background: #e2e8f0; color: #1e293b; }
.ops-tile--board .ops-tile__icon { background: #ccfbf1; color: #0f766e; }
.ops-tile--logs .ops-tile__icon { background: #dcfce7; color: #15803d; }
.ops-tile--users .ops-tile__icon { background: #e0e7ff; color: #4338ca; }
.ops-tile--security .ops-tile__icon { background: #dbeafe; color: #1d4ed8; }
.ops-tile--profile .ops-tile__icon { background: #ccfbf1; color: #0f766e; }
.ops-tile--notify .ops-tile__icon { background: #e2e8f0; color: #475569; }

/* ── Hero invoices (full-width bar, not a square) ──────── */
.ops-tile--hero {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: row;
    align-items: center;
    aspect-ratio: auto;
    min-height: 5.5rem;
    padding: 0.9rem 0.95rem 0.9rem 1.05rem;
    gap: 0.9rem;
    background: linear-gradient(135deg, #002245 0%, #0b3d72 55%, #15497a 100%) !important;
    border-color: transparent;
    box-shadow: 0 14px 28px rgba(0, 34, 69, 0.3);
}

.ops-tile--hero::before {
    display: block;
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--ops-orange);
}

.ops-tile--hero::after {
    width: 8.5rem;
    height: 8.5rem;
    right: -1.6rem;
    bottom: auto;
    top: 50%;
    margin-top: -4.25rem;
    opacity: 0.14;
    background: #fff;
}

.ops-tile--hero .ops-tile__icon {
    grid-column: auto;
    grid-row: auto;
    width: 4.15rem;
    height: 4.15rem;
    flex: 0 0 4.15rem;
    border-radius: 1.05rem;
    font-size: 2rem;
    background: rgba(255, 102, 0, 0.22);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.ops-tile--hero .ops-tile__copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    flex: 1 1 auto;
    min-width: 0;
    grid-column: auto;
    grid-row: auto;
    text-align: left;
}

.ops-tile--hero .ops-tile__label {
    grid-column: auto;
    grid-row: auto;
    align-self: stretch;
    width: 100%;
    padding: 0;
    font-size: 1.22rem;
    color: #fff;
    text-align: left;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.ops-tile--hero .ops-tile__desc {
    grid-column: auto;
    grid-row: auto;
    align-self: stretch;
    width: 100%;
    padding: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.82);
    text-align: left;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.ops-tile--hero .ops-tile__go {
    grid-column: auto;
    grid-row: auto;
    margin-left: auto;
    width: 2.05rem;
    height: 2.05rem;
    font-size: 0.9rem;
    background: var(--ops-orange);
    color: #fff;
}

.ops-tile--hero.is-locked .ops-tile__go,
.ops-tile--hero:disabled .ops-tile__go {
    background: rgba(255, 255, 255, 0.16);
    color: #fecaca;
}

/* ── Tablet ────────────────────────────────────────────── */
.tablet-layout .ops-hub {
    padding: 1.1rem 1.25rem 1.5rem;
    max-width: 720px;
    margin: 0 auto;
}

.tablet-layout .ops-hub__title {
    font-size: 1.85rem;
}

.tablet-layout .ops-hub__grid {
    gap: 0.85rem;
}

.tablet-layout .ops-tile {
    padding: 0;
    border-radius: 1.2rem;
    grid-template-columns: 50px minmax(0, 1fr) 2.15rem;
}

.tablet-layout .ops-tile--hero {
    min-height: 6.4rem;
}

.tablet-layout .ops-tile__icon {
    width: 50px;
    height: 100%;
    font-size: 1.75rem;
}

.tablet-layout .ops-tile__label {
    font-size: 1.25rem;
}

.tablet-layout .ops-tile__desc {
    font-size: 1.0625rem;
}

@media (max-width: 360px) {
    .ops-hub {
        padding: 0.6rem 0.65rem 1.1rem;
    }

    .ops-hub__title {
        font-size: 1.38rem;
    }

    .ops-hub__grid {
        gap: 0.5rem;
    }

    .ops-tile {
        padding: 0;
        border-radius: 1rem;
        grid-template-columns: 50px minmax(0, 1fr) 2.15rem;
        grid-template-rows: auto;
    }

    .ops-tile__icon {
        width: 50px;
        height: 100%;
        font-size: 1.75rem;
        border-radius: 0;
    }

    .ops-tile__label {
        font-size: 1.0625rem;
    }

    .ops-tile__desc {
        font-size: 0.9375rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    .ops-tile--hero {
        min-height: 5.15rem;
        padding: 0.75rem 0.8rem;
        gap: 0.7rem;
    }

    .ops-tile--hero .ops-tile__icon {
        width: 3.4rem;
        height: 3.4rem;
        font-size: 1.6rem;
    }
}

@media (max-height: 740px) {
    .ops-hub__subtitle {
        display: none;
    }
}
