/* =============== TIA UI (lightweight util classes) =============== */
:root {
    --tia-primary: #2563eb;
    --tia-primary-100: #dbeafe;
    --tia-primary-200: #bfdbfe;
    --tia-danger: #dc2626;
    --tia-muted: #64748b;
    --tia-border: #e5e7eb;
    --tia-bg: #f8fafc;
    --tia-white: #ffffff;
    --tia-ink: #0f172a;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--tia-bg);
    color: #1f2937;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Noto Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
.tia-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px;
    max-width: 72rem;
    margin: 0 auto;
}

.tia-header__brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tia-logo {
    height: 48px;
    width: 48px;
    border-radius: 8px;
}

.tia-logo-lg {
    height: 64px;
    width: 64px;
}

/* <- garante maior */
@media (max-width:640px) {
    .tia-logo-lg {
        height: 48px;
        width: 48px;
    }

    /* responsivo */
}

.tia-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--tia-ink);
}

/* Containers */
.container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 24px 16px;
}

.card {
    background: var(--tia-white);
    border: 1px solid var(--tia-border);
    border-radius: 16px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 4px 12px rgb(0 0 0 / 0.04);
}

/* Navegação (pills) */
.list-none {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav {
    margin-bottom: 24px;
}

.nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.nav-pill {
    display: inline-block;
    padding: .5rem .8rem;
    background: #fff;
    border: 1px solid var(--tia-border);
    border-radius: 999px;
    text-decoration: none;
    color: #1f2937;
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
    transition: background .15s ease, color .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.nav-pill:hover {
    background: #f1f5f9;
}

.nav-pill:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .22);
    border-color: var(--tia-primary);
}

.nav-pill--active {
    border-color: var(--tia-primary);
    color: var(--tia-primary);
    background: var(--tia-primary-100);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.nav-pill--danger {
    background: #fff1f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.nav .ml-auto {
    margin-left: auto;
}

/* Tipografia */
.text-sm {
    font-size: .875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.font-semibold {
    font-weight: 600;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--tia-muted);
}

/* Botões */
.btn {
    display: inline-block;
    padding: .5rem .9rem;
    border-radius: 10px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--tia-primary);
    color: #fff;
}

.btn-primary:hover {
    filter: brightness(0.95);
}

.btn-ghost {
    background: #fff;
    border-color: var(--tia-border);
    color: #1f2937;
}

.btn-ghost:hover {
    background: #f8fafc;
}

/* Formulários */
.input,
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: .5rem .65rem;
    border: 1px solid var(--tia-border);
    border-radius: 10px;
    background: #fff;
}

label span {
    display: block;
    margin-bottom: .25rem;
    color: #334155;
    font-size: .85rem;
}

/* Tabelas */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: #f1f5f9;
}

.table th,
.table td {
    padding: .55rem .5rem;
    border-top: 1px solid var(--tia-border);
    text-align: left;
}

.table tr:hover td {
    background: #fafafa;
}

/* Avisos & estados */
.alert {
    padding: .8rem 1rem;
    border-radius: 12px;
}

.alert-muted {
    background: #f8fafc;
    color: #334155;
    border: 1px dashed var(--tia-border);
}

.alert-danger {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* Utilitários */
.bg-slate-50 {
    background-color: var(--tia-bg);
}

.bg-white {
    background-color: var(--tia-white);
}

.text-slate-800 {
    color: #1f2937;
}

.text-slate-600 {
    color: #475569;
}

.text-slate-500 {
    color: #64748b;
}

.bg-blue-600 {
    background-color: var(--tia-primary);
}

.bg-red-600 {
    background-color: var(--tia-danger);
}

.bg-red-50 {
    background-color: #fef2f2;
}

.text-red-700 {
    color: #b91c1c;
}

.rounded {
    border-radius: .5rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.shadow {
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.08), 0 4px 12px rgb(0 0 0 / 0.06);
}

.p-2 {
    padding: .5rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-3 {
    padding-left: .75rem;
    padding-right: .75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-1 {
    padding-top: .25rem;
    padding-bottom: .25rem;
}

.py-2 {
    padding-top: .5rem;
    padding-bottom: .5rem;
}

/* <-- corrigido */
.py-3 {
    padding-top: .75rem;
    padding-bottom: .75rem;
}

.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.mt-2 {
    margin-top: .5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-3 {
    margin-bottom: .75rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.max-w-md {
    max-width: 28rem;
}

.max-w-6xl {
    max-width: 72rem;
}

.w-full {
    width: 100%;
}

.h-8 {
    height: 2rem;
}

.h-12 {
    height: 3rem;
}

.h-32 {
    height: 8rem;
}

.border {
    border: 1px solid var(--tia-border);
}

.border-t {
    border-top: 1px solid var(--tia-border);
}

.inline {
    display: inline;
}

.inline-block {
    display: inline-block;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: .5rem;
}

.gap-3 {
    gap: .75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.min-h-screen {
    min-height: 100vh;
}

.minw-260 {
    min-width: 260px;
}


/* utilitário com escape */
.whitespace-pre-line {
    white-space: pre-line;
}

/* Responsivo */
@media (max-width:640px) {
    .tia-title {
        font-size: 1.125rem;
    }

    .tia-logo {
        height: 40px;
        width: 40px;
    }

    .nav ul {
        gap: 6px;
    }

    .nav-pill {
        padding: .44rem .66rem;
    }
}