:root {
    --rural-accent: #06402b;
    --rural-accent-dark: #042e1f;
    --rural-accent-soft: #0b5f41;
    --rural-border: #c9ddd4;
    --rural-bg: #ffffff;
    --rural-text: #000000;
}

body {
    background: var(--rural-bg) !important;
    color: var(--rural-text) !important;
}

a {
    color: var(--rural-accent);
}

a:hover {
    color: var(--rural-accent-dark);
}

.text-primary {
    color: var(--rural-accent) !important;
}

.bg-primary,
.bg-gradient-primary,
.bg-gradient-info,
.bg-gradient-success,
.bg-gradient-default,
.badge-primary {
    background: var(--rural-accent) !important;
}

.badge-primary,
#admin-pending-badge {
    color: #ffffff !important;
}

.btn-primary,
.btn-info {
    background-color: var(--rural-accent);
    border-color: var(--rural-accent);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-info:hover,
.btn-info:focus {
    background-color: var(--rural-accent-dark);
    border-color: var(--rural-accent-dark);
}

.btn-outline-primary {
    border-color: var(--rural-accent);
    color: var(--rural-accent);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--rural-accent);
    border-color: var(--rural-accent);
    color: #fff;
}

.card,
.table {
    color: #000;
}

.page-landing,
.page-auth,
.page-budget,
.page-app {
    min-height: 100vh;
}

.page-landing .main-content {
    background: #fff;
    height: 100vh;
    overflow: hidden;
}

.landing-topbar {
    align-items: center;
    background: var(--rural-accent);
    border-bottom: 1px solid var(--rural-accent-dark);
    display: flex;
    height: 72px;
    left: 0;
    padding: 0 0.35rem;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1200;
}

.landing-brand {
    color: #fff !important;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.landing-menu-links {
    gap: 0.3rem;
    overflow-x: auto;
    scrollbar-width: thin;
    white-space: nowrap;
}

.landing-menu-btn {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    color: #fff !important;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0.15rem;
    padding: 0.34rem 0.78rem;
    text-transform: lowercase;
}

.landing-menu-btn:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff !important;
}

.landing-link {
    color: #fff !important;
    font-weight: 600;
}

.landing-budget-btn {
    background: #fff;
    border-radius: 0.4rem;
    color: var(--rural-accent) !important;
    font-size: 0.86rem;
    font-weight: 700;
    padding: 0.35rem 0.8rem;
}

.landing-budget-btn:hover {
    color: var(--rural-accent-dark) !important;
}

.landing-scroll {
    background: #fff;
    height: calc(100vh - 72px);
    margin-top: 72px;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
}

.landing-character-section {
    background: #fff;
    height: calc(100vh - 72px);
    min-height: calc(100vh - 72px);
    position: relative;
    scroll-snap-align: start;
}

.landing-character-section .container-fluid,
.landing-row,
.landing-image-col {
    height: 100%;
}

.landing-image-col {
    display: flex;
    justify-content: center;
}

.landing-image-wrap {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    margin: 0 auto;
    padding-left: clamp(0.4rem, 1.2vw, 1.2rem);
    padding-right: clamp(0.4rem, 1.2vw, 1.2rem);
    transform: translateY(clamp(22px, 4.2vh, 56px));
    width: 100%;
}

.landing-character-image {
    max-height: min(76vh, 760px);
    max-width: 100%;
    object-fit: contain;
    width: auto;
}

.landing-html-card {
    background: #fff;
    border: 1px solid var(--rural-border);
    border-radius: 0.8rem;
    box-shadow: 0 15px 30px rgba(8, 45, 33, 0.08);
    padding: 1rem;
}

