.am-dashboard {
    --am-bg: #f4f7fb;
    --am-surface: #ffffff;
    --am-surface-soft: #f8fafc;
    --am-text: #0f172a;
    --am-muted: #64748b;
    --am-line: #e2e8f0;
    --am-line-strong: #cbd5e1;
    --am-navy: #0b172a;
    --am-emerald: #0b5d91;
    --am-shadow: 0 1px 2px rgb(15 23 42 / 0.03), 0 12px 32px -18px rgb(15 23 42 / 0.18);
    display: grid;
    gap: 1.25rem;
    color: var(--am-text);
    padding-bottom: 2rem;
}

.dark .am-dashboard {
    --am-bg: #0b1220;
    --am-surface: #111a2c;
    --am-surface-soft: #162136;
    --am-text: #e8eef8;
    --am-muted: #91a0b8;
    --am-line: #22304a;
    --am-line-strong: #31415f;
    --am-shadow: 0 1px 2px rgb(0 0 0 / 0.18), 0 18px 40px -24px rgb(0 0 0 / 0.65);
}

.am-dashboard * {
    box-sizing: border-box;
}

.am-dashboard a {
    text-decoration: none;
}

.am-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(300px, 0.8fr);
    gap: 2rem;
    overflow: hidden;
    padding: 2rem 2.25rem;
    border: 1px solid rgb(255 255 255 / 0.08);
    border-radius: 1.4rem;
    background:
        radial-gradient(circle at 92% -20%, rgb(18 155 194 / 0.32), transparent 34%),
        linear-gradient(125deg, #0a1628 0%, #10233d 58%, #0a587f 100%);
    box-shadow: 0 24px 60px -32px rgb(2 6 23 / 0.8);
    color: #ffffff;
    isolation: isolate;
}

.am-hero__orb {
    position: absolute;
    z-index: -1;
    border-radius: 999px;
    filter: blur(2px);
    pointer-events: none;
}

.am-hero__orb--one {
    top: -9rem;
    right: -3rem;
    width: 24rem;
    height: 24rem;
    background: radial-gradient(circle, rgb(18 155 194 / 0.24), transparent 68%);
}

.am-hero__orb--two {
    bottom: -12rem;
    left: 28%;
    width: 22rem;
    height: 22rem;
    background: radial-gradient(circle, rgb(56 189 248 / 0.12), transparent 68%);
}

.am-hero__content {
    position: relative;
    z-index: 1;
    align-self: center;
}

.am-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding: 0.36rem 0.72rem;
    border: 1px solid rgb(255 255 255 / 0.14);
    border-radius: 999px;
    background: rgb(255 255 255 / 0.07);
    color: #d8f6fd;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.am-pulse {
    position: relative;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 999px;
    background: #6fdcf5;
    box-shadow: 0 0 0 0 rgb(111 220 245 / 0.5);
    animation: am-pulse 2.2s infinite;
}

@keyframes am-pulse {
    70% {
        box-shadow: 0 0 0 7px rgb(111 220 245 / 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgb(111 220 245 / 0);
    }
}

.am-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.7rem, 3vw, 2.55rem);
    font-weight: 750;
    letter-spacing: -0.045em;
    line-height: 1.1;
}

.am-hero__content > p {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    margin: 0.8rem 0 0;
    color: #aebed2;
    font-size: 0.92rem;
}

.am-hero__content > p span {
    color: #4f6480;
}

.am-hero__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1.65rem;
}

.am-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.55rem;
    padding: 0.62rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    font-size: 0.79rem;
    font-weight: 700;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.am-btn:hover {
    transform: translateY(-1px);
}

.am-btn__icon {
    width: 1rem;
    height: 1rem;
}

.am-btn--light {
    background: #ffffff;
    color: #0a172a;
    box-shadow: 0 8px 20px -12px rgb(255 255 255 / 0.55);
}

.am-btn--light:hover {
    background: #e9f7fc;
}

.am-btn--ghost {
    border-color: rgb(255 255 255 / 0.18);
    background: rgb(255 255 255 / 0.08);
    color: #ffffff;
}

.am-btn--ghost:hover {
    background: rgb(255 255 255 / 0.14);
}

.am-btn--outline {
    border-color: var(--am-line);
    background: var(--am-surface);
    color: var(--am-text);
}

.am-btn--outline:hover {
    border-color: #0b5d91;
    color: #0b5d91;
}

.am-link-light {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.25rem;
    color: #aebed2;
    font-size: 0.76rem;
    font-weight: 600;
    transition: color 160ms ease;
}

.am-link-light:hover {
    color: #ffffff;
}

.am-link-light__icon {
    width: 0.9rem;
    height: 0.9rem;
}

.am-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
    align-self: center;
    padding: 0.55rem;
    border: 1px solid rgb(255 255 255 / 0.1);
    border-radius: 1.1rem;
    background: rgb(255 255 255 / 0.055);
    backdrop-filter: blur(12px);
}

.am-hero__stat {
    display: flex;
    min-width: 0;
    flex-direction: column;
    padding: 0.75rem 0.6rem;
    border-radius: 0.8rem;
    text-align: center;
}

.am-hero__stat + .am-hero__stat {
    border-left: 1px solid rgb(255 255 255 / 0.09);
}

.am-hero__stat span {
    color: #94a9c1;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.3;
}

