[x-cloak] { display: none !important; }

:root {
    --vita-primary: #00662D;
    --vita-secondary: #000000;
    --vita-font-on-theme: #FFFFFF;
    --vita-gradient: linear-gradient(135deg, #00662D 0%, #000000 100%);
    --vita-primary-soft: #00662D18;
    --gradient-primary: var(--vita-gradient);
}

html { background: #f5f5f5; }

html.js:not(.alpine-ready) .vita-module-shell {
    visibility: hidden;
}

body { font-feature-settings: 'tnum' on, 'lnum' on; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-thumb { background: #c4c4c4; border-radius: 3px; }

.theme-gradient { background: var(--vita-gradient); color: var(--vita-font-on-theme); }
.theme-btn {
    background: var(--vita-gradient);
    color: var(--vita-font-on-theme);
    transition: filter 0.15s;
}
.theme-btn:hover:not(:disabled) { filter: brightness(0.92); }
.theme-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.qr-hub-card:hover {
    border-color: var(--vita-primary);
    box-shadow: 0 4px 14px color-mix(in srgb, var(--vita-primary) 12%, transparent);
}
.theme-icon-bg {
    display: flex; align-items: center; justify-content: center;
    background: var(--vita-gradient); color: var(--vita-font-on-theme);
    flex-shrink: 0;
}
.theme-text { color: var(--vita-primary); }
.theme-ring:focus { outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--vita-primary) 20%, transparent); border-color: var(--vita-primary); }

.sidebar-link {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.625rem 0.75rem; border-radius: 0.5rem;
    font-size: 0.875rem; font-weight: 500; color: #525252;
    transition: color 0.15s, background 0.15s;
}
.sidebar-link:hover { background: #fafafa; color: var(--vita-primary); }
.sidebar-link-active {
    background: var(--vita-primary-soft); color: var(--vita-primary); font-weight: 600;
    box-shadow: inset 3px 0 0 0 var(--vita-primary);
}

.sidebar-group-btn {
    display: flex; align-items: center; justify-content: space-between; gap: 0.5rem;
    padding: 0.625rem 0.75rem; border-radius: 0.5rem;
    font-size: 0.875rem; font-weight: 500; color: #525252;
    transition: color 0.15s, background 0.15s; width: 100%;
}
.sidebar-group-btn:hover { background: #fafafa; color: #171717; }

.sidebar-sublink {
    display: flex; align-items: center; gap: 0.625rem;
    padding: 0.5rem 0.75rem; border-radius: 0.5rem;
    font-size: 0.8125rem; color: #737373; transition: all 0.15s;
}
.sidebar-sublink:hover { background: #fafafa; color: var(--vita-primary); }
.sidebar-sublink-active { background: var(--vita-primary-soft); color: var(--vita-primary); font-weight: 500; }

.modal-label { display: block; font-size: 0.75rem; font-weight: 600; color: var(--vita-primary); margin-bottom: 0.25rem; }
.modal-input {
    width: 100%; padding: 0.5rem 0.75rem; font-size: 0.875rem;
    border: 1px solid #e5e5e5; border-radius: 0.5rem; background: #fff;
    min-width: 0;
}
.modal-input:focus { outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--vita-primary) 15%, transparent); border-color: var(--vita-primary); }
.modal-input-icon {
    display: flex; align-items: center; justify-content: center;
    width: 2.5rem; background: var(--vita-gradient); color: var(--vita-font-on-theme);
    border-radius: 0.5rem 0 0 0.5rem; flex-shrink: 0;
}
.modal-section-title {
    font-size: 0.75rem; font-weight: 700; color: #a3a3a3;
    text-transform: uppercase; letter-spacing: 0.05em;
    margin-bottom: 0.75rem; padding-bottom: 0.5rem; border-bottom: 1px solid #f5f5f5;
}

.theme-preview-bar {
    height: 3rem; border-radius: 0.75rem;
    background: var(--vita-gradient); color: var(--vita-font-on-theme);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 600; gap: 0.5rem;
    margin-top: 0.75rem;
}

.avatar-preview {
    width: 5rem; height: 5rem; border-radius: 9999px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; font-weight: 700; overflow: hidden;
    background: var(--vita-primary-soft); color: var(--vita-primary);
    background-size: cover; background-position: center;
}

.typing-dot { animation: typing 1.4s infinite ease-in-out both; }
.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }
@keyframes typing {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}
.chat-bubble-user { background: var(--vita-gradient); }

/* ── VITA Data Table (padrão global) ── */
.vita-table-wrap { overflow-x: auto; border: 1px solid #e5e5e5; border-radius: 0.25rem; -webkit-overflow-scrolling: touch; }
.vita-table { width: 100%; text-align: left; border-collapse: collapse; font-size: 0.875rem; }
@media (min-width: 1024px) {
    .vita-table { min-width: max-content; }
}
@media (max-width: 1023px) {
    .vita-table--responsive { table-layout: fixed; }
    .vita-table--responsive .vita-table-col-name { width: auto; min-width: 0; word-break: break-word; }
    .vita-table--responsive .vita-table-col-actions { width: 3.5rem; }
    .vita-table-actions-desktop { display: none !important; }
    .vita-table-wrap { overflow-x: visible; }
    .vita-table tbody td { font-size: 0.8125rem; padding: 0.5rem 0.65rem; }
}
@media (min-width: 1024px) {
    .vita-table-actions-mobile { display: none !important; }
}
.vita-table thead tr { background: var(--vita-gradient); color: var(--vita-font-on-theme); }
.vita-table thead th {
    padding: 0.5rem 1rem; font-weight: 600; font-size: 0.8125rem;
    border: 1px solid rgba(255,255,255,0.2); white-space: nowrap;
}
.vita-table tbody td { padding: 0.5rem 1rem; border: 1px solid #e5e5e5; color: #404040; vertical-align: middle; }
.vita-table tbody tr { background: #fff; transition: background 0.15s; }
.vita-table tbody tr:hover { background: #fafafa; }
.vita-table-action {
    width: 1.75rem; height: 1.75rem; border-radius: 0.25rem;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; transition: opacity 0.15s; flex-shrink: 0;
}
.vita-table-action:hover { opacity: 0.88; }
.vita-table-action--edit { background: #3498db; }
.vita-table-action--delete { background: #e74c3c; }
.vita-table-action--info { background: #2c3e50; }
.vita-table-action--toggle-on { background: #27ae60; }
.vita-table-action--toggle-off { background: #e67e22; }
.vita-table-action--files { background: #8e44ad; }
.vita-table-action--reset { background: #6366f1; }
.vita-table-action--permissions { background: #475569; }
.vita-table-action--afastamento { background: #0d9488; }
.vita-status-badge { padding: 0.125rem 0.5rem; border-radius: 9999px; font-size: 0.6875rem; font-weight: 600; }
.vita-status-badge--active { background: #dcfce7; color: #166534; }
.vita-status-badge--inactive { background: #fee2e2; color: #991b1b; }
.vita-table-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; font-size: 0.875rem; color: #525252; }
.vita-table-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; font-size: 0.875rem; color: #737373; }
.vita-table-page-btn {
    min-width: 2.25rem; height: 2.25rem; padding: 0 0.5rem;
    border: 1px solid #e5e5e5; border-radius: 0.375rem;
    background: #fff; font-size: 0.875rem; transition: background 0.15s, color 0.15s, border-color 0.15s;
    display: inline-flex; align-items: center; justify-content: center;
}
.vita-table-page-btn:hover:not(:disabled):not(.is-active) { background: #f5f5f5; }
.vita-table-page-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.vita-table-page-btn.is-active {
    background: var(--vita-primary);
    color: var(--vita-font-on-theme);
    border-color: var(--vita-primary);
    font-weight: 600;
}
.vita-table-page-ellipsis {
    min-width: 1.75rem; height: 2.25rem; padding: 0 0.25rem;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.875rem; color: #737373; user-select: none;
}
.vita-table-pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.vita-pagination-item { display: contents; }
.vita-perm-group-header { background: #f5f5f5; }
.vita-perm-group-title { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: #525252; }
.vita-module-shell { background: #fff; border-radius: 0.5rem; box-shadow: 0 1px 2px rgba(0,0,0,0.05); padding: 1rem 1.5rem; }
@media (min-width: 640px) { .vita-module-shell { padding: 1.5rem; } }

/* Tabela responsiva — expandir detalhes em mobile/tablet */
.vita-table-col-expand { width: 2.5rem; text-align: center; }
.vita-table-expand-btn {
    width: 1.75rem; height: 1.75rem; border-radius: 0.375rem; border: 1px solid #d4d4d4;
    background: #fff; color: var(--vita-primary); display: inline-flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 600; line-height: 1; transition: background 0.15s, transform 0.15s;
}
.vita-table-expand-btn:hover { background: var(--vita-primary-soft); }
.vita-table-expand-btn.is-open { background: var(--vita-primary); color: var(--vita-font-on-theme); border-color: var(--vita-primary); }
.vita-table-detail-row td { padding: 0 !important; border-top: none !important; background: #fafafa; }
.vita-table-detail-panel {
    padding: 0.75rem 1rem 1rem; border-top: 1px dashed #e5e5e5;
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; font-size: 0.8125rem;
}
.vita-table-detail-panel .label { font-size: 0.625rem; text-transform: uppercase; color: #a3a3a3; font-weight: 600; }
.vita-table-detail-panel .value { color: #404040; word-break: break-word; }
@media (max-width: 1023px) {
    .vita-table--checkins .vita-table-col-name {
        word-break: normal;
        overflow-wrap: anywhere;
    }
    .vita-table--checkins .vita-table-col-name .font-medium {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        max-width: 100%;
    }
}
@media (min-width: 1024px) {
    .vita-table-col-expand, .vita-table-detail-row { display: none !important; }
}

/* Cards de upload de imagem */
.vita-upload-card {
    display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem;
    border: 1px solid #e5e5e5; border-radius: 0.75rem; background: #fff;
}
.vita-upload-thumb {
    width: 3rem; height: 3rem; border-radius: 0.5rem; background: #f5f5f5;
    display: flex; align-items: center; justify-content: center; overflow: hidden; flex-shrink: 0;
}
.vita-upload-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Dashboard master — cards de empresas */
.vita-master-company-card {
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    will-change: transform;
}
.vita-master-company-card:hover {
    transform: translateY(-6px);
    border-color: var(--vita-primary) !important;
    box-shadow: 0 16px 32px -12px color-mix(in srgb, var(--vita-primary) 28%, transparent);
}
@media (prefers-reduced-motion: reduce) {
    .vita-master-company-card { transition: border-color 0.15s ease, box-shadow 0.15s ease; }
    .vita-master-company-card:hover { transform: none; }
}

/* Analytics — delta KPI */
.vita-analytics-delta { font-size: 0.75rem; font-weight: 600; display: inline-flex; align-items: center; gap: 0.125rem; }
.vita-analytics-delta.is-up { color: #059669; }
.vita-analytics-delta.is-down { color: #dc2626; }
.vita-analytics-delta.is-neutral { color: #737373; }

/* Mapa de calor — matriz interativa */
.vita-heatmap-scroll { -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.vita-heatmap-table { border-collapse: separate; border-spacing: 0.25rem; }
.vita-heatmap-cell {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    touch-action: manipulation;
}
.vita-heatmap-cell:focus-visible { outline: 2px solid var(--vita-primary); outline-offset: 2px; }
.vita-heatmap-chip { border-color: rgba(255, 255, 255, 0.35); }
.vita-heatmap-drawer { max-height: 100dvh; }
@media (max-width: 639px) {
    .vita-heatmap-drawer { max-width: 100% !important; border-radius: 1rem 1rem 0 0; top: auto !important; height: 85dvh; }
    .vita-heatmap-cell { min-height: 3rem; min-width: 3rem; }
}

