/* ── Vistalar Design System v3 ── */

/* ============================================================
   CSS Custom Properties
   ============================================================ */
:root {
    /* ── Colors ── */
    --v-primary: #0D6B6E;
    --v-primary-dark: #095B5E;
    --v-primary-light: #158A8E;
    --v-secondary: #4F6B7A;
    --v-accent: #C8963E;
    --v-surface: #FFFFFF;
    --v-background: #F4F7F8;
    --v-text-primary: #0F172A;
    --v-text-secondary: #4F6B7A;
    --v-divider: #E8F0F2;
    --v-warning-light: #FFF3E0;
    --v-success-light: #E8F5E9;
    --v-error-light: #FFEBEE;
    --v-border-dashed: #CBD5E1;

    /* ── Semantic: urgency / status ── */
    --v-urgency-overdue: #C62828;
    --v-urgency-overdue-bg: #FFEBEE;
    --v-urgency-today: #E65100;
    --v-urgency-today-bg: #FFF3E0;
    --v-urgency-upcoming: var(--v-primary);
    --v-urgency-upcoming-bg: #E0F7FA;

    /* ── Semantic: severity backgrounds ── */
    --v-severity-warning-bg: #FFFBEB;
    --v-severity-warning-text: #D97706;
    --v-severity-error-bg: #FEF2F2;
    --v-severity-error-text: #DC2626;
    --v-severity-success-bg: #ECFDF5;
    --v-severity-success-text: #059669;
    --v-severity-info-bg: #F0F9FF;
    --v-severity-info-text: #0369A1;
    --v-severity-default-bg: #F9FAFB;
    --v-severity-default-text: #1F2937;

    /* ── Chart palette ── */
    --v-chart-1: #0D6B6E;
    --v-chart-2: #14919B;
    --v-chart-3: #1AB8C4;
    --v-chart-4: #5BCBD4;
    --v-chart-5: #8CDBE1;
    --v-chart-6: #B8EAED;
    --v-chart-danger: #EF4444;
    --v-chart-warning: #F59E0B;
    --v-chart-neutral: #6B7280;
    --v-chart-success: #10B981;
    --v-chart-info: #3B82F6;

    /* ── Spacing scale ── */
    --v-space-xs: 4px;
    --v-space-sm: 8px;
    --v-space-md: 16px;
    --v-space-lg: 24px;
    --v-space-xl: 32px;
    --v-space-2xl: 48px;
    --v-space-3xl: 64px;

    /* ── Border radius ── */
    --v-radius-none: 0;
    --v-radius-sm: 4px;
    --v-radius-md: 8px;
    --v-radius-lg: 12px;
    --v-radius-xl: 16px;
    --v-radius-full: 9999px;

    /* ── Elevation / shadows ── */
    --v-shadow-none: none;
    --v-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --v-shadow-sm: 0 1px 4px rgba(15, 23, 42, 0.06);
    --v-shadow-md: 0 2px 8px rgba(15, 23, 42, 0.06);
    --v-shadow-lg: 0 8px 24px rgba(13, 107, 110, 0.10);
    --v-shadow-xl: 0 12px 32px rgba(15, 23, 42, 0.12);

    /* Legacy shadow aliases (backward compat) */
    --v-shadow-card: var(--v-shadow-md);
    --v-shadow-card-hover: var(--v-shadow-lg);
    --v-shadow-appbar: var(--v-shadow-sm);

    /* Floating action button shadow */
    --v-shadow-fab: 0 4px 12px rgba(0, 0, 0, 0.20);

    /* ── Typography scale ── */
    --v-font-xs: 0.75rem;
    --v-font-sm: 0.875rem;
    --v-font-base: 1rem;
    --v-font-lg: 1.125rem;
    --v-font-xl: 1.25rem;
    --v-font-2xl: 1.5rem;
    --v-font-3xl: 1.875rem;
    --v-font-4xl: 2.25rem;

    --v-leading-tight: 1.25;
    --v-leading-normal: 1.5;
    --v-leading-relaxed: 1.75;

    --v-font-normal: 400;
    --v-font-medium: 500;
    --v-font-semibold: 600;
    --v-font-bold: 700;
    --v-font-extrabold: 800;

    /* ── Form / input states ── */
    --v-input-bg: var(--v-surface);
    --v-input-border: var(--v-divider);
    --v-input-focus-border: var(--v-primary);
    --v-input-focus-ring: rgba(13, 107, 110, 0.15);
    --v-input-error-border: #C62828;
    --v-input-error-bg: var(--v-error-light);
    --v-input-disabled-bg: #F1F5F9;
    --v-input-disabled-text: #94A3B8;
    --v-input-placeholder: #94A3B8;

    /* ── Data visualization / charts ── */
    --v-chart-1: #0D6B6E;
    --v-chart-2: #C8963E;
    --v-chart-3: #4F6B7A;
    --v-chart-4: #2E7D32;
    --v-chart-5: #C62828;
    --v-chart-6: #158A8E;
    --v-chart-7: #CBD5E1;

    /* Transitions */
    --v-transition-fast: 150ms ease;
    --v-transition-normal: 250ms ease;

    /* Icon sizes */
    --v-icon-size-xl: 4rem;
}

