:root {
    --arat-ink: #10233d;
    --arat-muted: #66778f;
    --arat-primary: #0f6bff;
    --arat-accent: #17c9c0;
    --arat-warning: #f0a51f;
    --arat-danger: #d85a69;
    --arat-success: #19b37d;
    --arat-line: rgba(16, 35, 61, 0.08);
    --arat-panel: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 255, 0.88));
    --arat-shadow: 0 24px 64px rgba(16, 35, 61, 0.1);
}

html[data-bs-theme="dark"] {
    --arat-ink: #edf4ff;
    --arat-muted: #9aa9bf;
    --arat-line: rgba(148, 163, 184, 0.14);
    --arat-panel: linear-gradient(145deg, rgba(18, 28, 45, 0.96), rgba(12, 19, 33, 0.9));
    --arat-shadow: 0 28px 72px rgba(0, 0, 0, 0.28);
}

.page-title-head {
    position: relative;
    overflow: hidden;
    margin-bottom: 1.35rem;
    padding: 1.5rem 1.7rem;
    border-radius: 28px;
    border: 1px solid var(--arat-line);
    background: var(--arat-panel);
    box-shadow: var(--arat-shadow);
}

.page-title-head::before,
.page-title-head::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.page-title-head::before {
    top: -60px;
    right: -30px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(15, 107, 255, 0.18), transparent 70%);
}

.page-title-head::after {
    left: -40px;
    bottom: -70px;
    width: 170px;
    height: 170px;
    background: radial-gradient(circle, rgba(23, 201, 192, 0.16), transparent 70%);
}

.page-title-head h4 {
    position: relative;
    z-index: 1;
    margin-bottom: 0.25rem !important;
    color: var(--arat-ink);
    font-size: clamp(1.5rem, 2vw, 2rem);
    letter-spacing: -0.03em;
    text-transform: none !important;
}

.page-title-head .breadcrumb {
    position: relative;
    z-index: 1;
}

.page-title-head .breadcrumb-item,
.page-title-head .breadcrumb-item a {
    color: var(--arat-muted);
}

.page-title-head .breadcrumb-item.active {
    color: var(--arat-primary);
    font-weight: 700;
}

.arat-dashboard-page {
    padding-bottom: 1rem;
}

.arat-dashboard-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(320px, 1fr);
    gap: 1.25rem;
    margin-bottom: 1rem;
    padding: 1.8rem;
    border-radius: 32px;
    background:
        linear-gradient(140deg, rgba(8, 19, 40, 0.98), rgba(16, 55, 109, 0.96)),
        radial-gradient(circle at top right, rgba(23, 201, 192, 0.16), transparent 34%);
    box-shadow: 0 32px 90px rgba(7, 17, 31, 0.22);
    color: #ffffff;
}

.arat-dashboard-hero::before,
.arat-dashboard-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.arat-dashboard-hero::before {
    left: -40px;
    bottom: -110px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(23, 201, 192, 0.2), transparent 70%);
}

.arat-dashboard-hero::after {
    top: -80px;
    right: -50px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(69, 163, 255, 0.24), transparent 70%);
}

.arat-dashboard-hero__copy,
.arat-dashboard-hero__focus,
.arat-dashboard-hero__stats {
    position: relative;
    z-index: 1;
}

.arat-dashboard-hero__eyebrow {
    display: inline-flex;
    margin-bottom: 0.8rem;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.72);
}

.arat-dashboard-hero__title {
    margin: 0;
    font-size: clamp(1rem, 3vw, 2.4rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

.arat-dashboard-hero__lead {
    max-width: 58ch;
    margin: 0.9rem 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.98rem;
}

.arat-dashboard-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.4rem;
}

.arat-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.78rem 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
}

.arat-hero-btn--primary {
    background: #ffffff;
    color: #0f2341;
}

.arat-hero-btn--ghost {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.arat-dashboard-hero__stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.95rem;
    align-content: stretch;
    margin-top: 0.35rem;
}

.arat-dashboard-stat {
    padding: 1rem 1.05rem;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    min-height: 112px;
}

.arat-dashboard-stat span {
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.62);
}

.arat-dashboard-stat strong {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.6rem;
    line-height: 1;
    letter-spacing: -0.04em;
}

.arat-dashboard-stat--accent strong {
    color: #86f2ec;
}

.arat-dashboard-stat--warning strong {
    color: #ffd777;
}

.arat-dashboard-stat--success strong {
    color: #9cf0cf;
}

.arat-dashboard-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.15rem;
    border-radius: 24px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: var(--arat-shadow);
}

html[data-bs-theme="dark"] .arat-dashboard-toolbar {
    background: rgba(18, 28, 45, 0.76);
}

.arat-dashboard-toolbar__copy {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.7rem;
    color: var(--arat-muted);
}

.arat-dashboard-toolbar__copy strong {
    color: var(--arat-ink);
}

.arat-dashboard-toolbar__pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.58rem 0.85rem;
    border-radius: 999px;
    background: rgba(15, 107, 255, 0.1);
    color: var(--arat-primary);
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.arat-dashboard-grid {
    position: relative;
}

.arat-dashboard-grid .grid-stack-item-content {
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent !important;
    overflow: visible !important;
}

.arat-dashboard-grid .grid-stack-item-content > .card {
    height: 100%;
    border: 1px solid var(--arat-line);
    border-radius: 26px;
    background: var(--arat-panel);
    box-shadow: var(--arat-shadow);
    overflow: hidden;
}

.arat-dashboard-grid .card-header {
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--arat-line);
    background: transparent;
}

.arat-dashboard-grid .card-body {
    padding: 1.2rem;
}

.arat-dashboard-grid .card-title,
.arat-dashboard-grid h4,
.arat-dashboard-grid h5 {
    color: var(--arat-ink);
    font-weight: 800;
}

.arat-dashboard-grid .text-muted,
.arat-dashboard-grid small {
    color: var(--arat-muted) !important;
}

.arat-dashboard-grid .grid-stack-item[gs-id="sales"] .card,
.arat-dashboard-grid .grid-stack-item[gs-id="ordersKpi"] .card,
.arat-dashboard-grid .grid-stack-item[gs-id="customers"] .card,
.arat-dashboard-grid .grid-stack-item[gs-id="revenue"] .card {
    border: 0;
    background: linear-gradient(145deg, rgba(8, 22, 45, 0.98), rgba(12, 64, 126, 0.94));
    box-shadow: 0 26px 60px rgba(7, 17, 31, 0.18);
}

.arat-dashboard-grid .grid-stack-item[gs-id="sales"] .card-title,
.arat-dashboard-grid .grid-stack-item[gs-id="ordersKpi"] .card-title,
.arat-dashboard-grid .grid-stack-item[gs-id="customers"] .card-title,
.arat-dashboard-grid .grid-stack-item[gs-id="revenue"] .card-title,
.arat-dashboard-grid .grid-stack-item[gs-id="sales"] .card-body,
.arat-dashboard-grid .grid-stack-item[gs-id="ordersKpi"] .card-body,
.arat-dashboard-grid .grid-stack-item[gs-id="customers"] .card-body,
.arat-dashboard-grid .grid-stack-item[gs-id="revenue"] .card-body,
.arat-dashboard-grid .grid-stack-item[gs-id="sales"] .text-muted,
.arat-dashboard-grid .grid-stack-item[gs-id="ordersKpi"] .text-muted,
.arat-dashboard-grid .grid-stack-item[gs-id="customers"] .text-muted,
.arat-dashboard-grid .grid-stack-item[gs-id="revenue"] .text-muted {
    color: #ffffff !important;
}

.arat-dashboard-grid .grid-stack-item[gs-id="sales"] .badge,
.arat-dashboard-grid .grid-stack-item[gs-id="ordersKpi"] .badge,
.arat-dashboard-grid .grid-stack-item[gs-id="customers"] .badge,
.arat-dashboard-grid .grid-stack-item[gs-id="revenue"] .badge {
    background: rgba(255, 255, 255, 0.12) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.arat-dashboard-grid [data-widget="tickets"] .timeline-item {
    padding: 0.95rem 0;
    border-bottom: 1px solid var(--arat-line);
}

.arat-dashboard-grid [data-widget="tickets"] .timeline-item:last-child {
    border-bottom: 0;
}

.arat-dashboard-grid [data-widget="ordersStats"] .nav-tabs .nav-link {
    border-radius: 999px;
    border: 1px solid var(--arat-line);
    margin: 0 0.2rem;
}

.arat-dashboard-grid [data-widget="ordersStats"] .nav-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--arat-primary), var(--arat-accent));
    color: #ffffff;
    border-color: transparent;
}

.arat-dashboard-grid .card-action-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(15, 107, 255, 0.08);
    color: var(--arat-primary);
}

.arat-dashboard-canvas .offcanvas-header,
.arat-dashboard-canvas .offcanvas-body {
    background: var(--arat-panel);
}

.arat-dashboard-canvas .offcanvas-title {
    color: var(--arat-ink);
    font-weight: 800;
}

.arat-dashboard-canvas .drop-hint,
.arat-dashboard-canvas .palette-item .grid-stack-item-content,
.arat-dashboard-canvas .offcanvas-body > .d-flex.align-items-center.justify-content-between {
    border-color: var(--arat-line) !important;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 18px !important;
}

html[data-bs-theme="dark"] .arat-dashboard-canvas .drop-hint,
html[data-bs-theme="dark"] .arat-dashboard-canvas .palette-item .grid-stack-item-content,
html[data-bs-theme="dark"] .arat-dashboard-canvas .offcanvas-body > .d-flex.align-items-center.justify-content-between {
    background: rgba(17, 31, 55, 0.72);
}

.arat-dashboard-fab .fab,
.arat-dashboard-fab .sub-button {
    box-shadow: 0 18px 44px rgba(7, 17, 31, 0.22) !important;
}

