:root {
    --clr-accent: #F04C5C;
    --clr-accent-hover: #E03A4A;
    --clr-base: #9FA89B;
    --clr-base-dark: #808C7D;
    --clr-text-primary: #3F4A5A;
    --clr-text-secondary: #6B7280;
    --clr-text-muted: #9CA3AF;
    --clr-white-soft: #F7F8F6;
    --bg-100: #F7F8F6;
    --bg-95: #F0F2EE;
    --bg-90: #E5E8E3;
    --borda: #D1D5DB;
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 999px;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.08);
    --menu-width-collapsed: 74px;
    --menu-width-expanded: 280px;
}

[data-theme="dark"] {
    --clr-white-soft: #121418;
    --bg-100: #121418;
    --bg-95: #1A1D23;
    --bg-90: #24272F;
    --clr-text-primary: #E4E6EB;
    --clr-text-secondary: #B0B3B8;
    --clr-text-muted: #8F949E;
    --borda: #3A3D44;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.5);
}

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(63, 74, 90, 0.18) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(63, 74, 90, 0.14);
    border-radius: 10px;
    border: 3px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(63, 74, 90, 0.24);
    background-clip: content-box;
}

html,
body {
    min-height: 100%;
    background: var(--bg-100);
    color: var(--clr-text-primary);
    font-family: var(--font-secondary);
}

body.bg-gray-50,
.bg-gray-50 {
    background-color: var(--bg-100) !important;
}

h1,
h2,
h3,
h4,
.font-bold,
.font-semibold,
.font-medium,
label,
th {
    font-family: var(--font-primary);
    letter-spacing: 0;
}

h1,
h2,
h3,
.text-gray-800,
.text-gray-700 {
    color: var(--clr-text-primary) !important;
}

.text-gray-600,
.text-gray-500,
.text-gray-400 {
    color: var(--clr-text-secondary) !important;
}

.text-white,
.gradient-bg h1,
.gradient-bg p,
.gradient-red h1,
.gradient-red h2,
.gradient-red h3,
.gradient-red p,
.gradient-green h1,
.gradient-green h2,
.gradient-green h3,
.gradient-green p {
    color: #fff !important;
}

.sidebar {
    background: rgba(247, 248, 246, 0.94) !important;
    border-color: var(--bg-90) !important;
    box-shadow: var(--shadow-soft) !important;
    backdrop-filter: blur(16px);
    width: var(--menu-width-collapsed);
    z-index: 45;
    overflow: hidden;
    transition: width .48s cubic-bezier(.22, 1, .36, 1), box-shadow .42s ease, background .42s ease, transform .42s ease;
    will-change: width;
}

.sidebar:hover {
    width: var(--menu-width-expanded);
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 10px 0 34px rgba(15, 23, 42, 0.10) !important;
}

.sidebar > .p-3:first-child {
    padding: 14px 10px 18px !important;
}

.sidebar > .p-3:first-child > div {
    justify-content: center;
    min-height: 74px;
}

.sidebar > .p-3:first-child img {
    width: 42px;
    max-width: none;
    height: auto;
    transition: width .48s cubic-bezier(.22, 1, .36, 1), transform .48s cubic-bezier(.22, 1, .36, 1);
}

.sidebar:hover > .p-3:first-child > div {
    justify-content: center;
}

.sidebar:hover > .p-3:first-child img {
    width: 118px;
    transform: translateX(0);
}

.sidebar nav {
    padding: 14px 12px !important;
}

.sidebar nav a {
    border-radius: var(--radius-md) !important;
    color: var(--clr-text-secondary);
    font-family: var(--font-primary);
    font-weight: 500;
    justify-content: flex-start;
    min-height: 50px;
    padding: 0 13px !important;
    gap: 16px;
    overflow: hidden;
    white-space: nowrap;
    border-left: 0 !important;
    transition: color .28s ease, background .28s ease, box-shadow .28s ease, transform .32s cubic-bezier(.22, 1, .36, 1);
}

.sidebar nav a svg {
    width: 21px;
    height: 21px;
    flex: none;
    opacity: .72;
    transition: opacity .22s ease, color .22s ease, transform .22s ease;
}

.sidebar-label {
    min-width: 0;
    opacity: 0;
    transform: translateX(-10px);
    color: inherit;
    font-size: .92rem;
    line-height: 1;
    transition: opacity .28s ease .06s, transform .34s cubic-bezier(.22, 1, .36, 1) .04s;
}

