:root {
    --brand-primary: #EF305E;
    --brand-secondary: #0D2451;
    --brand-light: #F4F4F4;
    --brand-dark: #071530;
    --brand-gradient: linear-gradient(135deg, #EF305E 0%, #D11A46 100%);
    --brand-surface: rgba(255, 255, 255, 0.95);

    /* Anti-Gravity Tokens */
    --ag-glass: rgba(255, 255, 255, 0.7);
    --ag-glass-border: rgba(255, 255, 255, 0.3);
    --ag-blur: 15px;
    --ag-shadow-deep: 0 15px 45px rgba(13, 36, 81, 0.1);
    --ag-shadow-glow: 0 0 20px rgba(239, 48, 94, 0.2);
    --ag-radius-lg: 24px;
    --ag-radius-xl: 32px;
}

.bg-brand-primary {
    background-color: var(--brand-primary) !important;
}

.bg-brand-secondary {
    background-color: var(--brand-secondary) !important;
}

.text-brand-primary {
    color: var(--brand-primary) !important;
}

.text-brand-secondary {
    color: var(--brand-secondary) !important;
}

/* Global brand overrides */
.btn-primary {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #ffffff !important;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #D11A46 !important;
    border-color: #D11A46 !important;
    box-shadow: 0 4px 12px rgba(239, 48, 94, 0.3);
}

.text-primary {
    color: var(--brand-primary) !important;
}

.bg-primary {
    background-color: var(--brand-primary) !important;
}

/* Auth Pages Style */
.auth-bg {
    background: var(--brand-secondary);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.auth-bg::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(239, 48, 94, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    border-radius: 50%;
}

.auth-bg::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(239, 48, 94, 0.1) 0%, transparent 70%);
    bottom: -100px;
    left: -100px;
    border-radius: 50%;
}

.auth-card {
    background: var(--brand-surface);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    width: 100%;
    max-width: 1000px;
    display: flex;
    z-index: 1;
}

.auth-illustration {
    flex: 1;
    background: var(--brand-gradient);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-illustration::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2v-4h4v-2h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2v-4h4v-2H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.auth-illustration h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.auth-illustration p {
    font-size: 1.1rem;
    opacity: 0.9;
    text-align: center;
    max-width: 300px;
    line-height: 1.6;
    position: relative;
}

.auth-form-container {
    flex: 1;
    padding: 60px;
    background: white;
}

.auth-logo {
    text-align: center;
    margin-bottom: 40px;
}

.auth-logo img {
    height: 50px;
}

.form-label {
    font-weight: 600;
    color: var(--brand-secondary);
    margin-bottom: 8px;
}

.form-control-solid {
    background-color: #f5f8fa !important;
    border-color: #f5f8fa !important;
    color: #181c32 !important;
    transition: all 0.3s ease;
    border-radius: 12px !important;
    padding: 12px 16px !important;
}

.form-control-solid:focus {
    background-color: #eff2f5 !important;
    border-color: var(--brand-primary) !important;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    color: #7e8299;
}

.login-footer a {
    color: var(--brand-primary);
    font-weight: 700;
}

/* Global Component Overrides */
.card {
    border-radius: var(--ag-radius-lg) !important;
    border: none !important;
    box-shadow: var(--ag-shadow-deep) !important;
    background: white !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 50px rgba(13, 36, 81, 0.08) !important;
}

.card .card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    background-color: transparent !important;
    padding: 1.5rem 2rem !important;
}

/* Premium Table Styles */
.table.table-row-dashed {
    border-collapse: separate !important;
    border-spacing: 0 8px !important;
}

.table thead th {
    background: rgba(13, 36, 81, 0.03) !important;
    color: var(--brand-secondary) !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    font-size: 0.75rem !important;
    letter-spacing: 0.08em;
    padding: 1.25rem 1.5rem !important;
    border: none !important;
    border-top: 1px solid rgba(13, 36, 81, 0.05) !important;
    border-bottom: 1px solid rgba(13, 36, 81, 0.05) !important;
}

.table thead th:first-child {
    border-radius: 12px 0 0 12px !important;
    border-left: 1px solid rgba(13, 36, 81, 0.05) !important;
}

