:root {
    --ap-bg: #f3ecdb;
    --ap-bg-soft: #f8f2e6;
    --ap-bg-strong: #efe6d2;
    --ap-ink: #213323;
    --ap-ink-soft: rgba(33, 51, 35, 0.74);
    --ap-ink-dim: rgba(33, 51, 35, 0.46);
    --ap-olive: #607744;
    --ap-olive-deep: #41552b;
    --ap-copper: #b95f3b;
    --ap-lake: #315a60;
    --ap-border: rgba(33, 51, 35, 0.12);
    --ap-border-strong: rgba(33, 51, 35, 0.18);
    --ap-shadow: 0 24px 70px rgba(72, 50, 31, 0.12);
    --ap-radius-lg: 30px;
    --ap-radius-md: 20px;
    --ap-radius-sm: 12px;
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --font-display: "Cormorant Garamond", "Times New Roman", serif;
    --font-sans: "Archivo", "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", "Consolas", monospace;

    --rz-primary: var(--ap-olive);
    --rz-primary-rgb: 96, 119, 68;
    --rz-primary-lighter: #7d9560;
    --rz-primary-darker: var(--ap-olive-deep);
    --rz-primary-shade-100: rgba(96, 119, 68, 0.10);
    --rz-primary-shade-200: rgba(96, 119, 68, 0.20);
    --rz-primary-shade-300: rgba(96, 119, 68, 0.30);
    --rz-primary-shade-400: rgba(96, 119, 68, 0.40);
    --rz-secondary: var(--ap-copper);
    --rz-secondary-rgb: 185, 95, 59;
    --rz-success: #6b9358;
    --rz-info: var(--ap-lake);
    --rz-warning: #c38a4d;
    --rz-danger: #ba6e54;
    --rz-text-color: var(--ap-ink);
    --rz-text-secondary-color: var(--ap-ink-soft);
    --rz-body-background-color: var(--ap-bg);
    --rz-base-background-color: rgba(255, 255, 255, 0.40);
    --rz-secondary-background-color: rgba(255, 255, 255, 0.58);
    --rz-content-background-color: transparent;
    --rz-panel-background-color: rgba(255, 255, 255, 0.40);
    --rz-header-background-color: rgba(248, 242, 230, 0.78);
    --rz-sidebar-background-color: rgba(248, 242, 230, 0.78);
    --rz-border-color: var(--ap-border);
    --rz-border-radius: 18px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    color: var(--ap-ink);
    font-family: var(--font-sans);
    background:
        radial-gradient(circle at top right, rgba(185, 95, 59, 0.14), transparent 22%),
        linear-gradient(180deg, #f5efe2 0%, #efe5d2 100%);
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(33, 51, 35, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(33, 51, 35, 0.045) 1px, transparent 1px);
    background-size: 88px 88px;
    mask-image: radial-gradient(circle at center, black 42%, transparent 88%);
    pointer-events: none;
    opacity: .8;
    z-index: -2;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 82% 18%, rgba(96, 119, 68, 0.10), transparent 18%),
        radial-gradient(circle at 14% 76%, rgba(49, 90, 96, 0.08), transparent 16%);
    pointer-events: none;
    z-index: -1;
}

h1,
h2,
h3,
h4,
h5,
h6,
.rz-text-h1,
.rz-text-h2,
.rz-text-h3,
.rz-text-h4,
.rz-text-h5,
.rz-text-h6 {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--ap-ink);
}

a {
    color: inherit;
}

::selection {
    background: rgba(96, 119, 68, 0.18);
}

:focus-visible {
    outline: 2px solid rgba(96, 119, 68, 0.5);
    outline-offset: 2px;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-thumb {
    background: rgba(33, 51, 35, 0.16);
    border-radius: 999px;
}

.rz-layout,
.rz-body,
.rz-content-container {
    background: transparent !important;
}

.rz-card,
.rz-datatable,
.rz-grid-table,
.rz-popup,
.rz-dialog,
.rz-panel {
    background: rgba(255, 255, 255, 0.38) !important;
    border: 1px solid rgba(33, 51, 35, 0.10) !important;
    border-radius: var(--ap-radius-lg) !important;
    box-shadow: var(--ap-shadow) !important;
}

.rz-card {
    padding: 1.35rem !important;
}

.rz-datatable table,
.rz-grid-table {
    background: transparent !important;
}

.rz-datatable thead th,
.rz-grid-table thead th {
    background: transparent !important;
    color: var(--ap-ink-dim) !important;
    font: 500 0.72rem/1.2 var(--font-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
    border-color: rgba(33, 51, 35, 0.08) !important;
}

.rz-datatable tbody td,
.rz-grid-table tbody td,
.rz-grid-table th {
    border-color: rgba(33, 51, 35, 0.08) !important;
    color: var(--ap-ink) !important;
}

.rz-datatable tbody tr:hover,
.rz-grid-table tbody tr:hover {
    background: rgba(96, 119, 68, 0.06) !important;
}

.rz-inputtext,
.rz-textbox,
.rz-dropdown,
.rz-password input,
.rz-numeric .rz-spinner-input,
.rz-textarea {
    background: rgba(255, 255, 255, 0.55) !important;
    border: 1px solid rgba(33, 51, 35, 0.12) !important;
    border-radius: 18px !important;
    color: var(--ap-ink) !important;
    min-height: 52px;
}

.rz-inputtext:focus,
.rz-textbox:focus,
.rz-dropdown:focus-within,
.rz-password input:focus,
.rz-numeric .rz-spinner-input:focus,
.rz-textarea:focus {
    box-shadow: 0 0 0 4px rgba(96, 119, 68, 0.10) !important;
    border-color: rgba(96, 119, 68, 0.22) !important;
}

.rz-dropdown-label,
.rz-inputtext::placeholder,
.rz-textbox::placeholder,
.rz-password input::placeholder,
.rz-textarea::placeholder {
    color: var(--ap-ink-dim) !important;
}

.ap-button.rz-button,
.rz-button.ap-button {
    min-height: 46px;
    padding-inline: 1rem !important;
    border-radius: 999px !important;
    font: 600 0.92rem/1 var(--font-sans);
    box-shadow: none !important;
    transition: transform .18s ease, box-shadow .18s ease;
}

.ap-button.rz-button:hover,
.rz-button.ap-button:hover {
    transform: translateY(-1px);
}

.ap-button--primary.rz-button,
.rz-button.ap-button--primary {
    background: linear-gradient(135deg, var(--ap-olive), var(--ap-olive-deep)) !important;
    color: #fffdf8 !important;
    border: 1px solid transparent !important;
}

.ap-button--secondary.rz-button,
.rz-button.ap-button--secondary {
    background: rgba(185, 95, 59, 0.12) !important;
    color: var(--ap-copper) !important;
    border: 1px solid rgba(185, 95, 59, 0.14) !important;
}

.ap-button--outline.rz-button,
.rz-button.ap-button--outline {
    background: rgba(255, 255, 255, 0.26) !important;
    color: var(--ap-ink) !important;
    border: 1px solid rgba(33, 51, 35, 0.12) !important;
}

.ap-button--text.rz-button,
.rz-button.ap-button--text {
    background: transparent !important;
    color: var(--ap-ink-soft) !important;
    border: 1px solid transparent !important;
}

.ap-button--sm.rz-button,
.rz-button.ap-button--sm {
    min-height: 38px;
    font-size: 0.82rem;
}

.ap-button--lg.rz-button,
.rz-button.ap-button--lg {
    min-height: 52px;
}

.ap-brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
}

.ap-brand__mark {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--ap-olive), var(--ap-olive-deep));
    color: #fbf7ef;
    display: grid;
    place-items: center;
    font: 600 18px/1 var(--font-mono);
    letter-spacing: .18em;
}

