:root {
    --purple-600: #7c3aed;
    --purple-500: #8b5cf6;
    --indigo-700: #4338ca;
    --indigo-900: #312e81;
    --surface: #f8fafc;
    --text: #0f172a;
    --muted: #64748b;
    --white: #ffffff;
    --radius-lg: 20px;
    --radius-md: 14px;
    --shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
    --shadow-soft: 0 10px 30px rgba(79, 70, 229, 0.18);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    color: var(--text);
    background: var(--surface);
}

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

/* ——— Landing ——— */
.landing-root {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(165deg, #6d28d9 0%, #4f46e5 45%, #4338ca 100%);
    color: var(--white);
}

.landing-header {
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
    background: rgba(15, 23, 42, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.landing-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "logo cta"
        "nav nav";
    align-items: center;
    gap: 0.85rem 1rem;
}

.brand-logo {
    grid-area: logo;
    font-weight: 700;
    letter-spacing: -0.02em;
    font-size: 1.15rem;
}

.landing-header-cta {
    grid-area: cta;
    justify-self: end;
}

.landing-nav {
    grid-area: nav;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: clamp(1rem, 3vw, 1.75rem);
    font-size: 0.92rem;
    opacity: 0.92;
}

@media (min-width: 860px) {
    .landing-header-inner {
        display: flex;
        flex-wrap: nowrap;
        justify-content: space-between;
        gap: 1.5rem;
    }

    .landing-nav {
        flex: 1;
        grid-area: unset;
        justify-content: center;
    }

    .brand-logo,
    .landing-header-cta {
        grid-area: unset;
    }
}

.landing-header-cta .btn-arrow::after {
    border-color: #312e81;
}

.landing-nav a:hover {
    opacity: 1;
    text-decoration: underline;
}

.btn-book {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.92rem;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.pill-light {
    background: var(--white);
    color: var(--indigo-900);
    box-shadow: var(--shadow-soft);
}

.hero-cta-primary.pill-light .btn-arrow {
    background: rgba(79, 70, 229, 0.12);
}

.hero-cta-primary.pill-light .btn-arrow::after {
    border-color: #312e81;
}

.pill-dark {
    background: linear-gradient(135deg, #312e81, #4f46e5);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.12);
}

.pill-outline {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.35);
}

.btn-arrow {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: rgba(79, 70, 229, 0.18);
    position: relative;
}

.btn-arrow::after {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 8px;
    height: 8px;
    border-right: 2px solid #312e81;
    border-top: 2px solid #312e81;
    transform: rotate(45deg) translate(-1px, 1px);
}

.btn-arrow.light {
    background: rgba(255, 255, 255, 0.15);
}

.btn-arrow.light::after {
    border-color: #fff;
}

.btn-arrow.outline {
    background: rgba(255, 255, 255, 0.2);
}

.btn-arrow.outline::after {
    border-color: #fff;
}

.landing-main {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.landing-hero {
    position: relative;
    overflow: hidden;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(380px, 58vh, 720px);
    padding: clamp(2.5rem, 6vw, 4.5rem) 1.5rem clamp(3rem, 7vw, 5rem);
}

.landing-grid-bg {
    position: absolute;
    inset: 0;
    opacity: 0.22;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.35) 1px, transparent 0);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse at center, black 45%, transparent 75%);
}

/* Hero em duas colunas + prévia do painel */
.landing-hero-split {
    position: relative;
    z-index: 1;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 3.5rem);
    align-items: center;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (max-width: 960px) {
    .landing-hero-split {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .landing-hero-copy .hero-actions {
        justify-content: center;
    }
}

.landing-hero-copy {
    text-align: left;
}

@media (max-width: 960px) {
    .landing-hero-copy {
        text-align: center;
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.35);
    font-size: 0.88rem;
    margin: 0 0 1.25rem;
}

.hero-badge-saas {
    font-weight: 500;
    letter-spacing: 0.02em;
}

.hero-title {
    font-size: clamp(2.25rem, 4.2vw, 3.25rem);
    line-height: 1.08;
    margin: 0 0 0.5rem;
    letter-spacing: -0.03em;
}

.hero-tagline {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    font-weight: 600;
    opacity: 0.95;
    margin: 0 0 1rem;
    line-height: 1.4;
}

.hero-sub {
    font-size: 1.02rem;
    line-height: 1.65;
    opacity: 0.9;
    margin: 0 0 1.75rem;
    max-width: 34rem;
}

.landing-hero-copy .hero-sub {
    margin-left: 0;
    margin-right: auto;
}

@media (max-width: 960px) {
    .landing-hero-copy .hero-sub {
        margin-left: auto;
        margin-right: auto;
    }
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1rem;
    justify-content: flex-start;
    align-items: center;
}

.landing-hero-visual {
    display: flex;
    justify-content: center;
    perspective: 800px;
}

.lp-preview {
    width: 100%;
    max-width: 380px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow:
        0 24px 50px rgba(15, 23, 42, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
    overflow: hidden;
    transform: rotateY(-4deg) rotateX(2deg);
    transition: transform 0.25s ease;
}

@media (max-width: 960px) {
    .lp-preview {
        transform: none;
        max-width: 340px;
    }
}

.lp-preview:hover {
    transform: rotateY(-2deg) rotateX(1deg) translateY(-2px);
}

@media (max-width: 960px) {
    .lp-preview:hover {
        transform: translateY(-2px);
    }
}

.lp-preview-chrome {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 0.85rem;
    background: rgba(15, 23, 42, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.lp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}

.lp-dot:nth-child(2) { background: rgba(255, 255, 255, 0.35); }
.lp-dot:nth-child(3) { background: rgba(255, 255, 255, 0.45); }

.lp-preview-title {
    margin-left: auto;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.75;
}

.lp-preview-body {
    padding: 1rem 1rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lp-next-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(241, 245, 249, 0.98));
    color: var(--indigo-900);
    border-radius: 14px;
    padding: 1rem 1.05rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.lp-next-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #6366f1;
    margin-bottom: 0.35rem;
}

.lp-next-title {
    margin: 0 0 0.45rem;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.lp-next-desc {
    margin: 0 0 0.65rem;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--muted);
}

.lp-next-pill {
    display: inline-block;
    font-size: 0.72rem;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.12);
    color: #4f46e5;
    font-weight: 600;
}

.lp-mini-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.lp-mini-stat {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.65rem 0.75rem;
}

.lp-mini-stat-accent {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(124, 58, 237, 0.25));
    border-color: rgba(255, 255, 255, 0.2);
}

.lp-mini-label {
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.75;
    margin-bottom: 0.2rem;
}

.lp-mini-value {
    font-size: 1.05rem;
    font-weight: 700;
}

.landing-kicker {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #6366f1;
    margin: 0 0 0.5rem;
}

.lp-flow-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.15rem;
}

