﻿:root {
    --primary: #5A4FCF;
    /* Vibrant Purple/Blue like Cashea */
    --primary-dark: #4338ca;
    --accent: #00E5FF;
    /* Cyan accent */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, sans-serif;
}

body {
    background: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Utilities / Short Classes */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.flex-c {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

.txt-c {
    text-align: center;
}

.txt-sm {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hidden {
    display: none;
}

/* Components */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-pry {
    background: var(--primary);
    color: white;
}

.btn-pry:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-sec {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.btn-link {
    background: none;
    color: var(--primary);
    padding: 0;
}

.inp-grp {
    margin-bottom: 1rem;
    text-align: left;
}

.inp-lbl {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: var(--text-main);
}

.inp {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.inp:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.hdr {
    margin-bottom: 1.5rem;
}

.hdr h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.hdr p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Additional Utilities */
.flex-row {
    display: flex;
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

.txt-main {
    color: var(--text-main);
}

.txt-xs {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Mobile Rotate Warning */
.rotate-warning {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-body);
    z-index: 9999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
}

/* Responsive Logic */
@media (max-width: 767.98px) {
    body.show-rotate .rotate-warning {
        display: flex;
    }

    body.show-rotate .app-content,
    body.show-rotate .dash-layout,
    body.show-rotate .sidebar,
    body.show-rotate .sidebar-toggle,
    body.show-rotate .bottom-nav {
        display: none !important;
    }
}

/* Dashboard SPA Styles */
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 0.5rem;
}

.avatar {
    width: 44px;
    height: 44px;
    background: #e2e8f0;
    border-radius: 50%;
    object-fit: cover;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.avatar:active {
    transform: scale(0.9);
}

.card-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.card-gradient::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.tabs-nav {
    display: inline-flex;
    gap: 0.5rem;
    background: #f1f5f9;
    padding: 0.4rem;
    border-radius: 12px;
    margin: 1.5rem 0;
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 700;
    color: var(--text-muted);
    transition: 0.3s;
    border: none;
    background: transparent;
    text-decoration: none !important;
    font-size: 0.9rem;
}

.tab-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Roadmap / Stepper */
.stepper-container {
    max-width: 600px;
    margin: 1.5rem auto 2.5rem;
}

.stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.stepper-line {
    position: absolute;
    top: 18px;
    left: 40px;
    right: 40px;
    height: 2px;
    background: #e2e8f0;
    z-index: 0;
}

.stepper-line-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #059669;
    /* Green when progressing */
    transition: width 0.5s ease;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    background: var(--bg-body);
    padding: 0 10px;
}

.step-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #e2e8f0;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 850;
    font-size: 1rem;
    margin-bottom: 0.6rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 3px solid var(--bg-body);
    /* Creates a gap effect */
}

.step-item.active .step-circle {
    background: var(--primary);
    box-shadow: 0 0 20px rgba(90, 79, 207, 0.4);
    transform: scale(1.1);
}

.step-item.completed .step-circle {
    background: #059669;
    box-shadow: 0 0 15px rgba(5, 150, 105, 0.3);
}

.step-label {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    transition: 0.3s;
}

.step-item.active .step-label {
    color: var(--primary);
}

.step-item.completed .step-label {
    color: #059669;
}

.roadmap-container {
    position: relative;
    margin: 1.5rem 0;
}

/* Level Indicator & Roadmap */
.level-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    overflow-x: auto;
    padding: 1rem 0.5rem;
    /* Reduced vertical padding */
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .level-track {
        padding: 0.5rem 0.25rem;
        gap: 0.5rem;
    }
}

.level-track::-webkit-scrollbar {
    display: none;
}

.roadmap-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: none;
    /* Only show on mobile if needed */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: 0.2s;
    font-size: 1.2rem;
    color: var(--primary);
    user-select: none;
}

.roadmap-nav-btn:active {
    background: #f8fafc;
    transform: translateY(-50%) scale(0.9);
}

.roadmap-nav-left {
    left: -10px;
}

.roadmap-nav-right {
    right: -10px;
}

@media (max-width: 767px) {
    .roadmap-nav-btn {
        display: flex;
    }
}

.roadmap-item {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
}

.roadmap-node {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: white;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.roadmap-item.active .roadmap-node {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(90, 79, 207, 0.3);
    transform: translateY(-5px) scale(1.1);
}

.roadmap-item.completed .roadmap-node {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

.roadmap-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 21px;
    left: 50%;
    width: 100%;
    height: 4px;
    background: var(--border);
    z-index: 1;
}

.roadmap-item.completed:not(:last-child)::after {
    background: #10b981;
}

.roadmap-info {
    text-align: center;
}

.roadmap-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-main);
    display: block;
    margin-bottom: 2px;
}

.roadmap-sub {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

.progress-pill {
    margin-top: 0.5rem;
    background: #f1f5f9;
    border-radius: 20px;
    height: 6px;
    width: 60px;
    overflow: hidden;
}

.progress-pill-fill {
    height: 100%;
    background: var(--primary);
    transition: width 1s ease-out;
}

.motivation-bubble {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px dashed #7dd3fc;
    padding: 1rem;
    border-radius: 16px;
    /* margin-top: 1.5rem; */
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.01);
    }

    100% {
        transform: scale(1);
    }
}

