:root {
    --accent-1: #f59e0b;
    --accent-2: #ea580c;
    --bg-warm: #f5f0eb;
    --card-bg: #ffffff;
    --text-primary: #1c1917;
    --text-secondary: #78716c;
    --input-bg: #ffffff;
    --input-border: #d6d3d1;
    --input-focus-ring: rgba(245, 158, 11, 0.3);
}
body {
    background: var(--bg-warm);
    min-height: 100vh;
}
.sidebar-scroll::-webkit-scrollbar { width: 4px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
.card-shadow { box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06); }
.card-shadow-hover { transition: box-shadow 0.2s ease; }
.card-shadow-hover:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04); }

.toggle-switch { position: relative; display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; user-select: none; }
.toggle-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.toggle-slider { position: relative; width: 2.5rem; height: 1.375rem; background: #d6d3d1; border-radius: 999px; transition: background 0.2s; flex-shrink: 0; }
.toggle-slider::after { content: ''; position: absolute; top: 0.1875rem; left: 0.1875rem; width: 1rem; height: 1rem; background: white; border-radius: 50%; transition: transform 0.2s; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.toggle-switch input:checked + .toggle-slider { background: #d97706; }
.toggle-switch input:checked + .toggle-slider::after { transform: translateX(1.125rem); }
.toggle-switch input:disabled + .toggle-slider { opacity: 0.4; cursor: not-allowed; }

.btn-primary {
    background: linear-gradient(135deg, #f59e0b, #ea580c) !important;
    transition: all 0.15s ease;
    color: white !important;
    font-weight: 500;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #ea580c, #dc2626) !important;
}
.btn-secondary {
    background: #e7e5e4 !important;
    color: #44403c !important;
    transition: all 0.15s ease;
}
.btn-secondary:hover {
    background: #d6d3d1 !important;
}
.badge-soft {
    background: rgba(249, 115, 22, 0.1);
    color: #c2410c;
}

input, select, textarea {
    transition: all 0.15s ease;
}

main .bg-gray-800:not(.inline) {
    background: var(--card-bg) !important;
    border-color: #e7e5e4 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06) !important;
}
main .bg-gray-900:not(.inline) {
    background: var(--card-bg) !important;
}

main input.bg-gray-900,
main select.bg-gray-900,
main textarea.bg-gray-900 {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
main input.bg-gray-900:focus,
main select.bg-gray-900:focus,
main textarea.bg-gray-900:focus {
    border-color: var(--accent-1) !important;
    box-shadow: 0 0 0 3px var(--input-focus-ring) !important;
}
main input, main select, main textarea {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--text-primary) !important;
}
main input:focus, main select:focus, main textarea:focus {
    border-color: var(--accent-1) !important;
    box-shadow: 0 0 0 3px var(--input-focus-ring) !important;
}

main .focus\:ring-blue-500:focus {
    --tw-ring-color: var(--accent-1) !important;
    border-color: var(--accent-1) !important;
}

main .border-gray-700, main .divide-gray-700 > *,
main .border-b.border-gray-700, main .border-t.border-gray-700 {
    border-color: #e7e5e4 !important;
}

main .text-gray-100 { color: var(--text-primary) !important; }
main .text-gray-300, main .text-gray-400 { color: var(--text-secondary) !important; }
main .text-stone-200, main .text-stone-300 { color: var(--text-primary) !important; }
main .text-stone-400, main .text-stone-500 { color: var(--text-secondary) !important; }

main .text-amber-400 { color: #d97706 !important; font-weight: 600 !important; }
main .text-green-400 { color: #059669 !important; }
main .text-blue-400 { color: #0284c7 !important; }
main .text-yellow-400 { color: #d97706 !important; }
main .text-red-400 { color: #dc2626 !important; }
main .text-indigo-400 { color: #6366f1 !important; }
main .text-purple-400 { color: #9333ea !important; }
main .text-cyan-400 { color: #0891b2 !important; }
main .text-orange-400 { color: var(--accent-2) !important; }
main .text-teal-400 { color: #0d9488 !important; }
main .text-rose-400 { color: #e11d48 !important; }
main .text-sky-400 { color: #0284c7 !important; }

main .hover\:bg-gray-750:hover { background: #f5f5f4 !important; }
main th.bg-gray-900 { background: var(--bg-warm) !important; }

main .bg-blue-600\/20 { background: #eff6ff !important; border-color: #bfdbfe !important; }
main .bg-green-600\/20 { background: #f0fdf4 !important; border-color: #bbf7d0 !important; }
main .bg-purple-600\/20 { background: #faf5ff !important; border-color: #e9d5ff !important; }
main .bg-orange-600\/20 { background: #fff7ed !important; border-color: #fed7aa !important; }
main .bg-red-900\/20 { background: #fef2f2 !important; }

main .bg-red-900\/50 { background: #fef2f2 !important; border-color: #fecaca !important; }
main .bg-green-900\/50 { background: #f0fdf4 !important; border-color: #bbf7d0 !important; }
main .bg-blue-900\/50 { background: #eff6ff !important; border-color: #bfdbfe !important; }

main .bg-green-600:not(.badge-soft):not([class*="/"]):not(thead):not(tfoot):not(th):not(td) {
    background: linear-gradient(135deg, #f59e0b, #ea580c) !important;
    color: white !important;
}
main .hover\:bg-green-700:hover {
    background: linear-gradient(135deg, #ea580c, #dc2626) !important;
}
main .hover\:bg-green-600:hover,
main .hover\:bg-green-500:hover {
    background: linear-gradient(135deg, #ea580c, #dc2626) !important;
}

main .bg-blue-600:not(.badge-soft):not([class*="/"]):not(thead):not(tfoot):not(th):not(td) {
    background: linear-gradient(135deg, #f59e0b, #ea580c) !important;
    color: white !important;
}
main .hover\:bg-blue-700:hover,
main .hover\:bg-blue-600:hover,
main .hover\:bg-blue-500:hover {
    background: linear-gradient(135deg, #ea580c, #dc2626) !important;
}

main .bg-gray-700:not(.badge-soft):not([class*="/"]):not(thead):not(tfoot):not(th),
main .bg-gray-600:not(.badge-soft):not([class*="/"]):not(thead):not(tfoot):not(th),
main a.bg-gray-700 {
    background: #fff7ed !important;
    color: #9a3412 !important;
    border: 1px solid #fed7aa !important;
}
main .hover\:bg-gray-600:hover,
main .hover\:bg-gray-500:hover,
main a.bg-gray-700:hover {
    background: #ffedd5 !important;
    color: #7c2d12 !important;
    border-color: #fdba74 !important;
}

main .bg-red-600:not(.badge-soft):not([class*="/"]) {
    background: #dc2626 !important;
    color: white !important;
}
main .hover\:bg-red-700:hover,
main .hover\:bg-red-500:hover {
    background: #b91c1c !important;
}

main a.pag-link {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.15s ease;
}
main a.pag-link:hover {
    background: #ffedd5;
    border-color: #fdba74;
}
main span.pag-current {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    color: white;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}
main span.pag-disabled {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    background: #f5f5f4;
    color: #a8a29e;
    border: 1px solid #e7e5e4;
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

main th {
    color: var(--text-secondary) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

main label {
    color: #57534e !important;
    font-weight: 500 !important;
}

.required-indicator { color: #dc2626; margin-left: 2px; font-weight: bold; }

#help-body h3 { font-weight: 600; color: #44403c; font-size: 0.9rem; margin-bottom: 0.25rem; }
#help-body p { color: #78716c; line-height: 1.5; }
#help-body .help-item { padding: 0.75rem; background: #fafaf9; border-radius: 0.5rem; border: 1px solid #f5f5f4; }
kbd { border: 1px solid #d6d3d1; background: #f5f5f4; border-radius: 3px; padding: 1px 5px; font-family: monospace; font-size: 0.75rem; }
.spinner { display: inline-block; width: 1.25rem; height: 1.25rem; border: 2px solid #e7e5e4; border-top-color: #d97706; border-radius: 50%; animation: spin 0.6s linear infinite; }
.spinner-lg { width: 2rem; height: 2rem; border-width: 3px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideInRight { from { opacity: 0; transform: translateX(100%); } to { opacity: 1; transform: translateX(0); } }
@keyframes slideOutRight { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(100%); } }
@keyframes pulse-subtle { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.page-fade { animation: fadeIn 0.25s ease-out; }
.confirm-modal { animation: fadeIn 0.2s ease-out; }
.confirm-modal-backdrop { animation: fadeIn 0.15s ease-out; }
.toast { animation: slideInRight 0.3s ease-out; }
.toast.removing { animation: slideOutRight 0.3s ease-in forwards; }
.btn-loading { position: relative; pointer-events: none; opacity: 0.7; }
.btn-loading .btn-text { visibility: hidden; }
.btn-loading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 1rem; height: 1rem; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.6s linear infinite; }
.btn-primary:active, .btn-secondary:active, .pag-link:active { transform: scale(0.97); }
.btn-primary, .btn-secondary, .pag-link { transition: all 0.15s ease, transform 0.1s ease; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