.ap-brand__copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ap-brand__eyebrow,
.ap-shell__identity-label,
.ap-sidebar__eyebrow,
.ap-mobile-shell__signal,
.ap-badge,
.ap-login-page__eyebrow,
.ap-screen__eyebrow {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: .18em;
}

.ap-brand__eyebrow,
.ap-shell__identity-label,
.ap-sidebar__eyebrow {
    color: var(--ap-ink-dim);
    font-size: 11px;
}

.ap-brand__title {
    font: 600 34px/0.9 var(--font-display);
}

.ap-shell--web {
    position: relative;
}

.ap-shell--web::before,
.ap-screen::before,
.ap-landing-screen::before,
.ap-dashboard-screen::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='720' height='720' viewBox='0 0 720 720'%3E%3Cg fill='none' stroke='rgba(33,51,35,0.08)' stroke-width='1.2'%3E%3Cpath d='M-20 215c95-70 138-18 203-56 59-35 75-87 152-79 87 8 133 71 221 61 59-7 93-45 171-9'/%3E%3Cpath d='M-20 263c111-60 155 4 248-38 65-29 89-85 167-71 85 15 112 70 206 62 62-6 84-41 146-14'/%3E%3Cpath d='M-20 309c95-45 165 25 254-5 67-23 96-71 184-57 88 14 128 67 221 46 41-9 66-27 109-12'/%3E%3Cpath d='M-20 360c102-44 191 39 304 7 77-22 98-59 181-50 76 8 125 52 204 40 59-9 87-37 139-23'/%3E%3Cpath d='M-20 416c88-24 166 52 267 33 87-17 118-59 210-47 89 12 133 64 216 46'/%3E%3Cpath d='M-20 475c116-39 175 37 287 25 83-9 122-61 220-41 89 18 126 61 220 31'/%3E%3C/g%3E%3C/svg%3E");
    opacity: .9;
    pointer-events: none;
    z-index: 0;
}

.ap-shell__header,
.ap-shell__sidebar,
.ap-shell__body,
.ap-shell__content {
    position: relative;
    z-index: 1;
}

.ap-shell__header {
    position: sticky;
    top: 0;
    z-index: 25;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(33, 51, 35, 0.08);
}