.arat-dashboard-fab .sub-button {
    background: linear-gradient(135deg, var(--arat-primary), #42a7ff);
}

.edit-badge {
    border-radius: 999px;
    background: linear-gradient(135deg, var(--arat-primary), var(--arat-accent));
    box-shadow: 0 16px 36px rgba(15, 107, 255, 0.24);
}

body.edit-mode .arat-dashboard-grid .grid-stack-item-content > .card {
    outline: 2px dashed rgba(15, 107, 255, 0.32);
    outline-offset: 4px;
}

@media (max-width: 1199.98px) {
    .arat-dashboard-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .page-title-head,
    .arat-dashboard-hero,
    .arat-dashboard-toolbar {
        border-radius: 24px;
    }

    .arat-dashboard-hero {
        padding: 1.4rem;
    }

    .arat-dashboard-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .arat-dashboard-hero__actions {
        width: 100%;
    }

    .arat-hero-btn {
        width: 100%;
        justify-content: center;
    }
}

:root {
    --arat-body-atmosphere:
        radial-gradient(circle at 16% 18%, rgba(15, 107, 255, 0.18), transparent 34%),
        radial-gradient(circle at 84% 10%, rgba(23, 201, 192, 0.14), transparent 30%),
        linear-gradient(180deg, #f5f8fc 0%, #edf3fb 100%);
    --arat-body-atmosphere-dark:
        radial-gradient(circle at 16% 18%, rgba(15, 107, 255, 0.28), transparent 34%),
        radial-gradient(circle at 84% 10%, rgba(23, 201, 192, 0.18), transparent 30%),
        linear-gradient(180deg, #0d1526 0%, #101a2d 100%);
    --arat-hero-gradient:
        linear-gradient(140deg, rgba(8, 19, 40, 0.98), rgba(16, 55, 109, 0.96)),
        radial-gradient(circle at top right, rgba(23, 201, 192, 0.16), transparent 34%);
}

html[data-skin="default"] {
    --arat-body-atmosphere:
        radial-gradient(circle at 14% 16%, rgba(26, 179, 148, 0.16), transparent 34%),
        radial-gradient(circle at 84% 10%, rgba(28, 132, 198, 0.14), transparent 30%),
        linear-gradient(180deg, #f4f8fb 0%, #edf3f8 100%);
    --arat-body-atmosphere-dark:
        radial-gradient(circle at 14% 16%, rgba(26, 179, 148, 0.24), transparent 34%),
        radial-gradient(circle at 84% 10%, rgba(28, 132, 198, 0.18), transparent 30%),
        linear-gradient(180deg, #101720 0%, #16212f 100%);
    --arat-hero-gradient:
        linear-gradient(140deg, rgba(10, 21, 39, 0.98), rgba(18, 74, 73, 0.96)),
        radial-gradient(circle at top right, rgba(26, 179, 148, 0.24), transparent 34%);
}

html[data-skin="classic"] {
    --arat-body-atmosphere:
        radial-gradient(circle at 18% 16%, rgba(28, 132, 198, 0.16), transparent 34%),
        radial-gradient(circle at 84% 12%, rgba(26, 179, 148, 0.12), transparent 30%),
        linear-gradient(180deg, #f7fafc 0%, #edf2f7 100%);
    --arat-body-atmosphere-dark:
        radial-gradient(circle at 18% 16%, rgba(28, 132, 198, 0.24), transparent 34%),
        radial-gradient(circle at 84% 12%, rgba(26, 179, 148, 0.16), transparent 30%),
        linear-gradient(180deg, #121823 0%, #18202c 100%);
    --arat-hero-gradient:
        linear-gradient(140deg, rgba(16, 29, 51, 0.98), rgba(29, 63, 111, 0.96)),
        radial-gradient(circle at top right, rgba(28, 132, 198, 0.22), transparent 34%);
}

html[data-skin="modern"] {
    --arat-body-atmosphere:
        radial-gradient(circle at 16% 18%, rgba(94, 108, 193, 0.2), transparent 34%),
        radial-gradient(circle at 84% 10%, rgba(28, 141, 227, 0.16), transparent 30%),
        linear-gradient(180deg, #f5f6fb 0%, #edf2ff 100%);
    --arat-body-atmosphere-dark:
        radial-gradient(circle at 16% 18%, rgba(94, 108, 193, 0.28), transparent 34%),
        radial-gradient(circle at 84% 10%, rgba(53, 185, 225, 0.18), transparent 30%),
        linear-gradient(180deg, #101522 0%, #171f31 100%);
    --arat-hero-gradient:
        linear-gradient(140deg, rgba(17, 24, 43, 0.98), rgba(44, 62, 133, 0.96)),
        radial-gradient(circle at top right, rgba(53, 185, 225, 0.2), transparent 34%);
}

html[data-skin="galaxy"] {
    --arat-body-atmosphere:
        linear-gradient(180deg, rgba(245, 244, 255, 0.72) 0%, rgba(237, 241, 255, 0.82) 100%),
        radial-gradient(circle at 18% 18%, rgba(101, 117, 245, 0.22), transparent 34%),
        radial-gradient(circle at 82% 14%, rgba(242, 85, 131, 0.16), transparent 28%),
        url("/images/galaxy.jpg") center/cover no-repeat;
    --arat-body-atmosphere-dark:
        linear-gradient(180deg, rgba(10, 13, 30, 0.76) 0%, rgba(10, 13, 30, 0.84) 100%),
        radial-gradient(circle at 18% 18%, rgba(101, 117, 245, 0.28), transparent 34%),
        radial-gradient(circle at 82% 14%, rgba(242, 85, 131, 0.18), transparent 28%),
        url("/images/galaxy.jpg") center/cover no-repeat;
    --arat-hero-gradient:
        linear-gradient(140deg, rgba(26, 22, 60, 0.96), rgba(64, 33, 119, 0.94)),
        radial-gradient(circle at top right, rgba(71, 198, 242, 0.22), transparent 34%);
}

html[data-skin="luxe"] {
    --arat-body-atmosphere:
        radial-gradient(circle at 18% 16%, rgba(127, 82, 223, 0.18), transparent 34%),
        radial-gradient(circle at 84% 12%, rgba(28, 147, 144, 0.14), transparent 30%),
        linear-gradient(180deg, #f4f2f8 0%, #eceaf4 100%);
    --arat-body-atmosphere-dark:
        radial-gradient(circle at 18% 16%, rgba(127, 82, 223, 0.28), transparent 34%),
        radial-gradient(circle at 84% 12%, rgba(28, 147, 144, 0.18), transparent 30%),
        linear-gradient(180deg, #17141f 0%, #221b2f 100%);
    --arat-hero-gradient:
        linear-gradient(140deg, rgba(26, 20, 36, 0.98), rgba(73, 37, 111, 0.94)),
        radial-gradient(circle at top right, rgba(28, 147, 144, 0.2), transparent 34%);
}

html[data-skin="retro"] {
    --arat-body-atmosphere:
        radial-gradient(circle at 16% 18%, rgba(37, 99, 235, 0.16), transparent 34%),
        radial-gradient(circle at 84% 12%, rgba(233, 202, 75, 0.16), transparent 30%),
        linear-gradient(180deg, #f7f6f1 0%, #eef1f7 100%);
    --arat-body-atmosphere-dark:
        radial-gradient(circle at 16% 18%, rgba(37, 99, 235, 0.28), transparent 34%),
        radial-gradient(circle at 84% 12%, rgba(233, 202, 75, 0.18), transparent 30%),
        linear-gradient(180deg, #121722 0%, #1a2230 100%);
    --arat-hero-gradient:
        linear-gradient(140deg, rgba(19, 28, 42, 0.98), rgba(39, 67, 122, 0.95)),
        radial-gradient(circle at top right, rgba(233, 202, 75, 0.2), transparent 34%);
}

html[data-skin="neon"] {
    --arat-body-atmosphere:
        radial-gradient(circle at 16% 18%, rgba(95, 196, 190, 0.18), transparent 34%),
        radial-gradient(circle at 84% 12%, rgba(63, 80, 152, 0.18), transparent 30%),
        linear-gradient(180deg, #eef8fb 0%, #e6eef9 100%);
    --arat-body-atmosphere-dark:
        radial-gradient(circle at 16% 18%, rgba(95, 196, 190, 0.24), transparent 34%),
        radial-gradient(circle at 84% 12%, rgba(63, 80, 152, 0.24), transparent 30%),
        linear-gradient(180deg, #0f1624 0%, #182338 100%);
    --arat-hero-gradient:
        linear-gradient(140deg, rgba(17, 27, 44, 0.98), rgba(28, 53, 86, 0.95)),
        radial-gradient(circle at top right, rgba(95, 196, 190, 0.22), transparent 34%);
}

html[data-skin="pixel"] {
    --arat-body-atmosphere:
        radial-gradient(circle at 18% 16%, rgba(142, 127, 224, 0.18), transparent 34%),
        radial-gradient(circle at 84% 10%, rgba(87, 105, 195, 0.18), transparent 30%),
        linear-gradient(180deg, #f4f3ff 0%, #edf1ff 100%);
    --arat-body-atmosphere-dark:
        radial-gradient(circle at 18% 16%, rgba(142, 127, 224, 0.28), transparent 34%),
        radial-gradient(circle at 84% 10%, rgba(87, 105, 195, 0.24), transparent 30%),
        linear-gradient(180deg, #121629 0%, #1d2342 100%);
    --arat-hero-gradient:
        linear-gradient(140deg, rgba(22, 26, 55, 0.98), rgba(66, 75, 145, 0.94)),
        radial-gradient(circle at top right, rgba(142, 127, 224, 0.22), transparent 34%);
}

body.arat-admin-shell {
    background: var(--arat-body-atmosphere);
    background-attachment: fixed;
}

html[data-bs-theme="dark"] body.arat-admin-shell {
    background: var(--arat-body-atmosphere-dark);
    background-attachment: fixed;
}

body.arat-admin-shell .content-page,
body.arat-admin-shell .wrapper {
    background: transparent;
}

html.monochrome::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    backdrop-filter: grayscale(100%) opacity(.94);
    z-index: 999999;
}

.app-topbar {
    background: var(--bs-topbar-bg) !important;
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    z-index: 1050 !important;
}

.app-topbar .topbar-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    min-height: 74px;
    border-bottom: 0;
}

.app-topbar .topbar-item .topbar-link,
.topnav-toggle-button {
    border-radius: 14px;
    padding: 11px 12px;
}

.app-topbar .topbar-item .topbar-link:hover,
.topnav-toggle-button:hover {
    background: rgba(15, 107, 255, 0.08);
}

.app-topbar .topbar-item .topbar-link.is-active {
    background: rgba(15, 107, 255, 0.14);
    color: var(--arat-primary);
    box-shadow: inset 0 0 0 1px rgba(15, 107, 255, 0.12);
}

.topbar-presence {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 0;
}

.topbar-workspace,
.topbar-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 11px 16px !important;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.78);
    color: var(--arat-ink) !important;
}

.topbar-workspace__dot,
.topbar-status-pill__dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--arat-accent);
    box-shadow: 0 0 0 6px rgba(23, 201, 192, 0.14);
}

.topbar-workspace > div {
    min-width: 0;
}

.topbar-workspace strong,
.topbar-status-pill {
    font-weight: 800;
}

.topbar-workspace strong,
.topbar-workspace small,
.topbar-status-pill {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-workspace small {
    display: block;
    font-size: 0.72rem;
    color: var(--arat-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.topbar-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.topbar-icon-wrap .topbar-badge {
    position: absolute !important;
    top: -5px;
    right: -7px;
    min-width: 16px;
    height: 16px;
    font-size: 0.65rem;
    padding: 0 3px;
    line-height: 16px;
    border-radius: 8px;
    border: 2px solid var(--bs-body-bg, #fff);
}

#search-results,
.dropdown-menu,
.modal-content,
#theme-settings-offcanvas {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--arat-shadow);
    backdrop-filter: blur(20px);
}

#theme-settings-offcanvas.offcanvas,
#theme-settings-offcanvas.modal-content {
    z-index: 1062;
}

.offcanvas-backdrop.show {
    z-index: 1061;
}

html[data-bs-theme="dark"] #search-results,
html[data-bs-theme="dark"] .dropdown-menu,
html[data-bs-theme="dark"] .modal-content,
html[data-bs-theme="dark"] #theme-settings-offcanvas,
html[data-bs-theme="dark"] .topbar-workspace,
html[data-bs-theme="dark"] .topbar-status-pill {
    background: rgba(12, 21, 39, 0.94);
    border-color: rgba(255, 255, 255, 0.1);
    color: #fff !important;
}

html[data-bs-theme="dark"] .topbar-workspace small {
    color: var(--arat-muted);
}

.arat-cfg-chip {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 2px solid rgba(15, 23, 42, 0.1);
    background: var(--arat-panel);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    min-width: 60px;
    user-select: none;
    color: var(--arat-ink);
    font-size: 0.78rem;
}

.arat-cfg-chip:hover {
    border-color: var(--arat-primary);
    background: rgba(15, 107, 255, 0.08);
}

.arat-cfg-chip:has(input:checked) {
    border-color: var(--arat-primary);
    background: rgba(15, 107, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(15, 107, 255, 0.14);
    color: var(--arat-primary);
    font-weight: 600;
}

.arat-cfg-skin-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid rgba(15, 23, 42, 0.12);
    display: block;
}

.arat-cfg-skin-modern  { background: linear-gradient(135deg, #0f6bff 50%, #17c9c0 100%); }
.arat-cfg-skin-classic { background: linear-gradient(135deg, #1a3c6e 50%, #3b6eb5 100%); }
.arat-cfg-skin-galaxy  { background: linear-gradient(135deg, #5e22f0 50%, #b340e8 100%); }
.arat-cfg-skin-default { background: linear-gradient(135deg, #23303c 50%, #1ab394 100%); }
.arat-cfg-skin-luxe    { background: linear-gradient(135deg, #2e2e40 50%, #7f52df 100%); }
.arat-cfg-skin-retro   { background: linear-gradient(135deg, #101c2a 50%, #2563eb 100%); }
.arat-cfg-skin-neon    { background: linear-gradient(135deg, #1b2e4a 50%, #5fc4be 100%); }
.arat-cfg-skin-pixel   { background: linear-gradient(135deg, #8e7fe0 50%, #5769c3 100%); }

.arat-cfg-color-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: block;
}

.arat-cfg-topbar-light    { background: #ffffff; border: 1px solid #dde3ec; }
.arat-cfg-topbar-gray     { background: #edf1f6; border: 1px solid #dde3ec; }
.arat-cfg-topbar-dark     { background: #252630; }
.arat-cfg-topbar-gradient { background: linear-gradient(160deg, #1a455f, #262549); }

.arat-cfg-menu-dark     { background: #0c1933; }
.arat-cfg-menu-light    { background: #f4f8fb; border: 1px solid #dde3ec; }
.arat-cfg-menu-gray     { background: #e8edf4; border: 1px solid #dde3ec; }
.arat-cfg-menu-gradient { background: linear-gradient(160deg, #0f6bff, #17c9c0); }

html[data-bs-theme="dark"] .arat-cfg-chip {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(17, 31, 55, 0.72);
    color: rgba(224, 233, 247, 0.85);
}

html[data-bs-theme="dark"] .arat-cfg-chip:has(input:checked) {
    border-color: var(--arat-primary);
    background: rgba(15, 107, 255, 0.2);
    color: #7aadff;
}

#light-dark-mode .mode-light-system {
    display: none;
}

html[data-theme-mode="system"] #light-dark-mode .mode-light-moon,
html[data-theme-mode="system"] #light-dark-mode .mode-light-sun {
    display: none !important;
}

html[data-theme-mode="system"] #light-dark-mode .mode-light-system {
    display: block !important;
}

#monochrome-mode.is-active {
    background: rgba(15, 107, 255, 0.14);
    color: var(--arat-primary);
    box-shadow: inset 0 0 0 1px rgba(15, 107, 255, 0.12);
}

.arat-dashboard-hero {
    background: var(--arat-hero-gradient);
}

.arat-dashboard-hero__headline {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.arat-live-clock {
    font-size: clamp(2.6rem, 5vw, 4rem);
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.04em;
    line-height: 1;
    margin: 10px 0;
}

.arat-ops-date {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: capitalize;
}

.arat-ops-hello {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.82);
}

.arat-api-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.82);
    width: fit-content;
}

.arat-api-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--arat-accent);
    box-shadow: 0 0 0 5px rgba(23, 201, 192, 0.24);
    flex-shrink: 0;
}

.arat-dashboard-hero__focus {
    position: relative;
    z-index: 1;
    align-self: stretch;
}

.arat-dashboard-focus-card {
    height: 100%;
    padding: 1.2rem;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.04)),
        radial-gradient(circle at top right, rgba(23, 201, 192, 0.18), transparent 36%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
}

.arat-dashboard-focus-card__eyebrow {
    display: inline-flex;
    margin-bottom: 0.65rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.68);
}

.arat-dashboard-focus-card h3 {
    margin-bottom: 1rem;
    color: #ffffff;
    font-size: 1.1rem;
}

.arat-dashboard-focus-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.arat-dashboard-focus-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 0.95rem;
    border-radius: 18px;
    background: rgba(7, 18, 36, 0.26);
}

.arat-dashboard-focus-item__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 1rem;
    flex-shrink: 0;
}

.arat-dashboard-focus-item__copy {
    min-width: 0;
    flex: 1;
}

.arat-dashboard-focus-item__copy strong {
    display: block;
    color: #ffffff;
}

.arat-dashboard-focus-item__copy span {
    display: block;
    margin-top: 0.1rem;
    color: rgba(255, 255, 255, 0.62);
    font-size: 0.84rem;
}

.arat-dashboard-focus-item em {
    font-style: normal;
    font-size: 1.25rem;
    color: #ffffff;
}

.arat-dashboard-focus-card__note {
    margin-top: 0.95rem;
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.82rem;
}

html[data-bs-theme="dark"] .arat-dashboard-grid .grid-stack-item-content > .card {
    background: rgba(11, 24, 44, 0.82);
    border-color: rgba(255, 255, 255, 0.08);
}

html[data-bs-theme="dark"] .arat-dashboard-grid .card-action-item {
    background: rgba(15, 107, 255, 0.16);
    color: #8dc0ff;
}

@media (max-width: 1199.98px) {
    .topbar-presence {
        width: 100%;
    }

    .arat-dashboard-hero {
        grid-template-columns: 1fr;
    }

    .arat-dashboard-hero__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .topbar-workspace,
    .topbar-status-pill {
        width: 100%;
        justify-content: flex-start;
    }

    .arat-dashboard-hero__headline {
        flex-direction: column;
    }

    .arat-dashboard-hero__stats {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   GLOBAL SHELL
========================================== */

body.arat-admin-shell .content-page {
    background: transparent;
}

body.arat-admin-shell .content-page .card {
    border-radius: 24px;
    border: 1px solid var(--arat-line);
    background: var(--arat-panel);
    box-shadow: var(--arat-shadow);
    overflow: hidden;
}

body.arat-admin-shell .content-page .card-header {
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--arat-line);
    background: transparent;
}

body.arat-admin-shell .content-page .card-footer {
    border-top: 1px solid var(--arat-line);
    background: transparent;
}

body.arat-admin-shell .content-page .card-title,
body.arat-admin-shell .content-page .card-header h4,
body.arat-admin-shell .content-page .card-header h5 {
    color: var(--arat-ink);
    font-weight: 800;
}

body.arat-admin-shell .content-page .table > :not(caption) > * > * {
    border-bottom-color: var(--arat-line);
}

body.arat-admin-shell .content-page .table thead th {
    background: rgba(15, 107, 255, 0.05);
    color: var(--arat-muted);
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-size: 0.72rem;
}

html[data-bs-theme="dark"] body.arat-admin-shell .content-page .table thead th {
    background: rgba(255, 255, 255, 0.04);
}

body.arat-admin-shell .content-page .table-hover tbody tr:hover > * {
    background: rgba(15, 107, 255, 0.04);
}

body.arat-admin-shell .content-page .form-control,
body.arat-admin-shell .content-page .form-select {
    border-radius: 14px;
    border-color: var(--arat-line);
    background: rgba(255, 255, 255, 0.78);
}

html[data-bs-theme="dark"] body.arat-admin-shell .content-page .form-control,
html[data-bs-theme="dark"] body.arat-admin-shell .content-page .form-select {
    background: rgba(17, 31, 55, 0.8);
    color: var(--arat-ink);
}

body.arat-admin-shell .content-page .btn-light,
body.arat-admin-shell .content-page .btn-secondary {
    border-color: var(--arat-line);
    background: rgba(255, 255, 255, 0.78);
    color: var(--arat-ink);
}

html[data-bs-theme="dark"] body.arat-admin-shell .content-page .btn-light,
html[data-bs-theme="dark"] body.arat-admin-shell .content-page .btn-secondary {
    background: rgba(17, 31, 55, 0.82);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--arat-ink);
}

/* ==========================================
   DASHBOARD WIDGETS
========================================== */

.arat-dashboard-grid .arat-kpi-card {
    background: var(--arat-hero-gradient);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.arat-dashboard-grid .arat-kpi-card .card-header {
    align-items: center;
    gap: 0.85rem;
    background: transparent;
    border-bottom-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.arat-dashboard-grid .arat-kpi-card .card-body {
    background: transparent;
}

.arat-kpi-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.arat-dashboard-grid .arat-kpi-card .badge {
    border-radius: 999px;
    padding: 0.42rem 0.72rem;
}

.arat-kpi-card__metric {
    gap: 1rem;
}

.arat-kpi-card__copy h3 {
    font-size: clamp(1.55rem, 2vw, 2rem);
    font-weight: 800 !important;
    letter-spacing: -0.04em;
    color: #ffffff;
}

.arat-kpi-card__copy p {
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.72) !important;
}

.arat-dashboard-grid .grid-stack-item[gs-id="sales"] .donut-chart,
.arat-dashboard-grid .grid-stack-item[gs-id="ordersKpi"] .donut-chart,
.arat-dashboard-grid .grid-stack-item[gs-id="customers"] .donut-chart,
.arat-dashboard-grid .grid-stack-item[gs-id="revenue"] .donut-chart {
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.08);
    padding: 0.35rem;
}

.arat-widget-summary .panel_s {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.arat-widget-summary .card-body {
    padding: 1.25rem;
}

.arat-widget-summary__group {
    margin: 0;
    padding: 1rem 1rem 0.2rem;
    border-radius: 22px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.66);
    height: 100%;
}

html[data-bs-theme="dark"] .arat-widget-summary__group {
    background: rgba(17, 31, 55, 0.7);
}

.arat-widget-summary .text-neutral-700,
.arat-widget-summary .text-neutral-600,
.arat-widget-summary .fw-medium {
    color: var(--arat-ink) !important;
}

.arat-widget-summary ._total {
    font-size: 1.12rem;
}

.arat-widget-summary .progress {
    height: 10px;
    border-radius: 999px;
    overflow: hidden;
    background: rgba(15, 23, 42, 0.08);
}

html[data-bs-theme="dark"] .arat-widget-summary .progress {
    background: rgba(255, 255, 255, 0.08);
}

.arat-widget-summary .progress-bar {
    border-radius: 999px;
    animation: none;
}

.arat-widget-summary__total {
    border-radius: 20px !important;
    border-color: var(--arat-line) !important;
    background: rgba(255, 255, 255, 0.72) !important;
}

html[data-bs-theme="dark"] .arat-widget-summary__total {
    background: rgba(17, 31, 55, 0.78) !important;
}

.arat-widget-summary__total dt {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.arat-widget-summary__total dd {
    margin-bottom: 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.arat-widget-orders-stats .card-body > .row {
    min-height: 100%;
}

.arat-widget-orders-stats .nav-tabs {
    gap: 0.35rem;
    border-bottom: 0;
}

.arat-widget-orders-stats .nav-tabs .nav-link {
    font-weight: 700;
}

.arat-widget-orders-stats .card-body [x-ref="chart"] {
    padding: 0.85rem;
}

.arat-orders-stats__aside {
    background: rgba(255, 255, 255, 0.62) !important;
}

html[data-bs-theme="dark"] .arat-orders-stats__aside {
    background: rgba(17, 31, 55, 0.72) !important;
}

.arat-orders-mini-card {
    border-radius: 20px !important;
    border: 1px solid var(--arat-line) !important;
    background: rgba(255, 255, 255, 0.72);
}

html[data-bs-theme="dark"] .arat-orders-mini-card {
    background: rgba(17, 31, 55, 0.72);
}

.arat-orders-mini-card__delta {
    font-size: 0.82rem;
    font-weight: 700;
}

.arat-orders-mini-card__label {
    font-size: 0.8rem;
    font-weight: 600;
}

.arat-orders-mini-card .progress {
    height: 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
}

.arat-orders-mini-card .progress-bar {
    border-radius: 999px;
    background: linear-gradient(135deg, var(--arat-primary), var(--arat-accent));
}

.arat-widget-tickets .card-body {
    padding: 1rem;
}

.arat-widget-tickets__timeline {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.arat-widget-tickets__item {
    padding: 1rem;
    border-radius: 22px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.68);
}

html[data-bs-theme="dark"] .arat-widget-tickets__item {
    background: rgba(17, 31, 55, 0.72);
}

.arat-widget-tickets .timeline-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    min-width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(15, 107, 255, 0.08);
}

.arat-widget-tickets .timeline-content {
    min-width: 0;
}

.arat-widget-tickets .timeline-content hr {
    display: none;
}

.arat-widget-table .card-header,
.arat-widget-calendar .card-header {
    gap: 0.85rem;
}

.arat-widget-table .btn,
.arat-widget-calendar .btn {
    border-radius: 12px;
}

.arat-widget-table .table tbody td {
    vertical-align: middle;
}

.arat-widget-table .avatar-sm,
.arat-widget-table .avatar-md,
.arat-widget-table img.rounded,
.arat-widget-table img.rounded-circle {
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: rgba(255, 255, 255, 0.74);
}

html[data-bs-theme="dark"] .arat-widget-table .avatar-sm,
html[data-bs-theme="dark"] .arat-widget-table .avatar-md,
html[data-bs-theme="dark"] .arat-widget-table img.rounded,
html[data-bs-theme="dark"] .arat-widget-table img.rounded-circle {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(17, 31, 55, 0.78);
}

.arat-widget-table .card-drop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(15, 107, 255, 0.08);
}

.arat-widget-table .badge,
.arat-widget-tickets .badge {
    border-radius: 999px;
}

.arat-widget-calendar .card-body {
    padding: 0.65rem;
}

.arat-widget-calendar .btn-group .btn {
    border-radius: 12px !important;
}

.arat-dashboard-grid [data-widget="calendar"] .fc {
    padding: 0.35rem;
}

.arat-dashboard-grid [data-widget="calendar"] .fc-toolbar-title {
    font-size: 1rem;
    font-weight: 800;
    color: var(--arat-ink);
}

.arat-dashboard-grid [data-widget="calendar"] .fc-daygrid-day-frame,
.arat-dashboard-grid [data-widget="calendar"] .fc-list-day-cushion {
    border-radius: 12px;
}

.arat-dashboard-grid [data-widget="calendar"] .fc-col-header-cell-cushion,
.arat-dashboard-grid [data-widget="calendar"] .fc-daygrid-day-number,
.arat-dashboard-grid [data-widget="calendar"] .fc-list-day-text,
.arat-dashboard-grid [data-widget="calendar"] .fc-list-day-side-text {
    color: var(--arat-ink);
    text-decoration: none;
}

.arat-dashboard-grid [data-widget="calendar"] .fc-theme-standard td,
.arat-dashboard-grid [data-widget="calendar"] .fc-theme-standard th {
    border-color: var(--arat-line);
}

.arat-dashboard-grid [data-widget="map"] #map_es {
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.62);
}

html[data-bs-theme="dark"] .arat-dashboard-grid [data-widget="map"] #map_es {
    background: rgba(17, 31, 55, 0.72);
}

.arat-widget-accounting__row {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.68);
}

html[data-bs-theme="dark"] .arat-widget-accounting__row {
    background: rgba(17, 31, 55, 0.72);
}

.arat-widget-treasury .card-body > .mb-3,
.arat-widget-treasury .card-body > div:last-child {
    padding: 1rem;
    border-radius: 18px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.68);
}

html[data-bs-theme="dark"] .arat-widget-treasury .card-body > .mb-3,
html[data-bs-theme="dark"] .arat-widget-treasury .card-body > div:last-child {
    background: rgba(17, 31, 55, 0.72);
}

.arat-widget-treasury hr {
    border-color: var(--arat-line);
}

.arat-note-card {
    --arat-note-bg: #fff7b3;
    --arat-note-border: #d9c44f;
    --arat-note-ink: #3f3600;
    border-radius: 22px;
    border: 1px solid var(--arat-note-border);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)), var(--arat-note-bg);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
    color: var(--arat-note-ink);
}

.arat-note-card strong,
.arat-note-card .notes-status,
.arat-note-card small,
.arat-note-card .text-muted {
    color: var(--arat-note-ink) !important;
}

.arat-note-card .notes-status {
    background: rgba(255, 255, 255, 0.46) !important;
}

.arat-note-card__textarea {
    background: rgba(255, 255, 255, 0.18) !important;
    border: 1px dashed rgba(0, 0, 0, 0.16) !important;
    color: var(--arat-note-ink) !important;
    box-shadow: none !important;
}

.arat-note-card__textarea::placeholder {
    color: rgba(0, 0, 0, 0.48);
}

.arat-note-card--yellow {
    --arat-note-bg: #fff4a9;
    --arat-note-border: #dbc86b;
    --arat-note-ink: #473b00;
}

.arat-note-card--blue {
    --arat-note-bg: #d8ecff;
    --arat-note-border: #8dbef1;
    --arat-note-ink: #133a65;
}

.arat-note-card--green {
    --arat-note-bg: #def8c8;
    --arat-note-border: #93cf73;
    --arat-note-ink: #1d4f28;
}

.arat-note-card--pink {
    --arat-note-bg: #ffdcec;
    --arat-note-border: #f2a1c5;
    --arat-note-ink: #67243f;
}

.arat-note-card--lavender {
    --arat-note-bg: #ece5ff;
    --arat-note-border: #baa8ff;
    --arat-note-ink: #40306f;
}

.arat-note-card--gray {
    --arat-note-bg: #eef1f5;
    --arat-note-border: #c8d0da;
    --arat-note-ink: #2e3b4e;
}

html[data-bs-theme="dark"] .arat-note-card {
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
}

html[data-bs-theme="dark"] .arat-note-card--yellow {
    --arat-note-bg: #6a5d1c;
    --arat-note-border: #a18f32;
    --arat-note-ink: #fff4b2;
}

html[data-bs-theme="dark"] .arat-note-card--blue {
    --arat-note-bg: #1d3f60;
    --arat-note-border: #4378ab;
    --arat-note-ink: #d8eeff;
}

html[data-bs-theme="dark"] .arat-note-card--green {
    --arat-note-bg: #22492d;
    --arat-note-border: #4f9760;
    --arat-note-ink: #dbffe4;
}

html[data-bs-theme="dark"] .arat-note-card--pink {
    --arat-note-bg: #5a2741;
    --arat-note-border: #a2567a;
    --arat-note-ink: #ffd7e8;
}

html[data-bs-theme="dark"] .arat-note-card--lavender {
    --arat-note-bg: #3f3467;
    --arat-note-border: #7d69c8;
    --arat-note-ink: #ede6ff;
}

html[data-bs-theme="dark"] .arat-note-card--gray {
    --arat-note-bg: #2c3541;
    --arat-note-border: #5f6f82;
    --arat-note-ink: #edf4ff;
}

html[data-bs-theme="dark"] .arat-note-card__textarea {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}

.arat-admin-page {
    position: relative;
    padding-bottom: 1.25rem;
}

.arat-page-title-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.arat-page-title-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.65rem;
}

.arat-page-title-stat {
    min-width: 118px;
    padding: 0.72rem 0.95rem;
    border-radius: 18px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
    text-align: left;
}

html[data-bs-theme="dark"] .arat-page-title-stat {
    background: rgba(17, 31, 55, 0.78);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.arat-page-title-stat span {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--arat-muted);
}

.arat-page-title-stat strong {
    display: block;
    margin-top: 0.2rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--arat-ink);
}

.arat-page-title-stat--primary {
    border-color: rgba(15, 107, 255, 0.18);
}

.arat-page-title-stat--primary strong {
    color: #0f6bff;
}

.arat-page-title-stat--success {
    border-color: rgba(21, 165, 93, 0.18);
}

.arat-page-title-stat--success strong {
    color: #15a55d;
}

.arat-page-title-stat--warning {
    border-color: rgba(242, 153, 16, 0.18);
}

.arat-page-title-stat--warning strong {
    color: #d4860e;
}

.arat-page-title-stat--info strong {
    color: #1b8ad8;
}

.arat-shell-intro {
    position: relative;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at top right, rgba(108, 164, 255, 0.24), transparent 34%),
        radial-gradient(circle at bottom left, rgba(80, 206, 194, 0.18), transparent 30%),
        linear-gradient(135deg, #102846 0%, #173967 46%, #11233d 100%);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.24);
    color: #f1f7ff;
}

.arat-shell-intro::before,
.arat-shell-intro::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0.45;
}

.arat-shell-intro::before {
    inset: auto auto -32px -18px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(89, 198, 255, 0.35), transparent 70%);
}

.arat-shell-intro::after {
    inset: -54px -36px auto auto;
    width: 210px;
    height: 210px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 65%);
}

.arat-shell-intro .row,
.arat-shell-intro .d-flex,
.arat-shell-intro .arat-shell-intro__metrics {
    position: relative;
    z-index: 1;
}

.arat-shell-intro__body {
    padding: 1.65rem 1.75rem;
}

/* Versión compacta: solo eyebrow, menos padding */
.arat-shell-intro--compact .arat-shell-intro__body {
    padding: 0.85rem 1.4rem;
}
.arat-shell-intro--compact::before,
.arat-shell-intro--compact::after { display: none; }

.arat-shell-intro__eyebrow,
.arat-filter-panel__eyebrow,
.arat-section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.arat-shell-intro__title {
    margin: 0;
    font-size: clamp(1.5rem, 2vw, 2rem);
    font-weight: 800;
    line-height: 1.1;
}

.arat-shell-intro__copy {
    margin: 0.8rem 0 0;
    max-width: 64ch;
    color: rgba(241, 247, 255, 0.74);
    font-size: 0.98rem;
}

.arat-shell-intro__metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.arat-shell-intro__metric {
    padding: 1rem 1.05rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.09);
    backdrop-filter: blur(16px);
}

.arat-shell-intro__metric span {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(241, 247, 255, 0.6);
}

.arat-shell-intro__metric strong {
    display: block;
    margin-top: 0.3rem;
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
}

.arat-shell-tabs-card,
.arat-data-table-card,
.arat-company-logo-card,
.arat-company-tabs-card {
    border-radius: 28px;
    overflow: hidden;
}

.arat-shell-tabs-card > .card-header,
.arat-data-table-card > .card-header,
.arat-company-logo-card > .card-header,
.arat-company-tabs-card > .card-header {
    padding: 1rem 1.1rem;
    background: transparent;
    border-bottom: 1px solid var(--arat-line);
}

.arat-shell-tabs,
.arat-shell-tabnav {
    gap: 0.6rem;
}

.arat-shell-tabs .nav-link,
.arat-shell-tabnav .nav-link {
    border: 1px solid var(--arat-line);
    border-radius: 999px;
    padding: 0.72rem 1rem;
    font-weight: 700;
    color: var(--arat-muted);
    background: rgba(255, 255, 255, 0.58);
}

html[data-bs-theme="dark"] .arat-shell-tabs .nav-link,
html[data-bs-theme="dark"] .arat-shell-tabnav .nav-link {
    background: rgba(17, 31, 55, 0.72);
}

.arat-shell-tabs .nav-link.active,
.arat-shell-tabnav .nav-link.active {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #0f6bff, #13a7db);
    box-shadow: 0 18px 34px rgba(15, 107, 255, 0.24);
}

.arat-filter-panel {
    padding: 1.15rem;
    border-radius: 26px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.08);
}

html[data-bs-theme="dark"] .arat-filter-panel {
    background: rgba(17, 31, 55, 0.8);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.arat-filter-panel__summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.arat-filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.8rem;
    border-radius: 999px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.62);
    color: var(--arat-ink);
    font-size: 0.8rem;
    font-weight: 700;
}

html[data-bs-theme="dark"] .arat-filter-chip {
    background: rgba(255, 255, 255, 0.05);
}

.arat-filter-panel .app-search,
.arat-data-table-card .app-search {
    position: relative;
}

.arat-filter-panel .btn-check + .btn {
    border-radius: 14px;
}

.arat-user-card,
.arat-role-card {
    height: 100%;
    border-radius: 26px;
    border: 1px solid var(--arat-line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62)),
        linear-gradient(135deg, rgba(15, 107, 255, 0.05), transparent 45%);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

html[data-bs-theme="dark"] .arat-user-card,
html[data-bs-theme="dark"] .arat-role-card {
    background:
        linear-gradient(180deg, rgba(17, 31, 55, 0.9), rgba(17, 31, 55, 0.76)),
        linear-gradient(135deg, rgba(19, 167, 219, 0.08), transparent 50%);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.22);
}

.arat-user-card:hover,
.arat-role-card:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 107, 255, 0.22);
    box-shadow: 0 26px 48px rgba(15, 23, 42, 0.14);
}

html[data-bs-theme="dark"] .arat-user-card:hover,
html[data-bs-theme="dark"] .arat-role-card:hover {
    box-shadow: 0 26px 48px rgba(0, 0, 0, 0.28);
}

.arat-user-card__top,
.arat-role-card__top {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.arat-user-card__identity,
.arat-role-card__identity {
    flex: 1;
    min-width: 0;
}

.arat-user-card__avatar,
.arat-role-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    min-width: 64px;
    height: 64px;
    border-radius: 22px;
    border: 1px solid rgba(15, 107, 255, 0.14);
    background: rgba(15, 107, 255, 0.1);
    object-fit: cover;
    font-size: 1rem;
    font-weight: 800;
    color: #0f6bff;
}

.arat-user-card__avatar--fallback {
    background: var(--arat-avatar, #4f46e5);
    color: #fff;
    border-color: transparent;
}

.arat-user-card__menu .btn,
.arat-role-card__menu .btn {
    width: 38px;
    height: 38px;
    border-radius: 14px;
}

.arat-user-card__name,
.arat-role-card__name {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--arat-ink);
}

.arat-user-card__role,
.arat-role-card__description {
    margin: 0.3rem 0 0;
    color: var(--arat-muted);
}

.arat-user-card__chips,
.arat-role-card__chips,
.arat-role-card__users {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.arat-user-card__chip,
.arat-role-card__chip,
.arat-role-card__users .avatar,
.arat-role-card__users .avatar-sm {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.66);
    color: var(--arat-ink);
    font-size: 0.78rem;
    font-weight: 700;
}

html[data-bs-theme="dark"] .arat-user-card__chip,
html[data-bs-theme="dark"] .arat-role-card__chip,
html[data-bs-theme="dark"] .arat-role-card__users .avatar,
html[data-bs-theme="dark"] .arat-role-card__users .avatar-sm {
    background: rgba(255, 255, 255, 0.05);
}

.arat-user-card__status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.48rem 0.76rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.arat-user-card__status--active {
    background: rgba(21, 165, 93, 0.12);
    color: #168958;
}

.arat-user-card__status--inactive {
    background: rgba(148, 163, 184, 0.16);
    color: #66758b;
}

.arat-user-card__list,
.arat-role-card__perms {
    display: grid;
    gap: 0.7rem;
    padding: 0;
    margin: 1rem 0 0;
    list-style: none;
}

.arat-user-card__list li,
.arat-role-card__perms li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.82rem 0.9rem;
    border-radius: 18px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.58);
}

html[data-bs-theme="dark"] .arat-user-card__list li,
html[data-bs-theme="dark"] .arat-role-card__perms li {
    background: rgba(255, 255, 255, 0.04);
}

.arat-user-card__list i,
.arat-role-card__perms i {
    margin-top: 0.08rem;
    color: #0f6bff;
}

.arat-user-card__footer,
.arat-role-card__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--arat-line);
}

.arat-user-card__meta,
.arat-role-card__meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    color: var(--arat-muted);
    font-size: 0.8rem;
}

.arat-role-card__meta strong {
    color: var(--arat-ink);
    font-size: 1rem;
    font-weight: 800;
}

.arat-role-card--locked {
    border-color: rgba(242, 153, 16, 0.24);
}

.arat-role-card__users .avatar,
.arat-role-card__users .avatar-sm {
    padding: 0;
    width: 38px;
    min-width: 38px;
    height: 38px;
    justify-content: center;
}

.arat-users-grid,
.arat-roles-grid {
    row-gap: 1.2rem;
}

.arat-data-table-card .table {
    margin-bottom: 0;
}

.arat-users-table thead th,
.arat-role-table thead th,
.arat-permissions-table thead th,
.arat-company-numbering-table thead th,
.arat-company-bank-table thead th {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--arat-muted);
    background: transparent;
}

.arat-user-row__identity {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.arat-user-row__avatar {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    object-fit: cover;
    background: rgba(15, 107, 255, 0.08);
}

.arat-user-row__avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 800;
    color: #fff;
}

.arat-user-row__name {
    display: block;
    font-weight: 700;
    color: var(--arat-ink);
}

.arat-user-row__meta {
    display: block;
    margin-top: 0.12rem;
    color: var(--arat-muted);
    font-size: 0.8rem;
}

.arat-status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.arat-status-pill--active {
    background: rgba(21, 165, 93, 0.12);
    color: #168958;
}

.arat-status-pill--inactive {
    background: rgba(148, 163, 184, 0.16);
    color: #66758b;
}

.arat-admin-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.arat-admin-section-head__copy h4,
.arat-admin-section-head__copy h5 {
    margin-bottom: 0.35rem;
}

.arat-role-table-card .card-header,
.arat-permissions-card .card-header {
    gap: 1rem;
}

.arat-company-logo-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
}

.arat-company-helper {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.58);
    color: var(--arat-muted);
}

