:root {
    color-scheme: light;
    --primary: #00a857;
    --primary-strong: #00884a;
    --accent: #0f172a;
    --surface-0: #f4f6f8;
    --surface-1: rgba(255, 255, 255, 0.72);
    --surface-2: rgba(255, 255, 255, 0.92);
    --surface-3: rgba(247, 249, 251, 0.9);
    --surface-4: #ffffff;
    --text-1: #111827;
    --text-2: #5b6474;
    --text-3: #8a92a3;
    --border: rgba(17, 24, 39, 0.08);
    --border-strong: rgba(17, 24, 39, 0.14);
    --shadow-soft: 0 20px 50px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 18px 36px rgba(15, 23, 42, 0.06);
    --error: #d93025;
    --warning: #f59e0b;
    --success: #16a34a;
    --info: #0ea5e9;
    --radius-xl: 32px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --nav-height: 76px;
    --content-width: 1240px;
    --font-sans: "SF Pro Display", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
    color-scheme: dark;
    --accent: #ecfdf5;
    --surface-0: #050816;
    --surface-1: rgba(11, 15, 27, 0.7);
    --surface-2: rgba(11, 15, 27, 0.88);
    --surface-3: rgba(15, 20, 34, 0.94);
    --surface-4: rgba(18, 24, 38, 0.98);
    --text-1: #f8fafc;
    --text-2: #bac4d6;
    --text-3: #7c8699;
    --border: rgba(226, 232, 240, 0.08);
    --border-strong: rgba(226, 232, 240, 0.14);
    --shadow-soft: 0 24px 64px rgba(0, 0, 0, 0.34);
    --shadow-card: 0 18px 36px rgba(0, 0, 0, 0.22);
    --error: #ff7b72;
    --warning: #fbbf24;
    --success: #4ade80;
    --info: #38bdf8;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(0, 168, 87, 0.14), transparent 24%),
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.08), transparent 18%),
        linear-gradient(180deg, var(--surface-0) 0%, color-mix(in srgb, var(--surface-0) 92%, #ffffff 8%) 100%);
    color: var(--text-1);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    transition: background-color 220ms ease, color 220ms ease;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: -1;
    filter: blur(80px);
    opacity: 0.7;
}

body::before {
    top: 5%;
    left: -8rem;
    width: 16rem;
    height: 16rem;
    background: rgba(0, 168, 87, 0.18);
}

body::after {
    right: -6rem;
    bottom: 10%;
    width: 15rem;
    height: 15rem;
    background: rgba(14, 165, 233, 0.1);
}

.not-found-page {
    min-height: calc(100vh - var(--nav-height) - 48px);
    display: grid;
    place-items: center;
    padding: 32px 0 12px;
}

.not-found-shell {
    width: min(100%, 780px);
    padding: clamp(28px, 5vw, 56px);
    border: 1px solid var(--border);
    border-radius: 40px;
    background:
        radial-gradient(circle at top left, rgba(0, 168, 87, 0.16), transparent 32%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 30%),
        var(--surface-2);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    text-align: center;
}

.not-found-badge {
    width: fit-content;
    margin: 0 auto 24px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 12%, var(--surface-4) 88%);
    color: var(--primary-strong);
    font-size: 0.92rem;
    font-weight: 700;
}

.not-found-logo-wrap {
    display: inline-flex;
    justify-content: center;
    margin: 0 auto 28px;
}

.not-found-logo-wrap .brand-logo {
    width: clamp(170px, 24vw, 220px);
}

.not-found-copy {
    max-width: 560px;
    margin: 0 auto;
}