.ap-shell__header-inner {
    min-height: 86px;
    padding: 0 1.4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ap-shell__header-start,
.ap-shell__header-end {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.ap-shell__header-end {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ap-shell__pulse {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    padding: .7rem .9rem;
    border-radius: 999px;
    border: 1px solid rgba(33, 51, 35, 0.12);
    background: rgba(255, 255, 255, 0.34);
    color: var(--ap-ink-dim);
    font: 500 11px/1.2 var(--font-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ap-shell__pulse span:first-child {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--ap-copper);
}

.ap-shell__identity {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ap-shell__identity strong {
    font-size: 14px;
}

.ap-shell__sidebar {
    border-right: 1px solid rgba(33, 51, 35, 0.08);
    backdrop-filter: blur(10px);
}

.ap-sidebar__inner {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    padding: 1.5rem 1rem 1rem;
}

.ap-sidebar__intro,
.ap-sidebar__footer {
    padding: 1.15rem;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.34);
    border: 1px solid rgba(33, 51, 35, 0.10);
}

.ap-sidebar__intro h2,
.ap-sidebar__footer-title {
    margin: .5rem 0;
    font-size: 24px;
}

.ap-sidebar__intro p,
.ap-sidebar__footer p {
    margin: 0;
    color: var(--ap-ink-soft);
    line-height: 1.6;
}

.ap-sidebar__footer {
    margin-top: auto;
}

.ap-nav,
.ap-nav__menu {
    width: 100%;
}

.ap-nav .rz-navigation-item-link,
.ap-nav .rz-panel-menu .rz-navigation-item-link {
    min-height: 48px;
    margin-bottom: 8px;
    border-radius: 999px !important;
    padding: .85rem 1rem !important;
    color: var(--ap-ink-soft) !important;
    background: rgba(255, 255, 255, 0.22) !important;
    border: 1px solid transparent !important;
}

.ap-nav .rz-navigation-item-link:hover,
.ap-nav .rz-state-active > .rz-navigation-item-link {
    color: var(--ap-ink) !important;
    background: linear-gradient(135deg, rgba(96, 119, 68, 0.14), rgba(185, 95, 59, 0.08)) !important;
    border-color: rgba(96, 119, 68, 0.18) !important;
}

.ap-shell__content {
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
}

nav.ap-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 1rem 1.5rem 0;
    color: var(--ap-ink-dim);
    font: 500 11px/1.2 var(--font-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
}

nav.ap-breadcrumb .ap-breadcrumb-item {
    text-decoration: none;
    color: var(--ap-ink-dim);
}

nav.ap-breadcrumb .ap-breadcrumb-item.active,
nav.ap-breadcrumb .ap-breadcrumb-item:hover {
    color: var(--ap-copper);
}

.ap-auth-shell {
    min-height: 100vh;
    position: relative;
}

.ap-auth-shell__language {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
}

.ap-language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(33, 51, 35, 0.12);
    background: rgba(255, 255, 255, 0.34);
    color: var(--ap-ink-soft);
    font: 500 11px/1.2 var(--font-mono);
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ap-language-switcher select {
    min-height: 34px;
    padding: 0 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(33, 51, 35, 0.12);
    background: rgba(255, 255, 255, 0.65);
    color: var(--ap-ink);
    font: 600 0.82rem/1 var(--font-sans);
}

.ap-login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
}

.ap-login-page__aside {
    position: relative;
    overflow: hidden;
    padding: 3.4rem;
    background:
        radial-gradient(circle at 30% 20%, rgba(96, 119, 68, .22), transparent 20%),
        linear-gradient(180deg, #2d4224 0%, #1f3020 100%);
    color: #f7f2e7;
}

.ap-login-page__aside::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(247, 242, 231, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(247, 242, 231, .08) 1px, transparent 1px);
    background-size: 42px 42px;
    opacity: .4;
}

.ap-login-page__aside > * {
    position: relative;
    z-index: 1;
}

.ap-login-page__aside .ap-brand__mark {
    background: rgba(247, 242, 231, .14);
    border: 1px solid rgba(247, 242, 231, .16);
}

.ap-login-page__aside .ap-brand__title,
.ap-login-page__aside h1 {
    color: #f7f2e7;
}

.ap-login-page__eyebrow {
    color: #f2c6aa;
    font-size: 12px;
}

.ap-login-page__aside h1 {
    font-size: clamp(4rem, 7vw, 6rem);
    line-height: .92;
    max-width: 8ch;
    margin: 5rem 0 1rem;
}

.ap-login-page__aside p {
    color: rgba(247, 242, 231, .74);
    max-width: 28ch;
    line-height: 1.55;
    font-size: 1.15rem;
}

.ap-login-page__tokens {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1.75rem;
}

.ap-login-page__tokens span {
    padding: .8rem 1rem;
    border-radius: 999px;
    background: rgba(247, 242, 231, .08);
    border: 1px solid rgba(247, 242, 231, .16);
    color: #f7f2e7;
    font: 500 11px/1 var(--font-mono);
    letter-spacing: .16em;
    text-transform: uppercase;
}

.ap-login-page__main {
    display: grid;
    place-items: center;
    padding: 3rem;
}

.ap-login-card {
    width: min(100%, 470px);
    padding: 2rem;
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(33, 51, 35, 0.10);
    box-shadow: var(--ap-shadow);
}

.ap-login-card h2 {
    font-size: 42px;
    margin: .35rem 0 .5rem;
}

.ap-login-card p {
    margin-top: 0;
    color: var(--ap-ink-soft);
    line-height: 1.5;
}

.ap-login-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 1.25rem 0;
    color: var(--ap-ink-dim);
    font: 500 11px/1 var(--font-mono);
    letter-spacing: .16em;
    text-transform: uppercase;
}

.ap-login-divider::before,
.ap-login-divider::after {
    content: "";
    height: 1px;
    background: rgba(33, 51, 35, 0.12);
    flex: 1;
}

.ap-login-page__register {
    color: var(--ap-ink-soft);
    text-align: left;
}

.ap-login-page__register a {
    color: var(--ap-copper) !important;
    font-weight: 700;
    text-decoration: none;
}

.ap-login-page__links {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    font: 500 0.85rem/1.4 var(--font-mono);
    letter-spacing: .06em;
}

.ap-login-page__links a {
    color: var(--ap-copper);
    text-decoration: none;
}

.ap-login-card--narrow {
    width: min(100%, 540px);
}

.ap-screen,
.ap-landing-screen,
.ap-dashboard-screen {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ap-screen__hero,
.ap-dashboard-hero,
.ap-landing-topbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.ap-screen__eyebrow,
.ap-dashboard-hero__eyebrow,
.ap-landing-brow,
.ap-panel__eyebrow {
    font-size: 11px;
    color: var(--ap-copper);
}

.ap-screen__hero h1,
.ap-dashboard-hero h1,
.ap-landing-title {
    margin: 0;
    font-size: clamp(3rem, 6vw, 5.6rem);
    line-height: .92;
}

.ap-screen__lede,
.ap-dashboard-hero p,
.ap-landing-lede {
    color: var(--ap-ink-soft);
    font-size: 1.1rem;
    line-height: 1.6;
    max-width: 60ch;
}

.ap-landing-screen {
    gap: 1.4rem;
}

.ap-landing-topbar .chip-row,
.ap-dashboard-hero .chip-row,
.ap-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
}

.ap-chip {
    padding: .7rem .9rem;
    border-radius: 999px;
    border: 1px solid rgba(33, 51, 35, 0.12);
    background: rgba(255, 255, 255, 0.34);
    color: var(--ap-ink-dim);
    font: 500 11px/1 var(--font-mono);
    letter-spacing: .16em;
    text-transform: uppercase;
}

.ap-landing-hero {
    display: grid;
    grid-template-columns: 1.25fr .95fr;
    gap: 1.25rem;
}

.ap-landing-hero__copy,
.ap-landing-map-card,
.ap-landing-list-card,
.ap-dashboard-panel,
.ap-screen-panel,
.ap-filter-panel {
    background: rgba(255, 255, 255, 0.38);
    border: 1px solid rgba(33, 51, 35, 0.10);
    border-radius: var(--ap-radius-lg);
    box-shadow: var(--ap-shadow);
}

.ap-landing-hero__copy {
    padding: 1.7rem;
    position: relative;
    overflow: hidden;
}

.ap-landing-hero__copy::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(33, 51, 35, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(33, 51, 35, 0.035) 1px, transparent 1px);
    background-size: 34px 34px;
    pointer-events: none;
}

.ap-landing-title {
    max-width: 9ch;
}

.ap-landing-actions,
.ap-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.2rem;
}

.ap-landing-kpis,
.ap-dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: .85rem;
    margin-top: 1.2rem;
}

.ap-landing-kpi,
.ap-dashboard-kpi,
.metric-card {
    padding: 1rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.28);
    border: 1px solid rgba(33, 51, 35, 0.08);
}

.ap-landing-kpi strong,
.ap-dashboard-kpi strong {
    display: block;
    font: 600 34px/1 var(--font-display);
    margin: .45rem 0 .15rem;
}

.ap-landing-kpi span,
.ap-dashboard-kpi span,
.ap-dashboard-kpi small {
    color: var(--ap-ink-soft);
}