html[data-bs-theme="dark"] .arat-company-helper {
    background: rgba(255, 255, 255, 0.05);
}

.arat-company-tabs-card .card-body {
    padding: 1.25rem;
}

.arat-company-tabs-card .tab-pane > form {
    display: grid;
    gap: 1.2rem;
}

.arat-company-tabs-card .table-responsive {
    border: 1px solid var(--arat-line);
    border-radius: 20px;
    overflow: hidden;
}

.arat-chat-shell .outlook-box {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    min-height: calc(100vh - 280px);
    border-radius: 30px;
    overflow: hidden;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: 0 28px 50px rgba(15, 23, 42, 0.12);
}

html[data-bs-theme="dark"] .arat-chat-shell .outlook-box {
    background: rgba(17, 31, 55, 0.82);
    box-shadow: 0 28px 50px rgba(0, 0, 0, 0.24);
}

.arat-chat-sidebar-card,
.arat-chat-thread-card {
    margin: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    min-height: 0;
}

.arat-chat-sidebar-card {
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--arat-line);
}

.arat-chat-sidebar-card .card-header,
.arat-chat-thread-card .card-header {
    padding: 1rem 1.1rem;
    background: transparent;
}

.arat-chat-sidebar-card #chat-sidebar {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.75rem !important;
}

