/* ============================================================== 
   Borex-Inspired Admin Layout (Custom Implementation)
   ============================================================== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --bs-body-bg: #f8f9fa;
    --sidebar-width: 250px;
    --header-height: 70px;
    --primary-color: #3b76e1;
    --text-color: #495057;
    --sidebar-bg: #ffffff;
    --header-bg: #ffffff;
}

body {
    background-color: var(--bs-body-bg);
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Outfit', sans-serif;
}

a {
    text-decoration: none;
}

/* --- Layout Wrapper --- */
#layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* --- Header (Topbar) --- */
#page-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: var(--sidebar-width);
    z-index: 1002;
    background-color: var(--header-bg);
    box-shadow: 0 2px 4px rgba(15, 34, 58, 0.03);
    /* Subtle shadow for header */
    height: var(--header-height);
    transition: all 0.2s;
}

.header-profile-user {
    height: 36px;
    width: 36px;
    background-color: #f3f3f9;
    padding: 3px;
    border: 1px solid #eff2f7;
    object-fit: cover;
}

.noti-icon {
    font-size: 18px;
    /* Reduced from 22px */
    color: #555b6d;
    position: relative;
    padding: 0 10px;
}

.noti-icon .badge {
    position: absolute;
    top: 10px;
    right: 4px;
}

.dropdown-menu-lg {
    width: 300px;
    /* Slightly narrower */
}

.notification-item h6 {
    font-size: 13px !important;
    font-weight: 600;
}

.notification-item .text-muted p {
    font-size: 11.5px !important;
    line-height: 1.5;
}

.notification-item {
    transition: all 0.2s;
}

.notification-item:hover {
    background-color: #f3f3f9;
}

.avatar-xs {
    height: 32px;
    width: 32px;
}

.avatar-xs .avatar-title {
    font-size: 14px;
}

.navbar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    height: var(--header-height);
    padding: 0 1.5rem;
}

.header-item {
    height: var(--header-height);
    box-shadow: none !important;
    color: #555b6d;
    border: 0;
    border-radius: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-item:hover {
    color: var(--primary-color);
    background-color: #f8f9fa;
}

/* --- Sidebar --- */
.vertical-menu {
    width: var(--sidebar-width);
    z-index: 1001;
    background: var(--sidebar-bg);
    bottom: 0;
    margin-top: 0;
    position: fixed;
    top: 0;
    box-shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, 0.03);
    border-right: 1px solid #eff2f7;
    transition: all 0.2s;
}

.navbar-brand-box {
    padding: 0 1.5rem;
    text-align: center;
    width: 250px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    /* Space between logo and menu btn */
    border-bottom: 1px solid #f6f6f6;
    transition: all 0.2s;
}

.vertical-menu-btn {
    border: none;
    background: transparent;
    color: #555b6d;
    transition: all 0.2s;
}

.vertical-menu-btn:hover {
    color: var(--primary-color);
}

/* Sidebar Menu */
#sidebar-menu {
    padding: 10px 0 30px 0;
}

.metismenu {
    margin: 0;
    padding: 0;
}

.metismenu li {
    display: block;
    width: 100%;
}

.menu-title {
    padding: 12px 20px;
    letter-spacing: .05em;
    pointer-events: none;
    cursor: default;
    font-size: 11px;
    text-transform: uppercase;
    color: #74788d;
    font-weight: 600;
}

#sidebar-menu ul li a {
    display: flex;
    padding: 0.7rem 1.5rem;
    color: #545a6d;
    /* Default text color */
    position: relative;
    font-size: 14.5px;
    transition: all .4s;
    align-items: center;
}

#sidebar-menu ul li a i {
    display: inline-block;
    min-width: 1.5rem;
    padding-bottom: .125em;
    font-size: 1.1rem;
    line-height: 1.40625rem;
    vertical-align: middle;
    color: #74788d;
    transition: all .4s;
    margin-right: 5px;
}

#sidebar-menu ul li a:hover {
    color: #383c40;
    background-color: #f3f5f9;
}