.landing-step {
    color: var(--rural-accent);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.landing-section-title {
    color: var(--rural-accent);
    font-size: 1.9rem;
    margin-bottom: 0.7rem;
}

.landing-html-placeholder {
    border: 1px dashed var(--rural-border);
    border-radius: 0.6rem;
    color: #000;
    min-height: 220px;
    outline: none;
    padding: 1rem;
}

.landing-html-placeholder h2 {
    color: var(--rural-accent);
}

.landing-next-btn {
    align-items: center;
    background: var(--rural-accent);
    border: 2px solid var(--rural-accent-dark);
    border-radius: 999px;
    bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(4, 46, 31, 0.22);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    height: 68px;
    justify-content: center;
    left: 50%;
    position: absolute;
    transform: translateX(-50%);
    width: 68px;
    z-index: 6;
}

.landing-next-btn:hover,
.landing-next-btn:focus {
    background: var(--rural-accent-dark);
    color: #fff;
}

.landing-next-icon {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    transform: translateY(-1px);
}

.auth-portal-page {
    background:
        radial-gradient(circle at top left, rgba(6, 64, 43, 0.12), transparent 22%),
        radial-gradient(circle at bottom right, rgba(11, 95, 65, 0.1), transparent 24%),
        #ffffff !important;
}

.auth-portal-main {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.auth-portal-shell {
    width: min(1140px, 100%);
}

.auth-forms-grid {
    background: #ffffff;
    border: 1px solid rgba(6, 64, 43, 0.14);
    border-radius: 2rem;
    box-shadow: 0 28px 80px rgba(4, 46, 31, 0.14);
    display: flex;
    height: min(660px, calc(100vh - 2rem));
    min-height: min(660px, calc(100vh - 2rem));
    overflow: hidden;
    position: relative;
}

.auth-form-panel {
    display: flex;
    padding: 2.15rem clamp(1.25rem, 2.5vw, 3rem);
    position: relative;
    width: 50%;
}

.auth-surface-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    max-width: 405px;
    width: 100%;
}

.auth-back-link {
    color: var(--rural-accent);
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.auth-back-link:hover,
.auth-back-link:focus {
    color: var(--rural-accent-dark);
    text-decoration: none;
}

.auth-back-link-mobile {
    display: none;
}

.auth-form-panel-register .auth-back-link-mobile {
    display: inline-flex;
}

.auth-kicker {
    color: var(--rural-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin-bottom: 0.65rem;
    text-transform: uppercase;
}

.auth-panel-title {
    color: var(--rural-accent);
    font-family: "Avenir Next", "Century Gothic", sans-serif;
    font-size: clamp(1.85rem, 2.8vw, 2.7rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.98;
    margin-bottom: 0.75rem;
}

.auth-panel-copy {
    color: #1d3128;
    font-size: 0.94rem;
    line-height: 1.55;
    margin-bottom: 1.1rem;
    max-width: 32ch;
}

.auth-status {
    border-radius: 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.95rem;
    padding: 0.78rem 0.9rem;
}

.auth-status-success {
    background: #ecf8f1;
    border: 1px solid rgba(6, 64, 43, 0.16);
    color: var(--rural-accent);
}

.auth-form-stack {
    display: grid;
    gap: 0.8rem;
}

.auth-field {
    display: grid;
    gap: 0.34rem;
}

.auth-label {
    color: var(--rural-accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0;
}

.auth-input-wrap {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(6, 64, 43, 0.18);
    border-radius: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    display: flex;
    min-height: 50px;
    padding: 0 0.8rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-input-wrap:focus-within {
    border-color: var(--rural-accent);
    box-shadow: 0 0 0 4px rgba(6, 64, 43, 0.08);
    transform: translateY(-1px);
}

.auth-form-control {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #000 !important;
    min-height: 48px;
    padding: 0 !important;
}

.auth-form-control::placeholder {
    color: #688175;
}

.auth-error {
    color: #b42318;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 0;
}

.auth-submit-btn {
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 0.25rem;
    min-height: 46px;
}

.auth-inline-links {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: space-between;
    margin-top: 0.95rem;
}

.auth-switch-link {
    background: none;
    border: 0;
    color: var(--rural-accent);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 0;
}

.auth-switch-link:hover,
.auth-switch-link:focus,
.auth-ghost-link:hover,
.auth-ghost-link:focus {
    color: var(--rural-accent-dark);
    text-decoration: none;
}

.auth-ghost-link,
.auth-helper-note {
    color: #365347;
    font-size: 0.82rem;
}

.auth-overlay-panel {
    bottom: 0;
    left: 50%;
    padding: 0.8rem;
    position: absolute;
    top: 0;
    transform: translateX(0);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
    width: 50%;
    z-index: 3;
}

.auth-register-active .auth-overlay-panel {
    transform: translateX(-100%);
}

.auth-overlay-surface {
    align-items: center;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.14), transparent 20%),
        radial-gradient(circle at 82% 84%, rgba(255, 255, 255, 0.12), transparent 24%),
        linear-gradient(160deg, #06402b 0%, #0a563d 100%);
    border-radius: 1.5rem;
    display: flex;
    height: 100%;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.auth-overlay-surface::before,
.auth-overlay-surface::after {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    content: "";
    position: absolute;
}

.auth-overlay-surface::before {
    height: 320px;
    right: -120px;
    top: -90px;
    width: 320px;
}

.auth-overlay-surface::after {
    bottom: -110px;
    height: 280px;
    left: -120px;
    width: 280px;
}

.auth-overlay-hit {
    background: transparent;
    border: 0;
    cursor: pointer;
    inset: 0;
    position: absolute;
    z-index: 4;
}

.auth-overlay-hit-login,
.auth-register-active .auth-overlay-hit-register {
    display: none;
}

.auth-register-active .auth-overlay-hit-login {
    display: block;
}

.auth-overlay-copy {
    align-items: center;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    inset: 0;
    justify-content: space-between;
    padding: 2.2rem 1.5rem 1.9rem;
    pointer-events: none;
    position: absolute;
    text-align: center;
    transition: opacity 0.22s ease;
    z-index: 2;
}

.auth-overlay-copy-login {
    opacity: 0;
}

.auth-register-active .auth-overlay-copy-register {
    opacity: 0;
}

.auth-register-active .auth-overlay-copy-login {
    opacity: 1;
}

.auth-overlay-kicker {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    margin: 0;
    text-transform: uppercase;
}

.auth-overlay-text {
    font-size: 0.92rem;
    line-height: 1.55;
    margin: auto 0 1rem;
    max-width: 24ch;
}

.auth-overlay-cta {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.84rem;
    font-weight: 700;
    padding: 0.58rem 1.15rem;
}

.auth-logo-orb {
    align-items: center;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
    display: flex;
    height: min(15vw, 190px);
    justify-content: center;
    min-height: 145px;
    min-width: 145px;
    position: relative;
    width: min(15vw, 190px);
    z-index: 3;
}

.auth-logo-wordmark {
    align-items: flex-end;
    display: inline-flex;
    font-family: "Avenir Next", "Century Gothic", sans-serif;
    font-size: clamp(1.4rem, 1.8vw, 2.15rem);
    font-weight: 700;
    letter-spacing: -0.05em;
    line-height: 0.95;
}

.auth-logo-dark {
    color: #30363a;
}

.auth-logo-light {
    color: #a3cc35;
}

.page-auth .login-header {
    background: #fff;
    border-bottom: 1px solid var(--rural-border);
}

.page-auth .header h1,
.page-auth .header p,
.page-auth .card-header h2,
.page-auth .card-header p,
.page-auth .form-control-label,
.page-auth .input-group-text,
.page-auth .text-muted,
.page-auth .text-lead {
    color: var(--rural-accent) !important;
}

.page-auth .card {
    background: #fff !important;
    border: 1px solid var(--rural-border) !important;
}

.budget-portal-page {
    background:
        radial-gradient(circle at top right, rgba(6, 64, 43, 0.11), transparent 24%),
        radial-gradient(circle at bottom left, rgba(11, 95, 65, 0.09), transparent 24%),
        #ffffff !important;
}

.budget-portal-main {
    align-items: center;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.budget-portal-shell {
    width: min(1140px, 100%);
}

.budget-portal-grid {
    background: #ffffff;
    border: 1px solid rgba(6, 64, 43, 0.14);
    border-radius: 2rem;
    box-shadow: 0 28px 80px rgba(4, 46, 31, 0.14);
    display: flex;
    height: min(660px, calc(100vh - 2rem));
    min-height: min(660px, calc(100vh - 2rem));
    overflow: hidden;
    position: relative;
}

.budget-form-panel,
.budget-brand-panel {
    width: 50%;
}

.budget-form-panel {
    display: flex;
    padding: 2.15rem clamp(1.25rem, 2.5vw, 3rem);
}

.budget-surface-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 0 auto;
    max-width: 405px;
    width: 100%;
}

.budget-top-actions {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.budget-kicker {
    color: var(--rural-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin-bottom: 0.65rem;
    text-transform: uppercase;
}

.budget-panel-title {
    color: var(--rural-accent);
    font-family: "Avenir Next", "Century Gothic", sans-serif;
    font-size: clamp(1.85rem, 2.8vw, 2.7rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 0.98;
    margin-bottom: 0.75rem;
}

.budget-panel-copy {
    color: #1d3128;
    font-size: 0.94rem;
    line-height: 1.55;
    margin-bottom: 1.1rem;
    max-width: 34ch;
}

.budget-status {
    border-radius: 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.95rem;
    padding: 0.78rem 0.9rem;
}

.budget-status-success {
    background: #ecf8f1;
    border: 1px solid rgba(6, 64, 43, 0.16);
    color: var(--rural-accent);
}

.budget-form-stack {
    display: grid;
    gap: 0.8rem;
}

.budget-field {
    display: grid;
    gap: 0.34rem;
}

.budget-label {
    color: var(--rural-accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0;
}

.budget-input-wrap {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(6, 64, 43, 0.18);
    border-radius: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    display: flex;
    min-height: 50px;
    padding: 0 0.8rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.budget-input-wrap:focus-within {
    border-color: var(--rural-accent);
    box-shadow: 0 0 0 4px rgba(6, 64, 43, 0.08);
    transform: translateY(-1px);
}

.budget-form-control {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    color: #000 !important;
    min-height: 48px;
    padding: 0 !important;
}

.budget-form-select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--rural-accent) 50%),
        linear-gradient(135deg, var(--rural-accent) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 3px),
        calc(100% - 12px) calc(50% - 3px);
    background-repeat: no-repeat;
    background-size: 6px 6px, 6px 6px;
    padding-right: 2rem !important;
}

.budget-error {
    color: #b42318;
    font-size: 0.78rem;
    font-weight: 600;
    margin: 0;
}

.budget-submit-btn {
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-top: 0.25rem;
    min-height: 46px;
}

.budget-brand-panel {
    padding: 0.8rem;
}

.budget-brand-surface {
    align-items: center;
    background:
        radial-gradient(circle at 18% 16%, rgba(255, 255, 255, 0.14), transparent 20%),
        radial-gradient(circle at 82% 84%, rgba(255, 255, 255, 0.12), transparent 24%),
        linear-gradient(160deg, #06402b 0%, #0a563d 100%);
    border-radius: 1.5rem;
    display: flex;
    height: 100%;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.budget-brand-surface::before,
.budget-brand-surface::after {
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 999px;
    content: "";
    position: absolute;
}

.budget-brand-surface::before {
    height: 320px;
    right: -120px;
    top: -90px;
    width: 320px;
}

.budget-brand-surface::after {
    bottom: -110px;
    height: 280px;
    left: -120px;
    width: 280px;
}

.budget-brand-inner {
    align-items: center;
    display: flex;
    justify-content: center;
    position: relative;
    width: 100%;
    z-index: 2;
}

.budget-logo-orb {
    height: min(15vw, 190px);
    min-height: 145px;
    min-width: 145px;
    width: min(15vw, 190px);
}

.budget-logo-wordmark {
    font-size: clamp(1.4rem, 1.8vw, 2.15rem);
}

.page-app {
    background:
        radial-gradient(circle at top right, rgba(6, 64, 43, 0.08), transparent 22%),
        #eef5f1;
}

.page-app .main-content {
    min-height: 100vh;
}

.app-shell {
    box-sizing: border-box;
    display: flex;
    gap: 1rem;
    min-height: 100vh;
    padding: 1rem;
}

.app-sidebar {
    background: linear-gradient(180deg, #063827 0%, #052d20 100%);
    border-radius: 1.8rem;
    box-shadow: 0 24px 46px rgba(3, 31, 22, 0.22);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: calc(100vh - 2rem);
    padding: 1rem 0.75rem;
    width: 108px;
}

.app-sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.app-sidebar-brand {
    display: flex;
    justify-content: center;
    text-decoration: none;
}

.app-sidebar-brand-mark {
    background: #fff;
    border-radius: 1.2rem;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
    display: flex;
    justify-content: center;
    min-height: 68px;
    padding: 0.5rem 0.35rem;
    width: 68px;
}

.app-sidebar-brand-word {
    align-items: center;
    display: flex;
    flex-direction: column;
    font-family: "Avenir Next", "Century Gothic", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: -0.06em;
    line-height: 0.82;
}

.app-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
}

.app-nav-button {
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 1.25rem;
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
    justify-content: center;
    min-height: 78px;
    padding: 0.7rem 0.3rem;
    text-decoration: none;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
    width: 100%;
}

.app-nav-button:hover,
.app-nav-button:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    outline: none;
    transform: translateY(-1px);
}

.app-nav-button.is-active,
.app-nav-button.is-current {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--rural-accent);
}

.app-nav-icon {
    display: inline-flex;
    height: 20px;
    width: 20px;
}

.app-nav-icon svg,
.app-search-icon svg,
.app-search-button svg,
.app-icon-wrap svg,
.app-user-chevron svg,
.app-panel-close svg {
    height: 100%;
    width: 100%;
}

.app-nav-label {
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

.app-sidebar-logout {
    margin-top: 1rem;
}

.app-nav-logout {
    background: rgba(255, 255, 255, 0.04);
}

.app-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
    min-width: 0;
}

.app-topbar {
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(6, 64, 43, 0.1);
    border-radius: 1.5rem;
    box-shadow: 0 18px 38px rgba(8, 45, 33, 0.08);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.25rem;
}

.app-topbar-search {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.42rem;
    max-width: 480px;
    min-width: 0;
}

.app-search-box {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dbe8e2;
    border-radius: 1rem;
    display: flex;
    gap: 0.65rem;
    min-height: 52px;
    padding: 0 0.75rem;
}

.app-search-icon {
    color: #6f897d;
    display: inline-flex;
    height: 18px;
    width: 18px;
}

.app-search-input {
    background: transparent;
    border: 0;
    color: #000;
    flex: 1;
    font-size: 0.92rem;
    min-width: 0;
    outline: none;
}

.app-search-input::placeholder {
    color: #89a095;
}

.app-search-button {
    align-items: center;
    background: var(--rural-accent);
    border: 0;
    border-radius: 0.8rem;
    color: #fff;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 36px;
}

.app-search-button:hover,
.app-search-button:focus {
    background: var(--rural-accent-dark);
    color: #fff;
}

.app-search-status {
    color: #60796e;
    font-size: 0.78rem;
    margin: 0 0 0 0.15rem;
}

.app-topbar-right {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    justify-content: flex-end;
}

.app-map-status {
    background: #ecf7f1;
    border: 1px solid rgba(6, 64, 43, 0.12);
    border-radius: 999px;
    color: var(--rural-accent);
    font-size: 0.78rem;
    font-weight: 700;
    max-width: 280px;
    overflow: hidden;
    padding: 0.55rem 0.85rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-map-status[data-tone="success"],
.app-map-status[data-tone="warning"],
.app-map-status[data-tone="error"] {
    background: var(--rural-accent);
    border-color: var(--rural-accent);
    color: #fff;
}

.app-icon-button,
.app-user-button {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dbe8e2;
    color: #10281f;
    display: inline-flex;
}

.app-icon-button {
    border-radius: 999px;
    height: 46px;
    justify-content: center;
    position: relative;
    width: 46px;
}

.app-icon-wrap {
    display: inline-flex;
    height: 18px;
    width: 18px;
}

.app-icon-badge {
    align-items: center;
    background: var(--rural-accent);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.65rem;
    font-weight: 700;
    height: 18px;
    justify-content: center;
    min-width: 18px;
    padding: 0 0.28rem;
    position: absolute;
    right: 4px;
    top: 6px;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.app-icon-badge[data-empty="true"] {
    opacity: 0;
    transform: scale(0.72);
}

.app-user-button {
    border-radius: 999px;
    gap: 0.6rem;
    padding: 0.35rem 0.55rem 0.35rem 0.35rem;
}

.app-user-avatar {
    align-items: center;
    background: linear-gradient(135deg, #0b5f41 0%, #06402b 100%);
    border-radius: 50%;
    color: #fff;
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 700;
    height: 38px;
    justify-content: center;
    letter-spacing: 0.04em;
    width: 38px;
}

.app-user-name {
    color: #173328;
    font-size: 0.86rem;
    font-weight: 700;
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-user-chevron {
    color: #6a8378;
    display: inline-flex;
    height: 14px;
    width: 14px;
}

.app-content-grid {
    display: flex;
    flex: 1;
    gap: 1rem;
    min-height: 0;
    position: relative;
}

.left-drop-panel {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(6, 64, 43, 0.1);
    border-radius: 1.5rem;
    box-shadow: 0 18px 38px rgba(8, 45, 33, 0.08);
    display: flex;
    flex: 0 0 360px;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    position: relative;
    transition: flex-basis 0.22s ease, opacity 0.22s ease, transform 0.22s ease, margin 0.22s ease;
}

.left-drop-panel:not(.open) {
    border-width: 0;
    flex-basis: 0;
    margin-right: -1rem;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-14px);
}

.left-drop-header {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid rgba(6, 64, 43, 0.08);
    display: flex;
    justify-content: space-between;
    padding: 1rem;
}

.app-panel-kicker {
    color: var(--rural-accent);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    margin: 0 0 0.2rem;
    text-transform: uppercase;
}

.left-drop-header h3 {
    color: #113024;
    font-size: 1rem;
}

.app-panel-close {
    align-items: center;
    background: #eef6f2;
    border: 0;
    border-radius: 0.9rem;
    color: #173328;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 36px;
}

.left-drop-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 1rem;
}

.left-drop-backdrop {
    display: none;
}

.drop-card {
    background: linear-gradient(145deg, #ffffff 0%, #f7fbf9 100%);
    border: 1px solid #deebe5;
    border-radius: 1.2rem;
    box-shadow: 0 12px 24px rgba(8, 45, 33, 0.04);
    margin-bottom: 0.85rem;
    padding: 0.95rem;
}

.drop-card-highlight {
    background: linear-gradient(145deg, rgba(234, 247, 239, 0.98) 0%, rgba(250, 253, 251, 0.98) 100%);
}

.drop-card-top {
    align-items: flex-start;
    display: flex;
    gap: 0.7rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.drop-card h4 {
    color: #173328;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0 0 0.7rem;
    text-transform: uppercase;
}

.summary-grid {
    display: grid;
    gap: 0.6rem;
}

.summary-item {
    background: #ffffff;
    border: 1px solid #ddebe4;
    border-radius: 0.95rem;
    padding: 0.75rem 0.8rem;
}

.summary-item strong {
    color: #3b5b4d;
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.summary-item span {
    color: #10281f;
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.page-app .form-control-label {
    color: #234539;
    font-size: 0.67rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.page-app .form-control,
.page-app textarea.form-control,
.page-app select.form-control {
    background: #fff;
    border: 1px solid #dbe8e2;
    border-radius: 0.92rem;
    box-shadow: none;
    color: #000;
    min-height: 42px;
}

.page-app .form-control:focus,
.page-app textarea.form-control:focus,
.page-app select.form-control:focus {
    border-color: var(--rural-accent);
    box-shadow: 0 0 0 4px rgba(6, 64, 43, 0.08);
}

.page-app textarea.form-control {
    min-height: auto;
}

.note {
    color: #5b7569;
    font-size: 0.79rem;
    margin-bottom: 0;
}

.list {
    display: grid;
    gap: 0.75rem;
    max-height: 18rem;
    overflow: auto;
    padding-right: 0.2rem;
}

.list > .card {
    background: #fff;
    border: 1px solid #deebe5;
    border-radius: 1rem;
    box-shadow: none;
    margin: 0;
    padding: 0.85rem;
}

.list > .card strong {
    color: #10281f;
    display: block;
    font-size: 0.84rem;
    margin-bottom: 0.3rem;
}

.list > .card p {
    color: #21392f;
    font-size: 0.8rem;
    margin-bottom: 0.35rem;
}

.card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.action {
    background: linear-gradient(120deg, var(--rural-accent) 0%, var(--rural-accent-soft) 100%);
    border: 0;
    border-radius: 0.9rem;
    box-shadow: 0 6px 16px rgba(8, 45, 33, 0.12);
    color: #fff;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.5rem 0.9rem;
    transition: all 0.15s ease;
}

.action:hover,
.action:focus {
    color: #fff;
    filter: brightness(1.04);
}

.action:disabled {
    cursor: not-allowed;
    filter: none;
    opacity: 0.58;
}

.action[data-tone="secondary"] {
    background: linear-gradient(120deg, #1e654a 0%, #2a7e5b 100%);
}

.action[data-tone="danger"] {
    background: linear-gradient(120deg, #2a7e5b 0%, #10613f 100%);
}

.map-stage {
    display: flex;
    flex: 1;
    min-height: 0;
    min-width: 0;
}

.map-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(6, 64, 43, 0.1);
    border-radius: 1.55rem;
    box-shadow: 0 18px 38px rgba(8, 45, 33, 0.08);
    flex: 1;
    min-height: 0;
    padding: 0.85rem;
    position: relative;
}

#map {
    background: #f5faf7;
    border: 1px solid #e2ede8;
    border-radius: 1.1rem;
    height: 100%;
    min-height: 0;
    width: 100%;
}

.sample {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #deebe5;
    border-radius: 999px;
    bottom: 1.3rem;
    box-shadow: 0 12px 22px rgba(8, 45, 33, 0.08);
    color: #173328;
    font-family: "Avenir Next", "Century Gothic", sans-serif;
    font-size: 0.76rem;
    left: 1.3rem;
    margin-top: 0;
    max-width: calc(100% - 2.6rem);
    padding: 0.62rem 0.9rem;
    position: absolute;
    white-space: pre-wrap;
    z-index: 500;
}

.leaflet-control-layers,
.leaflet-bar {
    border: 1px solid #deebe5 !important;
    box-shadow: 0 10px 22px rgba(8, 45, 33, 0.08) !important;
}

.leaflet-control-layers,
.leaflet-control-zoom a {
    background: rgba(255, 255, 255, 0.96) !important;
    color: #163328 !important;
}

.hidden {
    display: none !important;
}

@media (max-width: 1199.98px) {
    .left-drop-panel {
        flex-basis: 320px;
    }

    .app-topbar {
        padding: 0.9rem 1rem;
    }
}

@media (max-width: 991.98px) {
    .app-shell {
        flex-direction: column;
        padding: 0.85rem;
    }

    .app-sidebar {
        min-height: auto;
        padding: 0.75rem;
        width: 100%;
    }

    .app-sidebar-top {
        align-items: center;
        flex-direction: row;
        gap: 0.75rem;
        width: 100%;
    }

    .app-sidebar-nav {
        display: grid;
        flex: 1;
        gap: 0.55rem;
        grid-template-columns: repeat(5, minmax(68px, 1fr));
    }

    .app-sidebar-logout {
        margin-top: 0;
    }

    .app-topbar {
        align-items: stretch;
        flex-direction: column;
    }

    .app-topbar-search {
        max-width: none;
    }

    .app-topbar-right {
        justify-content: space-between;
    }

    .app-content-grid {
        min-height: 540px;
    }

    .budget-portal-grid {
        flex-direction: column-reverse;
        height: auto;
        min-height: auto;
    }

    .budget-form-panel,
    .budget-brand-panel {
        width: 100%;
    }

    .budget-brand-panel {
        padding: 0;
    }

    .budget-brand-surface {
        border-radius: 2rem 2rem 1rem 1rem;
        min-height: 240px;
    }

    .budget-form-panel {
        padding: 1.6rem 1.35rem 1.4rem;
    }
}

@media (max-width: 767.98px) {
    .landing-topbar {
        height: 64px;
    }

    .landing-scroll {
        height: calc(100vh - 64px);
        margin-top: 64px;
    }

    .landing-character-section {
        height: calc(100vh - 64px);
        min-height: calc(100vh - 64px);
        padding-bottom: 5.2rem;
        padding-top: 1.2rem;
    }

    .landing-row,
    .landing-image-col {
        height: auto;
    }

    .landing-image-wrap {
        justify-content: center;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
        transform: translateY(0.9rem);
    }

    .landing-character-image {
        max-height: min(46vh, 420px);
    }

    .landing-html-placeholder {
        min-height: 170px;
    }

    .landing-next-btn {
        bottom: 0.8rem;
        height: 56px;
        width: 56px;
    }

    .landing-next-icon {
        font-size: 1.65rem;
    }

    .auth-portal-main {
        align-items: stretch;
        padding: 0.8rem;
    }

    .auth-forms-grid {
        border-radius: 1.5rem;
        min-height: auto;
        padding-top: 235px;
    }

    .auth-form-panel {
        padding: 1.4rem 1rem 1.2rem;
        width: 100%;
    }

    .auth-form-panel-register {
        display: none;
    }

    .auth-register-active .auth-form-panel-login {
        display: none;
    }

    .auth-register-active .auth-form-panel-register {
        display: flex;
    }

    .auth-back-link {
        display: none;
    }

    .auth-back-link-mobile {
        display: inline-flex;
    }

    .auth-overlay-panel,
    .auth-register-active .auth-overlay-panel {
        left: 0;
        padding: 0;
        top: 0;
        transform: none;
        width: 100%;
    }

    .auth-overlay-surface {
        border-radius: 1.5rem 1.5rem 1rem 1rem;
        height: 235px;
    }

    .auth-overlay-copy {
        padding: 1.4rem 1.2rem 1rem;
    }

    .auth-overlay-text {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
        max-width: 22ch;
    }

    .auth-logo-orb {
        height: 130px;
        min-height: 130px;
        min-width: 130px;
        width: 130px;
    }

    .auth-logo-wordmark {
        font-size: 1.45rem;
    }

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

    .budget-portal-main {
        align-items: stretch;
        padding: 0.8rem;
    }

    .budget-portal-grid {
        border-radius: 1.5rem;
    }

    .budget-form-panel {
        padding: 1.4rem 1rem 1.2rem;
    }

    .budget-top-actions {
        gap: 0.55rem;
        margin-bottom: 0.85rem;
    }

    .budget-brand-surface {
        border-radius: 1.5rem 1.5rem 1rem 1rem;
        min-height: 210px;
    }

    .budget-logo-orb {
        height: 130px;
        min-height: 130px;
        min-width: 130px;
        width: 130px;
    }

    .budget-logo-wordmark {
        font-size: 1.45rem;
    }

    .app-shell {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .app-sidebar {
        border-radius: 1.4rem;
    }

    .app-sidebar-top {
        align-items: stretch;
        flex-direction: column;
    }

    .app-sidebar-brand {
        justify-content: flex-start;
    }

    .app-sidebar-nav {
        display: flex;
        gap: 0.55rem;
        grid-template-columns: none;
        overflow-x: auto;
        padding-bottom: 0.15rem;
    }

    .app-nav-button {
        flex: 0 0 88px;
        min-height: 70px;
    }

    .app-sidebar-logout {
        align-self: flex-end;
    }

    .app-topbar {
        gap: 0.8rem;
        padding: 0.85rem;
    }

    .app-topbar-right {
        gap: 0.65rem;
    }

    .app-map-status {
        max-width: none;
        order: 3;
        width: 100%;
    }

    .app-user-name {
        max-width: 108px;
    }

    .app-content-grid {
        min-height: 480px;
    }

    .left-drop-panel {
        bottom: 0;
        flex-basis: min(340px, calc(100vw - 1.5rem));
        left: 0;
        max-width: calc(100vw - 1.5rem);
        position: absolute;
        top: 0;
        z-index: 30;
    }

    .left-drop-backdrop {
        background: rgba(5, 18, 13, 0.24);
        border-radius: 1.2rem;
        display: block;
        inset: 0;
        opacity: 0;
        pointer-events: none;
        position: absolute;
        transition: opacity 0.2s ease;
        z-index: 20;
    }

    .left-drop-backdrop.open {
        opacity: 1;
        pointer-events: auto;
    }

    .map-stage {
        min-height: 480px;
    }

    .map-card {
        padding: 0.6rem;
    }

    .sample {
        bottom: 1rem;
        left: 1rem;
        max-width: calc(100% - 2rem);
        padding: 0.55rem 0.8rem;
    }
}

body.page-app {
    overflow: hidden;
}

.page-app,
.page-app .main-content {
    background:
        radial-gradient(circle at top right, rgba(6, 64, 43, 0.08), transparent 22%),
        #eef5f1;
    height: 100dvh;
    min-height: 100vh;
    overflow: hidden;
}

.page-app .main-content {
    padding: 0;
}

.page-app .app-shell {
    gap: 1rem;
    height: 100%;
    min-height: 100%;
    overflow: hidden;
    padding: 1rem;
}

.page-app .app-sidebar {
    flex: 0 0 94px;
    height: 100%;
    min-height: 0;
    padding: 0.95rem 0.55rem;
    width: 94px;
}

.page-app .app-sidebar-brand-mark {
    align-items: center;
    min-height: 72px;
    width: 72px;
}

.page-app .app-sidebar-brand-word {
    font-size: 0.92rem;
    gap: 0.03rem;
}

.page-app .app-brand-dark {
    color: #30363a;
}

.page-app .app-brand-light {
    color: #a3cc35;
}

.page-app .app-nav-button {
    border-radius: 1.35rem;
    gap: 0;
    min-height: 72px;
    padding: 0;
}

.page-app .app-nav-icon {
    height: 28px;
    width: 28px;
}

.page-app .app-nav-label {
    display: none;
}

.page-app .app-main {
    gap: 0.85rem;
    overflow: hidden;
}

.page-app .app-topbar {
    align-items: center;
    flex: 0 0 auto;
    min-height: 84px;
    padding: 0.85rem 1rem;
}

.page-app .app-topbar-search {
    max-width: 460px;
}

.page-app .app-search-box {
    min-height: 48px;
}

.page-app .app-search-input {
    font-size: 0.88rem;
}

.page-app .app-topbar-right {
    flex-wrap: nowrap;
    gap: 0.7rem;
}

.page-app .app-map-status {
    max-width: 240px;
}

.page-app .app-icon-button,
.page-app .app-user-button {
    min-height: 44px;
}

.page-app .app-user-name {
    max-width: 150px;
}

.page-app .app-content-grid {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.page-app .left-drop-panel {
    flex: 0 0 340px;
    max-width: 340px;
    min-width: 340px;
}

.page-app .left-drop-panel:not(.open) {
    margin-right: 0;
    max-width: 0;
    min-width: 0;
}

.page-app .left-drop-header {
    padding: 0.85rem 0.95rem;
}

.page-app .left-drop-body {
    padding: 0.85rem;
}

.page-app .app-panel-section {
    display: none;
}

.page-app .app-panel-section.is-active {
    display: grid;
    gap: 0.85rem;
}

.page-app .drop-card {
    margin-bottom: 0;
    padding: 0.85rem;
}

.page-app .drop-card h4 {
    margin-bottom: 0.55rem;
}

.page-app .drop-card-top {
    margin-bottom: 0.55rem;
}

.page-app .action {
    min-height: 38px;
    padding: 0.52rem 0.88rem;
}

.page-app .list {
    max-height: 260px;
}

.page-app .notification-drawer {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(6, 64, 43, 0.1);
    border-radius: 1.5rem;
    box-shadow: 0 18px 38px rgba(8, 45, 33, 0.1);
    display: flex;
    flex-direction: column;
    inset: 0 0 0 auto;
    max-width: 390px;
    overflow: hidden;
    pointer-events: none;
    position: absolute;
    transform: translateX(calc(100% + 1rem));
    transition: transform 0.24s ease;
    width: min(390px, 100%);
    z-index: 35;
}

.page-app .notification-drawer.open {
    pointer-events: auto;
    transform: translateX(0);
}

.page-app .notification-drawer-header {
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid rgba(6, 64, 43, 0.08);
    display: flex;
    justify-content: space-between;
    padding: 0.85rem 0.95rem;
}

.page-app .notification-drawer-header h3 {
    color: #113024;
    font-size: 1rem;
    margin: 0;
}

.page-app .notification-drawer-body {
    display: grid;
    flex: 1;
    gap: 0.85rem;
    min-height: 0;
    overflow: auto;
    padding: 0.85rem;
}

.page-app .notification-backdrop {
    background: rgba(5, 18, 13, 0.16);
    border-radius: 1.5rem;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: absolute;
    transition: opacity 0.2s ease;
    z-index: 32;
}

.page-app .notification-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.page-app .map-stage {
    flex: 1;
    min-height: 0;
    min-width: 0;
}

.page-app .map-card {
    display: flex;
    overflow: hidden;
    padding: 0.75rem;
}

.page-app #map {
    flex: 1;
    min-height: 0;
}

.page-app .sample {
    bottom: 1rem;
    font-size: 0.74rem;
    left: 1rem;
    max-width: calc(100% - 2rem);
}

.page-app .app-topbar-placeholder {
    min-height: 96px;
}

.page-app .app-icon-button-static,
.page-app .app-user-button-static {
    cursor: default;
}

.page-app .app-placeholder-title {
    color: #163328;
    font-size: 1.45rem;
    font-weight: 700;
    margin: 0;
}

.page-app .app-placeholder-stage {
    align-items: center;
    display: flex;
    flex: 1;
    justify-content: center;
    min-height: 0;
    overflow: hidden;
    padding: 0 0.2rem;
}

.page-app .app-placeholder-card {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(6, 64, 43, 0.1);
    border-radius: 1.6rem;
    box-shadow: 0 18px 38px rgba(8, 45, 33, 0.08);
    max-width: 520px;
    padding: 1.8rem;
    text-align: left;
    width: 100%;
}

.page-app .app-placeholder-card h2 {
    color: #163328;
    font-size: 1.45rem;
    margin: 0 0 0.6rem;
}

.page-app .app-placeholder-card p:last-child {
    color: #496257;
    margin: 0;
}

.page-app .potree-layout {
    display: flex;
    flex: 1;
    gap: 0.85rem;
    min-height: 0;
    overflow: hidden;
}

.page-app .potree-panel-stack {
    display: grid;
    flex: 0 0 340px;
    gap: 0.85rem;
    max-width: 340px;
    min-height: 0;
    min-width: 340px;
}

.page-app .potree-cloud-list {
    display: grid;
    gap: 0.7rem;
    max-height: 360px;
    overflow: auto;
}

.page-app .potree-cloud-link {
    background: #ffffff;
    border: 1px solid #deebe5;
    border-radius: 1rem;
    color: #163328;
    display: grid;
    gap: 0.3rem;
    padding: 0.85rem;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.page-app .potree-cloud-link:hover,
.page-app .potree-cloud-link:focus {
    border-color: rgba(6, 64, 43, 0.28);
    box-shadow: 0 12px 24px rgba(8, 45, 33, 0.06);
    color: #163328;
    text-decoration: none;
    transform: translateY(-1px);
}

.page-app .potree-cloud-link.is-active {
    border-color: rgba(6, 64, 43, 0.42);
    box-shadow: 0 14px 26px rgba(8, 45, 33, 0.08);
}

.page-app .potree-cloud-link strong {
    color: #10281f;
    font-size: 0.88rem;
}

.page-app .potree-cloud-link span,
.page-app .potree-cloud-link small {
    color: #547065;
}

.page-app .potree-empty-list,
.page-app .potree-empty-state {
    background: linear-gradient(145deg, rgba(248, 252, 249, 0.98) 0%, rgba(239, 247, 243, 0.98) 100%);
    border: 1px dashed #c9ddd4;
    border-radius: 1.25rem;
    color: #173328;
    padding: 1rem;
}

.page-app .potree-empty-state {
    margin: auto;
    max-width: 640px;
}

.page-app .potree-empty-state h2 {
    color: #163328;
    font-size: 1.35rem;
    margin-bottom: 0.65rem;
}

.page-app .potree-empty-state p:last-child {
    margin-bottom: 0;
}

.page-app .potree-kv {
    align-items: baseline;
    border-bottom: 1px solid #e8f0ec;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.55rem 0;
}

.page-app .potree-kv:first-of-type {
    padding-top: 0;
}

.page-app .potree-kv:last-of-type {
    border-bottom: 0;
    padding-bottom: 0;
}

.page-app .potree-kv span {
    color: #5b7569;
    font-size: 0.78rem;
}

.page-app .potree-kv strong {
    color: #113024;
    font-size: 0.8rem;
    text-align: right;
}

.page-app .potree-stage {
    flex: 1;
    min-height: 0;
    min-width: 0;
}

.page-app .potree-viewer-card {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
    padding: 0.75rem;
}

.page-app .potree-viewer-toolbar {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.page-app .potree-viewer-toolbar h2 {
    color: #163328;
    font-size: 1.28rem;
    margin: 0;
}

.page-app .potree-viewer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
}

.page-app .potree-viewer-actions .action {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    text-decoration: none;
}

.page-app .potree-viewer-actions .action:hover,
.page-app .potree-viewer-actions .action:focus {
    text-decoration: none;
}

.page-app .potree-viewer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.page-app .potree-viewer-meta span {
    background: #f6faf8;
    border: 1px solid #deebe5;
    border-radius: 999px;
    color: #335045;
    font-size: 0.74rem;
    padding: 0.4rem 0.7rem;
}

.page-app .potree-status {
    background: rgba(6, 64, 43, 0.08) !important;
    border-color: rgba(6, 64, 43, 0.14) !important;
    color: #163328 !important;
    font-weight: 700;
}

.page-app .potree-viewer-shell {
    background: #f5faf7;
    border: 1px solid #e2ede8;
    border-radius: 1.1rem;
    flex: 1;
    min-height: 560px;
    overflow: hidden;
    position: relative;
}

.page-app #potree_render_area {
    height: 100%;
    width: 100%;
}

.page-app #potree_sidebar_container {
    background: rgba(255, 255, 255, 0.98);
    border-left: 1px solid #deebe5;
    display: none;
    height: 100%;
    max-width: min(360px, 100%);
    overflow: auto;
    position: absolute;
    right: 0;
    top: 0;
    width: 360px;
    z-index: 20;
}

.page-app .potree-viewer-shell.is-sidebar-open #potree_sidebar_container {
    display: block;
}

@media (max-width: 1199.98px) {
    .page-app .left-drop-panel {
        flex-basis: 320px;
        max-width: 320px;
        min-width: 320px;
    }

    .page-app .app-map-status {
        max-width: 210px;
    }
}

@media (max-width: 991.98px) {
    body.page-app {
        overflow: auto;
    }

    .page-app,
    .page-app .main-content {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .page-app .app-shell {
        height: auto;
        min-height: 100vh;
    }

    .page-app .app-content-grid {
        min-height: 520px;
    }

    .page-app .potree-layout {
        flex-direction: column;
        overflow: visible;
    }

    .page-app .potree-panel-stack {
        flex: 0 0 auto;
        max-width: none;
        min-width: 0;
    }

    .page-app .left-drop-panel {
        bottom: 0;
        left: 0;
        max-width: min(340px, calc(100vw - 1.5rem));
        min-width: min(340px, calc(100vw - 1.5rem));
        position: absolute;
        top: 0;
        z-index: 40;
    }

    .page-app .left-drop-panel:not(.open) {
        transform: translateX(calc(-100% - 0.75rem));
    }

    .page-app .left-drop-backdrop {
        background: rgba(5, 18, 13, 0.24);
        border-radius: 1.2rem;
        display: block;
        inset: 0;
        opacity: 0;
        pointer-events: none;
        position: absolute;
        transition: opacity 0.2s ease;
        z-index: 20;
    }

    .page-app .left-drop-backdrop.open {
        opacity: 1;
        pointer-events: auto;
    }

    .page-app .notification-drawer {
        width: min(360px, calc(100vw - 1.5rem));
    }

    .page-app .potree-viewer-shell {
        min-height: 480px;
    }
}

@media (max-width: 767.98px) {
    .page-app .app-shell {
        gap: 0.75rem;
        padding: 0.75rem;
    }

    .page-app .app-sidebar {
        border-radius: 1.4rem;
        flex: 0 0 auto;
        height: auto;
        padding: 0.7rem;
        width: 100%;
    }

    .page-app .app-sidebar-top {
        align-items: center;
        flex-direction: row;
        gap: 0.7rem;
    }

    .page-app .app-sidebar-nav {
        display: flex;
        flex: 1;
        gap: 0.55rem;
        overflow-x: auto;
    }

    .page-app .app-nav-button {
        flex: 0 0 64px;
        min-height: 64px;
    }

    .page-app .app-sidebar-logout {
        margin-top: 0;
    }

    .page-app .app-topbar {
        align-items: stretch;
        flex-direction: column;
        padding: 0.8rem;
    }

    .page-app .app-topbar-right {
        justify-content: space-between;
    }

    .page-app .app-map-status {
        max-width: none;
        order: 3;
        width: 100%;
    }

    .page-app .app-user-name {
        max-width: 104px;
    }

    .page-app .left-drop-panel,
    .page-app .notification-drawer {
        max-width: calc(100vw - 1.5rem);
    }

    .page-app .map-card {
        padding: 0.6rem;
    }

    .page-app .app-placeholder-stage {
        align-items: stretch;
        padding: 0;
    }

    .page-app .app-placeholder-card {
        max-width: none;
        padding: 1.3rem;
    }

    .page-app .potree-viewer-toolbar {
        flex-direction: column;
    }

    .page-app .potree-viewer-actions {
        justify-content: flex-start;
    }

    .page-app .potree-viewer-shell {
        min-height: 420px;
    }

    .page-app #potree_sidebar_container {
        max-width: 100%;
        width: 100%;
    }
}