/* ============================================================
   Dark Mode
   ============================================================ */
[data-theme="dark"] {
    --v-primary: #26A69A;
    --v-primary-dark: #1B8A7E;
    --v-primary-light: #33BBAE;
    --v-secondary: #94A3B8;
    --v-accent: #D4A84B;
    --v-surface: #1E293B;
    --v-background: #0F172A;
    --v-text-primary: #F1F5F9;
    --v-text-secondary: #94A3B8;
    --v-divider: #334155;
    --v-warning-light: #3E2723;
    --v-success-light: #1B3A1B;
    --v-error-light: #3E1F1F;
    --v-border-dashed: #475569;

    --v-shadow-card: var(--v-shadow-md);
    --v-shadow-card-hover: var(--v-shadow-lg);
    --v-shadow-appbar: var(--v-shadow-sm);
    --v-shadow-fab: 0 4px 12px rgba(0, 0, 0, 0.40);

    --v-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.20);
    --v-shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.30);
    --v-shadow-md: 0 2px 8px rgba(0, 0, 0, 0.35);
    --v-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.45);
    --v-shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.55);

    --v-input-bg: var(--v-surface);
    --v-input-border: var(--v-divider);
    --v-input-disabled-bg: #1E293B;
    --v-input-disabled-text: #64748B;
    --v-input-placeholder: #64748B;
}

body {
    transition: background-color 200ms ease, color 200ms ease;
}

/* ============================================================
   Base
   ============================================================ */
