/* LatiWeb - Estilos Complementares (CSS puro, sem @apply) */

/* Tabela zebra */
.table-zebra tbody tr:nth-child(even) { background-color: rgb(255 251 240 / 0.4); }
.table-zebra tbody tr:nth-child(odd) { background-color: white; }
.table-zebra tbody tr:hover { background-color: rgb(245 243 235); }

/* Botoes */
.btn-primary {
    background-color: #b45309; color: #fff; font-weight: 600;
    padding: 0.5rem 1rem; border-radius: 0.5rem;
    transition: all 0.2s; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    border: none; cursor: pointer; display: inline-block; text-align: center;
}
.btn-primary:hover { background-color: #92400e; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

.btn-secondary {
    background-color: #57534e; color: #fff; font-weight: 600;
    padding: 0.5rem 1rem; border-radius: 0.5rem;
    transition: all 0.2s; border: none; cursor: pointer;
    display: inline-block; text-align: center; text-decoration: none;
}
.btn-secondary:hover { background-color: #44403c; }

.btn-danger {
    background-color: #dc2626; color: #fff; font-weight: 600;
    padding: 0.5rem 1rem; border-radius: 0.5rem;
    transition: all 0.2s; border: none; cursor: pointer;
    display: inline-block; text-align: center;
}
.btn-danger:hover { background-color: #991b1b; }

.btn-success {
    background-color: #047857; color: #fff; font-weight: 600;
    padding: 0.5rem 1rem; border-radius: 0.5rem;
    transition: all 0.2s; border: none; cursor: pointer;
    display: inline-block; text-align: center;
}
.btn-success:hover { background-color: #065f46; }

/* Card */
.card {
    background-color: #fff; border-radius: 0.5rem;
    border: 1px solid #e7e5e4; box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    padding: 1.5rem; transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 6px rgba(0,0,0,0.07); }

/* Badges */
.badge {
    display: inline-flex; align-items: center;
    padding: 0.125rem 0.625rem; border-radius: 9999px;
    font-size: 0.75rem; font-weight: 500; line-height: 1.25rem;
}
.badge-amber { background-color: #fef3c7; color: #92400e; }
.badge-green { background-color: #d1fae5; color: #065f46; }
.badge-blue { background-color: #e0f2fe; color: #075985; }
.badge-red { background-color: #fee2e2; color: #991b1b; }
.badge-gray { background-color: #f5f5f4; color: #57534e; }

/* Formularios */
.form-input {
    width: 100%; padding: 0.5rem 0.75rem;
    border: 1px solid #d6d3d1; border-radius: 0.5rem;
    outline: none; transition: all 0.2s;
    font-size: 0.875rem; line-height: 1.25rem;
}
.form-input:focus { border-color: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,0.15); }

.form-label {
    display: block; font-size: 0.875rem; font-weight: 500;
    color: #44403c; margin-bottom: 0.25rem;
}

.form-select {
    width: 100%; padding: 0.5rem 0.75rem;
    border: 1px solid #d6d3d1; border-radius: 0.5rem;
    outline: none; transition: all 0.2s;
    font-size: 0.875rem; line-height: 1.25rem;
    background-color: #fff;
}
.form-select:focus { border-color: #d97706; box-shadow: 0 0 0 3px rgba(217,119,6,0.15); }

/* Animacao fade-in */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 0.3s ease-in; }

/* Print */
@media print {
    .no-print { display: none !important; }
    body { background: #fff; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ============================================
   TEMA DARK - Override completo
   ============================================ */
body.theme-dark {
    background-color: #1c1917 !important;
    color: #e7e5e4 !important;
}

/* Sidebar ja tratada via PHP (sidebar.php) */

/* Card dark */
body.theme-dark .card {
    background-color: #292524 !important;
    border-color: #44403c !important;
    color: #e7e5e4 !important;
}
body.theme-dark .card:hover {
    box-shadow: 0 4px 6px rgba(0,0,0,0.3) !important;
}

/* Tabela dark */
body.theme-dark .table-zebra tbody tr:nth-child(even) { background-color: rgba(41,37,36,0.6); }
body.theme-dark .table-zebra tbody tr:nth-child(odd) { background-color: #292524; }
body.theme-dark .table-zebra tbody tr:hover { background-color: #44403c; }
body.theme-dark .table-zebra thead tr { background-color: #1c1917 !important; }

/* Formularios dark */
body.theme-dark .form-input {
    background-color: #44403c !important;
    border-color: #57534e !important;
    color: #e7e5e4 !important;
}
body.theme-dark .form-input:focus {
    border-color: #d97706 !important;
    box-shadow: 0 0 0 3px rgba(217,119,6,0.25) !important;
}
body.theme-dark .form-input::placeholder { color: #a8a29e !important; }

body.theme-dark .form-select {
    background-color: #44403c !important;
    border-color: #57534e !important;
    color: #e7e5e4 !important;
}
body.theme-dark .form-select:focus {
    border-color: #d97706 !important;
}

body.theme-dark .form-label { color: #d6d3d1 !important; }

/* Textos dark */
body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3 { color: #fafaf9 !important; }

body.theme-dark .text-stone-800 { color: #fafaf9 !important; }
body.theme-dark .text-stone-700 { color: #d6d3d1 !important; }
body.theme-dark .text-stone-600 { color: #a8a29e !important; }
body.theme-dark .text-stone-500 { color: #a8a29e !important; }
body.theme-dark .text-stone-400 { color: #78716c !important; }

/* Badges dark */
body.theme-dark .badge-amber { background-color: #78350f !important; color: #fcd34d !important; }
body.theme-dark .badge-green { background-color: #064e3b !important; color: #6ee7b7 !important; }
body.theme-dark .badge-blue { background-color: #1e3a5f !important; color: #7dd3fc !important; }
body.theme-dark .badge-red { background-color: #7f1d1d !important; color: #fca5a5 !important; }
body.theme-dark .badge-gray { background-color: #44403c !important; color: #a8a29e !important; }

/* Alertas dark */
body.theme-dark .bg-emerald-50 { background-color: #052e16 !important; border-color: #065f46 !important; color: #6ee7b7 !important; }
body.theme-dark .bg-red-50 { background-color: #450a0a !important; border-color: #7f1d1d !important; color: #fca5a5 !important; }
body.theme-dark .bg-amber-50 { background-color: #451a03 !important; border-color: #78350f !important; color: #fcd34d !important; }

/* Botoes dark */
body.theme-dark .btn-primary {
    background-color: #b45309 !important;
}
body.theme-dark .btn-secondary {
    background-color: #57534e !important;
}

/* Main content background */
body.theme-dark main {
    background-color: #1c1917 !important;
}

/* Divider lines */
body.theme-dark hr,
body.theme-dark .border-b { border-color: #44403c !important; }
body.theme-dark .border-t { border-color: #44403c !important; }

/* Tabs dark */
body.theme-dark .tab-btn { color: #a8a29e !important; }
body.theme-dark .tab-btn:hover { color: #e7e5e4 !important; }

/* Table header dark */
body.theme-dark thead tr.bg-stone-800 { background-color: #1c1917 !important; }

/* Inputs file dark */
body.theme-dark input[type="file"] { color: #a8a29e !important; }

/* Scrollbar dark */
body.theme-dark ::-webkit-scrollbar { width: 8px; height: 8px; }
body.theme-dark ::-webkit-scrollbar-track { background: #1c1917; }
body.theme-dark ::-webkit-scrollbar-thumb { background: #57534e; border-radius: 4px; }
body.theme-dark ::-webkit-scrollbar-thumb:hover { background: #78716c; }

/* Textarea dark */
body.theme-dark textarea.form-input {
    background-color: #44403c !important;
    border-color: #57534e !important;
    color: #e7e5e4 !important;
}

/* Table container dark */
body.theme-dark table { color: #e7e5e4 !important; }
body.theme-dark th { color: #fafaf9 !important; }
body.theme-dark td { color: #d6d3d1 !important; }
body.theme-dark thead { background-color: #1c1917 !important; }
body.theme-dark thead th { color: #fafaf9 !important; }

/* Pagination dark */
body.theme-dark .pagination a { background-color: #44403c !important; color: #d6d3d1 !important; border-color: #57534e !important; }
body.theme-dark .pagination a:hover { background-color: #57534e !important; }

/* Print - never apply dark */
@media print {
    body.theme-dark { background: #fff !important; color: #000 !important; }
    body.theme-dark .card { background: #fff !important; border-color: #ddd !important; }
}
