/* ParamERP - Premium Enterprise Styling & Micro-Animations */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
    --brand-indigo: #4f46e5;
    --brand-indigo-light: #6366f1;
    --brand-emerald: #10b981;
    --brand-dark: #0f172a;
    --brand-card: #1e293b;
    --glass-bg: rgba(30, 41, 59, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.font-mono {
    font-family: 'JetBrains Mono', monospace;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
}

.glass-nav {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.5);
}
::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.4);
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.6);
}

/* Smooth Transitions & Micro-Animations */
.transition-all-fast {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.pulse-glow {
    box-shadow: 0 0 20px -3px rgba(99, 102, 241, 0.4);
}

.card-hover {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.card-hover:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.8);
}

/* Camera Scanner Container */
#qr-reader {
    width: 100% !important;
    border: none !important;
    border-radius: 1rem !important;
    overflow: hidden !important;
}

#qr-reader__scan_region {
    background: #000 !important;
    border-radius: 0.75rem !important;
}

#qr-reader__dashboard {
    padding: 10px !important;
    background: transparent !important;
}

#qr-reader button {
    background-color: #4f46e5 !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    cursor: pointer !important;
    margin: 4px !important;
}

/* Toast Notifications */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.toast-enter {
    animation: slideInUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Tab active indicator */
.nav-tab-active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.2) 0%, rgba(99, 102, 241, 0.1) 100%);
    border-left: 3px solid #6366f1;
    color: #ffffff;
}

/* ==============================================================
   LIGHT THEME ADAPTATION SYSTEM (☀️ Light / 🌙 Dark)
   ============================================================== */
html.theme-light,
body.theme-light {
    background-color: #f8fafc !important;
    color: #0f172a !important;
}

body.theme-light .bg-slate-950 {
    background-color: #f1f5f9 !important;
}

body.theme-light aside {
    background-color: #ffffff !important;
    border-right-color: #e2e8f0 !important;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.03) !important;
}

body.theme-light header {
    background-color: rgba(255, 255, 255, 0.96) !important;
    border-bottom-color: #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light .bg-slate-900,
body.theme-light .bg-slate-900\/90,
body.theme-light .bg-slate-900\/80,
body.theme-light .bg-slate-900\/70 {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03) !important;
}

body.theme-light .bg-slate-800,
body.theme-light .bg-slate-800\/80,
body.theme-light .bg-slate-800\/70,
body.theme-light .bg-slate-800\/60,
body.theme-light .bg-slate-800\/50,
body.theme-light .bg-slate-800\/40 {
    background-color: #f8fafc !important;
    border-color: #e2e8f0 !important;
    color: #1e293b !important;
}

/* Operational Tiles in Light Theme */
body.theme-light .group.cursor-pointer {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02) !important;
}

body.theme-light .group.cursor-pointer:hover {
    border-color: #cbd5e1 !important;
    box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.08) !important;
    background-color: #ffffff !important;
}

body.theme-light .group.cursor-pointer > .pointer-events-none {
    opacity: 0.06 !important;
}

body.theme-light .group.cursor-pointer .w-12.h-12 {
    background-color: #f1f5f9 !important;
    border-color: #e2e8f0 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

body.theme-light .group.cursor-pointer h3 {
    color: #0f172a !important;
}

body.theme-light .group.cursor-pointer:hover h3 {
    color: #4f46e5 !important;
}

body.theme-light .group.cursor-pointer p {
    color: #64748b !important;
}

body.theme-light .group.cursor-pointer .border-t {
    border-color: #f1f5f9 !important;
    color: #64748b !important;
}

body.theme-light .group.cursor-pointer:hover .border-t {
    color: #4f46e5 !important;
}

/* Borders in Light Theme */
body.theme-light .border-slate-800,
body.theme-light .border-slate-800\/80,
body.theme-light .border-slate-800\/60,
body.theme-light .border-slate-700,
body.theme-light .border-slate-700\/80,
body.theme-light .border-slate-700\/60,
body.theme-light .border-slate-700\/50,
body.theme-light .border-slate-700\/40 {
    border-color: #e2e8f0 !important;
}

body.theme-light .divide-slate-800\/60 > * + *,
body.theme-light .divide-slate-800 > * + *,
body.theme-light .divide-slate-700 > * + * {
    border-color: #f1f5f9 !important;
}

/* Form Elements in Light Theme */
body.theme-light input:not([type="checkbox"]):not([type="radio"]),
body.theme-light select,
body.theme-light textarea {
    background-color: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
}

body.theme-light input:focus,
body.theme-light select:focus,
body.theme-light textarea:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
    outline: none !important;
}

body.theme-light input::placeholder,
body.theme-light textarea::placeholder {
    color: #94a3b8 !important;
}