.not-found-kicker {
    margin: 0 0 10px;
    color: var(--primary-strong);
    font-size: 0.96rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.not-found-copy h1 {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 4.2rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.not-found-copy p:last-child {
    margin: 18px 0 0;
    color: var(--text-2);
    font-size: 1.02rem;
}

.not-found-actions {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select,
textarea {
    font: inherit;
}

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 60;
    padding: 0;
}

.apple-nav {
    width: 100%;
    min-height: var(--nav-height);
    margin: 0;
    padding: 12px max(24px, calc((100vw - var(--content-width)) / 2));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: rgba(255, 255, 255, 0.86);
    border: 0;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.05);
}

[data-theme="dark"] .apple-nav {
    background: rgba(11, 15, 27, 0.84);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: 0;
    flex: 0 0 auto;
}

.brand-logo {
    width: 148px;
    height: auto;
}

.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

.nav-panel {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link {
    padding: 10px 14px;
    border-radius: 999px;
    color: var(--text-2);
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
    background: var(--surface-3);
    color: var(--text-1);
}

.theme-toggle,
.nav-menu-toggle,
.user-chip {
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-1);
    border-radius: 999px;
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.theme-toggle,
.nav-menu-toggle {
    width: 70px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.theme-toggle:hover,
.nav-menu-toggle:hover,
.user-chip:hover,
.btn:hover,
.action-link:hover {
    transform: translateY(-1px);
}

.theme-toggle {
    padding: 0;
}

.theme-toggle-track {
    position: relative;
    width: 58px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(226, 232, 240, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
    overflow: hidden;
}

[data-theme="dark"] .theme-toggle-track {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.98));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.theme-toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
    transition: transform 220ms ease, background 220ms ease;
}

[data-theme="dark"] .theme-toggle-thumb {
    transform: translateX(28px);
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}

.theme-icon {
    position: relative;
    z-index: 1;
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    color: var(--text-3);
    transition: color 220ms ease, opacity 220ms ease;
}

.theme-icon-sun {
    color: #f59e0b;
}

.theme-icon-moon {
    color: #64748b;
}

[data-theme="dark"] .theme-icon-sun {
    opacity: 0.45;
}

[data-theme="dark"] .theme-icon-moon {
    color: #0f172a;
}

.nav-menu-toggle {
    display: none;
}

.nav-user {
    position: relative;
}

.user-chip {
    min-height: 48px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), color-mix(in srgb, var(--primary) 55%, #ffffff 45%));
    color: #fff;
    font-weight: 700;
}

.user-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 190px;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.76rem;
    color: var(--text-3);
}

.nav-user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 240px;
    display: grid;
    gap: 4px;
    padding: 10px;
    border-radius: 24px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
}

.nav-user.is-open .nav-user-dropdown {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-link {
    border-radius: 16px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text-2);
}

.dropdown-link:hover {
    background: var(--surface-3);
    color: var(--text-1);
}

.dropdown-link.is-danger {
    color: var(--error);
}

.page-wrap {
    flex: 1;
    width: min(var(--content-width), calc(100vw - 24px));
    margin: 0 auto;
    padding: 26px 0 40px;
}

.page-wrap-auth {
    width: min(1180px, calc(100vw - 24px));
    padding: 0;
}

.page {
    display: grid;
    gap: 24px;
    animation: page-enter 520ms ease;
}

.page-hero,
.glass-card,
.metric-card,
.list-card,
.empty-state,
.auth-shell,
.table-shell,
.chart-card,
.detail-grid,
.info-card,
.cta-banner {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.page-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(24px, 4vw, 40px);
    display: grid;
    gap: 28px;
    grid-template-columns: 1.3fr 0.9fr;
}

.page-hero > *,
.stats-grid > *,
.two-column-grid > *,
.hero-highlights > * {
    min-width: 0;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(135deg, rgba(0, 168, 87, 0.1), transparent 45%),
        radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.22), transparent 18%);
    pointer-events: none;
}

.hero-copy,
.hero-panel {
    position: relative;
    z-index: 1;
}

.hero-copy {
    display: grid;
    align-content: space-between;
    gap: 20px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.hero-title,
.section-title {
    margin: 0;
    letter-spacing: -0.05em;
    line-height: 1.02;
}

.hero-title {
    max-width: 12ch;
    font-size: clamp(2.25rem, 5vw, 4.6rem);
}

.hero-description,
.section-description,
.muted {
    color: var(--text-2);
}

.hero-description {
    max-width: 58ch;
    font-size: 1rem;
    margin: 2rem 0 0 0;
}

.hero-actions,
.stack-actions,
.inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 12px;
}

.hero-bottom-strip {
    display: grid;
    gap: 18px;
    padding: 18px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(255, 255, 255, 0.18));
    border: 1px solid var(--border);
}

[data-theme="dark"] .hero-bottom-strip {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
}

