/* ─────────────────────────────────────────────────────────────
   Viventa.Theme.Dashboard — Theme.css
   Figma Foundations & UI Kit Specification Integration
   ───────────────────────────────────────────────────────────── */

@import url('https://cdn.jsdelivr.net/npm/remixicon@4.2.0/fonts/remixicon.css');

/* ── Custom Brand Fonts (Local + System Fallbacks) ── */
@font-face {
    font-family: 'LT Wave Bold';
    src: local('LT Wave Bold'), local('LTWave-Bold');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'Pangram Sans';
    src: local('Pangram Sans'), local('PangramSans-Regular');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Pangram Sans';
    src: local('Pangram Sans Bold'), local('PangramSans-Bold');
    font-weight: 700;
    font-style: normal;
}

:root {
    /* ── Primary Colors ── */
    --token-colors-magenta: #E60064;
    --token-colors-magenta-dark: #C40055;
    --token-colors-navy: #323755;
    --token-colors-navy-dark: #2A2F47;
    --token-colors-white: #FFFFFF;
    --token-colors-gray-bg: #F5F7FA;

    /* ── Secondary Colors ── */
    --token-colors-purple: #7D96FF;
    --token-colors-mist: #00E6C8;
    --token-colors-yellow: #FFEA39;
    --token-colors-pink: #FFA5C8;
    --token-colors-light-green: #92F4E6;
    --token-colors-gray-mid: #707282;

    /* ── Text Colors ── */
    --token-colors-text-primary: #323755;
    --token-colors-text-secondary: #6A7282;
    --token-colors-text-tertiary: #99A1AF;
    --token-colors-text-dark: #101828;
    --token-colors-text-muted: #4A5565;

    /* ── Border Colors ── */
    --token-colors-border-default: #E5E7EB;
    --token-colors-border-light: #F3F4F6;

    /* ── Gradients ── */
    --token-gradient-brand: linear-gradient(169deg, #E60064, #C40055);
    --token-gradient-card: linear-gradient(150deg, #F5F7FA, #FFFFFF);

    /* ── Fonts ── */
    --font-brand-headers: 'LT Wave Bold', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-brand-body: 'Pangram Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

/* ── Global Container Reset ── */
.viventa-dashboard-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-color: var(--token-colors-gray-bg);
    font-family: var(--font-brand-body);
    box-sizing: border-box;
}

.viventa-dashboard-container *,
.viventa-dashboard-container *::before,
.viventa-dashboard-container *::after {
    box-sizing: border-box;
}

/* ── Sidebar (Barra Lateral) ── */
.viventa-sidebar {
    width: 260px;
    background-color: var(--token-colors-white);
    border-right: 1px solid var(--token-colors-border-light);
    display: flex;
    flex-direction: column;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    z-index: 100;
    box-shadow: 2px 0 12px rgba(50, 55, 85, 0.03);
}

.viventa-sidebar.collapsed {
    width: 80px;
}

.viventa-logo-section {
    height: 70px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--token-colors-border-light);
}

.viventa-logo-section img {
    height: 30px;
    transition: opacity 0.15s ease, width 0.15s ease;
}

.viventa-sidebar.collapsed .viventa-logo-section img {
    opacity: 0;
    width: 0;
    pointer-events: none;
}

.menu-toggle {
    background: transparent;
    border: none;
    color: var(--token-colors-text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.menu-toggle:hover {
    background-color: var(--token-colors-gray-bg);
    color: var(--token-colors-magenta);
}

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

/* ── Navigation List ── */
.viventa-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

/* Custom Scrollbar for Sidebar */
.viventa-nav::-webkit-scrollbar {
    width: 5px;
}
.viventa-nav::-webkit-scrollbar-track {
    background: transparent;
}
.viventa-nav::-webkit-scrollbar-thumb {
    background: var(--token-colors-border-default);
    border-radius: 99px;
}

.viventa-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.viventa-nav-item {
    margin-bottom: 2px;
}

.viventa-nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--token-colors-text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
    border-left: 3px solid transparent;
}

.viventa-nav-link:hover {
    background-color: var(--token-colors-gray-bg);
    color: var(--token-colors-text-dark);
}

.viventa-nav-link.active {
    background-color: rgba(230, 0, 100, 0.06);
    color: var(--token-colors-magenta);
    border-left-color: var(--token-colors-magenta);
    font-weight: 600;
}

.viventa-nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    font-size: 18px;
    flex-shrink: 0;
}

.viventa-sidebar.collapsed .viventa-nav-icon {
    margin-right: 0;
    margin: 0 auto;
}

.viventa-nav-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s;
}

.viventa-sidebar.collapsed .viventa-nav-text {
    opacity: 0;
    display: none;
}

.viventa-nav-arrow {
    font-size: 11px;
    transition: transform 0.25s ease;
    color: var(--token-colors-text-tertiary);
}

.viventa-sidebar.collapsed .viventa-nav-arrow {
    display: none;
}