.ap-kicker {
    color: var(--ap-ink-dim);
    font: 500 11px/1.2 var(--font-mono);
    letter-spacing: .16em;
    text-transform: uppercase;
}

.ap-landing-side {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ap-landing-map-card,
.ap-landing-list-card {
    padding: 1rem;
}

.ap-map-plot {
    height: 250px;
    border-radius: 24px;
    border: 1px solid rgba(33, 51, 35, 0.08);
    background:
        radial-gradient(circle at 26% 28%, rgba(96, 119, 68, .18), transparent 18%),
        radial-gradient(circle at 70% 62%, rgba(185, 95, 59, .18), transparent 20%),
        linear-gradient(135deg, rgba(255, 255, 255, .6), rgba(239, 230, 210, .8));
    position: relative;
    overflow: hidden;
}

.ap-map-plot::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(33, 51, 35, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(33, 51, 35, .08) 1px, transparent 1px);
    background-size: 26px 26px;
    opacity: .5;
}

.ap-landing-list {
    display: flex;
    flex-direction: column;
    gap: .9rem;
}

.ap-landing-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .9rem;
    border-bottom: 1px solid rgba(33, 51, 35, 0.08);
}

.ap-landing-list > div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.ap-tag {
    padding: .45rem .7rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
}

.ap-tag--olive {
    background: rgba(96, 119, 68, .16);
    color: var(--ap-olive-deep);
}

.ap-tag--copper {
    background: rgba(185, 95, 59, .12);
    color: var(--ap-copper);
}

.ap-tag--lake {
    background: rgba(49, 90, 96, .12);
    color: var(--ap-lake);
}

.ap-landing-bottom {
    display: grid;
    grid-template-columns: 1.5fr .9fr;
    gap: 1rem;
}

.ap-landing-panel {
    padding: 1.4rem;
}

.ap-landing-panel h3,
.ap-dashboard-panel h3,
.ap-screen-panel h3 {
    margin: .3rem 0 .75rem;
    font-size: 2rem;
}

.ap-landing-panel p,
.ap-dashboard-panel p,
.ap-screen-panel p {
    margin: 0;
    color: var(--ap-ink-soft);
    line-height: 1.6;
}

.ap-dashboard-screen {
    gap: 1.2rem;
}

.ap-dashboard-hero {
    padding: .2rem 0;
}

.ap-dashboard-kpis {
    margin-top: 0;
}

.ap-dashboard-kpi {
    cursor: pointer;
}

.ap-dashboard-grid {
    display: grid;
    grid-template-columns: 1.45fr .85fr;
    gap: 1rem;
}

.ap-dashboard-panel {
    padding: 1.35rem;
}

.ap-dashboard-panel__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.ap-screen {
    gap: 1.2rem;
}

.ap-filter-panel,
.ap-screen-panel {
    padding: 1.3rem;
}

.ap-filter-panel__row {
    display: flex;
    gap: .75rem;
    align-items: end;
}

.ap-filter-panel__row > div:first-child {
    flex: 1;
}

.ap-select-field,
.ap-field {
    display: flex;
    flex-direction: column;
    gap: .45rem;
    margin-bottom: 1rem;
}

.ap-label {
    color: var(--ap-ink-dim);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.ap-field-error,
.validation-message {
    color: var(--ap-copper);
    font-size: .8rem;
}

.ap-select {
    width: 100%;
    min-height: 52px;
    padding: .85rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(33, 51, 35, 0.12);
    background: rgba(255, 255, 255, 0.55);
    color: var(--ap-ink);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(33,51,35,0.55)' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.ap-select:focus {
    outline: none;
    border-color: rgba(96, 119, 68, 0.22);
    box-shadow: 0 0 0 4px rgba(96, 119, 68, 0.10);
}

.ap-badge {
    display: inline-flex;
    align-items: center;
    padding: .45rem .7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.40);
    color: var(--ap-ink-soft);
    font-size: .72rem;
}

.ap-badge-success { background: rgba(96, 119, 68, .16); color: var(--ap-olive-deep); }
.ap-badge-error { background: rgba(185, 95, 59, .12); color: var(--ap-copper); }
.ap-badge-warning { background: rgba(195, 138, 77, .14); color: #9a6d34; }
.ap-badge-info { background: rgba(49, 90, 96, .12); color: var(--ap-lake); }
.ap-badge-default { background: rgba(255, 255, 255, .35); color: var(--ap-ink-soft); }

.ap-detail-rows {
    display: flex;
    flex-direction: column;
}

.ap-detail-row {
    display: flex;
    gap: 1rem;
    padding: .95rem 0;
    border-bottom: 1px solid rgba(33, 51, 35, 0.08);
}

.ap-detail-row:last-child {
    border-bottom: none;
}

.ap-detail-label {
    width: 160px;
    flex-shrink: 0;
    color: var(--ap-ink-dim);
    font: 500 12px/1.2 var(--font-mono);
    text-transform: uppercase;
    letter-spacing: .12em;
}

.ap-detail-value--primary,
.ap-recovery-code {
    font-family: var(--font-mono);
}

.ap-detail-value--price {
    font: 600 2.2rem/1 var(--font-display);
}

.ap-avatar {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(96, 119, 68, 0.18), rgba(185, 95, 59, 0.08));
    border: 1px solid rgba(33, 51, 35, 0.10);
    font: 600 1.5rem/1 var(--font-mono);
}

.ap-product-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2rem;
}

.ap-product-image,
.ap-product-placeholder {
    width: 100%;
    border-radius: 24px;
    border: 1px solid rgba(33, 51, 35, 0.08);
    background: rgba(255, 255, 255, 0.34);
}

.ap-product-image {
    object-fit: contain;
    max-height: 320px;
}

.ap-product-placeholder {
    min-height: 280px;
    display: grid;
    place-items: center;
    font-size: 5rem;
}

.ap-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1rem;
}