.hero-highlights {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.highlight-card {
    padding: 18px 18px 16px;
    border-radius: 22px;
    background: color-mix(in srgb, var(--surface-3) 86%, #ffffff 14%);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.highlight-value {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.highlight-label {
    margin-top: 4px;
    color: var(--text-3);
    font-size: 0.9rem;
}

.hero-panel {
    display: grid;
    gap: 18px;
    align-content: center;
}

.hero-orb {
    padding: 24px;
    border-radius: 28px;
    background: linear-gradient(155deg, color-mix(in srgb, var(--primary) 20%, var(--surface-4) 80%), var(--surface-3));
    min-height: 340px;
    display: grid;
    align-content: space-between;
    gap: 20px;
}

.orb-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-2);
}

.orb-heading {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-2);
}

.orb-main {
    display: grid;
    gap: 6px;
}

.orb-value {
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.06em;
}

.orb-list {
    display: grid;
    gap: 12px;
}

.orb-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    color: var(--text-2);
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.36);
    border: 1px solid rgba(255, 255, 255, 0.22);
}

[data-theme="dark"] .orb-item {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

.orb-item-copy {
    display: grid;
    gap: 4px;
}

.orb-item-copy span {
    font-weight: 600;
    color: var(--text-2);
}

.orb-item-copy small {
    color: var(--text-3);
    font-size: 0.8rem;
}

.orb-item strong {
    color: var(--text-1);
    font-size: 1rem;
    text-align: right;
}

.stats-grid,
.two-column-grid,
.three-column-grid,
.feature-grid {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

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

.two-column-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
}

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

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

.metric-card,
.chart-card,
.list-card,
.table-shell,
.auth-shell,
.info-card,
.cta-banner,
.empty-state,
.glass-card {
    padding: clamp(20px, 3vw, 28px);
}

.metric-card {
    display: grid;
    gap: 14px;
}

.metric-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
}

.metric-icon {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: color-mix(in srgb, var(--primary) 12%, transparent);
    color: var(--primary);
}

.metric-value {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.metric-label {
    color: var(--text-3);
    font-size: 0.92rem;
}

.metric-trend {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
    background: var(--surface-3);
    width: fit-content;
}

.metric-trend.is-warning {
    color: var(--warning);
}

.metric-trend.is-success {
    color: var(--success);
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.section-title {
    font-size: clamp(1.4rem, 2vw, 2rem);
}

.section-description {
    margin: 6px 0 0;
}

.mini-stat-list,
.timeline-list,
.detail-list,
.auth-benefits {
    display: grid;
    gap: 12px;
}

.mini-stat,
.timeline-item,
.detail-row,
.benefit-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 18px;
    background: var(--surface-3);
    border: 1px solid var(--border);
}

.mini-stat-label,
.detail-label {
    color: var(--text-3);
    font-size: 0.9rem;
}

.mini-stat-value,
.detail-value {
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.35;
    word-break: break-word;
}

.chart-stage {
    position: relative;
    min-height: 300px;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.chart-stage canvas {
    display: block;
    width: 100% !important;
    max-width: 100%;
    min-height: 280px;
}

.pill,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--surface-3);
    border: 1px solid var(--border);
    font-size: 0.82rem;
    font-weight: 700;
}

.status-pill.is-success {
    color: var(--success);
}

.status-pill.is-warning {
    color: var(--warning);
}

.status-pill.is-danger {
    color: var(--error);
}

.status-pill.is-info {
    color: var(--info);
}