/* Active State */
#sidebar-menu ul li.mm-active>a {
    color: var(--primary-color);
    background-color: transparent;
    /* Remove background, use indicator */
    font-weight: 700;
}

#sidebar-menu ul li.mm-active>a:before {
    content: "";
    height: 20px;
    width: 3px;
    background-color: var(--primary-color);
    position: absolute;
    left: 0;
    border-radius: 0 4px 4px 0;
}

#sidebar-menu ul li.mm-active>a i {
    color: var(--primary-color);
}

/* Collapsible Arrow */
.has-arrow:after {
    content: "\F282";
    /* Bootstrap Icon Chevron Down */
    font-family: 'bootstrap-icons';
    display: block;
    float: right;
    transition: transform 0.2s;
    font-size: 0.8rem;
    margin-left: auto;
}

.mm-active>.has-arrow:after {
    transform: rotate(180deg);
}

/* Submenu */
.sub-menu {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease-out;
    padding-left: 0;
    list-style: none;
    background-color: #fff;
}

.sub-menu li a {
    padding: 0.5rem 1.5rem 0.5rem 3.5rem !important;
    /* Indent sub items */
    font-size: 13.5px !important;
    color: #74788d !important;
}

.sub-menu li a:hover {
    color: var(--primary-color) !important;
}

/* --- Main Content --- */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--header-height);
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--header-height));
    width: calc(100% - var(--sidebar-width));
    position: relative;
}

.page-content {
    padding: 1.5rem 1.5rem;
    flex: 1 0 auto;
}

/* --- Cards --- */
.borex-card {
    border: none;
    box-shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, 0.03);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    background-color: #fff;
    /* Removed translate-y hover to reduce 'busy' feel */
}

.borex-card:hover {
    box-shadow: 0 0.5rem 1rem rgba(18, 38, 63, 0.07);
}

.avatar-sm {
    height: 3rem;
    width: 3rem;
}

.avatar-title {
    align-items: center;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    font-weight: 500;
    height: 100%;
    justify-content: center;
    width: 100%;
}

/* --- Footer --- */
.footer {
    padding: 0 1.5rem;
    width: 100%;
    height: 60px;
    background-color: #fff;
    border-top: 1px solid #eff2f7;
    display: flex;
    align-items: center;
    color: #74788d;
    font-size: 13px;
    margin-top: auto;
}

/* --- Accordion Custom Fixes --- */
.accordion-button:focus {
    box-shadow: none !important;
    border-color: rgba(0, 0, 0, .125) !important;
}

.accordion-button:not(.collapsed) {
    color: var(--primary-color);
    background-color: #fff !important;
    box-shadow: none !important;
}

/* --- Collapsed Sidebar State --- */
body.vertical-collpsed .vertical-menu {
    width: 70px;
}

body.vertical-collpsed .main-content {
    margin-left: 70px;
    width: calc(100% - 70px);
}



body.vertical-collpsed #page-topbar {
    left: 70px;
}

/* body.vertical-collpsed .footer { left: 70px; } */
/* Removed redundant absolute offset */

/* Hide text and titles in collapsed mode */
body.vertical-collpsed .vertical-menu .metismenu span,
body.vertical-collpsed .vertical-menu .menu-title,
body.vertical-collpsed .vertical-menu .sub-menu {
    display: none !important;
}

body.vertical-collpsed .vertical-menu .metismenu i {
    margin-right: 0;
    display: block;
    text-align: center;
    font-size: 1.5rem;
    width: 100%;
}

body.vertical-collpsed .vertical-menu .metismenu a {
    padding: 15px 0;
    justify-content: center;
}

body.vertical-collpsed .navbar-brand-box {
    width: 70px;
    padding: 0;
    justify-content: center;
}

body.vertical-collpsed .navbar-brand-box .vertical-menu-btn {
    display: block;
    width: 100%;
    color: var(--primary-color);
    font-size: 1.2rem;
}