.ap-recovery-codes {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.ap-recovery-code {
    padding: .5rem .75rem;
    border-radius: 14px;
    border: 1px solid rgba(33, 51, 35, 0.08);
    background: rgba(255, 255, 255, 0.28);
}

.ap-loading-state,
.ap-empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

.ap-error-state {
    margin: 1rem 0;
}

.ap-overlay {
    position: fixed;
    inset: 0;
    background: rgba(29, 31, 21, 0.18);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

.ap-dialog {
    width: min(92vw, 920px);
    max-height: 90vh;
    overflow: hidden;
    background: rgba(248, 242, 230, 0.94);
    border: 1px solid rgba(33, 51, 35, 0.12);
    border-radius: 30px;
    box-shadow: var(--ap-shadow);
    display: flex;
    flex-direction: column;
}

.ap-dialog-sm { width: min(92vw, 430px); }
.ap-dialog-md { width: min(92vw, 640px); }
.ap-dialog-lg { width: min(94vw, 960px); }

.ap-dialog-header,
.ap-dialog-footer {
    padding: 1rem 1.3rem;
    border-color: rgba(33, 51, 35, 0.08);
}

.ap-dialog-header {
    border-bottom: 1px solid rgba(33, 51, 35, 0.08);
}

.ap-dialog-body {
    padding: 1.3rem;
    overflow-y: auto;
}

.ap-dialog-footer {
    border-top: 1px solid rgba(33, 51, 35, 0.08);
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    flex-wrap: wrap;
}

.ap-mobile-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ap-mobile-shell__header {
    position: sticky;
    top: 0;
    z-index: 22;
    padding: 1rem 1rem .9rem;
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(33, 51, 35, 0.08);
    background: rgba(248, 242, 230, 0.80);
}

.ap-mobile-shell__topline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}

.ap-mobile-shell__signal {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--ap-ink-dim);
    font-size: 11px;
}

.ap-mobile-shell__signal-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--ap-copper);
}

.ap-mobile-shell__signal-dot.is-online {
    background: var(--ap-olive);
}

.ap-mobile-brand {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.ap-mobile-brand p {
    margin: 0;
    color: var(--ap-ink-soft);
}

.ap-mobile-tabs,
.ap-mobile-tabbar {
    display: grid;
    gap: .55rem;
}

.ap-mobile-tabs {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 1rem;
}

.ap-mobile-tabs a,
.ap-mobile-tabbar a {
    min-height: 44px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 18px;
    text-decoration: none;
    color: var(--ap-ink-dim);
    background: rgba(255, 255, 255, 0.34);
    border: 1px solid rgba(33, 51, 35, 0.08);
    font-size: .78rem;
}

.ap-mobile-tabs a.is-active,
.ap-mobile-tabbar a.is-active {
    color: var(--ap-ink);
    background: linear-gradient(135deg, rgba(96, 119, 68, 0.16), rgba(185, 95, 59, 0.08));
}

.ap-mobile-shell__offline {
    padding: .7rem 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .45rem;
    background: rgba(185, 95, 59, 0.12);
    color: var(--ap-copper);
    border-bottom: 1px solid rgba(185, 95, 59, 0.12);
}

.ap-mobile-shell__content {
    flex: 1;
    padding: 1rem 1rem 5.8rem;
}

.ap-mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 24;
    padding: .8rem .85rem calc(.8rem + env(safe-area-inset-bottom, 0px));
    grid-template-columns: repeat(5, minmax(0, 1fr));
    background: rgba(248, 242, 230, 0.92);
    border-top: 1px solid rgba(33, 51, 35, 0.08);
    backdrop-filter: blur(18px);
}

.ap-mobile-tabbar a {
    min-height: 56px;
    flex-direction: column;
    gap: .25rem;
    font-size: .68rem;
}

.rz-button.full-width,
.full-width {
    width: 100%;
}