@media (max-width: 900px) {
    .lp-flow-grid {
        grid-template-columns: 1fr;
    }
}

.lp-flow-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.25rem 1.15rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lp-flow-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 14px 36px rgba(79, 70, 229, 0.1);
}

.lp-flow-card-accent {
    border-color: #a5b4fc;
    background: linear-gradient(180deg, #fff 0%, #eef2ff 100%);
}

.lp-flow-icon {
    display: block;
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
}

.lp-flow-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.02rem;
    color: var(--indigo-900);
}

.lp-flow-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.55;
}

.lp-cat-list {
    list-style: none;
    margin: 0 0 1.25rem;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.65rem;
}

.lp-cat-pill {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.lp-cat-1 { background: linear-gradient(135deg, #059669, #10b981); }
.lp-cat-2 { background: linear-gradient(135deg, #b45309, #d97706); }
.lp-cat-3 { background: linear-gradient(135deg, #be185d, #db2777); }
.lp-cat-4 { background: linear-gradient(135deg, #047857, #14b8a6); }
.lp-cat-5 { background: linear-gradient(135deg, #b45309, #eab308); color: #1e293b; }
.lp-cat-6 { background: linear-gradient(135deg, #4338ca, #6366f1); }

.lp-cat-note {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
    font-size: 0.98rem;
    line-height: 1.65;
    color: var(--muted);
}

.lp-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}

.lp-timeline-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1rem 1.25rem;
    padding-bottom: 1.5rem;
    position: relative;
}

.lp-timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 17px;
    top: 44px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #c7d2fe, #e0e7ff);
}

.lp-timeline-marker {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

.lp-timeline-content {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1rem 1.15rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.lp-timeline-content h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    color: var(--indigo-900);
}

.lp-timeline-content p {
    margin: 0;
    font-size: 0.93rem;
    color: var(--muted);
    line-height: 1.55;
}

/* Painéis abaixo do hero */
.landing-container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.landing-panel {
    padding: clamp(2.75rem, 6vw, 4rem) 0;
}

.landing-panel-light {
    background: var(--surface);
    color: var(--text);
    border-radius: 28px 28px 0 0;
    margin-top: -1.25rem;
    position: relative;
    z-index: 1;
    box-shadow: 0 -12px 40px rgba(15, 23, 42, 0.08);
}

.landing-panel-tint {
    background: linear-gradient(180deg, #eef2ff 0%, #f8fafc 100%);
    color: var(--text);
}

.landing-section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto clamp(2rem, 4vw, 2.75rem);
}

.landing-section-head h2 {
    margin: 0 0 0.65rem;
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
    letter-spacing: -0.02em;
    color: var(--indigo-900);
}

.landing-section-lead {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
    font-size: 1rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }
}

.feature-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-md);
    padding: 1.35rem 1.25rem;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.feature-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    color: var(--indigo-900);
}

.feature-card p {
    margin: 0;
    font-size: 0.94rem;
    color: var(--muted);
    line-height: 1.55;
}

.feature-icon {
    display: inline-flex;
    font-size: 1.75rem;
    margin-bottom: 0.65rem;
}

.steps-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    counter-reset: steps;
}

@media (max-width: 900px) {
    .steps-grid {
        grid-template-columns: 1fr;
        max-width: 440px;
        margin: 0 auto;
    }
}

.step-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1.35rem 1.25rem;
    border: 1px solid #e0e7ff;
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.08);
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    margin-bottom: 0.75rem;
}

.step-card h3 {
    margin: 0 0 0.45rem;
    font-size: 1.02rem;
    color: var(--indigo-900);
}

.step-card p {
    margin: 0;
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.55;
}

.landing-cta-band {
    padding: clamp(1.1rem, 2.8vw, 1.5rem) 0;
    background: linear-gradient(135deg, #4f46e5 0%, #5b21b6 100%);
    color: #fff;
}

.landing-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.landing-cta-copy h2 {
    margin: 0 0 0.2rem;
    font-size: clamp(1.25rem, 2.3vw, 1.5rem);
}

.landing-cta-copy p {
    margin: 0;
    opacity: 0.88;
    font-size: 0.98rem;
}

.landing-cta-btn {
    flex-shrink: 0;
}

.landing-footer {
    background: #1e1b4b;
    color: rgba(255, 255, 255, 0.78);
    padding: clamp(0.75rem, 2vw, 1rem) 0;
    font-size: 0.82rem;
    line-height: 1.4;
}

.landing-footer-compact {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.landing-footer-line {
    margin: 0;
}

.landing-footer-line + .landing-footer-line {
    margin-top: 0.35rem;
}

.landing-footer-line--meta {
    font-size: 0.8rem;
    opacity: 0.88;
}

.landing-footer-line--profile {
    font-weight: 700;
    color: #fff;
    font-size: 0.9rem;
}

.landing-footer-line--details {
    font-size: 0.78rem;
    opacity: 0.9;
    max-width: 52rem;
    margin-left: auto;
    margin-right: auto;
}

.landing-footer-sep {
    margin: 0 0.35rem;
    opacity: 0.55;
    font-weight: 400;
}

.landing-footer-brand {
    font-weight: 600;
    color: #fff;
}

.landing-footer-ico {
    margin-right: 0.15rem;
}

.landing-footer-linkedin,
.landing-footer-org-link {
    display: inline;
    font-weight: 600;
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
}

.landing-footer-linkedin:hover,
.landing-footer-org-link:hover {
    color: #bfdbfe;
}

@media (max-width: 540px) {
    .landing-footer-line--details {
        font-size: 0.74rem;
    }

    .landing-footer-line--profile {
        font-size: 0.85rem;
    }
}

/* scroll suave para âncoras */
html {
    scroll-behavior: smooth;
}

.landing-section {
    padding: 3rem 1.5rem;
}

.landing-section-light {
    background: var(--surface);
    color: var(--text);
}

.section-inner {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.section-inner h2 {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
}

.section-lead {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

/* ——— Auth ——— */
.auth-root {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background: linear-gradient(165deg, #6d28d9 0%, #4f46e5 45%, #4338ca 100%);
}

.auth-card {
    width: min(440px, 100%);
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem 2rem 1.75rem;
    box-shadow: var(--shadow);
    color: var(--text);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.auth-logo-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-500), var(--indigo-700));
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

.auth-title {
    margin: 0 0 0.35rem;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.auth-hint {
    margin: 0 0 1.25rem;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.field label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
}

.input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    font: inherit;
}

.input:focus {
    outline: none;
    border-color: #a5b4fc;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.auth-error {
    color: #b91c1c;
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
}

.auth-validation-summary {
    color: #b91c1c;
    font-size: 0.88rem;
    margin: 0 0 1rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: rgba(254, 226, 226, 0.95);
    border: 1px solid rgba(248, 113, 113, 0.35);
}

.auth-validation-summary ul {
    margin: 0;
    padding-left: 1.15rem;
}

.auth-success {
    color: #166534;
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: rgba(220, 252, 231, 0.95);
    border: 1px solid rgba(74, 222, 128, 0.45);
}

.field-error {
    display: block;
    color: #b91c1c;
    font-size: 0.82rem;
    margin-top: 0.35rem;
}

/* Pilha genérica de secções no painel (relatórios, utilizadores, etc.) */
.dash-content-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    max-width: 960px;
}

.users-list-panel {
    max-width: 100%;
    margin-bottom: 0;
    padding: 1.2rem 1.35rem 1.35rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.users-section-title {
    margin: 0 0 0.85rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e1b4b;
}

.users-table-wrap {
    margin-top: 0.35rem;
}

.users-login-code {
    font-size: 0.88rem;
    background: rgba(241, 245, 249, 0.95);
    padding: 0.15rem 0.45rem;
    border-radius: 6px;
}

.users-form-card {
    max-width: 420px;
    padding: 1.25rem 1.35rem;
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid #e5e7eb;
    box-shadow: 0 8px 28px rgba(79, 70, 229, 0.06);
}

.users-form-card-flat {
    max-width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.users-create-card .users-section-title {
    margin-top: 0;
}

.users-form-card .field {
    margin-bottom: 1rem;
}

.users-form-card .btn-primary {
    margin-top: 0.35rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font: inherit;
}

.btn-primary:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-primary.wide {
    width: 100%;
    margin-top: 0.25rem;
}

.btn-primary.soft {
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    box-shadow: var(--shadow-soft);
}

.auth-footer {
    margin: 1.25rem 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--muted);
}

.validation-message {
    color: #b91c1c;
    font-size: 0.82rem;
}

/* ——— Dashboard shell ——— */
.dash-shell {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
}

.dash-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--white);
    border-right: 1px solid #e2e8f0;
    padding: 1.5rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.dash-brand {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.dash-brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--purple-500), var(--indigo-700));
    box-shadow: 0 10px 24px rgba(79, 70, 229, 0.28);
}

.dash-brand-title {
    font-weight: 700;
    color: var(--indigo-900);
    letter-spacing: -0.02em;
}

.dash-brand-sub {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
}

.dash-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1;
}

.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    color: #475569;
    font-size: 0.94rem;
    cursor: pointer;
}

.dash-nav-item.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    font-weight: 600;
}

.dash-nav-item.disabled {
    opacity: 0.45;
    cursor: default;
}

.dash-nav-ico {
    opacity: 0.85;
    font-size: 0.95rem;
}

.dash-logout {
    margin-top: auto;
    padding: 0.55rem 0.75rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background: #fff;
    cursor: pointer;
    font: inherit;
    color: #475569;
}

.dash-main {
    flex: 1;
    min-width: 0;
    padding: 1.75rem 2rem 2.5rem;
    max-width: 1200px;
    width: 100%;
    box-sizing: border-box;
}

.dash-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
}

.dash-greet {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.dash-badge-admin {
    display: inline-block;
    margin-right: 0.45rem;
    padding: 0.12rem 0.5rem;
    border-radius: 8px;
    background: rgba(124, 58, 237, 0.14);
    color: #5b21b6;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    vertical-align: middle;
}

.dash-welcome {
    margin: 0.15rem 0 0;
    font-size: clamp(1.45rem, 2.5vw, 2rem);
    letter-spacing: -0.02em;
}

.dash-search-wrap {
    position: relative;
    min-width: min(260px, 100%);
    flex: 0 1 auto;
}

.dash-search {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.4rem;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    font: inherit;
}

.dash-search-ico {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.dash-muted {
    color: var(--muted);
}

.dash-error {
    color: #b91c1c;
    margin-bottom: 0.75rem;
}

.activity-alert {
    margin: 0 0 0.5rem;
}

/* Atividade: coluna de cartões (evita um único bloco muito alto) */
.activity-page {
    max-width: 960px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.activity-page--dual {
    max-width: 1100px;
}

/* Duas colunas estáveis: esquerda (resumo + histórico), direita (ações) */
.activity-dual-cols {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.activity-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

@media (min-width: 960px) {
    .activity-dual-cols {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
        align-items: start;
    }
}

.activity-card-footer {
    width: 100%;
}

.activity-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 1.2rem 1.35rem 1.35rem;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}

.activity-card-alt {
    background: #fafbfc;
    border-color: #e2e8f0;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.activity-card-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.9rem 1.2rem;
}

.activity-card > .activity-h2:first-child,
.activity-card > .activity-h3:first-child {
    margin-top: 0;
}

.activity-h2 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    color: #1e1b4b;
}

.activity-h3 {
    margin: 0 0 0.65rem;
    font-size: 1.02rem;
    color: #334155;
}

.activity-new-period-text {
    max-width: 52rem;
    line-height: 1.45;
    margin: 0 0 0.5rem;
}

.report-admin-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
}

.report-panels {
    margin-top: 0;
}

.report-panels .chart-panel {
    min-width: min(100%, 360px);
}

.report-cycles-card .table-title {
    margin-top: 0;
}

@media (max-width: 960px) {
    .report-panels {
        grid-template-columns: 1fr;
    }
}

.report-admin-label {
    font-weight: 600;
    font-size: 0.9rem;
}

.report-select {
    min-width: 14rem;
    max-width: 100%;
}

.report-admin-hint {
    flex: 1 1 12rem;
    font-size: 0.85rem;
}

.report-cat-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0;
}

.report-cat-list li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    font-size: 0.95rem;
}

.activity-lead {
    margin: 0 0 0.75rem;
    color: #475569;
    line-height: 1.5;
}

.activity-hint {
    font-size: 0.9rem;
    margin: 0 0 1rem;
}

.activity-form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    max-width: 280px;
    margin-bottom: 1rem;
}