body.vertical-collpsed .navbar-brand-box .vertical-menu-btn:hover {
    transform: scale(1.1);
}

body.vertical-collpsed .navbar-brand-box .logo-sm {
    display: none !important;
}

body.vertical-collpsed .navbar-brand-box .logo-lg {
    display: none;
}

body.vertical-collpsed .navbar-brand-box .logo-sm {
    display: block !important;
}

body.vertical-collpsed .has-arrow:after {
    display: none !important;
}

/* Logo Sizing */
.logo-sm {
    display: none;
    /* Hidden by default */
}

/* Mobile Responsive Adjustments */
@media (max-width: 992px) {
    #page-topbar {
        left: 0;
    }

    .vertical-menu {
        display: none;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    /* Mobile Toggle Active */
    body.sidebar-enable .vertical-menu {
        display: block;
        width: 250px;
        /* Full width on mobile when open */
    }


}

/* ========================================================================
   REXVU PREMIUM BUTTONS & UTILITIES
   ======================================================================== */

.btn {
    border-radius: 10px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease-in-out !important;
    padding: 0.6rem 1.25rem !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(91, 115, 232, 0.2) !important;
}

.btn-primary:hover {
    background-color: #4e63d0 !important;
    border-color: #4e63d0 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(91, 115, 232, 0.3) !important;
}

.btn-soft-primary {
    background-color: rgba(91, 115, 232, 0.1) !important;
    color: var(--primary-color) !important;
    border: none !important;
}

.btn-soft-primary:hover {
    background-color: rgba(91, 115, 232, 0.2) !important;
    color: var(--primary-color) !important;
}

.btn-soft-danger {
    background-color: rgba(244, 102, 102, 0.1) !important;
    color: #f46666 !important;
    border: none !important;
}

.btn-soft-danger:hover {
    background-color: rgba(244, 102, 102, 0.2) !important;
    color: #f46666 !important;
}

.btn-white {
    background-color: #fff !important;
    border: 1px solid #eff2f7 !important;
    color: #495057 !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .04) !important;
}

.btn-white:hover {
    background-color: #f8f9fa !important;
    border-color: #e2e5e8 !important;
}

/* Sizing & Weight Utilities */
.btn-lg {
    padding: 0.85rem 1.75rem !important;
    font-size: 1.1rem !important;
    border-radius: 12px !important;
}