.arat-chat-search .form-control,
.arat-chat-composer .form-control {
    border-radius: 18px;
}

.arat-chat-sidebar-card .chat-list .list-group-item {
    border: 0;
    margin-bottom: 0.45rem;
    padding: 0.9rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.64);
    color: var(--arat-ink);
}

html[data-bs-theme="dark"] .arat-chat-sidebar-card .chat-list .list-group-item {
    background: rgba(255, 255, 255, 0.04);
}

.arat-chat-sidebar-card .chat-list .list-group-item.active,
.arat-chat-sidebar-card .chat-list .list-group-item:hover {
    background: rgba(15, 107, 255, 0.1);
}

.arat-chat-list-item__name {
    display: block;
    font-weight: 800;
    color: var(--arat-ink);
}

.arat-chat-list-item__preview {
    display: block;
    margin-top: 0.15rem;
    color: var(--arat-muted);
    font-size: 0.8rem;
}

.arat-chat-list-item__time {
    font-size: 0.76rem;
    color: var(--arat-muted);
}

.arat-chat-thread-card .card-header {
    min-height: 84px;
    border-bottom: 1px solid var(--arat-line);
}

.arat-chat-thread-card {
    min-height: 0;
}

.arat-chat-thread-card [data-chat] {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    padding: 1rem 1.2rem 1.25rem;
    background:
        radial-gradient(circle at top right, rgba(15, 107, 255, 0.08), transparent 28%),
        radial-gradient(circle at bottom left, rgba(19, 167, 219, 0.08), transparent 28%);
}