.activity-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
}

.activity-input {
    max-width: 220px;
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem 1.25rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
    .activity-grid {
        grid-template-columns: 1fr;
    }
}

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

@media (max-width: 900px) {
    .activity-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .activity-summary {
        grid-template-columns: 1fr;
    }
}

.activity-mini-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    min-height: 8.75rem;
}

.activity-mini-card .activity-mini-row.accent {
    margin-top: auto;
}

.activity-mini-title {
    font-weight: 700;
    font-size: 0.92rem;
    color: #312e81;
    margin-bottom: 0.45rem;
}

.activity-mini-row {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 0.2rem;
}

.activity-mini-row.accent {
    margin-top: 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px dashed #cbd5e1;
}

.activity-mini-row .neg {
    color: #b91c1c;
}

.activity-form-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: flex-end;
    margin-bottom: 1rem;
}

.activity-form-inline .input {
    min-width: min(160px, 100%);
}

@media (max-width: 560px) {
    .activity-form-inline {
        flex-direction: column;
        align-items: stretch;
    }

    .activity-form-inline .input,
    .activity-form-inline select {
        width: 100%;
        min-width: 0;
    }

    .activity-form-inline .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

.activity-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.25rem;
    padding: 0 0.25rem;
}

.activity-expense-table {
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .activity-expense-table th,
    .activity-expense-table td {
        padding: 0.45rem 0.5rem;
    }
}