.table-shell {
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 18px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table th {
    color: var(--text-3);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

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

.data-table tbody tr {
    transition: background-color 180ms ease;
}

.data-table tbody tr:hover {
    background: color-mix(in srgb, var(--surface-3) 80%, transparent);
}

.parcela-action-stack {
    display: grid;
    gap: 8px;
    min-width: 180px;
}

.parcela-action-text {
    max-width: 24ch;
    line-height: 1.35;
}

.parcela-action-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.table-title {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.table-title strong {
    font-size: 0.98rem;
}

.table-title span {
    color: var(--text-3);
    font-size: 0.88rem;
}

.action-link,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    box-shadow: 0 14px 28px rgba(0, 168, 87, 0.22);
}

.btn-secondary {
    background: var(--surface-3);
    border-color: var(--border);
    color: var(--text-1);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-2);
}

.btn-block {
    width: 100%;
}

.btn.is-loading {
    pointer-events: none;
    opacity: 0.92;
}

.btn-spinner {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: currentColor;
    animation: btn-spin 0.75s linear infinite;
}

.action-link {
    min-height: 40px;
    padding: 0 14px;
    background: var(--surface-3);
    border-color: var(--border);
    color: var(--text-1);
}

.auth-page {
    min-height: 100vh;
    display: grid;
    align-items: center;
    position: relative;
    padding: 28px 0;
    isolation: isolate;
    background:
        radial-gradient(circle at 15% 20%, rgba(0, 168, 87, 0.10), transparent 22%),
        radial-gradient(circle at 85% 18%, rgba(14, 165, 233, 0.10), transparent 18%),
        linear-gradient(180deg, #eef2f6 0%, #f8fafc 52%, #edf2f7 100%);
}

.auth-page::before,
.auth-page::after {
    content: "";
    position: fixed;
    inset: auto;
    z-index: -1;
    border-radius: 999px;
    filter: blur(90px);
    pointer-events: none;
    opacity: 0.9;
}

.auth-page::before {
    top: 10%;
    left: -6rem;
    width: 16rem;
    height: 16rem;
    background: rgba(0, 168, 87, 0.10);
}

.auth-page::after {
    right: -5rem;
    bottom: 8%;
    width: 18rem;
    height: 18rem;
    background: rgba(59, 130, 246, 0.10);
}

[data-theme="dark"] .auth-page {
    background:
        radial-gradient(circle at 18% 22%, rgba(0, 168, 87, 0.14), transparent 20%),
        radial-gradient(circle at 84% 16%, rgba(56, 189, 248, 0.10), transparent 18%),
        linear-gradient(180deg, #030712 0%, #08111d 52%, #0a1320 100%);
}

.auth-brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.auth-logo {
    width: 150px;
    height: auto;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 22px;
    overflow: hidden;
    position: relative;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
}

[data-theme="dark"] .auth-shell {
    background: rgba(7, 12, 22, 0.78);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 34px 90px rgba(0, 0, 0, 0.34);
}

.auth-panel {
    padding: clamp(28px, 4vw, 42px);
}

.auth-showcase {
    position: relative;
    background:
        linear-gradient(160deg, #f7fffb 0%, #eefbf4 45%, #eaf4ff 100%);
    border-right: 1px solid var(--border);
    display: grid;
    gap: 22px;
    overflow: hidden;
}

.auth-showcase::before {
    content: "";
    position: absolute;
    top: -8%;
    right: -10%;
    width: 22rem;
    height: 22rem;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(0, 168, 87, 0.18), rgba(0, 168, 87, 0.02) 62%, transparent 72%);
    pointer-events: none;
    border: 0;
    filter: blur(4px);
}

[data-theme="dark"] .auth-showcase {
    background:
        linear-gradient(160deg, #07131c 0%, #0a1720 42%, #0d1524 100%);
}

[data-theme="dark"] .auth-showcase::before {
    background:
        radial-gradient(circle, rgba(0, 168, 87, 0.16), rgba(0, 168, 87, 0.02) 62%, transparent 72%);
}

.auth-showcase::after {
    content: "";
    position: absolute;
    left: -8%;
    bottom: -14%;
    width: 20rem;
    height: 20rem;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(56, 189, 248, 0.12), rgba(56, 189, 248, 0.02) 62%, transparent 72%);
    pointer-events: none;
}

[data-theme="dark"] .auth-showcase::after {
    background:
        radial-gradient(circle, rgba(56, 189, 248, 0.10), rgba(56, 189, 248, 0.02) 62%, transparent 72%);
}

.auth-card-stack {
    display: grid;
    gap: 14px;
    position: relative;
    z-index: 1;
}

.floating-card {
    padding: 18px 20px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.58);
    border: 1px solid rgba(255, 255, 255, 0.64);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 16px 28px rgba(15, 23, 42, 0.06);
}

[data-theme="dark"] .floating-card {
    background: rgba(9, 14, 24, 0.46);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.20);
}

.auth-showcase > * {
    position: relative;
    z-index: 1;
}

.auth-panel:last-child {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.50), rgba(255, 255, 255, 0.20));
}

[data-theme="dark"] .auth-panel:last-child {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.00));
}