/* Tables in Light Theme */
body.theme-light thead,
body.theme-light thead tr {
    background-color: #f8fafc !important;
    color: #475569 !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

body.theme-light thead th {
    color: #475569 !important;
    background-color: #f8fafc !important;
}

body.theme-light tbody tr {
    background-color: #ffffff !important;
    color: #1e293b !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

body.theme-light tbody tr:hover {
    background-color: #f8fafc !important;
}

body.theme-light td {
    color: #1e293b !important;
}

/* Headings and Texts in Light Theme */
body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light h4,
body.theme-light h5 {
    color: #0f172a !important;
}

body.theme-light p.text-white,
body.theme-light span.text-white,
body.theme-light div.text-white:not(.bg-indigo-600):not(.bg-emerald-600):not(.bg-cyan-600):not(.bg-amber-600):not(.bg-red-600):not(.bg-blue-600):not(.bg-purple-600):not(.bg-slate-900) {
    color: #0f172a !important;
}

body.theme-light .text-slate-100,
body.theme-light .text-slate-200 {
    color: #1e293b !important;
}

body.theme-light .text-slate-300 {
    color: #334155 !important;
}

body.theme-light .text-slate-400 {
    color: #64748b !important;
}

body.theme-light .text-slate-500 {
    color: #64748b !important;
}

/* Navigation Tab Active in Light Theme */
body.theme-light .nav-tab-active {
    background: #eef2ff !important;
    color: #4338ca !important;
    border-left: 3px solid #4f46e5 !important;
}

/* Panels and Cards in Light Theme */
body.theme-light .glass-panel {
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

body.theme-light .card-hover:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08) !important;
    border-color: #cbd5e1 !important;
}

/* Harmonized Badge Adapters for Light Theme */
body.theme-light .bg-indigo-500\/20 {
    background-color: #e0e7ff !important;
    color: #3730a3 !important;
    border-color: #c7d2fe !important;
}

body.theme-light .bg-emerald-500\/20 {
    background-color: #d1fae5 !important;
    color: #065f46 !important;
    border-color: #a7f3d0 !important;
}

body.theme-light .bg-amber-500\/20 {
    background-color: #fef3c7 !important;
    color: #92400e !important;
    border-color: #fde68a !important;
}

body.theme-light .bg-cyan-500\/20 {
    background-color: #cffafe !important;
    color: #155e75 !important;
    border-color: #a5f3fc !important;
}

body.theme-light .bg-purple-500\/20 {
    background-color: #f3e8ff !important;
    color: #6b21a8 !important;
    border-color: #e9d5ff !important;
}

body.theme-light .bg-teal-500\/20 {
    background-color: #ccfbf1 !important;
    color: #115e59 !important;
    border-color: #99f6e4 !important;
}

body.theme-light .bg-rose-500\/20,
body.theme-light .bg-red-500\/20 {
    background-color: #ffe4e6 !important;
    color: #9f1239 !important;
    border-color: #fecdd3 !important;
}

body.theme-light .bg-blue-500\/20 {
    background-color: #dbeafe !important;
    color: #1e40af !important;
    border-color: #bfdbfe !important;
}

/* Buttons in Light Mode */
body.theme-light button.bg-slate-800 {
    background-color: #f1f5f9 !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}

body.theme-light button.bg-slate-800:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Modals in Light Mode */
body.theme-light .fixed.inset-0 .bg-slate-900 {
    background-color: #ffffff !important;
    border-color: #e2e8f0 !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

/* --- Table Horizontal Scrollbar & Interactive Row Highlight --- */
.custom-scrollbar {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
}

.custom-scrollbar::-webkit-scrollbar {
    height: 7px !important;
    width: 7px !important;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6) !important;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.45) !important;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.8) !important;
}

/* Light Theme Scrollbar */
body.theme-light .custom-scrollbar::-webkit-scrollbar-track {
    background: #e2e8f0 !important;
}

body.theme-light .custom-scrollbar::-webkit-scrollbar-thumb {
    background: #94a3b8 !important;
}

body.theme-light .custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #64748b !important;
}

/* Row Hover Highlight & Click Indicator */
tbody tr.cursor-pointer {
    cursor: pointer !important;
    transition: background-color 0.15s ease, box-shadow 0.15s ease !important;
}

tbody tr.cursor-pointer:hover {
    background-color: rgba(30, 41, 59, 0.85) !important;
    box-shadow: inset 3px 0 0 #6366f1 !important;
}

body.theme-light tbody tr.cursor-pointer:hover {
    background-color: #f1f5f9 !important;
    box-shadow: inset 3px 0 0 #4f46e5 !important;
}