@media (max-width: 1180px) {
    .ap-shell__pulse {
        display: none;
    }

    .ap-landing-hero,
    .ap-dashboard-grid,
    .ap-landing-bottom,
    .ap-product-grid,
    .ap-login-page {
        grid-template-columns: 1fr;
    }

    .ap-landing-kpis,
    .ap-dashboard-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 920px) {
    .ap-shell__header-inner {
        padding: 1rem;
        flex-direction: column;
        align-items: stretch;
    }

    .ap-shell__header-end {
        justify-content: space-between;
    }

    .ap-auth-shell__language {
        position: static;
        padding: 1rem 1rem 0;
    }

    .ap-form-grid,
    .ap-mobile-tabs {
        grid-template-columns: 1fr 1fr;
    }

    .ap-filter-panel__row,
    .ap-screen__hero,
    .ap-dashboard-hero,
    .ap-landing-topbar {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .ap-screen__hero h1,
    .ap-dashboard-hero h1,
    .ap-landing-title {
        font-size: 3.2rem;
    }

    .ap-landing-kpis,
    .ap-dashboard-kpis,
    .ap-form-grid,
    .ap-mobile-tabs {
        grid-template-columns: 1fr;
    }

    .ap-detail-row {
        flex-direction: column;
        gap: .45rem;
    }

    .ap-detail-label {
        width: auto;
    }

    .ap-login-page__aside,
    .ap-login-page__main {
        padding: 1.5rem;
    }
}

/* Midnight Workshop overrides */
:root {
    --ap-bg: #090b0d;
    --ap-bg-soft: #11161b;
    --ap-bg-strong: #171d23;
    --ap-ink: #f1ece0;
    --ap-ink-soft: rgba(241, 236, 224, 0.72);
    --ap-ink-dim: rgba(241, 236, 224, 0.46);
    --ap-olive: #6fe7b1;
    --ap-olive-deep: #3fa97f;
    --ap-copper: #ff9b32;
    --ap-lake: #7a8fa7;
    --ap-border: rgba(255, 255, 255, 0.08);
    --ap-border-strong: rgba(255, 155, 50, 0.18);
    --ap-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
    --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
    --font-sans: "Sarabun", "Segoe UI", sans-serif;
    --font-mono: "IBM Plex Mono", "Consolas", monospace;
    --ap-amber: #ff9b32;
    --rz-primary: var(--ap-copper);
    --rz-primary-rgb: 255, 155, 50;
    --rz-primary-lighter: #ffb463;
    --rz-primary-darker: #dd7c1c;
    --rz-primary-shade-100: rgba(255, 155, 50, 0.10);
    --rz-primary-shade-200: rgba(255, 155, 50, 0.18);
    --rz-primary-shade-300: rgba(255, 155, 50, 0.26);
    --rz-primary-shade-400: rgba(255, 155, 50, 0.34);
    --rz-secondary: var(--ap-olive);
    --rz-secondary-rgb: 111, 231, 177;
    --rz-success: #6fe7b1;
    --rz-info: #7a8fa7;
    --rz-warning: #ffb85a;
    --rz-danger: #ff6d59;
    --rz-text-color: var(--ap-ink);
    --rz-text-secondary-color: var(--ap-ink-soft);
    --rz-body-background-color: var(--ap-bg);
    --rz-base-background-color: rgba(255, 255, 255, 0.03);
    --rz-secondary-background-color: rgba(255, 255, 255, 0.05);
    --rz-content-background-color: transparent;
    --rz-panel-background-color: rgba(23, 30, 37, 0.88);
    --rz-header-background-color: rgba(10, 12, 15, 0.88);
    --rz-sidebar-background-color: rgba(10, 12, 15, 0.94);
    --rz-border-color: var(--ap-border);
    --rz-border-radius: 22px;
}

body {
    color: var(--ap-ink);
    background:
        radial-gradient(circle at 15% 20%, rgba(255, 155, 50, 0.12), transparent 22%),
        radial-gradient(circle at 86% 10%, rgba(111, 231, 177, 0.08), transparent 18%),
        linear-gradient(180deg, #08090b 0%, #101417 100%);
}

body::before {
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: none;
    opacity: .7;
}

body::after {
    background:
        radial-gradient(circle at 18% 18%, rgba(255, 155, 50, 0.10), transparent 18%),
        radial-gradient(circle at 82% 22%, rgba(111, 231, 177, 0.08), transparent 16%);
}

h1,
h2,
h3,
h4,
h5,
h6,
.rz-text-h1,
.rz-text-h2,
.rz-text-h3,
.rz-text-h4,
.rz-text-h5,
.rz-text-h6 {
    font-family: var(--font-display);
    font-weight: 400;
    letter-spacing: .03em;
    color: var(--ap-ink);
}

::selection {
    background: rgba(255, 155, 50, 0.28);
}

:focus-visible {
    outline: 2px solid rgba(255, 155, 50, 0.56);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.14);
}

.rz-card,
.rz-datatable,
.rz-grid-table,
.rz-popup,
.rz-dialog,
.rz-panel {
    background: linear-gradient(180deg, rgba(23, 30, 37, 0.88), rgba(12, 15, 18, 0.92)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: var(--ap-shadow) !important;
}

.rz-datatable thead th,
.rz-grid-table thead th {
    color: var(--ap-ink-dim) !important;
    border-color: rgba(255, 255, 255, 0.06) !important;
}

.rz-datatable tbody td,
.rz-grid-table tbody td,
.rz-grid-table th {
    border-color: rgba(255, 255, 255, 0.06) !important;
    color: var(--ap-ink) !important;
}

.rz-datatable tbody tr:hover,
.rz-grid-table tbody tr:hover {
    background: rgba(255, 155, 50, 0.05) !important;
}

.rz-inputtext,
.rz-textbox,
.rz-dropdown,
.rz-password input,
.rz-numeric .rz-spinner-input,
.rz-textarea {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    color: var(--ap-ink) !important;
}

.rz-inputtext:focus,
.rz-textbox:focus,
.rz-dropdown:focus-within,
.rz-password input:focus,
.rz-numeric .rz-spinner-input:focus,
.rz-textarea:focus {
    box-shadow: 0 0 0 4px rgba(255, 155, 50, 0.10) !important;
    border-color: rgba(255, 155, 50, 0.28) !important;
}

.ap-button--primary.rz-button,
.rz-button.ap-button--primary {
    background: linear-gradient(135deg, #ff9b32, #dd7c1c) !important;
    color: #120901 !important;
}

.ap-button--secondary.rz-button,
.rz-button.ap-button--secondary {
    background: rgba(255, 155, 50, 0.14) !important;
    color: var(--ap-copper) !important;
    border-color: rgba(255, 155, 50, 0.18) !important;
}

.ap-button--outline.rz-button,
.rz-button.ap-button--outline {
    background: rgba(255, 255, 255, 0.04) !important;
    color: var(--ap-ink) !important;
    border-color: rgba(255, 255, 255, 0.10) !important;
}

.ap-button--text.rz-button,
.rz-button.ap-button--text {
    color: var(--ap-ink-soft) !important;
}

.ap-brand__mark {
    background: linear-gradient(135deg, #ff9b32, #915012);
    color: #140b02;
    box-shadow: 0 0 30px rgba(255, 155, 50, 0.20);
}

.ap-brand__eyebrow,
.ap-shell__identity-label,
.ap-sidebar__eyebrow,
.ap-mobile-shell__signal,
.ap-screen__eyebrow,
.ap-kicker {
    color: var(--ap-copper) !important;
    font-size: 11px;
}

.ap-brand__title {
    font-size: 2.8rem;
    line-height: .9;
}

.ap-shell__header {
    background: rgba(10, 12, 15, 0.88);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.ap-shell__pulse {
    background: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--ap-ink-dim);
}

.ap-shell__pulse span:first-child {
    background: var(--ap-copper);
    box-shadow: 0 0 18px rgba(255, 155, 50, 0.6);
}

.ap-shell__sidebar {
    background: linear-gradient(180deg, rgba(10, 12, 15, 0.96), rgba(15, 19, 22, 0.96));
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.ap-sidebar__intro h2,
.ap-sidebar__footer-title {
    font-size: 2rem;
    line-height: 1;
}

.ap-sidebar__intro p,
.ap-sidebar__footer p,
.ap-login-page__aside p,
.ap-screen__lede,
.ap-screen-panel p,
.ap-dashboard-panel__header p,
.ap-mobile-brand p {
    color: var(--ap-ink-soft) !important;
}

.ap-shell--web::before,
.ap-screen::before,
.ap-landing-screen::before,
.ap-dashboard-screen::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='960' viewBox='0 0 1440 960'%3E%3Cg fill='none' stroke='rgba(255,255,255,0.055)' stroke-width='1'%3E%3Cpath d='M0 134h420l72 72h308l64-64h576'/%3E%3Cpath d='M0 188h360l80 80h224l94-94h682'/%3E%3Cpath d='M0 820h520l72-72h302l88 88h458'/%3E%3Cpath d='M0 748h620l54-54h266l66 66h434'/%3E%3C/g%3E%3C/svg%3E");
    opacity: .85;
}

.ap-screen,
.ap-landing-screen,
.ap-dashboard-screen {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0;
}

.ap-screen__hero,
.ap-dashboard-hero,
.ap-landing-topbar {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.ap-screen__hero h1,
.ap-dashboard-hero h1,
.ap-landing-title {
    font-size: clamp(4rem, 6vw, 6.1rem);
    line-height: .9;
    max-width: 11ch;
}

.ap-chip-row {
    gap: .65rem;
}

.ap-chip {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--ap-ink-soft);
    padding: .75rem .9rem;
}

.ap-screen__hero .ap-chip-row,
.ap-dashboard-hero .ap-chip-row,
.ap-mobile-brand .ap-chip-row {
    margin-top: .9rem;
}

.ap-landing-hero {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 1.1rem;
    align-items: stretch;
}

.ap-landing-bottom,
.ap-dashboard-grid {
    grid-template-columns: 1.15fr .85fr;
}

.ap-landing-map-card,
.ap-landing-list-card,
.ap-screen-panel,
.ap-dashboard-panel,
.ap-stat-card,
.ap-filter-panel,
.ap-dashboard-panel--accent {
    background: linear-gradient(180deg, rgba(23, 30, 37, 0.88), rgba(12, 15, 18, 0.92)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--ap-shadow) !important;
}

.ap-map-plot {
    min-height: 240px;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01)),
        radial-gradient(circle at 80% 20%, rgba(111,231,177,0.12), transparent 24%);
    border: 1px solid rgba(255,255,255,0.06);
    position: relative;
    overflow: hidden;
}

.ap-map-plot::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 60px 60px;
}

.ap-map-plot::after {
    content: "";
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='620' height='240' viewBox='0 0 620 240'%3E%3Cpath d='M0 178L72 162L116 170L188 120L258 136L324 86L388 98L470 42L540 58L620 22' fill='none' stroke='%23ff9b32' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M0 198L82 182L162 194L242 154L310 166L372 142L448 122L520 104L620 92' fill='none' stroke='rgba(111,231,177,0.9)' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/cover no-repeat;
}

.ap-landing-list > div,
.ap-detail-row,
.ap-mobile-tabs a,
.ap-mobile-tabbar a,
.ap-dashboard-kpi {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.ap-tag--olive,
.ap-tag--lake {
    background: rgba(111, 231, 177, 0.14);
    color: var(--ap-olive);
}

.ap-tag--copper {
    background: rgba(255, 155, 50, 0.14);
    color: var(--ap-copper);
}

.ap-dashboard-kpi strong,
.ap-landing-kpi strong {
    font-family: var(--font-display);
    font-size: 3.2rem;
    font-weight: 400;
    letter-spacing: .04em;
}

.ap-dashboard-panel__header h3,
.ap-screen-panel h3,
.ap-login-card h2,
.ap-login-page__aside h1 {
    font-size: clamp(2.2rem, 3vw, 3.4rem);
    line-height: .95;
}

.ap-product-grid {
    display: grid;
    grid-template-columns: .82fr 1.18fr;
    gap: 1rem;
}

.ap-product-image,
.ap-product-placeholder {
    min-height: 420px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 50% 46%, rgba(255,155,50,0.24), transparent 30%),
        linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
    border: 1px solid rgba(255, 255, 255, 0.08);
    object-fit: cover;
}

.ap-product-placeholder {
    display: grid;
    place-items: center;
    font-size: 4rem;
}

.ap-product-hero__code {
    color: var(--ap-copper);
    font: 500 0.85rem/1.2 var(--font-mono);
    letter-spacing: .18em;
    text-transform: uppercase;
    margin-bottom: .55rem;
}

.ap-product-hero__name {
    max-width: 9.5ch;
}

.ap-detail-label {
    color: var(--ap-ink-dim);
    font: 500 11px/1.2 var(--font-mono);
    text-transform: uppercase;
    letter-spacing: .16em;
}

.ap-detail-value--primary,
.ap-detail-value--price {
    color: var(--ap-copper);
}

.ap-login-page {
    grid-template-columns: 1.05fr .95fr;
    min-height: calc(100vh - 2rem);
    gap: 1.5rem;
    padding: 1rem;
}

.ap-login-page__aside,
.ap-login-card {
    background: linear-gradient(180deg, rgba(23, 30, 37, 0.92), rgba(10, 13, 16, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--ap-shadow);
}

.ap-login-page__aside {
    border-radius: 32px;
    padding: 2.4rem;
    justify-content: space-between;
}

.ap-login-page__tokens span {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--ap-ink-soft);
}

.ap-login-card {
    border-radius: 32px;
}

.ap-mobile-shell {
    max-width: 430px;
    margin: 0 auto;
    padding-bottom: 1rem;
}

.ap-mobile-shell__header,
.ap-mobile-tabbar,
.ap-mobile-tabs {
    background: linear-gradient(180deg, rgba(23, 30, 37, 0.90), rgba(10, 13, 16, 0.96));
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ap-mobile-tabs a,
.ap-mobile-tabbar a {
    color: var(--ap-ink-soft);
}

.ap-mobile-tabs a.is-active,
.ap-mobile-tabbar a.is-active {
    color: var(--ap-copper);
    border-color: rgba(255, 155, 50, 0.18);
    background: rgba(255, 155, 50, 0.10);
}

.ap-mobile-shell__offline {
    background: rgba(255, 109, 89, 0.14);
    color: #ff998c;
    border-color: rgba(255, 109, 89, 0.22);
}

@media (max-width: 900px) {
    .ap-login-page,
    .ap-landing-hero,
    .ap-landing-bottom,
    .ap-dashboard-grid,
    .ap-product-grid {
        grid-template-columns: 1fr;
    }

    .ap-login-page__aside h1 {
        max-width: 12ch;
        margin-top: 2rem;
    }
}

/* Per-page identity */
.ap-landing-screen .ap-landing-hero__copy,
.ap-dashboard-screen .ap-dashboard-hero,
.ap-screen--products .ap-screen__hero,
.ap-screen--product-detail .ap-screen__hero,
.ap-screen--marketplace .ap-screen__hero {
    padding: 1.6rem 1.8rem;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(23, 30, 37, 0.78), rgba(11, 13, 16, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--ap-shadow);
}

.ap-landing-screen .ap-landing-hero__copy {
    position: relative;
    overflow: hidden;
}

.ap-landing-screen .ap-landing-hero__copy::after {
    content: "";
    position: absolute;
    inset: auto -60px -100px auto;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(255, 155, 50, 0.18), transparent 68%);
    pointer-events: none;
}

.ap-landing-screen .ap-landing-kpis {
    margin-top: 1.4rem;
    gap: .8rem;
}

.ap-landing-screen .ap-landing-kpi {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.ap-landing-screen .ap-landing-kpi:nth-child(1),
.ap-dashboard-screen .ap-dashboard-kpi:nth-child(1) {
    border-color: rgba(255, 155, 50, 0.24);
}

.ap-landing-screen .ap-landing-kpi:nth-child(2),
.ap-dashboard-screen .ap-dashboard-kpi:nth-child(3) {
    border-color: rgba(111, 231, 177, 0.20);
}

.ap-dashboard-screen .ap-dashboard-hero {
    align-items: end;
}

.ap-dashboard-screen .ap-dashboard-kpi {
    min-height: 166px;
    padding: 1.1rem 1rem !important;
}

.ap-dashboard-screen .ap-dashboard-kpi span:last-child {
    max-width: 16ch;
}

.ap-dashboard-screen .ap-dashboard-panel--accent {
    background:
        radial-gradient(circle at 84% 18%, rgba(255,155,50,0.16), transparent 18%),
        linear-gradient(180deg, rgba(23, 30, 37, 0.88), rgba(12, 15, 18, 0.92)) !important;
}

.ap-screen--products .ap-filter-panel {
    display: grid;
    gap: .8rem;
    border-style: dashed !important;
}

.ap-screen--products .ap-screen-panel {
    position: relative;
    overflow: hidden;
}

.ap-screen--products .ap-screen-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--ap-copper), rgba(255, 155, 50, 0));
}