.auth-title {
    margin: 12px 0 8px;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.auth-form {
    display: grid;
    gap: 16px;
}

.form-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-group {
    display: grid;
    gap: 8px;
}

.form-label {
    color: var(--text-2);
    font-size: 0.92rem;
    font-weight: 600;
}

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: var(--surface-3);
    color: var(--text-1);
    outline: 0;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.form-textarea {
    min-height: 120px;
    padding: 16px;
    resize: vertical;
}

.form-control::placeholder,
.form-textarea::placeholder {
    color: var(--text-3);
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--border-strong) 55%);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 15%, transparent);
}

.form-control.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
    border-color: color-mix(in srgb, var(--error) 60%, var(--border) 40%);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--error) 12%, transparent);
}

.input-shell {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
}

.input-shell .form-control {
    padding-left: 48px;
}

.error-text,
.helper-text {
    display: block;
    font-size: 0.82rem;
}

.error-text {
    display: none;
    margin-top: 2px;
    color: var(--error);
}

.error-text:not(:empty) {
    display: block;
}

.helper-text {
    color: var(--text-3);
}

.auth-footer {
    margin-top: 10px;
    color: var(--text-2);
}

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

.info-card {}

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

.detail-list-featured {
    gap: 14px;
}

.detail-row {
    align-items: flex-start;
    flex-direction: column;
}

.detail-row-wide {
    grid-column: 1 / -1;
}

.detail-row-emphasis {
    padding: 18px 18px 20px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--surface-3) 80%, #ffffff 20%), var(--surface-3));
}

[data-theme="dark"] .detail-row-emphasis {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.03));
}

.detail-row .detail-value {
    font-size: 1.05rem;
}

.cta-banner {
    display: grid;
    gap: 18px;
    align-items: center;
    grid-template-columns: 1.1fr auto;
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, transparent), transparent 55%),
        var(--surface-2);
}

.list-stack {
    display: grid;
    gap: 14px;
}

.list-row {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, minmax(120px, 1fr)) auto;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border-radius: 24px;
    background: var(--surface-3);
    border: 1px solid var(--border);
}

.list-row.is-compact {
    grid-template-columns: 1.2fr repeat(2, minmax(120px, 1fr)) auto;
}

.store-badge {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(140deg, color-mix(in srgb, var(--primary) 15%, transparent), var(--surface-4));
    display: grid;
    place-items: center;
    color: var(--primary);
}

.row-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.row-title {
    min-width: 0;
}

.row-title strong {
    display: block;
    font-size: 1rem;
}

.row-title span {
    display: block;
    color: var(--text-3);
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.empty-state {
    text-align: center;
    padding: 42px 24px;
}

.empty-state iconify-icon {
    color: var(--text-3);
    margin: 0 auto 12px;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(5, 8, 22, 0.34);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
    z-index: 90;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: min(100%, 420px);
    padding: 28px;
    border-radius: 28px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
    transform: translateY(12px) scale(0.98);
    transition: transform 220ms ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    margin-bottom: 18px;
    background: var(--surface-3);
}

.modal-title {
    margin: 0 0 8px;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}

.modal-message {
    margin: 0 0 22px;
    color: var(--text-2);
}

.modal-content-wide {
    width: min(100%, 560px);
}

.modal-choice-list {
    display: grid;
    gap: 10px;
    margin: 0 0 20px;
}

.modal-choice-button {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--surface-3);
    color: var(--text-1);
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.modal-choice-button:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--primary) 38%, var(--border));
    background: color-mix(in srgb, var(--primary) 8%, var(--surface-3));
    box-shadow: var(--shadow-card);
}