.sidebar:hover .sidebar-label {
    opacity: 1;
    transform: translateX(0);
}

.sidebar nav a:hover {
    background: var(--bg-95) !important;
    color: var(--clr-text-primary) !important;
    transform: translateX(4px);
}

.sidebar nav a:hover svg {
    color: var(--clr-accent);
    opacity: 1;
}

.sidebar nav a.text-cace-red {
    background: rgba(240, 76, 92, 0.09) !important;
    color: var(--clr-accent) !important;
    border-left-color: transparent !important;
    box-shadow: var(--shadow-soft);
}

.sidebar nav a.text-cace-red svg {
    opacity: 1;
}

.sidebar-user-copy,
.sidebar-logout {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-8px);
    transition: opacity .18s ease, transform .22s ease, visibility .18s ease;
}

.sidebar:hover .sidebar-user-copy,
.sidebar:hover .sidebar-logout {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.sidebar > .p-3:last-child > div {
    gap: 12px;
    justify-content: flex-start;
    overflow: hidden;
}

.sidebar > .p-3:last-child .rounded-full {
    flex: 0 0 40px;
}

@media (max-width: 1024px) {
    .sidebar,
    .sidebar:hover {
        width: var(--menu-width-expanded);
    }

    .sidebar .sidebar-label,
    .sidebar .sidebar-user-copy,
    .sidebar .sidebar-logout {
        opacity: 1;
        visibility: visible;
        transform: none;
    }
}

.main-content > .bg-white:first-child {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(247, 248, 246, 0.86) !important;
    border-color: var(--bg-90) !important;
    backdrop-filter: blur(16px);
}

.main-content > .p-6 {
    background:
        radial-gradient(circle at top right, rgba(240, 76, 92, 0.06), transparent 32rem),
        linear-gradient(180deg, var(--bg-100), var(--bg-95));
    min-height: calc(100vh - 73px);
}

.bg-white {
    background-color: #fff !important;
}

[data-theme="dark"] .bg-white {
    background-color: var(--bg-95) !important;
}

.rounded-2xl {
    border-radius: var(--radius-lg) !important;
}

.rounded-xl {
    border-radius: var(--radius-md) !important;
}

.border-gray-100,
.border-gray-200,
.border-gray-300 {
    border-color: var(--borda) !important;
}

.shadow-lg,
.shadow-xl,
.shadow-2xl,
.hover\:shadow-lg:hover {
    box-shadow: var(--shadow-card) !important;
}

.bg-white.rounded-2xl,
.bg-white.rounded-xl,
.modal-overlay > .bg-white {
    box-shadow: var(--shadow-soft);
}

.gradient-red,
.bg-cace-red {
    background: linear-gradient(135deg, var(--clr-accent) 0%, var(--clr-accent-hover) 100%) !important;
}

.gradient-green,
.bg-cace-green {
    background: linear-gradient(135deg, var(--clr-base) 0%, var(--clr-base-dark) 100%) !important;
}

.text-cace-red,
.hover\:text-cace-red:hover,
.hover\:text-cace-red-dark:hover {
    color: var(--clr-accent) !important;
}

.text-cace-green {
    color: var(--clr-base-dark) !important;
}

.bg-cace-50,
.bg-cace-100 {
    background-color: var(--bg-95) !important;
}

button,
a,
input,
select,
textarea {
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

button:not(:disabled):hover,
a[class*="px-"]:hover {
    transform: translateY(-1px);
}

input,
select,
textarea {
    border-color: var(--borda) !important;
    color: var(--clr-text-primary);
    font-family: var(--font-secondary);
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--clr-accent) !important;
    box-shadow: 0 0 0 3px rgba(240, 76, 92, 0.16) !important;
    outline: none !important;
}

.focus\:ring-cace-green:focus,
.focus\:ring-green-500:focus {
    --tw-ring-color: rgba(240, 76, 92, 0.18) !important;
}

table thead {
    background: var(--bg-95) !important;
}

th {
    color: var(--clr-text-primary) !important;
}

.toast {
    border-radius: var(--radius-md) !important;
    font-family: var(--font-secondary);
}

.swal2-popup {
    background: #fff !important;
    color: var(--clr-text-primary) !important;
}

.swal2-confirm {
    background: var(--clr-accent) !important;
    border-radius: var(--radius-full) !important;
}
