:root {
    --mp-primary: #2dd4bf;
    --mp-primary-dark: #14b8a6;
    --mp-sidebar-dark: #1e2a3b;
    --mp-sidebar-darker: #162032;
    --mp-text-muted: #64748b;
    --mp-border-radius: 12px;
    --mp-transition: all 0.3s ease;
    --sidebar-width: 260px;
    --topbar-height: 70px;
    --wallet-text-color: #1e293b;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #0f172a;
    --bs-body-color: #e2e8f0;
    --mp-card-bg: #1e293b;
    --mp-border-color: #334155;
    --mp-text-muted: #94a3b8;
    --mp-hover-bg: rgba(45, 212, 191, 0.1);
    --wallet-text-color: #ffffff;
}

[data-bs-theme="light"] {
    --bs-body-bg: #f1f5f9;
    --bs-body-color: #1e293b;
    --mp-card-bg: #ffffff;
    --mp-border-color: #e2e8f0;
    --mp-sidebar-dark: #1e2a3b;
    --mp-hover-bg: rgba(45, 212, 191, 0.1);
}

* {
    font-family: "Inter", sans-serif;
}

body {
    min-height: 100vh;
    transition: var(--mp-transition);
}

.sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--mp-sidebar-dark);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1040;
    flex-direction: column;
    transition: var(--mp-transition);
}

@media (min-width: 992px) {
    .sidebar {
        display: flex;
    }
}

.sidebar-header {
    height: var(--topbar-height);
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
}

.logo-mp {
    height: 30px;
    width: auto;
    max-width: none;
    object-fit: contain;
}

.sidebar-user {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--mp-primary);
    object-fit: cover;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 0.8rem;
    color: var(--mp-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav-label {
    padding: 0.5rem 1.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--mp-text-muted);
    margin-top: 0.5rem;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: #94a3b8;
    text-decoration: none;
    transition: var(--mp-transition);
    border-left: 3px solid transparent;
}

.sidebar-nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav-item.active {
    color: var(--mp-primary);
    background: rgba(45, 212, 191, 0.1);
    border-left-color: var(--mp-primary);
}

.sidebar-nav-item i {
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.6rem;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--mp-transition);
    text-decoration: none;
}

.sidebar-footer-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

.navbar-mp {
    background: var(--mp-card-bg);
    border-bottom: 1px solid var(--mp-border-color);
    height: var(--topbar-height);
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
}

.navbar-mp > .d-flex {
    height: 100%;
}

@media (min-width: 992px) {
    .navbar-mp {
        display: none;
    }
}

.navbar-brand-mp {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--bs-body-color);
    text-decoration: none;
    font-weight: 700;
}

.desktop-header {
    display: none;
    background: var(--mp-card-bg);
    border-bottom: 1px solid var(--mp-border-color);
    height: var(--topbar-height);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 1020;
}

@media (min-width: 992px) {
    .desktop-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

.desktop-header-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    margin: 0;
}

.desktop-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.main-wrapper {
    transition: var(--mp-transition);
}

@media (min-width: 992px) {
    .main-wrapper {
        margin-left: var(--sidebar-width);
    }
}

.main-content {
    padding: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .main-content {
        padding: 1.5rem 2rem;
    }
}

@media (min-width: 1200px) {
    .main-content {
        max-width: 1000px;
        padding: 2rem 3rem;
    }
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--mp-card-bg);
    border-top: 1px solid var(--mp-border-color);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem 0;
    padding-bottom: calc(0.5rem + env(safe-area-inset-bottom));
    z-index: 1030;
}

@media (min-width: 992px) {
    .bottom-nav {
        display: none;
    }
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--mp-text-muted);
    text-decoration: none;
    font-size: 0.65rem;
    transition: var(--mp-transition);
}

.bottom-nav-item i {
    font-size: 1.25rem;
    margin-bottom: 0.2rem;
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--mp-primary);
}

.btn-mp-primary {
    background: var(--mp-primary);
    color: var(--mp-sidebar-dark);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--mp-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-mp-primary:hover {
    background: var(--mp-primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

.btn-mp-outline {
    background: transparent;
    color: var(--bs-body-color);
    border: 1px solid var(--mp-border-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--mp-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-mp-outline:hover {
    border-color: var(--mp-primary);
    color: var(--mp-primary);
}

.theme-toggle,
.notification-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--mp-border-color);
    background: var(--mp-card-bg);
    color: var(--bs-body-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--mp-transition);
    position: relative;
}

.theme-toggle:hover,
.notification-toggle:hover {
    background: var(--mp-primary);
    color: #fff;
    border-color: var(--mp-primary);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--mp-border-color);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.notification-dropdown {
    width: 340px;
    max-width: calc(100vw - 2rem);
    padding: 0;
    border: 1px solid var(--mp-border-color);
    border-radius: var(--mp-border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    background: var(--mp-card-bg);
    overflow: hidden;
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--mp-border-color);
}

.notification-see-all {
    font-size: 0.85rem;
    color: var(--mp-primary);
    text-decoration: none;
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    text-decoration: none;
    color: var(--bs-body-color);
    border-bottom: 1px solid var(--mp-border-color);
    transition: var(--mp-transition);
    position: relative;
}

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

.notification-item.unread {
    background: rgba(45, 212, 191, 0.05);
}

.notification-item.unread::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--mp-primary);
}

.notification-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.notification-icon.primary {
    background: rgba(45, 212, 191, 0.15);
    color: var(--mp-primary);
}

.notification-icon.warning {
    background: rgba(251, 191, 36, 0.15);
    color: #f59e0b;
}

.notification-icon.success {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-text {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.notification-text strong {
    color: var(--mp-primary);
}

.notification-time {
    font-size: 0.75rem;
    color: var(--mp-text-muted);
}

.notification-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--mp-border-color);
}

.wallet-toggle {
    height: 40px;
    border-radius: 20px;
    border: 1px solid var(--mp-border-color);
    background: var(--mp-card-bg);
    color: var(--bs-body-color);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.85rem;
    cursor: pointer;
    transition: var(--mp-transition);
    text-decoration: none;
    white-space: nowrap;
}

.wallet-toggle:hover {
    border-color: var(--mp-primary);
    color: var(--wallet-text-color);
    background: var(--mp-hover-bg);
}

.wallet-balance {
    font-size: 0.85rem;
    font-weight: 600;
}

.wallet-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    background: var(--mp-primary);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.dropdown-menu {
    border: 1px solid var(--mp-border-color);
    border-radius: var(--mp-border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    background: var(--mp-card-bg);
}

.dropdown-item {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    color: var(--bs-body-color);
}

.dropdown-item:hover {
    background: var(--mp-hover-bg);
    color: var(--bs-body-color);
}

.dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

.mb-safe {
    margin-bottom: 80px;
}

@media (min-width: 992px) {
    .mb-safe {
        margin-bottom: 2rem;
    }
}

::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--mp-border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mp-text-muted);
}
