/* ================================================
   WeHa Finance - Editorial Design Tokens
   Portado do padrao GetNuva Finance, paleta WeHa.
   Light, neutral, type-driven. Teal como unico acento.
   ================================================ */

/* ------------------ SURFACES ------------------ */
.surface {
    background: #ffffff;
    border-radius: 0.75rem; /* rounded-xl */
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.8), 0 1px 2px rgba(15, 23, 42, 0.04);
}
.surface-lg {
    background: #ffffff;
    border-radius: 1rem; /* rounded-2xl */
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.8), 0 1px 2px rgba(15, 23, 42, 0.04);
}
.surface-hover {
    transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.surface-hover:hover {
    box-shadow: inset 0 0 0 1px rgba(125, 216, 216, 0.7),
                0 8px 24px -8px rgba(2, 183, 183, 0.18);
    transform: translateY(-2px);
}

/* Subtle accent rail used on hero panels (single teal line on top) */
.surface-rail-top {
    position: relative;
    overflow: hidden;
}
.surface-rail-top::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 1px;
    background: linear-gradient(to right, #02B7B7, #3ec7c7, transparent);
}

/* ------------------ TYPE TOKENS ------------------ */
.eyebrow {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #94a3b8; /* slate-400 */
}
.eyebrow-weha {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #019C9C; /* weha-600 */
}
.num {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

/* Section divider with eyebrow heading */
.section-eyebrow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.section-eyebrow > .eyebrow,
.section-eyebrow > .eyebrow-weha {
    flex-shrink: 0;
}
.section-eyebrow::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: rgba(226, 232, 240, 0.7);
}

/* ------------------ BUTTONS ------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: all 0.18s ease;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
}
.btn-primary {
    background: linear-gradient(135deg, #02B7B7 0%, #017F7F 100%);
    color: #ffffff;
}
.btn-primary:hover {
    box-shadow: 0 8px 20px -6px rgba(2, 183, 183, 0.45);
}
.btn-secondary {
    background: #ffffff;
    color: #475569; /* slate-600 */
    border-color: #e2e8f0; /* slate-200 */
}
.btn-secondary:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}
.btn-ghost {
    background: transparent;
    color: #64748b;
}
.btn-ghost:hover {
    background: #f1f5f9;
    color: #0f172a;
}
.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    line-height: 1rem;
    border-radius: 0.375rem;
}

/* ------------------ INPUTS ------------------ */
.input {
    width: 100%;
    padding: 0.5rem 0.875rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    color: #0f172a;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    outline: none;
}
.input::placeholder { color: #94a3b8; }
.input:focus {
    border-color: #02B7B7;
    box-shadow: 0 0 0 3px rgba(2, 183, 183, 0.12);
}

/* ------------------ BADGES ------------------ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1rem;
    border: 1px solid transparent;
    letter-spacing: 0.01em;
}
.badge-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.badge-danger  { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.badge-accent  { background: #fdefec; color: #d55a38; border-color: #f2937a; }
.badge-neutral { background: #f8fafc; color: #475569; border-color: #e2e8f0; }

/* ------------------ TABLES ------------------ */
.table-container {
    overflow-x: auto;
    border-radius: 0.75rem;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.8), 0 1px 2px rgba(15, 23, 42, 0.04);
}
.table {
    width: 100%;
    border-collapse: collapse;
}
.table th {
    background: #f8fafc;
    padding: 0.625rem 1rem;
    text-align: left;
    font-size: 0.6875rem;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #e2e8f0;
}
.table td {
    padding: 0.875rem 1rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: #1e293b;
    vertical-align: middle;
}
.table tbody tr { transition: background-color 0.12s ease; }
.table tbody tr:hover { background: #f8fafc; }
.table tbody tr:first-child td { border-top: 0; }
.table .td-num {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* ------------------ PAGE HEADER ------------------ */
.page-header { margin-bottom: 1.5rem; }
.page-header__kicker {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #019C9C; /* weha-600 */
    margin-bottom: 0.25rem;
}
.page-header__title {
    font-size: 1.75rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}
.page-header__lead {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.375rem;
    max-width: 56ch;
}

/* ------------------ STATS / KPI ------------------ */
.kpi { padding: 1.25rem; }
.kpi__label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}
.kpi__value {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
    font-weight: 600;
    font-size: 1.875rem;
    line-height: 1;
    color: #0f172a;
}
.kpi__sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 0.5rem;
}

/* ------------------ TOOLTIPS ------------------ */
/* Uso: <span class="tip" tabindex="0" data-tip="Explicacao">...icone...</span>
   O balao e criado via JS no body (nunca e clipado por overflow dos cards). */
.tip {
    display: inline-flex;
    align-items: center;
    cursor: help;
    outline: none;
}
.tip-bubble {
    position: fixed;
    z-index: 100;
    background: #0f172a;
    color: #f1f5f9;
    font-size: 11px;
    line-height: 1.45;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    text-align: left;
    white-space: normal;
    max-width: 260px;
    padding: 8px 10px;
    border-radius: 8px;
    box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.4);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease;
}
.tip-bubble.is-visible {
    opacity: 1;
}
/* Icone de info padrao */
.tip-icon {
    width: 13px;
    height: 13px;
    color: #cbd5e1;
    transition: color 0.15s ease;
}
.tip:hover .tip-icon, .tip:focus .tip-icon {
    color: #02B7B7;
}
.tip-icon--light {
    color: rgba(255, 255, 255, 0.5);
}
.tip:hover .tip-icon--light, .tip:focus .tip-icon--light {
    color: rgba(255, 255, 255, 0.9);
}

/* ------------------ SCROLLBAR ------------------ */
.scrollbar-thin::-webkit-scrollbar { width: 6px; }
.scrollbar-thin::-webkit-scrollbar-track { background: transparent; }
.scrollbar-thin::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ------------------ DRILL-DOWN ------------------ */
/* Numero clicavel que abre o detalhamento. Precisa parecer clicavel sem
   virar botao pesado: sublinhado pontilhado que acende no hover. */
.drill {
    cursor: pointer;
    border-radius: 10px;
    margin: -4px -6px;
    padding: 4px 6px;
    transition: background-color 0.15s ease;
}
.drill:hover {
    background: rgba(2, 183, 183, 0.06);
}
.drill:focus-visible {
    outline: 2px solid #02B7B7;
    outline-offset: 1px;
}
.drill .drill__count {
    text-decoration: underline dotted;
    text-underline-offset: 2px;
    text-decoration-color: #cbd5e1;
}
.drill:hover .drill__count {
    color: #017F7F;
    text-decoration-color: #02B7B7;
}

/* Link pro registro no Jobber, dentro do detalhamento */
.drill-link {
    text-decoration: underline;
    text-decoration-color: #cbd5e1;
    text-underline-offset: 2px;
    transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
.drill-link:hover {
    color: #017F7F;
    text-decoration-color: #02B7B7;
}