.site-footer {
    width: 100%;
    margin: 0;
    padding: 20px max(24px, calc((100vw - var(--content-width)) / 2));
    color: rgba(255, 255, 255, 0.88);
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    border: 0;
    border-radius: 0;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.footer-inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-logo {
    width: 148px;
    height: auto;
}

.footer-heart {
    color: #ffe0e6;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@keyframes page-enter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1100px) {
    .page-hero,
    .auth-shell,
    .two-column-grid,
    .cta-banner {
        grid-template-columns: 1fr;
    }

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

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

    .hero-highlights,
    .detail-list,
    .details-grid,
    .feature-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .list-row,
    .list-row.is-compact {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .parcela-action-stack {
        min-width: 0;
    }

    .parcela-action-text {
        max-width: none;
        font-size: 0.95rem;
    }

    .parcela-action-links {
        width: 100%;
    }

    .parcela-action-links .action-link {
        width: 100%;
        justify-content: center;
        padding-inline: 16px;
    }

    .auth-showcase {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }
}

@media (max-width: 820px) {
    .app-header {
        padding-inline: 0;
    }

    .apple-nav {
        border-radius: 0;
        align-items: flex-start;
        flex-wrap: wrap;
        padding-inline: 16px;
    }

    .nav-menu-toggle {
        display: inline-grid;
    }

    .nav-panel {
        width: 100%;
        display: none;
        flex-direction: column;
        align-items: stretch;
        padding-top: 8px;
    }

    .apple-nav.is-open .nav-panel {
        display: flex;
    }

    .nav-links,
    .nav-user-dropdown {
        width: 100%;
    }

    .nav-links {
        flex-direction: column;
    }

    .nav-link,
    .theme-toggle,
    .user-chip {
        width: 100%;
        justify-content: center;
    }

    .theme-toggle {
        max-width: 78px;
        align-self: center;
    }

    .nav-user {
        width: 100%;
    }

    .nav-user-dropdown {
        position: static;
        margin-top: 10px;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        display: none;
    }

    .nav-user.is-open .nav-user-dropdown {
        display: grid;
    }

    .hero-highlights,
    .stats-grid,
    .stats-grid.stats-grid-3,
    .details-grid,
    .detail-list,
    .feature-grid,
    .three-column-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .section-head,
    .site-footer,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 560px) {
    .page-wrap {
        width: min(var(--content-width), calc(100vw - 16px));
        padding-top: 18px;
    }

    .apple-nav {
        width: 100%;
        padding: 12px 16px;
    }

    .user-copy {
        display: none;
    }

    .brand-logo {
        width: 126px;
    }

    .footer-logo {
        width: 126px;
    }

    .metric-card,
    .chart-card,
    .list-card,
    .table-shell,
    .auth-shell,
    .info-card,
    .cta-banner,
    .empty-state,
    .glass-card,
    .page-hero {
        border-radius: 24px;
        padding: 20px;
    }

    .hero-title,
    .auth-title {
        max-width: none;
        font-size: clamp(1.9rem, 10vw, 2.9rem);
    }
}

.auth-simple-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px 16px;
}

[data-theme="dark"] .auth-simple-page {}

.auth-simple-card {
    width: min(100%, 520px);
    padding: clamp(24px, 4vw, 36px);
    border-radius: 32px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

[data-theme="dark"] .auth-simple-card {
    background: rgba(8, 12, 22, 0.82);
    border-color: rgba(255, 255, 255, 0.07);
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.34);
}

.auth-simple-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}

.auth-simple-logo .auth-logo {
    width: 148px;
}

.auth-simple-head {
    margin-bottom: 24px;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary) 10%, transparent);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.auth-simple-title {
    margin: 16px 0 8px;
    font-size: clamp(2rem, 5vw, 2.8rem);
    line-height: 1.02;
    letter-spacing: -0.05em;
}

.auth-simple-description {
    margin: 0;
    color: var(--text-2);
    font-size: 1rem;
}

.auth-footer-center {
    text-align: center;
}

.auth-inline-links {
    margin-top: 18px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-inline-links a {
    color: var(--primary);
    font-weight: 700;
}

.auth-callout {
    margin-bottom: 20px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--primary) 8%, var(--surface-3));
    border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border));
    color: var(--text-2);
}

.auth-callout iconify-icon {
    flex: 0 0 auto;
    color: var(--primary);
    margin-top: 1px;
}

.auth-callout-error {
    background: color-mix(in srgb, var(--error) 10%, var(--surface-3));
    border-color: color-mix(in srgb, var(--error) 18%, var(--border));
}

.auth-callout-error iconify-icon {
    color: var(--error);
}

@media (max-width: 560px) {
    .auth-simple-card {
        padding: 22px 18px;
        border-radius: 26px;
    }

    .auth-simple-topbar {
        margin-bottom: 22px;
    }

    .auth-simple-logo .auth-logo {
        width: 128px;
    }

    .auth-simple-title {
        font-size: clamp(1.8rem, 9vw, 2.4rem);
    }

    .auth-inline-links {
        flex-direction: column;
    }
}