html[data-bs-theme="dark"] .arat-chat-thread-card [data-chat] {
    background:
        radial-gradient(circle at top right, rgba(15, 107, 255, 0.14), transparent 30%),
        radial-gradient(circle at bottom left, rgba(19, 167, 219, 0.12), transparent 30%);
}

.arat-chat-thread-card .chat-item {
    margin: 1rem 0;
}

.arat-chat-thread-card .chat-item.flash .chat-message {
    animation: aratChatFlash 1.5s ease-in-out;
}

@keyframes aratChatFlash {
    0%,
    100% {
        background-color: rgba(255, 193, 7, 0.16);
    }

    50% {
        background-color: rgba(255, 224, 132, 0.58);
    }
}

.arat-chat-thread-card .chat-message {
    max-width: min(44rem, 72vw);
    border-radius: 22px;
    border: 1px solid rgba(15, 107, 255, 0.08);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.08);
}

.arat-chat-thread-card .chat-item.justify-content-end .chat-message,
.arat-chat-thread-card .chat-item.text-end .chat-message {
    background: linear-gradient(135deg, rgba(15, 107, 255, 0.16), rgba(19, 167, 219, 0.14)) !important;
}

.arat-chat-thread-card .chat-item .chat-message mark {
    padding: 0 0.18rem;
    border-radius: 4px;
    background: #ffc107;
    color: #000;
}

.arat-chat-composer {
    padding: 1rem 1.1rem 1.15rem;
    background: rgba(255, 255, 255, 0.54);
    border-top: 1px solid var(--arat-line);
}

html[data-bs-theme="dark"] .arat-chat-composer {
    background: rgba(255, 255, 255, 0.03);
}

.arat-contact-shell .pagination {
    gap: 0.45rem;
}

.arat-contact-shell .page-link {
    border-radius: 14px;
    border-color: var(--arat-line);
    background: rgba(255, 255, 255, 0.68);
}

html[data-bs-theme="dark"] .arat-contact-shell .page-link {
    background: rgba(255, 255, 255, 0.05);
}

.arat-profile-hero {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at top right, rgba(119, 171, 255, 0.28), transparent 34%),
        radial-gradient(circle at bottom left, rgba(81, 202, 190, 0.2), transparent 30%),
        linear-gradient(140deg, #102846 0%, #173b68 46%, #10223a 100%);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.24);
    color: #f3f8ff;
}

.arat-profile-hero::before,
.arat-profile-hero::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.arat-profile-hero::before {
    width: 200px;
    height: 200px;
    inset: auto auto -60px -40px;
    background: radial-gradient(circle, rgba(90, 209, 255, 0.28), transparent 70%);
}

.arat-profile-hero::after {
    width: 240px;
    height: 240px;
    inset: -80px -50px auto auto;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.14), transparent 65%);
}

.arat-profile-hero__body {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
    gap: 1.25rem;
    padding: 1.8rem;
}

.arat-profile-hero__identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.arat-profile-hero__avatar {
    width: 112px;
    min-width: 112px;
    height: 112px;
    border-radius: 28px;
    border: 3px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
    object-fit: cover;
}

.arat-profile-hero__avatar--fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    font-weight: 800;
    color: #fff;
}

.arat-profile-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(243, 248, 255, 0.68);
}

.arat-profile-hero__title {
    margin: 0;
    font-size: clamp(1.8rem, 2.4vw, 2.35rem);
    font-weight: 800;
}

.arat-profile-hero__subtitle {
    margin: 0.45rem 0 0;
    color: rgba(243, 248, 255, 0.76);
    font-size: 1rem;
}

.arat-profile-hero__copy {
    margin: 0.9rem 0 0;
    max-width: 62ch;
    color: rgba(243, 248, 255, 0.78);
}

.arat-profile-hero__chips,
.arat-profile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.arat-profile-hero__chip,
.arat-profile-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.62rem 0.86rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
}

.arat-profile-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1rem;
}

.arat-profile-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    align-self: stretch;
}

.arat-profile-stat {
    padding: 1rem 1.05rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
}

.arat-profile-stat span {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(243, 248, 255, 0.62);
}

.arat-profile-stat strong {
    display: block;
    margin-top: 0.25rem;
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
}

.arat-profile-panel {
    border-radius: 28px;
}

.arat-profile-panel__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.arat-profile-panel__header p {
    margin: 0.35rem 0 0;
    color: var(--arat-muted);
}

.arat-profile-info-list {
    display: grid;
    gap: 0.8rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.arat-profile-info-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.95rem 1rem;
    border-radius: 20px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.58);
}

html[data-bs-theme="dark"] .arat-profile-info-list li {
    background: rgba(255, 255, 255, 0.04);
}

.arat-profile-info-list i {
    margin-top: 0.08rem;
    color: #0f6bff;
}

.arat-profile-info-list span {
    display: block;
    color: var(--arat-muted);
    font-size: 0.8rem;
}

.arat-profile-info-list strong {
    display: block;
    margin-top: 0.15rem;
    color: var(--arat-ink);
    font-size: 0.96rem;
}

.arat-profile-richtext {
    color: var(--arat-muted);
    line-height: 1.7;
}

.arat-profile-richtext p:last-child {
    margin-bottom: 0;
}

.arat-metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.arat-metric-card,
.arat-module-card,
.arat-surface-card {
    border-radius: 26px;
    border: 1px solid var(--arat-line);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.66)),
        linear-gradient(135deg, rgba(15, 107, 255, 0.05), transparent 50%);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.1);
}

html[data-bs-theme="dark"] .arat-metric-card,
html[data-bs-theme="dark"] .arat-module-card,
html[data-bs-theme="dark"] .arat-surface-card {
    background:
        linear-gradient(180deg, rgba(17, 31, 55, 0.9), rgba(17, 31, 55, 0.78)),
        linear-gradient(135deg, rgba(19, 167, 219, 0.08), transparent 55%);
    box-shadow: 0 22px 42px rgba(0, 0, 0, 0.22);
}

.arat-metric-card {
    padding: 1.05rem 1.15rem;
}

.arat-metric-card span {
    display: block;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--arat-muted);
    font-weight: 800;
}

.arat-metric-card strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--arat-ink);
}

.arat-metric-card p {
    margin: 0.35rem 0 0;
    color: var(--arat-muted);
    font-size: 0.82rem;
}

.arat-module-card {
    height: 100%;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.arat-module-card:hover,
.arat-surface-card:hover {
    transform: translateY(-4px);
    border-color: rgba(15, 107, 255, 0.22);
    box-shadow: 0 26px 48px rgba(15, 23, 42, 0.14);
}

html[data-bs-theme="dark"] .arat-module-card:hover,
html[data-bs-theme="dark"] .arat-surface-card:hover {
    box-shadow: 0 26px 48px rgba(0, 0, 0, 0.28);
}

.arat-module-card__body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    padding: 1.2rem;
}

.arat-module-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    min-width: 60px;
    height: 60px;
    border-radius: 20px;
    background: rgba(15, 107, 255, 0.1);
    color: #0f6bff;
}

.arat-module-card__title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--arat-ink);
}

.arat-module-card__copy {
    margin: 0;
    color: var(--arat-muted);
}

.arat-module-card__footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.arat-inline-note {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(15, 107, 255, 0.14);
    background: rgba(15, 107, 255, 0.06);
    color: var(--arat-ink);
}

html[data-bs-theme="dark"] .arat-inline-note {
    background: rgba(15, 107, 255, 0.12);
}

.arat-detail-list {
    display: grid;
    gap: 0.85rem;
}