html, body {
    font-family: 'Inter', 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    background: var(--v-background);
    color: var(--v-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Tipografia
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.metric-value {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

/* ============================================================
   Focus visivel (acessibilidade)
   ============================================================ */
:focus-visible {
    outline: 2px solid var(--v-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================================
   Hover global em cards
   ============================================================ */
.mud-card.v-card-interactive {
    transition: box-shadow var(--v-transition-fast), transform var(--v-transition-fast);
    cursor: pointer;
}
.mud-card.v-card-interactive:hover {
    box-shadow: var(--v-shadow-card-hover) !important;
    transform: translateY(-2px);
}

.mud-card.v-card-form {
    transition: none;
    cursor: default;
}

/* ============================================================
   Transicoes de pagina (fade-in no @Body)
   ============================================================ */
.page-fade-in {
    animation: fadeIn 250ms ease both;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Skeleton -> Content transition
   ============================================================ */
.skeleton-fade .mud-skeleton {
    transition: opacity 200ms ease;
}

/* ============================================================
   Landing Page
   ============================================================ */

/* Hero — gradiente escuro (teal escuro -> grafite) */
.landing-hero {
    background: linear-gradient(135deg, #0F172A 0%, #0D6B6E 40%, #0A5A5D 70%, #0F172A 100%);
}

/* Cards da landing (features, depoimentos) */
.landing-card {
    transition: transform var(--v-transition-fast), box-shadow var(--v-transition-fast);
}
.landing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(13, 107, 110, 0.12);
}

/* Secoes da landing */
.landing-section {
    padding: 4rem 0;
}
.landing-section-alt {
    background: var(--v-background);
    margin: 0 -1.5rem;
    padding: 3rem 1.5rem;
}

/* Texto teal e dourado reutilizavel */
.text-teal { color: #0D6B6E; }
.bg-teal { background-color: #0D6B6E; }
.bg-gold { background-color: #C8963E; }

/* ============================================================
   Tela de Login / Register
   ============================================================ */

/* Fundo com gradiente suave — sempre claro, independente de dark mode */
.auth-page-bg {
    min-height: 100vh;
    background: linear-gradient(160deg, #F4F7F8 0%, #E8F4F5 30%, #F4F7F8 70%, #F0EDE4 100%);
}

/* Card de autenticacao */
.auth-card {
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08), 0 1px 4px rgba(15, 23, 42, 0.04) !important;
}

/* ============================================================
   Imagens de propriedade (catalogo e cards)
   ============================================================ */

/* Card de imóvel — título */
.property-card-title {
    min-height: 3em;
}

/* Container de foto com aspect ratio fixo e placeholder */
.property-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: var(--v-divider);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: inherit;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.property-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 300ms ease;
}

/* Fade-in: imagem comeca transparente e ganha opacidade ao carregar.
   Requer @onload no <img> para adicionar a classe "loaded".
   Enquanto nao ha @onload implementado, imagens ficam visiveis por padrao. */
.property-card-image img.loaded {
    opacity: 1;
}

/* ============================================================
   Estados vazios (empty states)
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}
.empty-state-icon {
    margin-bottom: 1rem;
    opacity: 0.6;
}
.empty-state-title {
    margin-bottom: 0.5rem;
    font-weight: 600;
}
.empty-state-description {
    max-width: 400px;
    margin: 0 auto 1.5rem auto;
    color: var(--v-text-secondary);
}

/* ============================================================
   Loading splash (Blazor startup)
   ============================================================ */
.loading-progress {
    display: block;
    width: min(300px, 60vw);
    height: auto;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.loading-progress-text {
    position: absolute;
    text-align: center;
    font-family: Inter, Montserrat, Arial, sans-serif;
    font-weight: 500;
    color: var(--v-secondary);
    inset: calc(50% + 160px) 0 auto 0;
}
.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "");
}

/* ============================================================
   Blazor error UI
   ============================================================ */
#blazor-error-ui {
    background: lightyellow;
    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;
    position: fixed;
    width: 100%;
    z-index: 1000;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}
.blazor-error-boundary::after {
    content: "Um erro ocorreu.";
}

/* ============================================================
   AppBar scroll shadow (aplicado via JS)
   ============================================================ */
.mud-appbar.v-appbar-scrolled {
    box-shadow: var(--v-shadow-appbar) !important;
}

/* ============================================================
   NavMenu hover suave
   ============================================================ */
.mud-nav-link:hover {
    background-color: rgba(13, 107, 110, 0.04);
    transition: background-color 150ms ease;
}

/* ============================================================
   Responsive: filtros colapsaveis no catalogo
   ============================================================ */
@media (max-width: 600px) {
    .catalog-filters-collapsed {
        display: none;
    }
    .catalog-filters-expanded {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
}
@media (min-width: 601px) {
    .catalog-filters-toggle {
        display: none;
    }
}

/* ============================================================
   Utilitarias de texto
   ============================================================ */
.v-text-secondary { color: var(--v-text-secondary); }
.v-text-muted { color: #94A3B8; }
.v-text-accent { color: var(--v-accent); }

/* Texto riscado (checklist de contratos, itens concluidos) */
.text-line-through {
    text-decoration: line-through;
    color: var(--v-text-secondary);
}

/* Cards de cobrancas vencidas */
.overdue-card {
    border-left: 3px solid var(--v-urgency-overdue) !important;
    background: var(--v-urgency-overdue-bg) !important;
}

/* Card de repasse calculado */
.transfer-result-card {
    border-left: 4px solid var(--v-chart-success) !important;
}

/* ============================================================
   Backgrounds utilitarios
   ============================================================ */
.v-bg-surface { background: var(--v-surface); }
.v-bg-background { background: var(--v-background); }

/* ============================================================
   Kanban stages
   ============================================================ */
.v-kanban-stage-header {
    background-color: #0D6B6E;
    border-radius: 4px;
}
.v-kanban-stage-won {
    background-color: #2E7D32 !important;
}
.v-kanban-stage-lost {
    background-color: #C62828 !important;
}
.v-kanban-drop-default {
    background-color: var(--v-background);
}
.v-kanban-drop-won {
    background-color: var(--v-success-light);
}
.v-kanban-drop-lost {
    background-color: var(--v-error-light);
}

/* ============================================================
   Chip "Em breve"
   ============================================================ */
.v-chip-em-breve {
    background-color: #F4F7F8;
    color: #94A3B8;
    font-weight: 500;
}

/* ============================================================
   Skeleton com shimmer
   ============================================================ */
.v-skeleton {
    background: linear-gradient(
        90deg,
        var(--v-divider) 25%,
        var(--v-surface) 50%,
        var(--v-divider) 75%
    );
    background-size: 200% 100%;
    animation: vShimmer 1.5s infinite;
}

@keyframes vShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   Skip link (acessibilidade)
   ============================================================ */
.v-skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--v-primary);
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    z-index: 9999;
    text-decoration: none;
}
.v-skip-link:focus {
    top: 0;
}

/* ============================================================
   Bottom nav spacer (usado pela spec 27-mobile-first)
   ============================================================ */
.v-bottom-nav-spacer {
    height: 56px;
}

/* ============================================================
   Touch target minimo para mobile (usado pela spec 27-mobile-first)
   ============================================================ */
.v-touch-target {
    min-height: 48px;
    min-width: 48px;
}

/* ============================================================
   Catálogo público (vitrine)
   ============================================================ */

/* Hero */
.catalog-hero {
    padding: 3rem 1rem 2rem;
}
.catalog-hero-title {
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* QR Code */
.catalog-qr-paper {
    display: inline-block;
    padding: 0.5rem;
    border-radius: 12px;
    background: var(--v-surface);
}
.catalog-qr-image {
    width: 110px;
    height: 110px;
    display: block;
}

/* Filtros */
.catalog-filter-paper {
    border-radius: 12px;
}
.catalog-filter-select {
    min-width: 150px;
}
.catalog-filter-select-sm {
    min-width: 120px;
}

/* Grid e cards do catálogo */
.catalog-grid {
    gap: 24px;
}
.catalog-card-clickable {
    cursor: pointer;
}

/* Detalhe do catálogo */
.catalog-detail-layout {
    gap: 32px;
}
.catalog-gallery-paper {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}
.catalog-gallery-image {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
    display: block;
}
.catalog-gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border-radius: 50%;
}
.catalog-thumbnail-strip {
    overflow-x: auto;
    padding-bottom: 4px;
}
.catalog-thumbnail-item {
    width: 72px;
    height: 72px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}
.catalog-thumbnail-item.active {
    border-color: var(--v-primary);
}
.catalog-detail-paper-rounded {
    border-radius: 12px;
}
.catalog-price-card {
    border-radius: 12px;
    position: sticky;
    top: 16px;
}
.catalog-placeholder-paper {
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    background: var(--v-surface);
}
.catalog-description {
    white-space: pre-wrap;
    line-height: 1.8;
}

/* ============================================================
   Auth (Login / Register)
   ============================================================ */
.auth-container {
    padding-top: 4rem;
    padding-bottom: 4rem;
}
.auth-card-container {
    max-width: 420px;
}

/* ============================================================
   Formulários admin
   ============================================================ */
.form-max-width {
    max-width: 720px;
}
.form-max-width-sm {
    max-width: 500px;
}

/* ============================================================
   Barra de qualidade (imóvel)
   ============================================================ */
.v-quality-bar {
    width: 60px;
}

/* ============================================================
   Stuck leads panel
   ============================================================ */
.v-stuck-lead-row {
    background-color: var(--v-warning-light);
    border-radius: 4px;
}

/* ============================================================
   Kanban card
   ============================================================ */
.lead-kanban-card {
    min-width: 220px;
}

/* ============================================================
   Utilitárias de layout
   ============================================================ */
.v-overflow-x-auto { overflow-x: auto; }
.v-min-height-300 { min-height: 300px; }
.v-kanban-column { width: 240px; }
.v-border-dashed { border: 1px dashed var(--v-border-dashed); }
.v-pre-wrap { white-space: pre-wrap; }
.font-weight-bold { font-weight: 700; }
.font-weight-semibold { font-weight: 600; }
.v-text-white { color: #FFFFFF; }

/* ============================================================
   Spacing utilities (gap, padding, margin)
   ============================================================ */
.v-gap-xs  { gap: var(--v-space-xs); }
.v-gap-sm  { gap: var(--v-space-sm); }
.v-gap-md  { gap: var(--v-space-md); }
.v-gap-lg  { gap: var(--v-space-lg); }
.v-gap-xl  { gap: var(--v-space-xl); }
.v-gap-2xl { gap: var(--v-space-2xl); }
.v-gap-3xl { gap: var(--v-space-3xl); }
.v-p-xs  { padding: var(--v-space-xs); }
.v-p-sm  { padding: var(--v-space-sm); }
.v-p-md  { padding: var(--v-space-md); }
.v-p-lg  { padding: var(--v-space-lg); }
.v-p-xl  { padding: var(--v-space-xl); }
.v-p-2xl { padding: var(--v-space-2xl); }
.v-p-3xl { padding: var(--v-space-3xl); }
.v-m-xs  { margin: var(--v-space-xs); }
.v-m-sm  { margin: var(--v-space-sm); }
.v-m-md  { margin: var(--v-space-md); }
.v-m-lg  { margin: var(--v-space-lg); }
.v-m-xl  { margin: var(--v-space-xl); }
.v-m-2xl { margin: var(--v-space-2xl); }
.v-m-3xl { margin: var(--v-space-3xl); }

/* ============================================================
   Responsive breakpoints utilities
   ============================================================ */
/* --v-bp-xs: 0px / --v-bp-sm: 600px / --v-bp-md: 960px / --v-bp-lg: 1280px / --v-bp-xl: 1920px */
@media (max-width: 599px)  { .v-hide-xs { display: none !important; } }
@media (max-width: 959px)  { .v-hide-sm { display: none !important; } }
@media (min-width: 0px)    { .v-show-xs { display: block !important; } }
@media (min-width: 600px)  { .v-show-sm { display: block !important; } }

/* ============================================================
   Skeleton variants
   ============================================================ */
.v-skeleton-text {
    height: 1em;
    border-radius: var(--v-radius-sm);
    background: linear-gradient(90deg, var(--v-divider) 25%, var(--v-surface) 50%, var(--v-divider) 75%);
    background-size: 200% 100%;
    animation: vShimmer 1.5s infinite;
}
.v-skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(90deg, var(--v-divider) 25%, var(--v-surface) 50%, var(--v-divider) 75%);
    background-size: 200% 100%;
    animation: vShimmer 1.5s infinite;
}
.v-skeleton-card {
    aspect-ratio: 16 / 10;
    border-radius: var(--v-radius-md);
    background: linear-gradient(90deg, var(--v-divider) 25%, var(--v-surface) 50%, var(--v-divider) 75%);
    background-size: 200% 100%;
    animation: vShimmer 1.5s infinite;
}

/* ============================================================
   Form input states
   ============================================================ */
.v-input {
    background: var(--v-input-bg);
    border-color: var(--v-input-border);
}
.v-input:focus {
    border-color: var(--v-input-focus-border);
    box-shadow: 0 0 0 3px var(--v-input-focus-ring);
}
.v-input-error {
    border-color: var(--v-input-error-border) !important;
    background: var(--v-input-error-bg);
}
.v-input-disabled {
    background: var(--v-input-disabled-bg) !important;
    color: var(--v-input-disabled-text) !important;
    cursor: not-allowed;
}

/* ============================================================
   Ícone tamanho extra grande (404, empty states)
   ============================================================ */
.v-icon-size-xl {
    font-size: 4rem;
}

/* ============================================================
   Landing page — classes adicionais
   ============================================================ */
.landing-hero-subtitle {
    color: #CBD5E1;
    max-width: 520px;
    margin: 0 auto;
    font-weight: 400;
}

.landing-section-subtitle {
    color: #4F6B7A;
    max-width: 520px;
    margin: 0 auto;
}

.landing-section-label {
    color: #C8963E;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.85rem;
}

.landing-feature-description {
    color: #4F6B7A;
    line-height: 1.6;
}

.landing-cta-section {
    background: linear-gradient(135deg, #0D6B6E 0%, #095B5E 100%);
}

.landing-cta-description {
    color: #CBD5E1;
}

.landing-footer {
    background: #0F172A;
}

.landing-footer-text {
    color: #94A3B8;
}

/* ============================================================
   Print
   ============================================================ */
@media print {
    .mud-appbar,
    .mud-drawer,
    .mud-navmenu,
    .mud-button,
    .mud-icon-button,
    .v-bottom-nav-spacer,
    #blazor-error-ui {
        display: none !important;
    }

    html, body {
        background: #FFFFFF !important;
        color: #000000 !important;
    }

    .mud-card {
        box-shadow: none !important;
        border: 1px solid #E5E7EB;
        break-inside: avoid;
    }

    .mud-table {
        border: 1px solid #D1D5DB;
    }
    .mud-table th,
    .mud-table td {
        border-bottom: 1px solid #D1D5DB;
        padding: 0.25rem 0.5rem;
    }

    * {
        animation: none !important;
        transition: none !important;
    }

    ::-webkit-scrollbar {
        display: none;
    }
}

/* ══════════════════════════════════════════════════════════════
   Agenda — Semana (tabela/calendário)
   ══════════════════════════════════════════════════════════════ */

.agenda-week-table {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--v-divider);
    border-radius: 8px;
    overflow: hidden;
}

.agenda-week-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--v-background);
    border-bottom: 1px solid var(--v-divider);
}

.agenda-week-header-cell {
    padding: 10px 4px;
    text-align: center;
    border-right: 1px solid var(--v-divider);
}
.agenda-week-header-cell:last-child {
    border-right: none;
}

.agenda-week-dayname {
    font-size: var(--v-font-xs, 0.75rem);
    color: var(--v-text-secondary);
    text-transform: lowercase;
}
.agenda-week-daynum {
    font-size: var(--v-font-lg, 1.25rem);
    font-weight: 600;
    color: var(--v-text-primary);
}

.agenda-week-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    min-height: 120px;
}

.agenda-week-cell {
    padding: 6px 4px;
    border-right: 1px solid var(--v-divider);
    min-height: 120px;
}
.agenda-week-cell:last-child {
    border-right: none;
}

.agenda-week-item {
    padding: 3px 6px;
    margin-bottom: 3px;
    border-radius: 4px;
    border-left: 3px solid transparent;
    background: var(--v-surface);
    cursor: pointer;
    transition: background 0.15s;
}
.agenda-week-item:hover {
    background: var(--v-background);
}

.agenda-week-item-title {
    font-size: var(--v-font-xs, 0.75rem);
    font-weight: 600;
    color: var(--v-text-primary);
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-week-item-time {
    font-size: 0.65rem;
    color: var(--v-text-secondary);
}

/* ══════════════════════════════════════════════════════════════
   Agenda — Mês (grid calendário)
   ══════════════════════════════════════════════════════════════ */

.agenda-month-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    padding: 0 4px;
    margin-bottom: 4px;
}

.agenda-month-weekday {
    font-size: var(--v-font-xs, 0.75rem);
    color: var(--v-text-secondary);
    text-transform: lowercase;
    padding: 4px 0;
}

.agenda-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    padding: 0 4px;
}

.agenda-month-cell {
    min-height: 52px;
    padding: 4px 2px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s;
}
.agenda-month-cell:hover {
    background: var(--v-background);
}

.agenda-month-other {
    opacity: 0.35;
}

.agenda-month-day {
    font-size: var(--v-font-sm, 0.875rem);
    color: var(--v-text-primary);
    display: block;
    margin-bottom: 2px;
}

.agenda-month-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.agenda-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.agenda-dot-overdue { background: var(--v-urgency-overdue); }
.agenda-dot-today   { background: var(--v-urgency-today); }
.agenda-dot-pending { background: var(--v-primary); }

.agenda-month-count {
    font-size: 0.65rem;
    color: var(--v-text-secondary);
}

/* ══════════════════════════════════════════════════════════════
   Agenda — estados comuns
   ══════════════════════════════════════════════════════════════ */

.agenda-today {
    background: rgba(13, 107, 110, 0.07);
}
.agenda-today-text {
    font-weight: 700;
    color: var(--v-primary);
}

/* ══════════════════════════════════════════════════════════════
   Funil — Stat cards
   ══════════════════════════════════════════════════════════════ */

.funnel-stat-card {
    flex: 1;
    min-width: 130px;
    max-width: 180px;
    padding: 14px 12px;
    border-radius: 10px;
    background: var(--v-surface);
    border: 1px solid var(--v-divider);
    text-align: center;
    transition: box-shadow 0.15s;
}
.funnel-stat-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.funnel-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--v-text-primary);
    margin: 4px 0 2px;
    line-height: 1.2;
}

.funnel-stat-label {
    font-size: var(--v-font-xs, 0.75rem);
    color: var(--v-text-secondary);
}

/* Dashboard KPI card wrapper */
.v-kpi-card {
    flex: 1 1 var(--v-space-160, 160px);
    min-width: var(--v-space-160, 160px);
}

/* Catalog footer */
.v-footer {
    text-align: center;
    padding: 2rem 1rem;
}

/* Landing appbar */
.landing-appbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    position: absolute;
    box-shadow: var(--v-shadow-sm);
    padding: 0.25rem 0;
}
.v-rounded-btn {
    border-radius: var(--v-radius-md, 8px);
}

/* Bottom nav */
.v-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}
.v-bottom-nav-paper {
    height: 56px;
}