.table thead th:last-child {
    border-radius: 0 12px 12px 0 !important;
    border-right: 1px solid rgba(13, 36, 81, 0.05) !important;
}

.table tbody tr {
    transition: all 0.2s ease;
    background: white;
}

.table tbody tr:hover {
    background-color: rgba(239, 48, 94, 0.02) !important;
    transform: scale(1.002);
}

.table tbody td {
    padding: 1.25rem 1.5rem !important;
    border-bottom: 1px solid #f1f1f1 !important;
    vertical-align: middle !important;
}

/* Search & Input Refinement */
.form-control-solid,
.form-select-solid {
    background-color: #f8f9fa !important;
    border: 1px solid #f8f9fa !important;
    color: var(--brand-secondary) !important;
    font-weight: 500 !important;
    border-radius: 14px !important;
    padding: 0.75rem 1.25rem !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.form-control-solid:focus,
.form-select-solid:focus {
    background-color: #ffffff !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 4px rgba(239, 48, 94, 0.1) !important;
}

/* Premium Pagination */
.pagination {
    gap: 8px;
}

.pagination .page-item .page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px !important;
    border: 1px solid #f1f1f1 !important;
    color: var(--brand-secondary);
    font-weight: 700;
    transition: all 0.3s ease;
    margin: 0 !important;
}

.pagination .page-item.active .page-link {
    background: var(--brand-gradient) !important;
    border-color: transparent !important;
    color: white !important;
    box-shadow: var(--ag-shadow-glow) !important;
}

.pagination .page-item:hover:not(.active) .page-link {
    background-color: #f8f9fa !important;
    border-color: var(--brand-primary) !important;
    color: var(--brand-primary);
}

.bg-body {
    background-color: #F6F8FA !important;
}

/* Anti-Gravity Premium Styles */
.ag-glass {
    background: var(--ag-glass) !important;
    backdrop-filter: blur(var(--ag-blur)) !important;
    -webkit-backdrop-filter: blur(var(--ag-blur)) !important;
    border: 1px solid var(--ag-glass-border) !important;
}

.ag-shadow {
    box-shadow: var(--ag-shadow-deep) !important;
}

.ag-floating {
    animation: ag-float 3s ease-in-out infinite;
}

@keyframes ag-float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

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

.ag-card {
    background: white;
    border-radius: var(--ag-radius-lg);
    box-shadow: var(--ag-shadow-deep);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.ag-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px rgba(13, 36, 81, 0.15);
}

.ag-icon-box {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ag-card:hover .ag-icon-box {
    transform: rotate(-10deg) scale(1.1);
}

.chart-container {
    min-height: 350px;
    padding: 1.5rem;
}

.ag-hero {
    background: var(--brand-secondary);
    border-radius: var(--ag-radius-xl);
    padding: 3rem;
    color: white;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.ag-hero::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(239, 48, 94, 0.2) 0%, transparent 70%);
}

/* Sidebar & Header Refinement */
#kt_aside {
    background-color: var(--brand-secondary) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05) !important;
}

#kt_aside .menu-item .menu-link.active {
    background-color: rgba(239, 48, 94, 0.1) !important;
    color: var(--brand-primary) !important;
}

#kt_header {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02) !important;
}

.aside-logo {
    padding: 2rem !important;
    background: transparent !important;
}

@media (max-width: 991px) {
    .auth-illustration {
        display: none;
    }

    .auth-card {
        max-width: 500px;
    }
}

/* Search Container Refinement */
.bg-search {
    background: white !important;
    border-radius: var(--ag-radius-lg) !important;
    padding: 2rem !important;
    margin-bottom: 2rem !important;
    box-shadow: var(--ag-shadow-deep) !important;
    border: 1px solid rgba(0, 0, 0, 0.02) !important;
}

/* Button Refinements */
.btn-light {
    background-color: #f8f9fa !important;
    border: 1px solid #f1f1f1 !important;
    border-radius: 12px !important;
    font-weight: 600 !important;
}

.btn-light:hover {
    background-color: #f1f1f1 !important;
    color: var(--brand-secondary) !important;
}

/* Scrollbar Refinement */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #e1e3ea;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d1d3e0;
}