.arat-detail-list__item {
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.58);
}

html[data-bs-theme="dark"] .arat-detail-list__item {
    background: rgba(255, 255, 255, 0.04);
}

.arat-detail-list__item span {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--arat-muted);
    font-weight: 800;
}

.arat-detail-list__item strong,
.arat-detail-list__item .arat-detail-list__value {
    display: block;
    margin-top: 0.25rem;
    color: var(--arat-ink);
    font-size: 0.95rem;
    font-weight: 700;
}

.arat-timeline-list {
    position: relative;
    display: grid;
    gap: 1rem;
    padding-left: 0;
    list-style: none;
}

.arat-timeline-list::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 18px;
    width: 1px;
    background: var(--arat-line);
}

.arat-timeline-list li {
    position: relative;
    padding: 0.95rem 1rem 0.95rem 3.2rem;
    border-radius: 20px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.62);
}

html[data-bs-theme="dark"] .arat-timeline-list li {
    background: rgba(255, 255, 255, 0.04);
}

.arat-timeline-list li::before {
    content: "";
    position: absolute;
    top: 1.2rem;
    left: 12px;
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f6bff, #13a7db);
    box-shadow: 0 0 0 5px rgba(15, 107, 255, 0.12);
}

.arat-form-shell {
    padding: 1.25rem;
    border-radius: 28px;
}

.arat-section-block {
    padding: 1rem;
    border-radius: 20px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.52);
}

html[data-bs-theme="dark"] .arat-section-block {
    background: rgba(255, 255, 255, 0.04);
}

.autocomplete-results {
    max-height: 220px;
    overflow-y: auto;
    border-radius: 18px;
    border: 1px solid var(--arat-line) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.12);
}

html[data-bs-theme="dark"] .autocomplete-results {
    background: rgba(17, 31, 55, 0.98) !important;
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.28);
}

.autocomplete-results .item:hover {
    background: rgba(15, 107, 255, 0.08) !important;
}

.arat-erp-shell .btn-purple {
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #0f6bff, #13a7db);
    box-shadow: 0 16px 30px rgba(15, 107, 255, 0.22);
}

.arat-erp-shell .arat-erp-flow-card {
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background:
        radial-gradient(circle at top right, rgba(108, 164, 255, 0.24), transparent 34%),
        radial-gradient(circle at bottom left, rgba(80, 206, 194, 0.18), transparent 30%),
        linear-gradient(135deg, #102846 0%, #173967 46%, #11233d 100%);
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.24);
    color: #f1f7ff;
}

.arat-erp-shell .arat-erp-flow-card .card-body {
    padding: 1.4rem 1.55rem;
}

.arat-erp-shell .arat-erp-flow-card .text-muted,
.arat-erp-shell .arat-erp-flow-card .text-secondary,
.arat-erp-shell .arat-erp-flow-card small,
.arat-erp-shell .arat-erp-flow-card p {
    color: rgba(241, 247, 255, 0.72) !important;
}

.arat-erp-shell .arat-erp-commercial-flow {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.arat-erp-shell .flow-step {
    padding: 0.48rem 0.82rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.08);
    color: rgba(241, 247, 255, 0.84);
}

.arat-erp-shell .flow-step.is-active {
    background: rgba(255, 255, 255, 0.96);
    color: #0f2542;
    border-color: transparent;
    box-shadow: 0 18px 32px rgba(10, 19, 36, 0.18);
}

.arat-erp-shell .flow-step-link {
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.arat-erp-shell .flow-step-link:hover {
    transform: translateY(-2px);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.14);
}

.arat-erp-shell .kpi-card {
    min-width: 190px;
    max-width: 320px;
    border-radius: 24px !important;
    border: 1px solid var(--arat-line) !important;
    background: rgba(255, 255, 255, 0.72) !important;
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.1);
}

html[data-bs-theme="dark"] .arat-erp-shell .kpi-card {
    background: rgba(17, 31, 55, 0.82) !important;
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.22);
}

.arat-erp-shell .kpi-card .card-body {
    padding: 1rem 1.05rem !important;
}

.arat-erp-shell .kpi-card .small.fw-semibold {
    display: block;
    margin-bottom: 0.32rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.arat-erp-shell .selection-summary {
    border-radius: 20px;
    border: 1px dashed rgba(15, 107, 255, 0.24);
    background: rgba(15, 107, 255, 0.06);
}

html[data-bs-theme="dark"] .arat-erp-shell .selection-summary {
    background: rgba(15, 107, 255, 0.12);
}

.arat-erp-shell .arat-erp-chart-card {
    border-radius: 28px;
    overflow: hidden;
}

.arat-erp-shell .arat-erp-chart-card .card-body {
    padding: 1.25rem;
}

.arat-erp-shell .chart-box {
    min-height: 320px;
}

.arat-erp-shell .dashboard-title,
.arat-erp-shell .dashboard-subtitle {
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--arat-muted);
}

.arat-erp-shell .insight-list li {
    padding: 0.6rem 0;
    border-bottom: 1px dashed var(--arat-line);
}

.arat-erp-shell .insight-list li:last-child {
    border-bottom: 0;
}

.arat-erp-shell .arat-erp-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.arat-erp-shell .arat-erp-filters .app-search,
.arat-erp-shell .arat-erp-filters > div {
    min-width: 0;
}

.arat-erp-shell .arat-erp-filters .form-control,
.arat-erp-shell .arat-erp-filters .form-select,
.arat-erp-shell .filters-toolbar .form-control,
.arat-erp-shell .filters-toolbar .form-select {
    border-radius: 16px;
}

.arat-erp-shell .filters-toolbar {
    gap: 0.75rem;
}

.arat-product-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.arat-product-kpi {
    position: relative;
    overflow: hidden;
}

.arat-product-kpi__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.arat-product-kpi__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    min-width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(15, 107, 255, 0.1);
    color: #0f6bff;
    font-size: 1.35rem;
}

.arat-product-kpi strong {
    display: block;
    margin-top: 0.55rem;
    font-size: 1.55rem;
    line-height: 1.05;
}

.arat-product-kpi__delta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.65rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    background: rgba(15, 107, 255, 0.08);
    color: #0f6bff;
}

.arat-product-kpi__delta--negative {
    background: rgba(217, 83, 79, 0.12);
    color: #d9534f;
}

.arat-product-kpi small {
    display: block;
    margin-top: 0.55rem;
    color: var(--arat-muted);
    font-size: 0.8rem;
}

.arat-erp-doc-shell .arat-erp-doc-header,
.arat-erp-doc-shell .arat-erp-doc-lines,
.arat-erp-doc-shell .arat-erp-doc-summary,
.arat-erp-doc-shell .arat-erp-doc-aside {
    overflow: hidden;
    border-radius: 30px;
}

.arat-erp-doc-shell .arat-erp-doc-header .card-header,
.arat-erp-doc-shell .arat-erp-doc-lines .card-header,
.arat-erp-doc-shell .arat-erp-doc-summary .card-header,
.arat-erp-doc-shell .arat-erp-doc-aside .card-header {
    padding: 1.2rem 1.35rem 0;
    border: 0;
    background: transparent;
}

.arat-erp-doc-shell .arat-erp-doc-header .card-body,
.arat-erp-doc-shell .arat-erp-doc-summary .card-body,
.arat-erp-doc-shell .arat-erp-doc-aside .card-body {
    padding: 1.2rem 1.35rem 1.35rem;
}

.arat-erp-doc-shell .arat-erp-doc-lines .card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.arat-erp-doc-shell .arat-erp-doc-lines .table thead th {
    border-bottom-width: 1px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--arat-muted);
    background: rgba(15, 107, 255, 0.05);
}

html[data-bs-theme="dark"] .arat-erp-doc-shell .arat-erp-doc-lines .table thead th {
    background: rgba(255, 255, 255, 0.04);
}

.arat-erp-doc-shell .arat-erp-doc-lines .table td,
.arat-erp-doc-shell .arat-erp-doc-lines .table th {
    vertical-align: middle;
}

.arat-erp-doc-shell .arat-erp-doc-lines .table {
    min-width: 1080px;
}

.arat-erp-doc-shell .arat-erp-doc-lines .prod-description {
    min-width: 0;
}

.arat-erp-doc-shell .arat-erp-doc-lines .qty-input {
    min-width: 4rem;
}

.arat-erp-doc-shell .arat-erp-doc-lines .input-group-sm .form-select {
    min-width: 4.5rem;
}

/* ── Line rows — nuevo diseño spreadsheet-card ─────────────────────────── */

/* Sticky summary panel */
.arat-erp-doc-summary-col > .card {
    position: sticky;
    top: calc(var(--ins-topbar-height, 65px) + 1rem);
}

/* Header de columnas */
.arat-lines-head {
    display: none; /* oculto en móvil */
    padding: 0.5rem 1rem;
    border-bottom: 1px solid var(--arat-line);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--arat-muted);
}

/* Lista */
.arat-lines-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px 4px;
}

/* Fila de línea */
.arat-line-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--arat-line);
    border-radius: 12px;
    transition: border-color 0.15s, box-shadow 0.15s;
    position: relative;
}

.arat-line-row:hover {
    border-color: rgba(15, 107, 255, 0.3);
    box-shadow: 0 2px 12px rgba(15, 107, 255, 0.07);
}

.arat-line-row--from-order {
    border-left: 3px solid var(--arat-primary);
}

/* Número de línea */
.arat-line-row__num {
    display: none; /* Solo visible en desktop vía grid */
}

/* Producto */
.arat-line-row__product { flex: 1; min-width: 0; }

.arat-line-row__product-grid {
    display: grid;
    gap: 8px;
}

.arat-line-row__product-sku,
.arat-line-row__product-copy {
    min-width: 0;
}

.arat-line-row__product-copy .arat-line-row__desc {
    margin-top: 0 !important;
}

.arat-line-row__product-copy {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.arat-line-row__desc--locked {
    color: var(--arat-muted) !important;
    font-style: italic;
    background: transparent !important;
    border-color: transparent !important;
    padding-left: 0 !important;
    pointer-events: none;
}

.arat-line-row__from-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--arat-primary);
    margin-top: 3px;
    letter-spacing: 0.02em;
}

/* Campos numéricos: fila horizontal en móvil */
.arat-line-row__fields-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.arat-line-row__qty  { flex: 1; min-width: 120px; max-width: 160px; }
.arat-line-row__price { flex: 1; min-width: 110px; max-width: 150px; }
.arat-line-row__tax  { flex: 0 0 76px; }

/* Total */
.arat-line-row__total {
    flex: 0 0 auto;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--arat-ink);
    white-space: nowrap;
    align-self: center;
    min-width: 80px;
    text-align: right;
}

/* Eliminar */
.arat-line-row__remove {
    position: absolute;
    top: 8px;
    right: 8px;
}

.arat-line-row__remove button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    background: none;
    border-radius: 6px;
    color: var(--arat-muted);
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
    cursor: pointer;
    padding: 0;
}

.arat-line-row:hover .arat-line-row__remove button { opacity: 1; }
.arat-line-row__remove button:hover {
    color: var(--arat-danger);
    background: rgba(216, 90, 105, 0.1);
}

/* Estado vacío */
.arat-lines-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem;
}

.arat-lines-empty__btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 2rem 3rem;
    border: 2px dashed var(--arat-line);
    border-radius: 16px;
    background: none;
    color: var(--arat-muted);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
    width: 100%;
    max-width: 320px;
    text-align: center;
}

.arat-lines-empty__btn small { font-size: 0.72rem; opacity: 0.75; }
.arat-lines-empty__btn:hover { border-color: var(--arat-primary); color: var(--arat-primary); }

