:root {
    /* BRAND */
    --primary-color: #8351e4;
    --secondary-color: #3fafd5;

    /* BUTTONS */
    --btn-primary: #8351e4;
    --btn-primary-hover: #6d3ed6;

    --secondary-btn-bg: #3fafd5;
    --secondary-btn-color: #ffffff;
    --secondary-btn-border: #3fafd5;

    /* TEXT */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --primary-text: #ffffff;

    /* BACKGROUND */
    --custom-card-bg: #ffffff;
    --card-border: #e5e7eb;
    --hover-bg: #f1f5f9;

    /* SIDEBAR */
    --side-bar-bg: #0f172a;
    --sidebar-active-color: rgba(131, 81, 228, 0.15);
    --sidebar-hover-color: rgba(63, 175, 213, 0.1);

    /* INPUTS */
    --default-btn-bg: #efeff7;
    --default-btn-color: #001f17;
    --default-btn-shadow: rgba(14, 50, 80, 0.3);

    /* ACCENTS */
    --accent: #8351e4;

    /* BORDERS */
    --border-color: #eee;
    --dt-border-radius: 8px;
    --dt-border-color: #8351e4;

    /* HEADER */
    --page-head-bg: #8351e40d;
    --brand-primary: #8351e4;
    --brand-secondary: #3fafd5;
    /* Lighter glass effect */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.12);
    --primary: #8351e4;
    --blue: #8351e4;
    /* Frappe maps primary to blue */

    /* Secondary Color: #3fafd5 */
    --secondary: #3fafd5;
    --cyan: #3fafd5;

    /* Frappe UI Specific Variables */
    --bg-blue: #8351e4;
    --text-blue: #8351e4;

    /* Optional: Button Hover States (slightly darker) */
    --primary-hover: #6d3ec9;
    --secondary-hover: #329bbd;

    --navbar-bg: #8351e40d;

    /* --surface-menu-bar: #329bbd0d; */
    --custom-card-bg: #8351e40d;

    --text-on-blue: #ffffff;
}

/* 🌙 DARK MODE */
[data-theme="dark"] {
    --primary-color: #8351e4;
    --secondary-color: #3fafd5;

    --btn-primary: #8351e4;
    --btn-primary-hover: #9b6bff;

    --secondary-btn-bg: #3fafd5;
    --secondary-btn-color: #ffffff;
    --secondary-btn-border: #3fafd5;

    --text-primary: #f1f5f9;
    --text-secondary: #cbd5f5;

    --custom-card-bg: #1e293b;
    --card-border: #334155;
    --hover-bg: #334155;

    --side-bar-bg: #020617;
    --sidebar-active-color: rgba(131, 81, 228, 0.25);
    --sidebar-hover-color: rgba(63, 175, 213, 0.15);

    --default-btn-bg: #232323;
    --default-btn-color: #e2e1e1;
    --default-btn-shadow: rgba(0, 0, 0, 0.4);

    --accent: #8351e4;

    --border-color: rgba(255, 255, 255, 0.1);
}

/* Cairo Regular */
@font-face {
    font-family: 'Cairo';
    src: url('/assets/nxvysion/fonts/Cairo-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

/* Cairo Medium */
@font-face {
    font-family: 'Cairo';
    src: url('/assets/nxvysion/fonts/Cairo-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}

/* Cairo SemiBold */
@font-face {
    font-family: 'Cairo';
    src: url('/assets/nxvysion/fonts/Cairo-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}

/* Cairo Bold */
@font-face {
    font-family: 'Cairo';
    src: url('/assets/nxvysion/fonts/Cairo-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

body {
    font-family: 'Cairo', sans-serif !important;
}

/* ACTIVE SIDEBAR */
.standard-sidebar-item.active-sidebar {
    background: var(--sidebar-active-color) !important;
    color: var(--primary-color) !important;
    font-weight: 600;
}

.body-sidebar {
    position: relative;
}

.body-sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #329bbd0d;
    pointer-events: none;
}

.page-content {
    position: relative;
}

.main-section {
    position: relative;
    min-height: 100vh;
    align-items: flex-start !important;
}

.main-section::before {
    background-image: url('/assets/nxvysion/images/logo.svg');
    background-repeat: no-repeat;
    background-position: center;
    /* background-size: 150px 150px; */
    opacity: 0.28;
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 250px;
    min-height: 250px;
    width: 400px;
    height: 400px;
}


/* PRIMARY BUTTON */
.btn.btn-primary.primary-action {
    background: var(--btn-primary) !important;
    border: none;
    border-radius: 8px;
    color: #fff !important;
}

.btn.btn-primary.primary-action:hover {
    background: var(--btn-primary-hover) !important;
}

/* DEFAULT BUTTON */
.btn.btn-default {
    border-radius: 8px;
    box-shadow: 1px 1px 2px var(--default-btn-shadow) !important;
    background-color: var(--default-btn-bg) !important;
    color: var(--default-btn-color) !important;
}

/* INPUT */
.form-control {
    border-radius: 6px;
    box-shadow: 1px 1px 2px var(--default-btn-shadow) !important;
}

.form-control:focus {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 0 1px var(--secondary-color) !important;
}

/* WIDGET */
.widget.links-widget-box {
    background: var(--custom-card-bg);
    border-radius: 12px;
    padding: 16px;
    border: 1px solid var(--card-border);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

/* HEADER */
.widget-title {
    color: var(--text-primary);
}

/* LINKS */
.link-item {
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.link-item:hover {
    background: var(--hover-bg);
}

.link-text {
    color: var(--text-secondary);
}

/* ACCENT LINE */
.widget.links-widget-box::before {
    content: "";
    display: block;
    height: 2px;
    border-radius: 6px;
    background: var(--primary-color);
    margin-bottom: 12px;
}



/* Login Screen  */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    flex-direction: row;
    min-height: 500px;
}

@media (max-width: 901px) {
    .login-side {
        display: none !important;
    }

}

.login-side {
    flex: 2;
    padding: 40px;
    font-size: 1.5em;
    background-color: var(--secondary-color);
    height: 100%;
}

.login-side {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    /* Deep dark background to make colors pop */
    padding: 2rem;
}


.glass-card {
    position: relative;
    z-index: 1;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem;
    background-color: #8351e40d;
}

.login-title {
    color: #000000;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.login-title span {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.login-desc {
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}


.login-actions {
    display: flex;
    gap: 0.5rem;
    font-size: medium;
}

.login-actions>a {
    color: var(--secondary-color);
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

/* Ensure the login-form side matches the vibe */
.login-form {
    background: #ffffff;
    padding: 3rem !important;
    border-radius: 0 24px 24px 0;
}


.login-form {
    flex: 3;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-form>* {
    width: 100%;
}