.ap-screen--products .rz-grid-table tbody td:first-child,
.ap-screen--products .rz-datatable tbody td:first-child {
    font-weight: 700;
    letter-spacing: .04em;
}

.ap-screen--product-detail .ap-screen__hero {
    align-items: end;
}

.ap-screen--product-detail .ap-product-grid > div:first-child {
    position: relative;
}

.ap-screen--product-detail .ap-product-grid > div:first-child::after {
    content: "component scan";
    position: absolute;
    left: 1.1rem;
    top: 1rem;
    font: 500 11px/1 var(--font-mono);
    text-transform: uppercase;
    letter-spacing: .16em;
    color: var(--ap-copper);
    z-index: 1;
}

.ap-screen--product-detail .ap-detail-row {
    border-radius: 18px;
    padding: 1rem 1.1rem;
}

.ap-screen--marketplace .ap-screen-panel:first-of-type {
    border-style: dashed !important;
}

.ap-screen--marketplace .ap-screen-panel:last-of-type {
    box-shadow:
        inset 0 0 0 1px rgba(255, 155, 50, 0.10),
        var(--ap-shadow) !important;
}

.ap-screen--marketplace .ap-marketplace-form > *:last-child,
.ap-screen--marketplace .ap-marketplace-form > *:nth-last-child(2) {
    align-self: end;
}