.arat-prod-mode-switch {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.arat-prod-mode-card {
    border: 1px solid var(--arat-line);
    border-radius: 18px;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.6);
    text-align: left;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.arat-prod-mode-card strong {
    display: block;
    margin-bottom: 0.2rem;
    color: var(--arat-heading);
}

.arat-prod-mode-card small {
    display: block;
    color: var(--arat-muted);
    line-height: 1.45;
}

.arat-prod-mode-card.is-active {
    border-color: rgba(15, 107, 255, 0.32);
    background: rgba(15, 107, 255, 0.08);
    transform: translateY(-1px);
}

.arat-prod-mode-note {
    margin-bottom: 1rem;
    color: var(--arat-muted);
    font-size: 0.88rem;
}

/* Botón "añadir otra línea" inline */
.arat-lines-add-row {
    width: 100%;
    margin-top: 2px;
    padding: 7px;
    border: 1px dashed var(--arat-line);
    border-radius: 8px;
    background: none;
    color: var(--arat-muted);
    font-size: 0.78rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.arat-lines-add-row:hover { border-color: var(--arat-primary); color: var(--arat-primary); }

/* ── Desktop: grid alineado con cabecera ── */
@media (min-width: 992px) {
    .arat-lines-head {
        display: grid;
        grid-template-columns: 28px 1fr 148px 136px 70px 98px 28px;
        gap: 8px;
    }

    .arat-line-row {
        display: grid;
        grid-template-columns: 28px 1fr 148px 136px 70px 98px 28px;
        gap: 8px;
        align-items: start;
        flex-direction: unset;
        padding: 10px 10px;
    }

    .arat-line-row__num {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        background: rgba(15, 107, 255, 0.09);
        color: var(--arat-primary);
        font-size: 0.7rem;
        font-weight: 700;
        flex-shrink: 0;
        margin-top: 2px;
    }

    .arat-line-row__product { min-width: 0; }
    .arat-line-row__product-grid {
        grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
        align-items: start;
    }
    .arat-line-row__qty,
    .arat-line-row__price,
    .arat-line-row__tax,
    .arat-line-row__total { min-width: 0; max-width: none; flex: none; }
    .arat-line-row__fields-row { display: contents; }

    .arat-line-row__total {
        align-self: start;
        padding-top: 6px;
        min-width: 0;
    }

    .arat-line-row__remove {
        position: static;
        display: flex;
        align-items: flex-start;
        padding-top: 2px;
    }
}

@media (max-width: 767.98px) {
    .arat-prod-mode-switch {
        grid-template-columns: 1fr;
    }
}

/* Dark mode */
html[data-bs-theme="dark"] .arat-line-row {
    border-color: rgba(255, 255, 255, 0.08);
}
html[data-bs-theme="dark"] .arat-line-row:hover {
    border-color: rgba(15, 107, 255, 0.35);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}

html[data-bs-theme="dark"] .arat-line-row__tax .form-select,
html[data-bs-theme="dark"] .arat-line-row__qty .form-select {
    background-color: rgba(17, 31, 55, 0.92);
    border-color: rgba(255, 255, 255, 0.1);
    color: #eef4ff;
}

html[data-bs-theme="dark"] .arat-line-row__tax .form-select option,
html[data-bs-theme="dark"] .arat-line-row__qty .form-select option {
    background-color: #13233d;
    color: #eef4ff;
}

html[data-bs-theme="dark"] .arat-prod-mode-card {
    background: rgba(255, 255, 255, 0.04);
}

html[data-bs-theme="dark"] .arat-prod-mode-card.is-active {
    background: rgba(15, 107, 255, 0.16);
}

@media (min-width: 1200px) {
    .arat-erp-doc-shell--budget .arat-lines-head,
    .arat-erp-doc-shell--order .arat-lines-head,
    .arat-erp-doc-shell--order-edit .arat-lines-head,
    .arat-erp-doc-shell--invoice .arat-lines-head,
    .arat-erp-doc-shell--delivery-create .arat-lines-head,
    .arat-erp-doc-shell--delivery-edit .arat-lines-head {
        grid-template-columns: 28px minmax(0, 1fr) 133px 124px 64px 92px 28px;
    }

    .arat-erp-doc-shell--budget .arat-line-row,
    .arat-erp-doc-shell--order .arat-line-row,
    .arat-erp-doc-shell--order-edit .arat-line-row,
    .arat-erp-doc-shell--invoice .arat-line-row,
    .arat-erp-doc-shell--delivery-create .arat-line-row,
    .arat-erp-doc-shell--delivery-edit .arat-line-row {
        grid-template-columns: 28px minmax(0, 1fr) 133px 124px 64px 92px 28px;
    }

    .arat-erp-doc-shell--budget .arat-line-row__product-grid,
    .arat-erp-doc-shell--order .arat-line-row__product-grid,
    .arat-erp-doc-shell--order-edit .arat-line-row__product-grid,
    .arat-erp-doc-shell--invoice .arat-line-row__product-grid,
    .arat-erp-doc-shell--delivery-create .arat-line-row__product-grid,
    .arat-erp-doc-shell--delivery-edit .arat-line-row__product-grid {
        grid-template-columns: minmax(105px, 119px) minmax(0, 1fr);
    }

    .arat-erp-doc-shell--budget .arat-line-row__qty .input-group,
    .arat-erp-doc-shell--order .arat-line-row__qty .input-group,
    .arat-erp-doc-shell--order-edit .arat-line-row__qty .input-group,
    .arat-erp-doc-shell--invoice .arat-line-row__qty .input-group,
    .arat-erp-doc-shell--delivery-create .arat-line-row__qty .input-group,
    .arat-erp-doc-shell--delivery-edit .arat-line-row__qty .input-group {
        width: 100%;
        flex-wrap: nowrap;
    }

    .arat-erp-doc-shell--budget .arat-line-row__qty .form-control,
    .arat-erp-doc-shell--budget .arat-line-row__price .form-control,
    .arat-erp-doc-shell--order .arat-line-row__qty .form-control,
    .arat-erp-doc-shell--order .arat-line-row__price .form-control,
    .arat-erp-doc-shell--order-edit .arat-line-row__qty .form-control,
    .arat-erp-doc-shell--order-edit .arat-line-row__price .form-control,
    .arat-erp-doc-shell--invoice .arat-line-row__qty .form-control,
    .arat-erp-doc-shell--invoice .arat-line-row__price .form-control,
    .arat-erp-doc-shell--delivery-create .arat-line-row__qty .form-control,
    .arat-erp-doc-shell--delivery-create .arat-line-row__price .form-control,
    .arat-erp-doc-shell--delivery-edit .arat-line-row__qty .form-control,
    .arat-erp-doc-shell--delivery-edit .arat-line-row__price .form-control {
        min-width: 0;
    }

    .arat-erp-doc-shell--budget .arat-line-row__qty .form-select,
    .arat-erp-doc-shell--order .arat-line-row__qty .form-select,
    .arat-erp-doc-shell--order-edit .arat-line-row__qty .form-select,
    .arat-erp-doc-shell--invoice .arat-line-row__qty .form-select,
    .arat-erp-doc-shell--delivery-create .arat-line-row__qty .form-select,
    .arat-erp-doc-shell--delivery-edit .arat-line-row__qty .form-select {
        flex: 0 0 44px;
        width: 44px;
        min-width: 44px;
        max-width: 44px;
        padding-left: 0.35rem;
        padding-right: 1rem;
        background-position: right 0.18rem center;
        background-size: 10px 8px;
        font-size: 0.76rem;
    }
}

.arat-erp-doc-shell .arat-erp-doc-lines .card-footer {
    padding: 1rem 1.25rem 1.15rem;
    border-top: 1px solid var(--arat-line);
    background: transparent;
}

.arat-erp-doc-shell .arat-erp-doc-status {
    display: grid;
    gap: 0.85rem;
}

.arat-erp-doc-shell .arat-erp-doc-status-item,
.arat-erp-doc-shell .arat-erp-doc-summary__panel {
    padding: 1rem 1.05rem;
    border-radius: 20px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.58);
}

html[data-bs-theme="dark"] .arat-erp-doc-shell .arat-erp-doc-status-item,
html[data-bs-theme="dark"] .arat-erp-doc-shell .arat-erp-doc-summary__panel {
    background: rgba(255, 255, 255, 0.04);
}

.arat-erp-doc-shell .arat-erp-doc-status-item span,
.arat-erp-doc-shell .arat-erp-doc-summary__label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--arat-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.arat-erp-doc-shell .arat-erp-doc-status-item strong {
    display: block;
    font-size: 1rem;
    line-height: 1.35;
}

.arat-erp-doc-shell .arat-erp-doc-summary .card-body {
    display: grid;
    gap: 1rem;
}

.arat-erp-doc-shell .arat-erp-doc-summary__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
}

.arat-erp-doc-shell .arat-erp-doc-summary__row strong {
    font-size: 1.05rem;
}

.arat-erp-doc-shell .arat-erp-doc-summary__row--total strong {
    font-size: 1.5rem;
    line-height: 1;
}

.arat-erp-doc-shell .arat-erp-doc-breakdown {
    display: grid;
    gap: 0.45rem;
}

.arat-erp-doc-shell .arat-erp-doc-breakdown > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--arat-muted);
    font-size: 0.92rem;
}

.arat-erp-doc-shell .arat-erp-doc-summary textarea {
    min-height: 128px;
}

.arat-erp-doc-shell .arat-erp-doc-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
}

.arat-erp-doc-shell .arat-erp-doc-note {
    padding: 1rem 1.05rem;
    border-radius: 20px;
    border: 1px dashed rgba(15, 107, 255, 0.24);
    background: rgba(15, 107, 255, 0.06);
    color: var(--arat-muted);
}

html[data-bs-theme="dark"] .arat-erp-doc-shell .arat-erp-doc-note {
    background: rgba(15, 107, 255, 0.12);
}

.arat-erp-doc-shell .arat-erp-doc-note strong {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--arat-heading);
}

.arat-erp-doc-shell .badge.text-bg-light {
    background: rgba(15, 107, 255, 0.08) !important;
    color: #0f6bff !important;
}

html[data-bs-theme="dark"] .arat-erp-doc-shell .badge.text-bg-light {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #eef4ff !important;
}

.arat-erp-doc-shell .modal-content.arat-surface-card,
.arat-erp-doc-shell .modal-content.arat-erp-doc-modal {
    border-radius: 28px;
    overflow: hidden;
}

.arat-erp-doc-shell .modal-header,
.arat-erp-doc-shell .modal-footer {
    border-color: var(--arat-line);
}

.arat-product-shell .card,
.arat-product-shell .accordion-item,
.arat-admin-config-shell .card,
.arat-erp-utility-shell .card {
    border: 1px solid var(--arat-line);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 20px 38px rgba(15, 23, 42, 0.1);
}

html[data-bs-theme="dark"] .arat-product-shell .card,
html[data-bs-theme="dark"] .arat-product-shell .accordion-item,
html[data-bs-theme="dark"] .arat-admin-config-shell .card,
html[data-bs-theme="dark"] .arat-erp-utility-shell .card {
    background: rgba(17, 31, 55, 0.82);
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.22);
}

.arat-product-shell .card-header,
.arat-admin-config-shell .card-header,
.arat-erp-utility-shell .card-header {
    padding: 1.2rem 1.35rem 0;
    border: 0;
    background: transparent;
}

.arat-product-shell .card-body,
.arat-admin-config-shell .card-body,
.arat-erp-utility-shell .card-body {
    padding: 1.2rem 1.35rem 1.35rem;
}

.arat-product-shell .card-footer,
.arat-admin-config-shell .card-footer,
.arat-erp-utility-shell .card-footer {
    border-top: 1px solid var(--arat-line);
    background: transparent;
}

.arat-product-shell .accordion-button {
    border-radius: 20px !important;
    background: transparent;
    box-shadow: none;
}

.arat-product-shell .dropzone,
.arat-admin-config-shell .preview-area,
.arat-admin-config-shell #fb-preview,
.arat-admin-config-shell .template-preview-sheet {
    border-radius: 22px;
    border: 1px dashed var(--arat-line) !important;
    background: rgba(255, 255, 255, 0.56);
}

html[data-bs-theme="dark"] .arat-product-shell .dropzone,
html[data-bs-theme="dark"] .arat-admin-config-shell .preview-area,
html[data-bs-theme="dark"] .arat-admin-config-shell #fb-preview,
html[data-bs-theme="dark"] .arat-admin-config-shell .template-preview-sheet {
    background: rgba(255, 255, 255, 0.04);
}

.arat-product-shell .carousel-inner,
.arat-product-shell .template-block {
    border-radius: 24px;
}

.arat-product-shell .nav-tabs .nav-link,
.arat-admin-config-shell .nav-tabs .nav-link,
.arat-erp-utility-shell .nav-tabs .nav-link {
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--arat-muted);
    font-weight: 700;
}

.arat-product-shell .nav-tabs .nav-link.active,
.arat-admin-config-shell .nav-tabs .nav-link.active,
.arat-erp-utility-shell .nav-tabs .nav-link.active {
    color: #0f6bff;
    border-color: rgba(15, 107, 255, 0.18);
    background: rgba(15, 107, 255, 0.08);
}

.arat-product-shell .arat-product-hero-actions,
.arat-product-shell .arat-product-actions,
.arat-erp-utility-shell .arat-utility-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.arat-product-shell .arat-product-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.arat-product-shell .arat-product-kpi {
    padding: 1rem 1.05rem;
    border-radius: 22px;
    border: 1px solid var(--arat-line);
    background: rgba(255, 255, 255, 0.52);
}

