/* =============================================
   app.css — Pesquisa Salarial Enterprise
   Tailwind-compatible custom styles
   ============================================= */

/* ── Reset & Base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #F9FAFB;
    color: #111827;
}

.dark body { background-color: #030712; color: #F9FAFB; }

h1, h2, h3, h4, h5, h6, .font-display { font-family: 'Sora', sans-serif; }

/* ── Scrollbar personalizada ──────────────────── */
::-webkit-scrollbar            { width: 5px; height: 5px; }
::-webkit-scrollbar-track      { background: transparent; }
::-webkit-scrollbar-thumb      { background: #D1D5DB; border-radius: 99px; }
.dark ::-webkit-scrollbar-thumb { background: #374151; }

/* ── Focus ring acessível ─────────────────────── */
:focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
}

/* ── Utilitários de transição ─────────────────── */
.transition-fast   { transition: all 100ms ease; }
.transition-normal { transition: all 200ms ease; }
.transition-slow   { transition: all 350ms ease; }

/* ── Sombras personalizadas ───────────────────── */
.shadow-card { box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04); }
.shadow-card-hover:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1), 0 8px 32px rgba(0,0,0,.06); }

/* ── Gradientes de fundo ──────────────────────── */
.bg-gradient-app { background: linear-gradient(135deg, #EFF6FF 0%, #F5F3FF 100%); }
.dark .bg-gradient-app { background: linear-gradient(135deg, #030712 0%, #0F172A 100%); }

/* ── Badge / Tags ─────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}
.badge-blue   { background: #EFF6FF; color: #1D4ED8; }
.badge-green  { background: #F0FDF4; color: #15803D; }
.badge-yellow { background: #FFFBEB; color: #B45309; }
.badge-red    { background: #FEF2F2; color: #B91C1C; }
.badge-gray   { background: #F3F4F6; color: #4B5563; }

/* ── Tabelas ──────────────────────────────────── */
.table-hover tbody tr { transition: background 120ms ease; }

/* ── Formulários ──────────────────────────────── */
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #E5E7EB;
    border-radius: 12px;
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease;
    background: #fff;
    color: #111827;
}
.form-input:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.dark .form-input {
    background: #1F2937;
    border-color: #374151;
    color: #F9FAFB;
}
.dark .form-input:focus { border-color: #3B82F6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }

.form-input.error { border-color: #EF4444; }
.form-input.error:focus { box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12); }

/* ── Botões ───────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 12px;
    font-family: 'Sora', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 150ms ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.btn-primary   { background: #2563EB; color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.25); }
.btn-primary:hover:not(:disabled) { background: #1D4ED8; box-shadow: 0 6px 16px rgba(37,99,235,.35); }

.btn-success   { background: #16A34A; color: #fff; box-shadow: 0 4px 12px rgba(22,163,74,.25); }
.btn-success:hover:not(:disabled) { background: #15803D; }

.btn-danger    { background: #DC2626; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #B91C1C; }

.btn-ghost     { background: #F3F4F6; color: #374151; }
.btn-ghost:hover:not(:disabled)  { background: #E5E7EB; }
.dark .btn-ghost { background: #1F2937; color: #D1D5DB; }
.dark .btn-ghost:hover:not(:disabled) { background: #374151; }

/* ── Card base ────────────────────────────────── */
.card {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.dark .card { background: #111827; border-color: #1F2937; }

/* ── Animações personalizadas ─────────────────── */
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes pulse    { 50% { opacity: .5; } }
@keyframes bounce   { 0%,100% { transform: translateY(-15%); animation-timing-function: cubic-bezier(.8,0,1,1); } 50% { transform: none; animation-timing-function: cubic-bezier(0,0,.2,1); } }
@keyframes fadeIn   { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideIn  { from { transform: translateX(-100%); } to { transform: translateX(0); } }

.animate-spin    { animation: spin 1s linear infinite; }
.animate-pulse   { animation: pulse 2s cubic-bezier(.4,0,.6,1) infinite; }
.animate-bounce  { animation: bounce 1s infinite; }
.animate-fade-in { animation: fadeIn 300ms ease forwards; }

/* ── Utilitários Tailwind complementares ──────── */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.truncate { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.select-none { user-select: none; }
.pointer-events-none { pointer-events: none; }
.overscroll-none { overscroll-behavior: none; }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── Responsividade utilitária ────────────────── */
@media (max-width: 640px) {
    .hide-mobile { display: none !important; }
}
@media (min-width: 768px) {
    .hide-desktop { display: none !important; }
}

/* ── Print ────────────────────────────────────── */
@media print {
    #sidebar, nav.fixed, #impersonation-banner { display: none !important; }
    #content-panel { padding: 0 !important; }
}