.ap-login-page__aside {
    position: relative;
    overflow: hidden;
}

.ap-login-page__aside::after {
    content: "";
    position: absolute;
    inset: auto -40px -80px auto;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(255, 155, 50, 0.18), transparent 68%);
}

.ap-login-page__tokens {
    display: flex;
    flex-wrap: wrap;
    gap: .7rem;
}

.ap-mobile-shell__header {
    position: relative;
    overflow: hidden;
}

.ap-mobile-shell__header::before {
    content: "";
    position: absolute;
    inset: auto -40px -60px auto;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(255, 155, 50, 0.16), transparent 68%);
    pointer-events: none;
}

.ap-mobile-shell__content .ap-dashboard-kpis,
.ap-mobile-shell__content .ap-landing-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .7rem;
}

.ap-register-card {
    max-width: 680px;
}

.ap-register-page .ap-login-page__main {
    align-items: stretch;
}

.ap-screen--search .ap-filter-panel,
.ap-screen--orders .ap-screen-panel,
.ap-screen--vendors .ap-screen-panel,
.ap-screen--pricing .ap-screen-panel {
    position: relative;
    overflow: hidden;
}

.ap-screen--search .ap-filter-panel::before,
.ap-screen--orders .ap-screen-panel::before,
.ap-screen--vendors .ap-screen-panel::before,
.ap-screen--pricing .ap-screen-panel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--ap-copper), rgba(255, 155, 50, 0));
}

.ap-screen--orders .ap-screen__hero,
.ap-screen--vendors .ap-screen__hero,
.ap-screen--search .ap-screen__hero,
.ap-screen--pricing .ap-screen__hero {
    padding: 1.6rem 1.8rem;
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(23, 30, 37, 0.78), rgba(11, 13, 16, 0.86));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--ap-shadow);
}

.ap-screen--orders .ap-screen__hero,
.ap-screen--vendors .ap-screen__hero {
    align-items: end;
}

.ap-search-grid,
.ap-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.ap-search-hit {
    background:
        linear-gradient(180deg, rgba(23, 30, 37, 0.92), rgba(12, 15, 18, 0.96)) !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--ap-shadow);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.ap-search-hit:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 155, 50, 0.24);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), 0 24px 60px rgba(0, 0, 0, 0.35);
}

.ap-pricing-card {
    display: grid;
    gap: 1rem;
    padding: 1.4rem;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(23, 30, 37, 0.88), rgba(11, 13, 16, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04), var(--ap-shadow);
}

.ap-pricing-card--featured {
    border-color: rgba(255, 155, 50, 0.26);
    box-shadow:
        inset 0 0 0 1px rgba(255, 155, 50, 0.08),
        0 28px 80px rgba(0, 0, 0, 0.45);
}

.ap-pricing-card__price {
    font-family: var(--font-display);
    font-size: clamp(2.6rem, 5vw, 4rem);
    line-height: .9;
    color: var(--ap-mist);
}

.ap-pricing-card__price span {
    margin-left: .45rem;
    font: 500 0.95rem/1 var(--font-mono);
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ap-ink-soft);
}

.ap-pricing-card ul {
    display: grid;
    gap: .7rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ap-pricing-card li {
    position: relative;
    padding-left: 1rem;
    color: var(--ap-ink-soft);
}

.ap-pricing-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .55rem;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--ap-copper);
    box-shadow: 0 0 16px rgba(255, 155, 50, 0.5);
}

@media (max-width: 900px) {
    .ap-register-card {
        max-width: none;
    }
}

@media (max-width: 640px) {
    .ap-login-card {
        width: 100%;
        padding: 1.4rem;
        border-radius: 26px;
    }

    .ap-login-page__links {
        flex-direction: column;
        align-items: flex-start;
    }

    .ap-login-page__aside h1 {
        font-size: clamp(2.8rem, 14vw, 4rem);
        max-width: 10ch;
    }
}

:focus-visible {
    outline: 2px solid var(--ap-copper);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