html[data-bs-theme="dark"] .arat-product-shell .arat-product-kpi {
    background: rgba(255, 255, 255, 0.04);
}

.arat-product-shell .arat-product-kpi span {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--arat-muted);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.arat-product-shell .arat-product-kpi strong {
    display: block;
    font-size: 1.2rem;
    line-height: 1.1;
}

.arat-product-shell .arat-product-media-card .card-body {
    padding: 1rem;
}

.arat-product-shell .arat-product-form-actions {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.arat-product-shell .arat-product-note,
.arat-erp-utility-shell .arat-utility-note,
.arat-admin-config-shell .arat-config-note {
    padding: 1rem 1.05rem;
    border-radius: 20px;
    border: 1px dashed rgba(15, 107, 255, 0.24);
    background: rgba(15, 107, 255, 0.06);
    color: var(--arat-muted);
}

html[data-bs-theme="dark"] .arat-product-shell .arat-product-note,
html[data-bs-theme="dark"] .arat-erp-utility-shell .arat-utility-note,
html[data-bs-theme="dark"] .arat-admin-config-shell .arat-config-note {
    background: rgba(15, 107, 255, 0.12);
}

@media (max-width: 991.98px) {
    .arat-page-title-meta {
        width: 100%;
        align-items: flex-start;
    }

    .arat-page-title-stats {
        justify-content: flex-start;
    }

    .arat-shell-intro__metrics {
        grid-template-columns: 1fr;
    }

    .arat-metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .arat-product-shell .arat-product-kpi-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .arat-erp-doc-shell .arat-erp-doc-actions {
        justify-content: flex-start;
    }

    .arat-chat-shell .outlook-box {
        display: block;
        min-height: auto;
    }

    .arat-chat-sidebar-card {
        border-right: 0;
        border-bottom: 1px solid var(--arat-line);
    }

    .arat-profile-hero__body {
        grid-template-columns: 1fr;
    }

    .arat-product-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .arat-shell-intro__body {
        padding: 1.35rem;
    }

    .arat-filter-panel__summary {
        justify-content: flex-start;
    }

    .arat-user-card__top,
    .arat-role-card__top,
    .arat-user-card__footer,
    .arat-role-card__footer,
    .arat-admin-section-head {
        flex-direction: column;
        align-items: stretch;
    }

    .arat-profile-hero__identity {
        flex-direction: column;
        align-items: flex-start;
    }

    .arat-profile-stats {
        grid-template-columns: 1fr;
    }

    .arat-metric-grid {
        grid-template-columns: 1fr;
    }

    .arat-product-shell .arat-product-kpi-strip {
        grid-template-columns: 1fr;
    }

    .arat-erp-doc-shell .arat-erp-doc-actions > * {
        width: 100%;
    }

    .arat-product-shell .arat-product-form-actions > *,
    .arat-product-shell .arat-product-hero-actions > *,
    .arat-erp-utility-shell .arat-utility-actions > * {
        width: 100%;
    }

    .arat-erp-shell .arat-erp-filters {
        align-items: stretch;
    }

    .arat-erp-shell .arat-erp-filters .app-search,
    .arat-erp-shell .arat-erp-filters > div,
    .arat-erp-shell .filters-toolbar .form-select.auto-width,
    .arat-erp-shell .filters-toolbar .form-control.form-control-sm,
    .arat-erp-shell .filters-toolbar .input-group.w-auto {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* ── Topbar: compactar botones ─────────────────────────────────────────── */
.app-topbar .topbar-menu .topbar-item .topbar-link {
    padding: 0 3px !important;
}
.app-topbar .topbar-menu .topbar-item.nav-user .topbar-link {
    padding: 0 2px 0 4px !important;
}

/* ── Card contexto cliente ─────────────────────────────────────────────── */
.arat-erp-cliente-ctx {
    border-radius: 16px;
    border: 1px solid var(--arat-line);
}

.arat-ctx-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.arat-ctx-item--name {
    font-size: 0.95rem;
}

.arat-ctx-divider {
    width: 1px;
    height: 24px;
    background: var(--arat-line);
    flex-shrink: 0;
}

.arat-ctx-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: none;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.arat-ctx-btn--warning {
    color: #92600a;
    background: rgba(240, 165, 31, 0.12);
    border-color: rgba(240, 165, 31, 0.25);
}

.arat-ctx-btn--warning:hover {
    background: rgba(240, 165, 31, 0.22);
    border-color: rgba(240, 165, 31, 0.45);
}

html[data-bs-theme="dark"] .arat-ctx-btn--warning {
    color: #f5c96a;
    background: rgba(240, 165, 31, 0.15);
}

.arat-ctx-btn__cta {
    font-style: normal;
    font-size: 0.72rem;
    font-weight: 700;
    opacity: 0.7;
    margin-left: 2px;
}

.arat-ctx-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 500;
}

.arat-ctx-badge--success {
    color: #0f6835;
    background: rgba(25, 179, 125, 0.12);
    border: 1px solid rgba(25, 179, 125, 0.25);
}

html[data-bs-theme="dark"] .arat-ctx-badge--success {
    color: #6ee4b2;
    background: rgba(25, 179, 125, 0.15);
}

/* ── Modal de progreso asíncrono ─────────────────────────────────────── */
.arat-async-job-modal {
    border-radius: 24px;
    border: 1px solid rgba(31, 84, 172, 0.14);
    box-shadow: 0 28px 80px rgba(11, 18, 41, 0.18);
    overflow: hidden;
}

.arat-async-job-modal .modal-body {
    padding: 1.5rem;
}

.arat-async-job-modal__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 1rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
    font-size: 0.77rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.arat-async-job-modal__header {
    margin-bottom: 1.1rem;
}

.arat-async-job-modal__header h5 {
    font-size: 1.15rem;
    font-weight: 800;
}

.arat-async-job-modal__progress-wrap {
    margin-bottom: 0.85rem;
}

.arat-async-job-modal__progress {
    height: 14px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.18);
    overflow: hidden;
}

.arat-async-job-modal__progress .progress-bar {
    min-width: 3rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    background: linear-gradient(90deg, #2563eb 0%, #06b6d4 100%);
}

.arat-async-job-modal__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: #5f6b85;
    font-size: 0.82rem;
    font-weight: 600;
}

.arat-async-job-modal[data-state="finished"] .arat-async-job-modal__eyebrow {
    background: rgba(25, 179, 125, 0.12);
    color: #148054;
}

.arat-async-job-modal[data-state="finished"] .progress-bar {
    background: linear-gradient(90deg, #19b37d 0%, #34d399 100%);
}

.arat-async-job-modal[data-state="failed"] .arat-async-job-modal__eyebrow,
.arat-async-job-modal[data-state="cancelled"] .arat-async-job-modal__eyebrow {
    background: rgba(220, 38, 38, 0.12);
    color: #b42318;
}

.arat-async-job-modal[data-state="failed"] .progress-bar,
.arat-async-job-modal[data-state="cancelled"] .progress-bar {
    background: linear-gradient(90deg, #dc2626 0%, #f97316 100%);
}

html[data-bs-theme="dark"] .arat-async-job-modal {
    border-color: rgba(96, 165, 250, 0.18);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.16), transparent 42%),
        rgba(12, 18, 34, 0.96);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

html[data-bs-theme="dark"] .arat-async-job-modal .modal-body,
html[data-bs-theme="dark"] .arat-async-job-modal .modal-footer {
    background: transparent;
}

html[data-bs-theme="dark"] .arat-async-job-modal__header h5 {
    color: #eef3ff;
}

html[data-bs-theme="dark"] .arat-async-job-modal__header .text-muted,
html[data-bs-theme="dark"] .arat-async-job-modal__meta {
    color: rgba(219, 234, 254, 0.74) !important;
}

/* ── Page loader ERP ─────────────────────────────────────────────────── */
.apl-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background:
        radial-gradient(circle at top, rgba(37, 99, 235, 0.16), transparent 38%),
        rgba(242, 247, 255, 0.76);
    backdrop-filter: blur(16px) saturate(1.08);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}

.apl-overlay::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(37, 99, 235, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(37, 99, 235, 0.08) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.55;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent 92%);
    pointer-events: none;
}

html[data-bs-theme="dark"] .apl-overlay {
    background:
        radial-gradient(circle at top, rgba(6, 182, 212, 0.14), transparent 34%),
        rgba(5, 10, 24, 0.78);
}

html[data-bs-theme="dark"] .apl-overlay::before {
    background-image:
        linear-gradient(rgba(96, 165, 250, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96, 165, 250, 0.08) 1px, transparent 1px);
    opacity: 0.4;
}

.apl-overlay.apl-hiding {
    opacity: 0;
    visibility: hidden;
}

.apl-overlay.apl-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.apl-box {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1.15rem;
    width: min(100%, 460px);
    padding: 1.3rem 1.4rem;
    border-radius: 28px;
    border: 1px solid rgba(30, 64, 175, 0.12);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 255, 0.92));
    box-shadow:
        0 24px 80px rgba(15, 23, 42, 0.16),
        inset 0 1px 0 rgba(255, 255, 255, 0.65);
    overflow: hidden;
}

.apl-box::before {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 27px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    pointer-events: none;
}

.apl-box::after {
    content: "";
    position: absolute;
    inset: auto -15% 50% 45%;
    height: 140px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.14), transparent 68%);
    pointer-events: none;
}

html[data-bs-theme="dark"] .apl-box {
    border-color: rgba(96, 165, 250, 0.16);
    background:
        linear-gradient(180deg, rgba(10, 18, 36, 0.96), rgba(12, 20, 42, 0.92));
    box-shadow:
        0 26px 84px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-bs-theme="dark"] .apl-box::before {
    border-color: rgba(148, 163, 184, 0.08);
}

.apl-orbit {
    position: relative;
    width: 78px;
    height: 78px;
    flex: 0 0 78px;
}

.apl-orbit__ring,
.apl-orbit__core,
.apl-orbit__dot {
    position: absolute;
    border-radius: 999px;
}

.apl-orbit__ring {
    inset: 0;
    border: 1px solid rgba(37, 99, 235, 0.18);
}

.apl-orbit__ring--outer {
    animation: apl-rotate 1.7s linear infinite;
}

.apl-orbit__ring--inner {
    inset: 10px;
    border-color: rgba(14, 165, 233, 0.22);
    animation: apl-rotate-reverse 1.05s linear infinite;
}

.apl-orbit__core {
    inset: 21px;
    background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
    box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.12);
}

.apl-orbit__dot {
    top: 8px;
    left: 50%;
    width: 10px;
    height: 10px;
    margin-left: -5px;
    background: #06b6d4;
    box-shadow: 0 0 0 6px rgba(6, 182, 212, 0.12);
    transform-origin: 0 31px;
    animation: apl-orbit-dot 1.2s linear infinite;
}

html[data-bs-theme="dark"] .apl-orbit__ring {
    border-color: rgba(96, 165, 250, 0.22);
}

html[data-bs-theme="dark"] .apl-orbit__ring--inner {
    border-color: rgba(34, 211, 238, 0.22);
}

.apl-copy {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.apl-kicker {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.62rem;
    margin-bottom: 0.7rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.09);
    color: #1d4ed8;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.apl-label {
    margin: 0;
    color: #102043;
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.apl-sub {
    margin: 0.42rem 0 0;
    color: #5f6b85;
    font-size: 0.88rem;
    line-height: 1.5;
}

html[data-bs-theme="dark"] .apl-kicker {
    background: rgba(37, 99, 235, 0.15);
    color: #93c5fd;
}

html[data-bs-theme="dark"] .apl-label {
    color: #eff6ff;
}

html[data-bs-theme="dark"] .apl-sub {
    color: rgba(219, 234, 254, 0.74);
}

@keyframes apl-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes apl-rotate-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

@keyframes apl-orbit-dot {
    from { transform: rotate(0deg) translateY(0); }
    to { transform: rotate(360deg) translateY(0); }
}

@media (max-width: 640px) {
    .apl-overlay {
        padding: 1rem;
    }

    .apl-box {
        gap: 0.95rem;
        padding: 1.05rem 1rem;
        border-radius: 24px;
    }

    .apl-orbit {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }

    .apl-orbit__ring--inner {
        inset: 8px;
    }

    .apl-orbit__core {
        inset: 17px;
    }

    .apl-orbit__dot {
        top: 7px;
        transform-origin: 0 25px;
    }

    .apl-label {
        font-size: 0.98rem;
    }

    .apl-sub {
        font-size: 0.82rem;
    }
}