.btn-sm {
    padding: 0.35rem 0.85rem !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.font-size-11 {
    font-size: 11px !important;
}

.font-size-12 {
    font-size: 12px !important;
}

.font-size-13 {
    font-size: 13px !important;
}

.font-size-14 {
    font-size: 14px !important;
}

.font-size-15 {
    font-size: 15px !important;
}

.font-size-16 {
    font-size: 16px !important;
}

.font-size-18 {
    font-size: 18px !important;
}

/* Badge Subtles */
.bg-primary-subtle {
    background-color: rgba(91, 115, 232, 0.1) !important;
    color: var(--primary-color) !important;
}

.bg-danger-subtle {
    background-color: rgba(244, 102, 102, 0.1) !important;
    color: #f46666 !important;
}

.bg-success-subtle {
    background-color: rgba(52, 195, 143, 0.1) !important;
    color: #34c38f !important;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .navbar {
        background-color: white !important;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
    }

    .hero-section {
        padding-top: 120px !important;
    }

    .navbar-collapse {
        background: white;
        margin-top: 15px;
        padding: 20px;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    /* Admin Specific Mobile Fixes */
    #page-topbar {
        left: 0 !important;
    }

    .navbar-header {
        padding: 0 10px !important;
    }

    /* Force show text when sidebar is enabled on mobile, overriding collapsed rules */
    body.sidebar-enable .vertical-menu .metismenu span,
    body.sidebar-enable .vertical-menu .menu-title,
    body.sidebar-enable .vertical-menu .sub-menu {
        display: block !important;
    }

    body.sidebar-enable .vertical-menu {
        width: 250px !important;
        display: block !important;
        z-index: 1005;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.2) !important;
    }

    /* Show title/breadcrumb context even on small screens with better fit */
    .breadcrumb {
        font-size: 11px !important;
        white-space: nowrap;
        /* Avoid wrapping that breaks header */
    }

    .breadcrumb-item+.breadcrumb-item::before {
        padding-right: 0.2rem !important;
        padding-left: 0.2rem !important;
    }

    /* Chart / Card Mobile Tuning */
    .card-body {
        padding: 1.25rem !important;
    }

    .card-title {
        font-size: 15px !important;
        margin-bottom: 1.25rem !important;
        text-align: center;
    }

    /* Fix chart container center alignment on mobile */
    canvas {
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }

    /* Ensure pie/donut charts are centered */
    div[style*="height"] {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* ========================================================================
   REXVU HOME PREMIUM STYLES (index.html)
   ======================================================================== */

:root {
    --rexvu-gradient-primary: linear-gradient(135deg, #3b76e1 0%, #7c3aed 100%);
    --rexvu-glass-bg: rgba(255, 255, 255, 0.7);
    --rexvu-glass-border: rgba(255, 255, 255, 0.4);
}

.text-gradient {
    background: var(--rexvu-gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-section {
    background: radial-gradient(circle at top right, rgba(124, 58, 237, 0.05), transparent),
        radial-gradient(circle at bottom left, rgba(59, 118, 225, 0.05), transparent);
}

.glass-card {
    background: var(--rexvu-glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--rexvu-glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px) rotate(-2deg);
    }

    50% {
        transform: translateY(-20px) rotate(1deg);
    }

    100% {
        transform: translateY(0px) rotate(-2deg);
    }
}

.animate-float-reverse {
    animation: floatReverse 5s ease-in-out infinite;
}

@keyframes floatReverse {
    0% {
        transform: translateY(0px) translateX(0px);
    }

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

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

.challenge-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #fff;
    cursor: pointer;
}

.challenge-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(59, 118, 225, 0.12);
    border-color: rgba(59, 118, 225, 0.2);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--rexvu-gradient-primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.feature-pill {
    background: rgba(59, 118, 225, 0.05);
    border: 1px solid rgba(59, 118, 225, 0.1);
    color: var(--primary-color);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Custom Cursor Flare or Decoration */
.blob-decoration {
    position: absolute;
    width: 300px;
    height: 300px;
    background: var(--rexvu-gradient-primary);
    filter: blur(80px);
    opacity: 0.1;
    z-index: -1;
    border-radius: 50%;
}

/* ========================================================================
   REXVU AUTH STYLES (login.html, signup.html)
   ======================================================================== */

.auth-bg {
    background: radial-gradient(circle at top left, rgba(124, 58, 237, 0.08), transparent),
        radial-gradient(circle at bottom right, rgba(59, 118, 225, 0.08), transparent);
    min-height: 100vh;
}

.auth-card {
    border-radius: 24px;
    border: 1px solid var(--rexvu-glass-border);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
}

.social-btn {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 12px;
    transition: all 0.2s;
    border: 1px solid #eff2f7;
    background: #fff;
    width: 100%;
}

.social-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.btn-google {
    color: #444;
}

.btn-kakao {
    background-color: #FEE500 !important;
    color: #3C1E1E !important;
    border-color: #FEE500 !important;
}

.btn-naver {
    background-color: #03C75A !important;
    color: #fff !important;
    border-color: #03C75A !important;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #adb5bd;
    font-size: 12px;
    font-weight: 600;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #eff2f7;
}

.auth-divider:not(:empty)::before {
    margin-right: 1.5rem;
}

.auth-divider:not(:empty)::after {
    margin-left: 1.5rem;
}

.form-control-lg {
    border-radius: 12px !important;
    font-size: 15px !important;
    padding: 0.75rem 1rem !important;
    border-color: #eff2f7 !important;
}

.form-control-lg:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 4px rgba(59, 118, 225, 0.1) !important;
}