.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 1024px) {
    .dash-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .dash-shell {
        flex-direction: column;
    }

    .dash-main {
        padding: 1rem 1rem 1.75rem;
    }

    .dash-top {
        margin-bottom: 1.25rem;
    }

    .dash-search-wrap {
        width: 100%;
        min-width: 0;
    }

    .dash-sidebar {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .dash-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

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

    .dash-panels {
        grid-template-columns: 1fr;
    }

    .dash-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.stat-card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 1rem 1.1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.stat-card-accent {
    background: linear-gradient(145deg, #5b21b6, #4f46e5);
    color: #fff;
    border: none;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--muted);
}

.stat-card-accent .stat-label {
    color: rgba(255, 255, 255, 0.85);
}

.stat-value {
    margin-top: 0.35rem;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.stat-decor.bars {
    position: absolute;
    right: 0.75rem;
    bottom: 0.65rem;
    width: 42px;
    height: 32px;
    background: linear-gradient(to top, #cbd5e1 40%, transparent 40%),
                linear-gradient(to top, #cbd5e1 65%, transparent 65%),
                linear-gradient(to top, #cbd5e1 85%, transparent 85%);
    background-size: 30% 100%;
    background-position: 0 100%, 50% 100%, 100% 100%;
    background-repeat: no-repeat;
    opacity: 0.55;
}

.stat-card-accent .stat-decor.bars {
    opacity: 0.35;
    filter: brightness(10);
}

.stat-spark {
    position: absolute;
    right: 0.75rem;
    bottom: 0.65rem;
    width: 56px;
    height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.18), rgba(79, 70, 229, 0.05));
}

.stat-spark.light {
    background: rgba(255, 255, 255, 0.22);
}

.stat-spark.subtle::after {
    content: '';
    position: absolute;
    inset: 6px;
    border-radius: 6px;
    border-bottom: 2px solid #cbd5e1;
}

.dash-panels {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 960px) {
    .dash-panels {
        grid-template-columns: 1fr;
    }
}

.panel {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
    padding: 1.25rem 1.35rem;
}

.dash-panel-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.6rem;
}

.dash-panel-actions a.btn-primary {
    text-decoration: none;
}

.promo-panel {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem;
    align-items: center;
}

@media (max-width: 720px) {
    .promo-panel {
        grid-template-columns: 1fr;
    }
}

.promo-copy h2 {
    margin: 0 0 0.35rem;
    font-size: 1.25rem;
    color: var(--indigo-900);
}

.panel-lead {
    margin: 0 0 0.5rem;
    font-weight: 600;
    color: #4338ca;
}

.panel-text {
    margin: 0 0 1rem;
    color: var(--muted);
    line-height: 1.55;
    font-size: 0.95rem;
}

.promo-visual {
    position: relative;
    min-height: 120px;
    min-width: 200px;
}

.glass-card {
    position: absolute;
    right: 0;
    width: 220px;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(124, 58, 237, 0.35));
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 0.82rem;
    backdrop-filter: blur(8px);
    box-shadow: 0 18px 40px rgba(79, 70, 229, 0.25);
}

.glass-card-back {
    top: 8px;
    transform: rotate(-6deg) translateX(-12px);
    opacity: 0.85;
}

.glass-card-front {
    top: 36px;
    transform: rotate(4deg);
    font-weight: 600;
}

.chart-panel {
    position: relative;
}

.chart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.chart-title {
    font-size: 0.88rem;
    color: var(--muted);
}

.chart-ico {
    color: #cbd5e1;
}

.chart-big {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.03em;
}

.chart-sub {
    margin: 0.15rem 0 0.5rem;
    font-size: 0.88rem;
}

.chart-svg {
    width: 100%;
    height: 120px;
    display: block;
}

.dash-table-wrap {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    padding: 1rem 1.1rem 1.25rem;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.table-title {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.dash-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.dash-table th,
.dash-table td {
    text-align: left;
    padding: 0.55rem 0.35rem;
    border-bottom: 1px solid #f1f5f9;
}

.dash-table th {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.82rem;
}

.dash-table td.neg {
    color: #b91c1c;
}

/* Blazor defaults kept minimal */
h1:focus {
    outline: none;
}

.blazor-error-boundary {
    padding: 1rem;
    background: #fee2e2;
    color: #7f1d1d;
}

#blazor-error-ui {
    color-scheme: light only;
    background: #fef9c3;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #e0e0e0;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: #2563eb;
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Carregando");
}