.am-hero__stat strong {
    margin: 0.3rem 0 0.05rem;
    color: #ffffff;
    font-size: 1.45rem;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.am-hero__stat small {
    color: #66809d;
    font-size: 0.6rem;
}

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

.am-kpi {
    position: relative;
    overflow: hidden;
    padding: 1.15rem 1.2rem 1rem;
    border: 1px solid var(--am-line);
    border-radius: 1.1rem;
    background: var(--am-surface);
    box-shadow: var(--am-shadow);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.am-kpi::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    border-radius: 3px;
    background: var(--am-accent);
    content: "";
}

.am-kpi:hover {
    border-color: color-mix(in srgb, var(--am-accent) 35%, var(--am-line));
    box-shadow: 0 16px 36px -24px color-mix(in srgb, var(--am-accent) 55%, transparent);
    transform: translateY(-2px);
}

.am-kpi--blue {
    --am-accent: #0ea5e9;
    --am-accent-soft: #e0f2fe;
}

.am-kpi--violet {
    --am-accent: #8b5cf6;
    --am-accent-soft: #ede9fe;
}

.am-kpi--green {
    --am-accent: #10b981;
    --am-accent-soft: #d1fae5;
}

.am-kpi--amber {
    --am-accent: #f59e0b;
    --am-accent-soft: #fef3c7;
}

.dark .am-kpi--blue {
    --am-accent-soft: rgb(14 165 233 / 0.14);
}

.dark .am-kpi--violet {
    --am-accent-soft: rgb(139 92 246 / 0.14);
}

.dark .am-kpi--green {
    --am-accent-soft: rgb(16 185 129 / 0.14);
}

.dark .am-kpi--amber {
    --am-accent-soft: rgb(245 158 11 / 0.14);
}

.am-kpi__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.am-kpi__icon {
    display: inline-flex;
    width: 2.3rem;
    height: 2.3rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.7rem;
    background: var(--am-accent-soft);
    color: var(--am-accent);
}

.am-kpi__icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.am-kpi__tag {
    color: var(--am-muted);
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.am-kpi__value {
    margin-top: 0.9rem;
    color: var(--am-text);
    font-size: 1.9rem;
    font-weight: 760;
    letter-spacing: -0.05em;
    line-height: 1;
}

.am-kpi__value--money {
    font-size: clamp(1.3rem, 1.65vw, 1.75rem);
    letter-spacing: -0.04em;
}

.am-kpi__label {
    margin-top: 0.35rem;
    color: var(--am-text);
    font-size: 0.78rem;
    font-weight: 650;
}

.am-kpi__footer {
    display: flex;
    min-height: 1.6rem;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.5rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--am-line);
    color: var(--am-muted);
    font-size: 0.65rem;
    line-height: 1.4;
}

.am-kpi__warning {
    color: #dc2626;
    font-weight: 700;
}

.dark .am-kpi__warning {
    color: #f87171;
}

.am-trend {
    font-weight: 700;
}

.am-trend--up {
    color: #059669;
}

.dark .am-trend--up {
    color: #34d399;
}

.am-trend--down {
    color: #dc2626;
}

.dark .am-trend--down {
    color: #f87171;
}

.am-layout {
    display: grid;
    gap: 1rem;
}

.am-layout--wide {
    grid-template-columns: minmax(0, 1.9fr) minmax(300px, 1fr);
}

.am-layout--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.am-card {
    min-width: 0;
    padding: 1.35rem;
    border: 1px solid var(--am-line);
    border-radius: 1.15rem;
    background: var(--am-surface);
    box-shadow: var(--am-shadow);
}

.am-card--flush {
    padding: 0;
}

.am-card--flush > .am-card__header {
    padding: 1.35rem 1.35rem 0.85rem;
}

.am-card--chart {
    overflow: hidden;
}

.am-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.am-card__eyebrow {
    display: block;
    margin-bottom: 0.3rem;
    color: #059669;
    font-size: 0.59rem;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.dark .am-card__eyebrow {
    color: #34d399;
}

.am-card__header h2 {
    margin: 0;
    color: var(--am-text);
    font-size: 1.02rem;
    font-weight: 720;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

.am-card__header p {
    margin: 0.25rem 0 0;
    color: var(--am-muted);
    font-size: 0.69rem;
    line-height: 1.45;
}

.am-card__metric {
    flex-shrink: 0;
    text-align: right;
}

.am-card__metric span {
    display: block;
    color: var(--am-muted);
    font-size: 0.6rem;
}

.am-card__metric strong {
    display: block;
    margin-top: 0.15rem;
    color: #059669;
    font-size: 0.98rem;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.dark .am-card__metric strong {
    color: #34d399;
}

.am-card__metric--danger strong {
    color: #dc2626;
}

.dark .am-card__metric--danger strong {
    color: #f87171;
}

.am-card__link {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.3rem;
    color: #059669;
    font-size: 0.68rem;
    font-weight: 700;
}

.am-card__link svg {
    width: 0.8rem;
    height: 0.8rem;
    transition: transform 160ms ease;
}

.am-card__link:hover svg {
    transform: translateX(2px);
}

.am-icon-link {
    display: inline-flex;
    width: 1.9rem;
    height: 1.9rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--am-line);
    border-radius: 0.55rem;
    color: var(--am-muted);
    transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}

.am-icon-link:hover {
    border-color: #10b981;
    background: #ecfdf5;
    color: #047857;
}

.dark .am-icon-link:hover {
    background: rgb(16 185 129 / 0.12);
    color: #34d399;
}

.am-icon-link svg {
    width: 0.85rem;
    height: 0.85rem;
}

.am-chart {
    position: relative;
    min-height: 220px;
    padding-top: 1rem;
}

.am-chart__grid {
    position: absolute;
    inset: 1.7rem 0 2.1rem;
    display: grid;
    grid-template-rows: repeat(4, 1fr);
    pointer-events: none;
}

.am-chart__grid span {
    border-top: 1px dashed var(--am-line);
}

.am-chart__bars {
    position: relative;
    display: grid;
    height: 220px;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: clamp(0.5rem, 1.5vw, 1.4rem);
    align-items: end;
}

.am-chart__column {
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    justify-content: flex-end;
    text-align: center;
}

.am-chart__value {
    overflow: hidden;
    margin-bottom: 0.4rem;
    color: var(--am-muted);
    font-size: 0.57rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-chart__track {
    display: flex;
    height: 165px;
    align-items: flex-end;
    justify-content: center;
}

.am-chart__bar {
    width: min(2.3rem, 72%);
    min-height: 4px;
    border-radius: 0.45rem 0.45rem 0.18rem 0.18rem;
    background: linear-gradient(180deg, #2bc3e9 0%, #0b5d91 100%);
    box-shadow: 0 8px 18px -12px rgb(11 93 145 / 0.55);
    transition: height 450ms ease, filter 160ms ease;
}

.am-chart__bar:not(.is-current) {
    background: linear-gradient(180deg, #d8f6fd 0%, #9ddff1 100%);
}

.dark .am-chart__bar:not(.is-current) {
    background: linear-gradient(180deg, #164e72 0%, #0f3b59 100%);
}

.am-chart__column:hover .am-chart__bar {
    filter: brightness(1.07);
}

.am-chart__label {
    display: block;
    margin-top: 0.6rem;
    color: var(--am-muted);
    font-size: 0.62rem;
    font-weight: 650;
    text-transform: capitalize;
}

.am-chart__label.is-current {
    color: #0b5d91;
    font-weight: 800;
}

.dark .am-chart__label.is-current {
    color: #6fdcf5;
}

.am-status {
    display: flex;
    align-items: center;
    gap: 1.35rem;
    padding: 0.35rem 0 0.5rem;
}

.am-donut {
    --am-donut: conic-gradient(#e2e8f0 0% 100%);
    position: relative;
    display: grid;
    width: 8.7rem;
    height: 8.7rem;
    flex-shrink: 0;
    place-items: center;
    border-radius: 999px;
    background: var(--am-donut);
    box-shadow: inset 0 0 0 1px rgb(15 23 42 / 0.03);
}

.am-donut::before {
    position: absolute;
    inset: 1.15rem;
    border-radius: inherit;
    background: var(--am-surface);
    box-shadow: inset 0 0 0 1px var(--am-line);
    content: "";
}

.am-donut__center {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.am-donut__center strong {
    color: var(--am-text);
    font-size: 1.6rem;
    font-weight: 760;
    letter-spacing: -0.045em;
    line-height: 1;
}

.am-donut__center span {
    margin-top: 0.2rem;
    color: var(--am-muted);
    font-size: 0.56rem;
    font-weight: 600;
}

.am-status__legend {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 0.55rem;
}

.am-status__row {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.45rem;
    color: var(--am-muted);
    font-size: 0.67rem;
}

.am-status__dot {
    width: 0.42rem;
    height: 0.42rem;
    flex-shrink: 0;
    border-radius: 999px;
}

.am-status__name {
    overflow: hidden;
    flex: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-status__row strong {
    color: var(--am-text);
    font-size: 0.72rem;
    font-weight: 750;
}

.am-alert {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 1rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid #fecaca;
    border-radius: 0.65rem;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.64rem;
    line-height: 1.45;
}

.dark .am-alert {
    border-color: rgb(248 113 113 / 0.25);
    background: rgb(127 29 29 / 0.18);
    color: #fca5a5;
}

.am-alert svg {
    width: 0.9rem;
    height: 0.9rem;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.am-table-wrap {
    overflow-x: auto;
}

.am-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.7rem;
}

.am-table th {
    padding: 0.65rem 1.35rem;
    border-top: 1px solid var(--am-line);
    border-bottom: 1px solid var(--am-line);
    background: var(--am-surface-soft);
    color: var(--am-muted);
    font-size: 0.57rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.am-table td {
    padding: 0.8rem 1.35rem;
    border-bottom: 1px solid var(--am-line);
    vertical-align: middle;
}

.am-table tbody tr:last-child td {
    border-bottom: 0;
}

.am-table tbody tr {
    transition: background 140ms ease;
}

.am-table tbody tr:hover {
    background: var(--am-surface-soft);
}

.am-table__right {
    text-align: right;
}

.am-table__money {
    color: var(--am-text);
    font-weight: 700;
    white-space: nowrap;
}

.am-record {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    color: var(--am-text);
    white-space: nowrap;
}

a.am-record:hover strong {
    color: #0b5d91;
}

.am-record strong {
    font-size: 0.7rem;
    font-weight: 700;
    transition: color 140ms ease;
}

.am-record span {
    color: var(--am-muted);
    font-size: 0.6rem;
}

.am-record--plain {
    cursor: default;
}

.am-technician {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--am-muted);
    white-space: nowrap;
}

.am-avatar {
    display: inline-flex;
    width: 1.4rem;
    height: 1.4rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #d1fae5;
    color: #047857;
    font-size: 0.55rem;
    font-weight: 800;
}

.dark .am-avatar {
    background: rgb(16 185 129 / 0.16);
    color: #6ee7b7;
}

.am-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.45rem;
    border-radius: 999px;
    font-size: 0.56rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.am-badge--draft {
    background: #f1f5f9;
    color: #475569;
}

.am-badge--issued,
.am-badge--sent {
    background: #e0f2fe;
    color: #0369a1;
}

.am-badge--in-progress {
    background: #fef3c7;
    color: #b45309;
}

.am-badge--waiting-approval {
    background: #ede9fe;
    color: #6d28d9;
}

.am-badge--waiting-parts {
    background: #fee2e2;
    color: #b91c1c;
}

.am-badge--completed,
.am-badge--paid,
.am-badge--approved {
    background: #d1fae5;
    color: #047857;
}

.am-badge--invoiced,
.am-badge--partially-paid,
.am-badge--partially-approved {
    background: #dbeafe;
    color: #1d4ed8;
}

.am-badge--cancelled,
.am-badge--void {
    background: #f1f5f9;
    color: #64748b;
}

.dark .am-badge--draft,
.dark .am-badge--cancelled,
.dark .am-badge--void {
    background: #1e293b;
    color: #94a3b8;
}

.dark .am-badge--issued,
.dark .am-badge--sent {
    background: rgb(14 165 233 / 0.14);
    color: #7dd3fc;
}

.dark .am-badge--in-progress {
    background: rgb(245 158 11 / 0.14);
    color: #fcd34d;
}

.dark .am-badge--waiting-approval {
    background: rgb(139 92 246 / 0.14);
    color: #c4b5fd;
}

.dark .am-badge--waiting-parts {
    background: rgb(239 68 68 / 0.14);
    color: #fca5a5;
}

.dark .am-badge--completed,
.dark .am-badge--paid,
.dark .am-badge--approved {
    background: rgb(16 185 129 / 0.14);
    color: #6ee7b7;
}

.dark .am-badge--invoiced,
.dark .am-badge--partially-paid,
.dark .am-badge--partially-approved {
    background: rgb(59 130 246 / 0.14);
    color: #93c5fd;
}

.am-timeline {
    display: grid;
    gap: 0;
}

.am-timeline__item {
    display: grid;
    grid-template-columns: 3.2rem 1.1rem minmax(0, 1fr);
    gap: 0.45rem;
    min-height: 4.4rem;
}

.am-timeline__time {
    padding-top: 0.15rem;
    text-align: right;
}

.am-timeline__time strong {
    display: block;
    color: var(--am-text);
    font-size: 0.72rem;
    font-weight: 750;
}

.am-timeline__time span {
    display: block;
    margin-top: 0.1rem;
    color: var(--am-muted);
    font-size: 0.54rem;
    text-transform: uppercase;
}

.am-timeline__line {
    position: relative;
    display: flex;
    justify-content: center;
}

.am-timeline__line::after {
    position: absolute;
    top: 0.65rem;
    bottom: 0;
    width: 1px;
    background: var(--am-line);
    content: "";
}

.am-timeline__item:last-child .am-timeline__line::after {
    display: none;
}

.am-timeline__dot {
    position: relative;
    z-index: 1;
    width: 0.52rem;
    height: 0.52rem;
    margin-top: 0.32rem;
    border: 2px solid var(--am-surface);
    border-radius: 999px;
    background: #10b981;
    box-shadow: 0 0 0 1px #10b981;
}

.am-timeline__body {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.1rem;
    padding-bottom: 1rem;
}

.am-timeline__body strong {
    overflow: hidden;
    color: var(--am-text);
    font-size: 0.71rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-timeline__body span {
    color: var(--am-muted);
    font-size: 0.62rem;
}

.am-timeline__body small {
    overflow: hidden;
    margin-top: 0.08rem;
    color: #94a3b8;
    font-size: 0.56rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-workload {
    display: grid;
    height: 170px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.35rem;
    align-items: end;
}

.am-workload__day {
    display: flex;
    min-width: 0;
    height: 100%;
    flex-direction: column;
    align-items: center;
}

.am-workload__count {
    color: var(--am-muted);
    font-size: 0.54rem;
    font-weight: 700;
}

.am-workload__track {
    display: flex;
    width: min(2rem, 68%);
    flex: 1;
    align-items: flex-end;
    margin: 0.3rem 0 0.4rem;
    overflow: hidden;
    border-radius: 0.4rem;
    background: var(--am-surface-soft);
}

.am-workload__bar {
    width: 100%;
    border-radius: 0.35rem;
    background: linear-gradient(180deg, #6ee7b7, #10b981);
    transition: height 400ms ease;
}

.am-workload__day > span {
    color: var(--am-muted);
    font-size: 0.55rem;
    font-weight: 600;
    text-transform: capitalize;
}

.am-workload__day > strong {
    color: var(--am-text);
    font-size: 0.62rem;
    font-weight: 700;
}

.am-workload__day.is-today .am-workload__count,
.am-workload__day.is-today > strong {
    color: #059669;
}

.dark .am-workload__day.is-today .am-workload__count,
.dark .am-workload__day.is-today > strong {
    color: #34d399;
}

.am-workload__day.is-today .am-workload__bar {
    background: linear-gradient(180deg, #fbbf24, #f59e0b);
}

.am-stock-list,
.am-invoice-list {
    display: grid;
    gap: 0.15rem;
}

.am-stock-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--am-line);
}

.am-stock-item:last-child {
    border-bottom: 0;
}

.am-stock-item__main {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.1rem;
}

.am-stock-item__main strong {
    overflow: hidden;
    color: var(--am-text);
    font-size: 0.68rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-stock-item__main span {
    color: var(--am-muted);
    font-size: 0.56rem;
}

.am-stock-item__values {
    flex-shrink: 0;
    text-align: right;
}

.am-stock-item__values strong {
    display: block;
    color: #dc2626;
    font-size: 0.72rem;
    font-weight: 750;
}

.dark .am-stock-item__values strong {
    color: #f87171;
}

.am-stock-item__values span {
    display: block;
    color: var(--am-muted);
    font-size: 0.53rem;
}

.am-invoice-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--am-line);
    color: var(--am-text);
    transition: opacity 140ms ease;
}

.am-invoice-item:last-child {
    border-bottom: 0;
}

.am-invoice-item:hover {
    opacity: 0.75;
}

.am-invoice-item > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.15rem;
}

.am-invoice-item > div:last-child {
    flex-shrink: 0;
    align-items: flex-end;
}

.am-invoice-item strong {
    font-size: 0.68rem;
    font-weight: 700;
}

.am-invoice-item > div > span {
    overflow: hidden;
    max-width: 8rem;
    color: var(--am-muted);
    font-size: 0.56rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-empty {
    display: flex;
    min-height: 10rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 1rem;
    color: var(--am-muted);
    text-align: center;
}

.am-empty svg {
    width: 1.5rem;
    height: 1.5rem;
    margin-bottom: 0.2rem;
    color: #94a3b8;
}

.am-empty strong {
    color: var(--am-text);
    font-size: 0.75rem;
}

.am-empty span {
    max-width: 17rem;
    font-size: 0.62rem;
    line-height: 1.5;
}

.am-empty--compact {
    min-height: 7rem;
}

.am-quickbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border: 1px dashed var(--am-line-strong);
    border-radius: 1rem;
    background: color-mix(in srgb, var(--am-surface) 60%, transparent);
}

.am-quickbar > div:first-child {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.am-quickbar__icon {
    display: inline-flex;
    width: 2.2rem;
    height: 2.2rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
    background: #ecfdf5;
    color: #059669;
}

.dark .am-quickbar__icon {
    background: rgb(16 185 129 / 0.12);
    color: #34d399;
}

.am-quickbar__icon svg {
    width: 1rem;
    height: 1rem;
}

.am-quickbar > div:first-child > div {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.am-quickbar strong {
    color: var(--am-text);
    font-size: 0.72rem;
}

.am-quickbar > div:first-child > div > span {
    color: var(--am-muted);
    font-size: 0.62rem;
}

.am-quickbar__actions {
    display: flex;
    flex-shrink: 0;
    gap: 0.5rem;
}

@media (max-width: 1280px) {
    .am-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .am-hero {
        grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
    }
}

@media (max-width: 1100px) {
    .am-layout--wide,
    .am-layout--three {
        grid-template-columns: minmax(0, 1fr);
    }

    .am-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .am-hero__stats {
        max-width: 30rem;
    }
}

@media (max-width: 700px) {
    .am-dashboard {
        gap: 0.9rem;
    }

    .am-hero {
        gap: 1.4rem;
        padding: 1.45rem;
        border-radius: 1.1rem;
    }

    .am-hero__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .am-btn {
        width: 100%;
    }

    .am-link-light {
        justify-content: center;
        margin: 0.25rem 0 0;
    }

    .am-hero__stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .am-kpi-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .am-card {
        padding: 1.1rem;
    }

    .am-card--flush {
        padding: 0;
    }

    .am-status {
        flex-direction: column;
        align-items: flex-start;
    }

    .am-status__legend {
        width: 100%;
    }

    .am-chart__bars {
        gap: 0.45rem;
    }

    .am-chart__value {
        display: none;
    }

    .am-quickbar {
        align-items: stretch;
        flex-direction: column;
    }

    .am-quickbar__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .am-dashboard *,
    .am-dashboard *::before,
    .am-dashboard *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

:root {
    --sc-navy: #073563;
    --sc-navy-deep: #052844;
    --sc-blue: #0b5d91;
    --sc-cyan: #129bc2;
    --sc-cyan-soft: #e9f7fc;
    --sc-line: #dfe8f2;
    --sc-surface: #ffffff;
    --sc-canvas: #f4f8fc;
    --sc-muted: #64778d;
    --sc-shadow: 0 18px 44px -32px rgb(7 53 99 / 0.38);
}

.fi-body {
    background:
        radial-gradient(900px 460px at 100% -8%, rgb(18 155 194 / 0.08), transparent 65%),
        var(--sc-canvas);
    color: #182b42;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

.fi-sidebar {
    border-right: 0;
    background: linear-gradient(180deg, #082b4d 0%, #06213d 58%, #051b32 100%);
    color: #d7e6f3;
    box-shadow: 12px 0 32px -28px rgb(2 18 34 / 0.75);
}

.dark .fi-sidebar {
    border-right: 0;
    background: linear-gradient(180deg, #071f38 0%, #05182c 100%);
}

.fi-sidebar-header {
    border-bottom: 1px solid rgb(154 195 224 / 0.14);
    padding: 1.05rem 1rem;
}

.dark .fi-sidebar-header {
    border-bottom-color: rgb(154 195 224 / 0.11);
}

.fi-sidebar-header-logo-ctn a {
    display: inline-flex;
    width: max-content;
    max-width: 100%;
    padding: 0.42rem 0.7rem;
    border-radius: 0.7rem;
    background: #fff;
    box-shadow: 0 8px 22px -14px rgb(0 0 0 / 0.7);
}

.fi-sidebar-header-logo-ctn .fi-logo {
    width: auto;
    max-width: 100%;
    object-fit: contain;
}

.fi-sidebar-nav {
    padding: 0.8rem 0.65rem 1.2rem;
}

.fi-sidebar-group-label {
    color: #7da4c2;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.fi-sidebar-group-btn {
    color: #8db4d1;
}

.fi-sidebar-group-collapse-btn,
.fi-sidebar-group-dropdown-trigger-btn {
    color: #7198b7;
}

.fi-sidebar-item-btn {
    gap: 0.7rem;
    min-height: 2.45rem;
    border-radius: 0.65rem;
    color: #c2d7e8;
    font-weight: 550;
    transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.fi-sidebar-item-btn:hover {
    background: rgb(255 255 255 / 0.075);
    color: #fff;
}

.fi-sidebar-item-icon {
    color: #7fa8c6;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: linear-gradient(90deg, rgb(18 155 194 / 0.28), rgb(18 155 194 / 0.1));
    box-shadow: inset 3px 0 0 #2bc3e9;
    color: #fff;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-icon {
    color: #6fdcf5;
}

.dark .fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: linear-gradient(90deg, rgb(18 155 194 / 0.3), rgb(18 155 194 / 0.08));
    color: #fff;
}

.fi-sidebar-item-badge-ctn .fi-badge {
    background: rgb(255 255 255 / 0.12);
    color: #dff7ff;
}

.fi-sidebar-footer {
    border-top: 1px solid rgb(154 195 224 / 0.14);
    padding: 0.8rem;
}

.fi-sidebar .fi-tenant-menu,
.fi-sidebar .fi-tenant-menu-trigger {
    color: #d7e6f3;
}

.fi-sidebar-header-controls {
    border-bottom: 1px solid rgb(154 195 224 / 0.12);
    padding: 0.4rem 0.8rem 0.75rem;
}

.fi-topbar {
    border-bottom: 1px solid rgb(207 220 233 / 0.8);
    background: rgb(255 255 255 / 0.9);
    box-shadow: 0 8px 24px -26px rgb(7 53 99 / 0.45);
    backdrop-filter: blur(16px);
}

.dark .fi-topbar {
    border-bottom-color: #22364d;
    background: rgb(11 26 43 / 0.9);
}

.fi-main {
    padding: 1.35rem 1.6rem 2.6rem;
}

.fi-page-header-main-ctn {
    gap: 1rem;
}

.fi-page-main {
    gap: 1rem;
}

.fi-header {
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--sc-line);
    border-radius: 1rem;
    background: var(--sc-surface);
    box-shadow: var(--sc-shadow);
}

.fi-header-heading {
    color: #102840;
    font-size: 1.42rem;
    font-weight: 750;
    letter-spacing: -0.035em;
}

.fi-header-subheading {
    margin-top: 0.3rem;
    color: var(--sc-muted);
    font-size: 0.82rem;
}

.fi-breadcrumbs {
    color: #73879d;
    font-size: 0.72rem;
}

.fi-page.fi-resource-create-record-page,
.fi-page.fi-resource-edit-record-page {
    width: 100%;
    max-width: 78rem;
    margin-inline: auto;
}

.fi-section:not(.fi-section-not-contained) {
    overflow: hidden;
    border: 1px solid var(--sc-line);
    border-radius: 0.95rem;
    background: var(--sc-surface);
    box-shadow: 0 12px 34px -30px rgb(7 53 99 / 0.48);
}

.fi-section-header {
    padding: 0.9rem 1.15rem;
    border-bottom: 1px solid #e8eff6;
    background: linear-gradient(180deg, #fbfdff, #f7fafd);
}

.fi-section-header-heading {
    color: #18314c;
    font-size: 0.88rem;
    font-weight: 750;
    letter-spacing: -0.01em;
}

.fi-section-header-description {
    margin-top: 0.18rem;
    color: #73869a;
    font-size: 0.72rem;
}

.fi-section-content {
    padding: 1.15rem;
}

.fi-section-footer {
    border-top: 1px solid #e8eff6;
    background: #f8fbfe;
}

.fi-fo-field {
    gap: 0.38rem;
}

.fi-fo-field-label {
    color: #31475f;
    font-size: 0.78rem;
    font-weight: 650;
}

.fi-fo-field-label-required-mark {
    color: var(--sc-cyan);
}

.fi-fo-field-wrp-error-message,
.fi-fo-field-wrp-error-list {
    color: #b42318;
    font-size: 0.72rem;
}

.fi-input-wrp {
    border: 1px solid #cedae6;
    border-radius: 0.62rem;
    background: #fff;
    box-shadow: 0 1px 2px rgb(7 53 99 / 0.03);
    transition: border-color 150ms ease, box-shadow 150ms ease;
}

.fi-input-wrp:focus-within {
    border-color: var(--sc-cyan);
    box-shadow: 0 0 0 3px rgb(18 155 194 / 0.13);
}

.fi-input-wrp.fi-invalid {
    border-color: #e27a70;
}

.fi-input,
.fi-select-input,
.fi-textarea {
    color: #172c43;
    font-size: 0.82rem;
}

.fi-input::placeholder,
.fi-textarea::placeholder {
    color: #9aabbb;
}

.fi-input-wrp-prefix,
.fi-input-wrp-suffix {
    color: #668098;
}

.fi-checkbox-input,
.fi-radio-input {
    accent-color: var(--sc-blue);
}

.fi-btn {
    border-radius: 0.62rem;
    font-size: 0.78rem;
    font-weight: 650;
    letter-spacing: -0.005em;
    box-shadow: none;
}

.fi-btn.fi-color-primary:not(.fi-outlined) {
    background: linear-gradient(135deg, var(--sc-navy), var(--sc-blue) 58%, #0c7fa7);
    box-shadow: 0 10px 22px -16px rgb(7 53 99 / 0.8);
}

.fi-btn.fi-color-primary:not(.fi-outlined):hover {
    background: linear-gradient(135deg, #062f58, #0a6c9f);
}

.fi-btn.fi-outlined {
    background: #fff;
}

.fi-badge {
    border-radius: 999px;
    font-weight: 700;
}

.fi-ta-ctn {
    overflow: hidden;
    border: 1px solid var(--sc-line);
    border-radius: 0.95rem;
    background: var(--sc-surface);
    box-shadow: var(--sc-shadow);
}

.fi-ta-header {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #e8eff6;
}

.fi-ta-header-heading {
    color: #18314c;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.fi-ta-header-description {
    color: #73869a;
    font-size: 0.75rem;
}

.fi-ta-header-toolbar {
    gap: 0.55rem;
    padding: 0.72rem 1.1rem;
    border-bottom: 1px solid #e8eff6;
    background: #f8fbfe;
}

.fi-ta-table > thead > tr > th,
.fi-ta-header-cell {
    border-bottom: 1px solid #e2ebf3;
    background: #f7fafd;
    color: #5e748b;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.fi-ta-table > tbody > tr > td,
.fi-ta-cell {
    border-bottom: 1px solid #edf2f7;
    font-size: 0.79rem;
}

.fi-ta-table > tbody > tr:hover > td {
    background: #f5fafd;
}

.fi-ta-table > tbody > tr:last-child > td {
    border-bottom: 0;
}

.fi-ta-record {
    transition: background 120ms ease;
}

.fi-ta-empty-state-heading,
.fi-ta-empty-state-description {
    color: #6b7f93;
}

.fi-ta-ctn .fi-pagination {
    border-top: 1px solid #e8eff6;
    background: #fbfdff;
}

.fi-dropdown-panel,
.fi-modal-window {
    border: 1px solid var(--sc-line);
    border-radius: 0.9rem;
    box-shadow: 0 26px 70px -34px rgb(7 53 99 / 0.5);
}

.fi-modal-heading {
    color: #15304a;
    font-weight: 750;
    letter-spacing: -0.02em;
}

.fi-tabs {
    border-radius: 0.6rem;
}

.fi-simple-layout {
    background:
        radial-gradient(760px 420px at 92% -10%, rgb(18 155 194 / 0.15), transparent 68%),
        radial-gradient(620px 380px at 2% 20%, rgb(11 93 145 / 0.1), transparent 66%),
        #eef5fa;
}

.fi-simple-page-content > .fi-simple-header {
    margin-bottom: 1rem;
}

.fi-simple-header .fi-logo {
    width: auto;
    max-width: 230px;
    object-fit: contain;
}

.fi-simple-page-content > .fi-simple-header + .fi-section,
.fi-simple-page-content > form > .fi-section,
.fi-simple-page-content > .fi-form {
    overflow: hidden;
    border: 1px solid var(--sc-line);
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 28px 70px -42px rgb(7 53 99 / 0.48);
}

.fi-simple-header-heading {
    color: #112b45;
    font-weight: 750;
    letter-spacing: -0.03em;
}

.fi-simple-header-subheading {
    color: #64778d;
}

.am-hero {
    background:
        radial-gradient(420px 260px at 95% -10%, rgb(43 195 233 / 0.32), transparent 68%),
        linear-gradient(135deg, #062b4e, #073e6a 56%, #0a587f);
    box-shadow: 0 24px 54px -34px rgb(7 53 99 / 0.72);
}

.am-card {
    border-color: var(--sc-line);
    box-shadow: 0 14px 38px -32px rgb(7 53 99 / 0.5);
}

.am-quickbar__icon {
    background: #e8f6fb;
    color: var(--sc-blue);
}

.dark .am-quickbar__icon {
    background: rgb(18 155 194 / 0.14);
    color: #6fdcf5;
}

.dark .fi-body {
    background:
        radial-gradient(900px 460px at 100% -8%, rgb(18 155 194 / 0.07), transparent 65%),
        #091524;
    color: #dce8f3;
}

.dark .fi-topbar {
    border-bottom-color: #22364d;
    background: rgb(11 26 43 / 0.92);
}

.dark .fi-header,
.dark .fi-section:not(.fi-section-not-contained),
.dark .fi-ta-ctn {
    border-color: #22364d;
    background: #0e1d2f;
    box-shadow: none;
}

.dark .fi-header-heading,
.dark .fi-section-header-heading,
.dark .fi-ta-header-heading,
.dark .fi-modal-heading {
    color: #e7f0f8;
}

.dark .fi-header-subheading,
.dark .fi-section-header-description,
.dark .fi-ta-header-description {
    color: #91a6ba;
}

.dark .fi-section-header,
.dark .fi-ta-header,
.dark .fi-ta-header-toolbar {
    border-color: #21354b;
    background: #0c1a2b;
}

.dark .fi-section-content {
    background: #0e1d2f;
}

.dark .fi-section-footer {
    border-color: #21354b;
    background: #0b1828;
}

.dark .fi-fo-field-label {
    color: #c4d4e3;
}

.dark .fi-input-wrp {
    border-color: #2c425a;
    background: #0b1929;
}

.dark .fi-input,
.dark .fi-select-input,
.dark .fi-textarea {
    color: #e5eef7;
}

.dark .fi-ta-table > thead > tr > th,
.dark .fi-ta-header-cell {
    border-color: #22364b;
    background: #0b1929;
    color: #91a8bd;
}

.dark .fi-ta-table > tbody > tr > td,
.dark .fi-ta-cell {
    border-color: #1d3044;
}

.dark .fi-ta-table > tbody > tr:hover > td {
    background: #11243a;
}

.dark .fi-ta-ctn .fi-pagination {
    border-color: #21354b;
    background: #0b1828;
}

.dark .fi-simple-layout {
    background:
        radial-gradient(760px 420px at 92% -10%, rgb(18 155 194 / 0.1), transparent 68%),
        radial-gradient(620px 380px at 2% 20%, rgb(11 93 145 / 0.08), transparent 66%),
        #071321;
}

.dark .fi-simple-page-content > .fi-simple-header + .fi-section,
.dark .fi-simple-page-content > form > .fi-section,
.dark .fi-simple-page-content > .fi-form {
    border-color: #22364d;
    background: #0e1d2f;
    box-shadow: none;
}

@media (max-width: 1024px) {
    .fi-main {
        padding: 1.1rem 1rem 2.2rem;
    }

    .fi-header {
        padding: 0.95rem 1rem;
    }
}

@media (max-width: 640px) {
    .fi-header-heading {
        font-size: 1.16rem;
    }

    .fi-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .fi-header-actions-ctn {
        width: 100%;
    }

    .fi-section-content {
        padding: 0.9rem;
    }

    .fi-ta-header,
    .fi-ta-header-toolbar {
        padding-inline: 0.8rem;
    }

    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr {
        border-bottom: 1px solid #e8eff6;
        background: var(--sc-surface);
    }

    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr:last-child {
        border-bottom: 0;
    }

    .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr > .fi-ta-cell:not(.fi-ta-selection-cell):has(> .fi-ta-cell-label) {
        display: grid;
        grid-template-columns: minmax(6.5rem, 38%) minmax(0, 1fr);
        align-items: baseline;
        gap: 0.75rem;
        padding: 0.32rem 1rem;
    }

    .fi-ta-table.fi-ta-table-stacked-on-mobile .fi-ta-cell-label {
        padding-top: 0;
        color: #647a90;
        font-size: 0.62rem;
        font-weight: 800;
        letter-spacing: 0.055em;
        line-height: 1.35;
        text-transform: uppercase;
    }

    .fi-ta-table.fi-ta-table-stacked-on-mobile .fi-ta-cell-content {
        color: #1c334b;
        font-size: 0.8rem;
        line-height: 1.45;
        text-align: end;
    }

    .dark .fi-ta-table.fi-ta-table-stacked-on-mobile > tbody > tr {
        border-bottom-color: #1d3044;
        background: #0e1d2f;
    }

    .dark .fi-ta-table.fi-ta-table-stacked-on-mobile .fi-ta-cell-label {
        color: #8fa6ba;
    }

    .dark .fi-ta-table.fi-ta-table-stacked-on-mobile .fi-ta-cell-content {
        color: #dce8f3;
    }
}

/* Resource reports */
.am-report {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.am-report__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border: 1px solid var(--am-line);
    border-radius: 1.15rem;
    background: var(--am-surface);
    box-shadow: var(--am-shadow);
}

.am-report__eyebrow {
    display: block;
    color: #059669;
    font-size: 0.59rem;
    font-weight: 750;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.dark .am-report__eyebrow {
    color: #34d399;
}

.am-report__copy h1 {
    margin: 0.2rem 0 0;
    color: var(--am-text);
    font-size: 1.32rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.am-report__copy p {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0.3rem 0 0;
    color: var(--am-muted);
    font-size: 0.72rem;
}

.am-report__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0.55rem;
}

.am-report__field {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.am-report__field span {
    color: var(--am-muted);
    font-size: 0.62rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.am-report__field input {
    height: 2.55rem;
    padding: 0 0.7rem;
    border: 1px solid var(--am-line);
    border-radius: 0.75rem;
    background: var(--am-surface);
    color: var(--am-text);
    font-size: 0.78rem;
    font-weight: 600;
}

.am-report__field input:focus {
    border-color: #0b5d91;
    outline: none;
    box-shadow: 0 0 0 3px rgb(11 93 145 / 0.14);
}

.dark .am-report__field input:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgb(56 189 248 / 0.18);
}

.am-report__bar + .am-report__bar {
    margin-top: 1rem;
}

.am-report__bar-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}

.am-report__bar-head span {
    color: var(--am-text);
    font-size: 0.8rem;
    font-weight: 650;
}

.am-report__bar-head strong {
    color: var(--am-muted);
    font-size: 0.76rem;
    font-weight: 750;
}

.am-report__track {
    overflow: hidden;
    height: 0.5rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--am-line) 70%, transparent);
}

.am-report__fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #0b5d91, #38bdf8);
}

.dark .am-report__fill {
    background: linear-gradient(90deg, #0e7490, #38bdf8);
}

.am-report__table-wrap {
    overflow-x: auto;
    padding: 0 1.35rem 1.35rem;
}

.am-report__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
}

.am-report__table th {
    padding: 0.55rem 0.65rem;
    border-bottom: 1px solid var(--am-line);
    color: var(--am-muted);
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

.am-report__table td {
    padding: 0.65rem;
    border-bottom: 1px solid color-mix(in srgb, var(--am-line) 65%, transparent);
    color: var(--am-text);
    vertical-align: middle;
}

.am-report__table tbody tr:last-child td {
    border-bottom: 0;
}

.am-report__table tbody tr:hover {
    background: color-mix(in srgb, var(--am-line) 30%, transparent);
}

.am-report__empty {
    margin: 0;
    padding: 1rem 0;
    color: var(--am-muted);
    font-size: 0.78rem;
}

.am-report__table .am-report__empty {
    padding: 1.15rem 0.65rem;
    text-align: center;
}

@media (max-width: 900px) {
    .am-report__toolbar {
        align-items: stretch;
    }

    .am-report__actions {
        width: 100%;
    }

    .am-report__field {
        flex: 1 1 9rem;
    }

    .am-report__field input {
        width: 100%;
    }
}

.am-com .am-hero {
    margin-bottom: 1.25rem;
}

.am-com__hero-value {
    font-size: 1.12rem !important;
    letter-spacing: -0.02em;
}

.am-com__stack {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 1.15rem;
}

.am-com .am-card__header {
    align-items: flex-start;
}

.am-com__message {
    display: grid;
    gap: 0.9rem;
}

.am-com__message-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--am-line);
    border-radius: 0.8rem;
    background: color-mix(in srgb, var(--am-surface-soft) 72%, transparent);
}

.am-com__message-head span {
    color: var(--am-muted);
    font-size: 0.6rem;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.am-com__message-head strong {
    overflow-wrap: anywhere;
    color: var(--am-text);
    font-size: 0.78rem;
    font-weight: 700;
}

.am-com__body {
    padding: 1.15rem 1.2rem;
    border: 1px solid var(--am-line);
    border-radius: 0.9rem;
    background: var(--am-surface-soft);
    color: var(--am-text);
    font-size: 0.84rem;
    line-height: 1.8;
    overflow-wrap: anywhere;
}

.am-com__related {
    display: grid;
    gap: 0.55rem;
}

.am-com__related-item {
    display: grid;
    grid-template-columns: 2.45rem minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.7rem 0.8rem;
    border: 1px solid var(--am-line);
    border-radius: 0.85rem;
    background: color-mix(in srgb, var(--am-surface-soft) 55%, transparent);
    transition: border-color 0.15s ease, background 0.15s ease;
}

.am-com__related-item:hover {
    border-color: var(--am-line-strong);
    background: var(--am-surface-soft);
}

.am-com__related-icon {
    display: grid;
    width: 2.45rem;
    height: 2.45rem;
    place-items: center;
    border-radius: 0.7rem;
    background: color-mix(in srgb, #0b5d91 10%, var(--am-surface));
    color: #0b5d91;
}

.am-com__related-icon svg {
    width: 1.05rem;
    height: 1.05rem;
}

.am-com__related-item div {
    display: grid;
    min-width: 0;
    gap: 0.12rem;
}

.am-com__related-item div span {
    color: var(--am-muted);
    font-size: 0.58rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.am-com__related-item div strong {
    overflow: hidden;
    color: var(--am-text);
    font-size: 0.78rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.am-com__related-item > a {
    display: grid;
    width: 1.9rem;
    height: 1.9rem;
    place-items: center;
    border: 1px solid var(--am-line);
    border-radius: 999px;
    color: var(--am-muted);
    transition: color 0.15s ease, border-color 0.15s ease;
}

.am-com__related-item > a:hover {
    border-color: #0b5d91;
    color: #0b5d91;
}

.am-com__related-item > a svg {
    width: 0.9rem;
    height: 0.9rem;
}

.am-com__details {
    display: grid;
    gap: 0;
    margin: 0;
}

.am-com__details > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid color-mix(in srgb, var(--am-line) 65%, transparent);
}

.am-com__details > div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.am-com__details dt {
    color: var(--am-muted);
    font-size: 0.65rem;
    font-weight: 650;
}

.am-com__details dd {
    margin: 0;
    color: var(--am-text);
    font-size: 0.72rem;
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
}

.am-com__mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.64rem !important;
    font-weight: 500 !important;
}

.am-com__alert {
    display: flex;
    gap: 0.65rem;
    margin-bottom: 1rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid #fecaca;
    border-radius: 0.8rem;
    background: #fef2f2;
    color: #991b1b;
}

.am-com__alert > svg {
    width: 1.1rem;
    height: 1.1rem;
    flex: none;
    margin-top: 0.05rem;
}

.am-com__alert strong {
    display: block;
    font-size: 0.72rem;
    font-weight: 750;
}

.am-com__alert p {
    margin: 0.15rem 0 0;
    font-size: 0.68rem;
    line-height: 1.55;
}

.am-com__dot--muted {
    background: #94a3b8;
    box-shadow: 0 0 0 1px #94a3b8;
}

.am-com__dot--pending {
    background: #f59e0b;
    box-shadow: 0 0 0 1px #f59e0b;
}

.am-com__dot--info {
    background: #0ea5e9;
    box-shadow: 0 0 0 1px #0ea5e9;
}

.am-com__dot--danger {
    background: #ef4444;
    box-shadow: 0 0 0 1px #ef4444;
}

.am-com__dot--warning {
    background: #f59e0b;
    box-shadow: 0 0 0 1px #f59e0b;
}

.am-badge--queued {
    background: #f1f5f9;
    color: #475569;
}

.am-badge--delivered {
    background: #d1fae5;
    color: #047857;
}

.am-badge--failed {
    background: #fee2e2;
    color: #b91c1c;
}

.am-badge--opted-out {
    background: #fef3c7;
    color: #b45309;
}

.am-badge--email {
    background: #e0f2fe;
    color: #0369a1;
}

.am-badge--sms {
    background: #fef3c7;
    color: #b45309;
}

.am-badge--whatsapp {
    background: #d1fae5;
    color: #047857;
}

.dark .am-com__body,
.dark .am-com__related-item,
.dark .am-com__message-head {
    background: #0b1929;
}

.dark .am-com__related-icon {
    background: rgb(14 165 233 / 0.14);
    color: #7dd3fc;
}

.dark .am-com__alert {
    border-color: rgb(239 68 68 / 0.35);
    background: rgb(127 29 29 / 0.24);
    color: #fca5a5;
}

.dark .am-badge--queued {
    background: #1e293b;
    color: #94a3b8;
}

.dark .am-badge--delivered,
.dark .am-badge--whatsapp {
    background: rgb(16 185 129 / 0.14);
    color: #6ee7b7;
}

.dark .am-badge--failed {
    background: rgb(239 68 68 / 0.14);
    color: #fca5a5;
}

.dark .am-badge--opted-out,
.dark .am-badge--sms {
    background: rgb(245 158 11 / 0.14);
    color: #fcd34d;
}

.dark .am-badge--email {
    background: rgb(14 165 233 / 0.14);
    color: #7dd3fc;
}

@media (max-width: 1024px) {
    .am-com__stack {
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .am-com__body {
        padding: 0.95rem;
        font-size: 0.8rem;
    }

    .am-com__related-item {
        grid-template-columns: 2.2rem minmax(0, 1fr) auto;
        gap: 0.6rem;
    }

    .am-com__related-icon {
        width: 2.2rem;
        height: 2.2rem;
    }

    .am-com__details > div {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }

    .am-com__details dd {
        text-align: left;
    }
}

.fi-fo-field-label-ctn .fi-sc-icon[x-tooltip] {
    margin-inline-start: 0.28rem;
    color: #71859a !important;
    cursor: help;
    opacity: 0.72;
    transition: color 150ms ease, opacity 150ms ease;
}

.fi-fo-field-label-ctn .fi-sc-icon[x-tooltip]:hover {
    color: var(--sc-cyan) !important;
    opacity: 1;
}

.fi-ta-header-cell-tooltip {
    cursor: help;
    text-decoration: underline dotted rgb(113 133 154 / 0.55);
    text-underline-offset: 0.2em;
}

.tippy-box {
    --tippy-background-color: #10263d;
    max-width: min(22rem, calc(100vw - 2rem)) !important;
    border-radius: 0.68rem;
    box-shadow: 0 18px 44px rgb(6 30 54 / 0.24);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.6;
    letter-spacing: 0.005em;
}

.tippy-box[data-theme~='light'] {
    --tippy-background-color: #ffffff;
    border: 1px solid #d8e5f0;
    color: #2d465f;
    box-shadow: 0 16px 40px rgb(6 30 54 / 0.16);
}

.tippy-content {
    padding: 0.62rem 0.78rem;
}

.dark .fi-fo-field-label-ctn .fi-sc-icon[x-tooltip] {
    color: #829ab0 !important;
}

.dark .fi-fo-field-label-ctn .fi-sc-icon[x-tooltip]:hover {
    color: #7dd3fc !important;
}

.dark .tippy-box[data-theme~='light'] {
    --tippy-background-color: #102337;
    border-color: #2a4159;
    color: #dce8f3;
    box-shadow: 0 18px 44px rgb(0 0 0 / 0.38);
}