/* Dashboard Grids */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}

.item-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: 0.2s;
}

.item-card:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.alert-promo {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Profile Menu Slide-over */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

.profile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: white;
    z-index: 1001;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    /* Allow vertical scroll */
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
}

.profile-menu.active {
    right: 0;
}

.menu-header {
    margin-bottom: 2rem;
}

.menu-close {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-muted);
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.2s;
}

.menu-close:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    color: var(--text-main);
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 500;
}

.menu-item:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.menu-item span.icon {
    width: 32px;
    height: 32px;
    background: #eff6ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.menu-section-lbl {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 1.5rem 0 0.5rem 0.5rem;
}

.user-info-card {
    background: #f8fafc;
    padding: 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}

.user-info-card p {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: white;
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 0.75rem 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    border-top: 1px solid var(--border);
}

.bottom-nav a {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: 0.2s;
}

.bottom-nav a.active {
    color: var(--primary);
}

.bottom-nav a span:first-child {
    font-size: 1.4rem;
}

.bottom-nav a span:last-child {
    font-size: 0.65rem;
    font-weight: 700;
}

/* Roadmap Drawer */
.roadmap-drawer-trigger {
    display: none;
    width: 100%;
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    /* margin-bottom: 1rem; */
    transition: 0.2s;
}

.roadmap-drawer-trigger:active {
    transform: scale(0.98);
}

.roadmap-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.roadmap-overlay.active {
    display: block;
    opacity: 1;
}

.roadmap-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: white;
    z-index: 2001;
    border-top-left-radius: 24px;
    border-top-right-radius: 24px;
    padding: 2rem 1.5rem 5rem;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.1);
}

.roadmap-drawer.active {
    bottom: 0;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.drawer-close {
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .bottom-nav {
        display: flex;
    }

    .roadmap-drawer-trigger {
        display: flex;
    }

    .desktop-only-tracker {
        display: none !important;
    }
}


@media (max-width: 768px) {}

@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Dashboard Layout */
.dash-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0.75rem;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .sidebar-logo h1,
.sidebar.collapsed .sidebar-logo p,
.sidebar.collapsed .sidebar-item span:not(.icon),
.sidebar.collapsed .sidebar-submenu,
.sidebar.collapsed .sidebar-submenu-item,
.sidebar.collapsed .sidebar-footer {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    display: none !important;
}

.sidebar.collapsed .sidebar-item {
    justify-content: center;
    padding: 0.85rem;
}

.sidebar-logo {
    padding: 0 1rem;
    margin-bottom: 2.5rem;
    transition: opacity 0.2s;
    height: 50px;
}

.sidebar-logo h1 {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--primary);
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    white-space: nowrap;
}

.sidebar-item:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.sidebar-item.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(90, 79, 207, 0.3);
}

.sidebar-submenu {
    display: flex;
    flex-direction: column;
    padding-left: 2.5rem;
    gap: 0.25rem;
    margin-top: 0.25rem;
    transition: all 0.3s ease;
}

.sidebar-submenu-item {
    padding: 0.6rem 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
    white-space: nowrap;
}

.sidebar-submenu-item:hover,
.sidebar-submenu-item.active {
    background: #f1f5f9;
    color: var(--primary);
}

.sidebar-item-danger {
    color: #ef4444;
}

.sidebar-item-danger:hover {
    background: #fef2f2;
    color: #dc2626;
}

.sidebar-toggle {
    background: #f1f5f9;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: absolute;
    right: -15px;
    top: 25px;
    z-index: 1010;
    transition: transform 0.3s;
}

.sidebar.collapsed .sidebar-toggle {
    transform: rotate(180deg);
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-body);
}

.top-nav {
    height: 70px;
    background: white;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 900;
}

@media (max-width: 992px) {
    .sidebar {
        width: 80px;
        padding: 1.5rem 0.5rem;
    }

    .sidebar-logo h1,
    .sidebar-item span:not(.icon) {
        display: none;
    }

    .sidebar-item {
        justify-content: center;
        padding: 0.85rem;
    }
}

/* Profile Dropdown Styles Shared */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-dropdown .dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    border: 1px solid var(--border);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    overflow: hidden;
}

.profile-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 1.25rem 1rem;
    background: #f8fafc;
}

.dropdown-divider {
    height: 1px;
    background: var(--border);
}

.dropdown-info {
    padding: 1rem;
}

.logout-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    color: #ef4444;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
}

.logout-item:hover {
    background: #fef2f2;
    transform: translateX(3px);
}