.viventa-nav-item.expanded > .viventa-nav-link .viventa-nav-arrow {
    transform: rotate(180deg);
}

/* ── Submenus ── */
.viventa-subnav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background-color: var(--token-colors-gray-bg);
    overflow: hidden;
}

.viventa-subnav-link {
    display: block;
    padding: 10px 20px 10px 58px;
    color: var(--token-colors-text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.15s ease, background-color 0.15s ease;
    white-space: nowrap;
}

.viventa-subnav-link:hover {
    color: var(--token-colors-text-dark);
    background-color: var(--token-colors-border-light);
}

.viventa-subnav-link.active {
    color: var(--token-colors-magenta);
    font-weight: 600;
}

.viventa-sidebar.collapsed .viventa-subnav-list {
    display: none !important;
}

/* ── Sidebar Footer (User panel) ── */
.viventa-user-footer {
    padding: 20px;
    border-top: 1px solid var(--token-colors-border-light);
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 14px;
}

.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--token-gradient-brand);
    color: var(--token-colors-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-brand-headers);
    font-weight: 800;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(230, 0, 100, 0.25);
}

.user-details {
    margin-left: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.viventa-sidebar.collapsed .user-details {
    display: none;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--token-colors-text-primary);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.user-role {
    font-size: 12px;
    color: var(--token-colors-text-secondary);
}

.logout-link {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--token-colors-text-secondary);
    padding: 10px 12px;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.logout-link i {
    margin-right: 10px;
    font-size: 16px;
}

.logout-link:hover {
    background-color: var(--token-colors-gray-bg);
    color: var(--token-colors-magenta);
}

.viventa-sidebar.collapsed .logout-link span {
    display: none;
}
.viventa-sidebar.collapsed .logout-link i {
    margin-right: 0;
    margin: 0 auto;
}

/* ── Main Content Area ── */
.viventa-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── Header ── */
.viventa-header {
    height: 70px;
    background-color: var(--token-colors-white);
    border-bottom: 1px solid var(--token-colors-border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.viventa-breadcrumb {
    display: flex;
    align-items: center;
    color: var(--token-colors-text-secondary);
    font-size: 14px;
}

.viventa-breadcrumb a {
    color: var(--token-colors-text-secondary);
    text-decoration: none;
    transition: color 0.15s ease;
}

.viventa-breadcrumb a:hover {
    color: var(--token-colors-magenta);
}

.viventa-breadcrumb .separator {
    margin: 0 10px;
    font-size: 11px;
    color: var(--token-colors-text-tertiary);
}

.viventa-breadcrumb .current {
    color: var(--token-colors-text-primary);
    font-weight: 600;
}

.viventa-header-user {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.viventa-header-user .avatar-circle {
    width: 34px;
    height: 34px;
    font-size: 13px;
}

/* ── Content Pane Container ── */
.viventa-pane-container {
    flex: 1;
    overflow-y: auto;
    padding: 28px 32px;
}

/* ── Brand Typography Scale Helpers ── */
h1, .token-h1 {
    font-family: var(--font-brand-headers);
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--token-colors-text-primary);
    margin: 0 0 12px;
}

h2, .token-h2 {
    font-family: var(--font-brand-body);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--token-colors-text-primary);
    margin: 0 0 8px;
}

h3, .token-h3 {
    font-family: var(--font-brand-body);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--token-colors-text-primary);
    margin: 0 0 6px;
}

.token-display {
    font-family: var(--font-brand-headers);
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--token-colors-text-primary);
}

.token-price-large {
    font-family: var(--font-brand-body);
    font-size: 30px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--token-colors-magenta);
}

.token-price-medium {
    font-family: var(--font-brand-body);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--token-colors-magenta);
}

.token-body-large {
    font-family: var(--font-brand-body);
    font-size: 18px;
    font-weight: 300;
    line-height: 1.6;
    color: var(--token-colors-text-secondary);
}

.token-body-medium {
    font-family: var(--font-brand-body);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--token-colors-text-primary);
}

.token-body-small {
    font-family: var(--font-brand-body);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--token-colors-text-secondary);
}

.token-caption {
    font-family: var(--font-brand-body);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    color: var(--token-colors-text-muted);
}

.token-caption-strong {
    font-family: var(--font-brand-body);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--token-colors-text-primary);
}

/* ── Responsive breakpoint ── */
@media (max-width: 1024px) {
    .viventa-sidebar {
        width: 80px;
    }
    
    .viventa-sidebar .viventa-logo-section img,
    .viventa-sidebar .viventa-nav-text,
    .viventa-sidebar .viventa-nav-arrow,
    .viventa-sidebar .viventa-subnav-list,
    .viventa-sidebar .user-details,
    .viventa-sidebar .logout-link span {
        display: none !important;
        opacity: 0;
    }

    .viventa-sidebar .viventa-nav-icon {
        margin-right: 0;
    }

    .viventa-sidebar .logout-link i {
        margin: 0 auto;
    }

    .viventa-sidebar .menu-toggle i {
        transform: rotate(180deg);
    }
}
