/* Phichain - Professional Investment Fund UI */
:root {
    --bg: #FAFBFC;
    --bg-card: #FFFFFF;
    --border: #E2E8F0;
    --border-light: #F1F5F9;

    --primary: #059669;
    --primary-light: #10b981;
    --primary-dim: rgba(5, 150, 105, 0.08);
    --purple: #7C3AED;
    --orange: #EA580C;

    --text: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;

    --font-mono: 'JetBrains Mono', monospace;
    --font-sans: 'General Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    --sidebar-w: 240px;
    --sidebar-bg: #000000;
    --sidebar-selected: #059669;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* ============ SIDEBAR - TICKMILL STYLE ============ */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 70px;
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    z-index: 200;
    overflow: hidden;
    transition: width 0.25s ease;
}

.sidebar:hover {
    width: var(--sidebar-w);
    overflow-y: auto;
}

.sidebar-logo {
    width: 100%;
    height: 80px;
    padding: 20px 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo .logo-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-logo .logo-icon img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.sidebar-logo .logo-name {
    font-size: 24px;
    font-weight: 700;
    color: white;
    letter-spacing: 1px;
    display: none;
}

.sidebar:hover .sidebar-logo .logo-name {
    display: block;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    padding: 20px 10px 0 10px;
}

/* Nav Items */
.nav-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--radius);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
}

.sidebar:hover .nav-item {
    padding: 12px 16px;
}

.nav-item svg,
.nav-item [data-lucide] {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.nav-item span {
    display: none;
    white-space: nowrap;
    text-align: left;
}

.sidebar:hover .nav-item span {
    display: block;
}

.nav-item .chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
    opacity: 0.7;
    display: none;
    margin-left: auto;
}

.sidebar:hover .nav-item .chevron {
    display: block;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.nav-item.active {
    background: var(--sidebar-selected);
    color: white;
}

.nav-item.expanded {
    background: var(--sidebar-selected);
    color: white;
}

.nav-item.expanded .chevron {
    transform: rotate(180deg);
}

/* Nav Groups with Submenus */
.nav-group {
    display: flex;
    flex-direction: column;
}

/* Submenu */
.submenu {
    display: none;
    flex-direction: column;
    padding-left: 20px;
    margin-top: 4px;
    gap: 2px;
}

.sidebar:hover .submenu.show {
    display: flex;
}

.submenu-item {
    display: block;
    padding: 10px 16px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.15s ease;
}

.submenu-item:hover {
    color: #0F172A;
    background: white;
}

.submenu-item.active {
    background: var(--sidebar-selected);
    color: white;
}

/* Sidebar Bottom */
.sidebar-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 20px 10px 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar:hover .sidebar-bottom {
    align-items: stretch;
}

/* ============ MAIN CONTENT ============ */
.main-content {
    margin-left: 70px;
    padding: 48px 48px;
    background: var(--bg);
    min-height: 100vh;
}

.content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* ============ HEADER ============ */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.header-greeting h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.greeting-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #000000;
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.action-btn.secondary:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.action-btn svg {
    width: 18px;
    height: 18px;
}

/* ============ STATS ROW 3-COLUMN ============ */
.stats-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow);
    min-height: 120px;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.stat-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-badge {
    background: #059669;
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text);
    margin-bottom: 4px;
}

.stat-card .stat-value.positive {
    color: #059669;
}

.stat-sublabel {
    font-size: 14px;
    color: var(--text-muted);
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
}

.stat-change.positive {
    color: #059669;
}

.stat-change i {
    width: 16px;
    height: 16px;
}

.donut-card {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.donut-card .section-title {
    display: none;
}

.donut-card .donut-container {
    width: 110px;
    height: 110px;
    flex-shrink: 0;
}

.donut-card .donut-svg {
    width: 100%;
    height: 100%;
}

.donut-card .donut-labels {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.donut-card .label-row {
    font-size: 17px;
    font-weight: 500;
}

/* ============ STATS ROW (LEGACY) ============ */
.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

.donut-section {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}


.stat-box {
    background: var(--bg-card);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.stat-box-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.stat-box-value {
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text);
    margin-bottom: 4px;
}

.stat-box-label {
    font-size: 13px;
    color: var(--text-muted);
}

.stat-box-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin-top: 8px;
}

.stat-box-change.positive {
    color: #22c55e;
}

.stat-box-change svg {
    width: 14px;
    height: 14px;
}

/* Donut in stat-box */
.donut-container {
    width: 140px;
    height: 140px;
    margin: 0 auto 12px;
    position: relative;
    cursor: pointer;
}

.donut-svg {
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease;
}

.donut-container:hover .donut-svg {
    transform: scale(1.05);
}

.donut-segment {
    transition: all 0.3s ease;
    cursor: pointer;
}

.donut-segment.you-segment:hover {
    stroke-width: 4.5;
    filter: drop-shadow(0 0 6px rgba(1, 107, 220, 0.5));
}

.donut-segment.other-lps:hover {
    stroke-width: 4.5;
    filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.3));
}

.donut-center-text {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.donut-container:hover .donut-center-text {
    opacity: 1;
}

.donut-tooltip {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text);
    color: white;
    padding: 6px 12px;
    border-radius: var(--radius);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.donut-container:hover .donut-tooltip {
    opacity: 1;
}

.donut-labels {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.label-row {
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.label-row:hover {
    background: var(--primary-dim);
}

.label-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.label-row:hover .dot {
    transform: scale(1.3);
}

.dot.brand-blue {
    background: #059669;
}

.dot.black {
    background: #1a1a1a;
}

.dot.accent {
    background: #0891b2;
}

.dot.gray {
    background: #e5e7eb;
}

.share-capital-box .donut-labels {
    align-items: center;
}

/* AUM Box */
.aum-box {
    display: flex;
    flex-direction: column;
}

.aum-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
}

.aum-header .aum-value {
    font-size: 22px;
    font-weight: 700;
    font-family: var(--font-mono);
    color: var(--text);
}

.aum-header .aum-date {
    font-size: 11px;
    color: var(--text-muted);
}

.mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 60px;
    flex: 1;
}

.mini-bar {
    flex: 1;
    background: #22c55e;
    border-radius: 1px 1px 0 0;
}

.mini-chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--text-muted);
    margin-top: 4px;
}

.stat-cards {
    display: flex;
    gap: 24px;
    flex: 1;
}

.stat-cards-stacked {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 1;
}

.stat-cards-stacked .stat-card {
    flex: none;
}

.stat-card {
    flex: 1;
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 31px;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

.stat-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.stat-change svg {
    width: 14px;
    height: 14px;
}

.stat-change.positive {
    color: #22c55e;
}

.stat-change.negative {
    color: #ef4444;
}

/* ============ CHART SECTION ============ */
.chart-section {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 32px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.chart-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg);
    padding: 4px;
    border-radius: var(--radius);
}

.chart-tab {
    padding: 6px 16px;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.15s ease;
}

.chart-tab.active {
    background: #000000;
    color: white;
}

.chart-tab:hover:not(.active) {
    background: var(--primary);
    color: white;
}

.chart-container {
    height: 280px;
}

/* ============ INVEST SECTION ============ */
.invest-section {
    margin-bottom: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}

.view-all {
    font-size: 13px;
    color: #000000;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.view-all:hover {
    color: var(--primary);
    text-decoration: underline;
}

.fund-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.fund-card {
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fund-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.fund-logo {
    width: 56px;
    height: 56px;
    background: #000000;
    border-radius: var(--radius);
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: background 0.2s ease;
}

.fund-card:hover .fund-logo {
    background: var(--primary);
}

.fund-logo img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.fund-logo svg {
    width: 28px;
    height: 28px;
    color: white;
}

.fund-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
}

.fund-type {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: block;
}

.fund-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.btn-primary {
    padding: 8px 20px;
    background: #000000;
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

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

.btn-secondary {
    padding: 8px 20px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text);
}

/* ============ INVESTMENTS TABLE ============ */
.investments-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
}

.investments-table {
    width: 100%;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border-collapse: collapse;
    overflow: hidden;
}

.investments-table th {
    text-align: left;
    padding: 16px 20px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
}

.investments-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
}

.investments-table tr:last-child td {
    border-bottom: none;
}

.mono {
    font-family: var(--font-mono);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.status-badge.active::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #10B981;
    border-radius: 50%;
}

.offering-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.offering-logo {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.offering-logo img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.offering-name {
    font-weight: 500;
}

.offering-type {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============ ABOUT PAGE ============ */
.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-primary);
}

.section-label svg {
    width: 14px;
    height: 14px;
    fill: var(--primary);
    color: var(--primary);
}

.about-page {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-intro {
    color: var(--text-secondary);
    line-height: 1.7;
}

.about-intro p:first-child {
    margin-bottom: 16px;
}

.about-card {
    background: rgba(1, 107, 220, 0.08);
    border: 1px solid rgba(1, 107, 220, 0.15);
    border-radius: var(--radius);
    padding: 24px 28px;
}

.about-card h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 15px;
}

/* ============ FUND PAGE ============ */
.fund-card-link {
    text-decoration: none;
    color: inherit;
}

.fund-card-link .fund-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fund-card-link .fund-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.quick-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.quick-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--surface-alt);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.2s ease;
}

.quick-link-item:hover {
    background: var(--primary);
    color: white;
}

.quick-link-item svg {
    width: 18px;
    height: 18px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .fund-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: 80px;
        padding: 16px 8px;
    }

    .sidebar-nav {
        padding: 0 8px;
    }

    .nav-item span,
    .nav-item .chevron,
    .submenu {
        display: none;
    }

    .nav-item {
        justify-content: center;
        padding: 12px;
    }

    .main-content {
        margin-left: 80px;
        padding: 32px;
    }

    .stats-row {
        flex-direction: column;
    }

    .fund-cards {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   MOBILE-FIRST RESPONSIVE STYLES
   Design: Phone first (320px), then tablet, then desktop
   ============================================================ */

/* ============ MOBILE BASE (Default - 320px+) ============ */

/* Mobile Header - Always visible on mobile */
.mobile-header {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 56px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    z-index: 1000;
    padding: 0 16px;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hamburger-btn,
.mobile-profile-btn {
    background: transparent;
    border: none;
    color: white;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 10px;
    transition: background 0.2s;
}

.hamburger-btn:active,
.mobile-profile-btn:active {
    background: rgba(255,255,255,0.15);
}

.mobile-logo {
    font-size: 16px;
    font-weight: 700;
    color: white;
    letter-spacing: 2px;
}

/* Sidebar - Hidden by default on mobile, slides in */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 280px;
    height: 100vh;
    background: #000;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar.mobile-open {
    transform: translateX(0);
}

/* Force sidebar items to show when open on mobile */
.sidebar.mobile-open .nav-item span,
.sidebar.mobile-open .nav-item .chevron,
.sidebar.mobile-open .sidebar-logo .logo-name,
.sidebar.mobile-open .submenu.show {
    display: block !important;
}

.sidebar.mobile-open .sidebar-bottom {
    align-items: stretch !important;
}

/* Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1050;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.active {
    display: block;
}

/* Main Content - Mobile first */
.main-content {
    margin-left: 0;
    padding: 72px 16px 24px 16px;
    min-height: 100vh;
}

.content-wrapper {
    max-width: 100%;
}

/* Header */
.header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.header-greeting h1 {
    font-size: 22px;
    line-height: 1.2;
}

.greeting-subtitle {
    font-size: 13px;
}

.header-actions {
    width: 100%;
    display: flex;
    gap: 8px;
}

.action-btn {
    flex: 1;
    justify-content: center;
    padding: 12px 16px;
    font-size: 13px;
}

/* Stats - Single column on mobile */
.stats-row-3 {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-card {
    width: 100%;
    padding: 16px;
}

.stat-card.donut-card {
    order: -1;
}

.donut-container {
    max-width: 140px;
    margin: 0 auto;
}

.donut-labels {
    font-size: 12px;
}

.stat-value {
    font-size: 24px;
}

.stat-label {
    font-size: 11px;
}

/* Metrics Grid - 2 columns on mobile */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.metric-card {
    padding: 14px;
}

.metric-value {
    font-size: 18px;
}

.metric-label {
    font-size: 9px;
}

/* Content Grid - Single column */
.content-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.content-card {
    padding: 16px;
}

.content-card.full-width {
    width: 100%;
}

.card-title {
    font-size: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
}

/* Charts */
.chart-section {
    padding: 16px;
    margin-bottom: 16px;
}

.chart-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 14px;
}

.chart-header h2 {
    font-size: 14px;
}

.chart-tabs {
    width: 100%;
    display: flex;
    gap: 4px;
}

.chart-tab {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    font-size: 12px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-container {
    height: 200px;
}

/* Tables - Card view on mobile */
.investments-section {
    overflow: visible;
}

.investments-section h2 {
    font-size: 16px;
    margin-bottom: 14px;
}

.investments-table {
    display: block;
    background: transparent;
    box-shadow: none;
}

.investments-table thead {
    display: none;
}

.investments-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.investments-table tr {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.investments-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.investments-table td:last-child {
    border-bottom: none;
}

.investments-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.offering-cell {
    flex-direction: row !important;
    gap: 10px;
}

.offering-logo {
    width: 32px;
    height: 32px;
}

/* Fund Cards */
.fund-cards {
    grid-template-columns: 1fr;
    gap: 12px;
}

/* Stats Grid (inside cards) */
.stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.stat-item {
    padding: 12px;
}

/* Performance Stats */
.perf-stats {
    gap: 10px;
}

.perf-stat-item {
    padding: 12px;
    font-size: 13px;
}

/* Performance Grid */
.perf-grid {
    grid-template-columns: 1fr;
    gap: 10px;
}

.perf-item {
    padding: 16px;
}

.perf-value {
    font-size: 20px;
}

/* Period Buttons */
.period-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.period-btn {
    flex: 1;
    min-width: calc(33% - 8px);
    padding: 10px;
    font-size: 12px;
    min-height: 44px;
}

/* Returns Table - Horizontal scroll */
.returns-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 11px;
}

.returns-table th,
.returns-table td {
    padding: 8px 6px;
    white-space: nowrap;
}

/* Terms Grid */
.terms-grid {
    grid-template-columns: 1fr;
}

.term-row {
    padding: 10px 0;
    font-size: 13px;
}

/* Capital rows */
.capital-row {
    padding: 10px 0;
    font-size: 13px;
}

/* Quick Links */
.quick-links {
    flex-direction: column;
    gap: 8px;
}

.quick-link-item {
    width: 100%;
    padding: 14px 16px;
}

/* Touch Targets - ensure all interactive elements are at least 44px */
.nav-item,
.submenu-item,
.btn-primary,
.btn-secondary {
    min-height: 44px;
}

/* Page Headers */
.page-header h1,
.fund-header h1 {
    font-size: 24px;
}

.page-subtitle {
    font-size: 13px;
}

/* ============ TABLET (768px+) ============ */
@media (min-width: 768px) {
    /* Hide mobile header, show sidebar */
    .mobile-header {
        display: none;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
    
    .sidebar {
        transform: translateX(0);
        width: 70px;
    }
    
    .sidebar:hover {
        width: 240px;
    }
    
    .main-content {
        margin-left: 70px;
        padding: 32px;
    }
    
    .header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .header-actions {
        width: auto;
    }
    
    .action-btn {
        flex: none;
    }
    
    .stats-row-3 {
        flex-direction: row;
    }
    
    .stat-card.donut-card {
        order: 0;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
    
    .metric-value {
        font-size: 22px;
    }
    
    .content-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .content-card.full-width {
        grid-column: span 2;
    }
    
    .chart-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .chart-tabs {
        width: auto;
    }
    
    .chart-container {
        height: 280px;
    }
    
    .investments-table {
        display: table;
        background: white;
        box-shadow: var(--shadow);
    }
    
    .investments-table thead {
        display: table-header-group;
    }
    
    .investments-table tbody {
        display: table-row-group;
    }
    
    .investments-table tr {
        display: table-row;
        padding: 0;
        box-shadow: none;
    }
    
    .investments-table td {
        display: table-cell;
        padding: 16px 20px;
    }
    
    .investments-table td::before {
        display: none;
    }
    
    .fund-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .perf-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============ DESKTOP (1024px+) ============ */
@media (min-width: 1024px) {
    .main-content {
        padding: 48px;
    }
    
    .header-greeting h1 {
        font-size: 28px;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 20px;
    }
    
    .metric-value {
        font-size: 28px;
    }
    
    .content-grid {
        grid-template-columns: 2fr 1fr;
        gap: 24px;
    }
    
    .fund-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============ LARGE DESKTOP (1400px+) ============ */
@media (min-width: 1400px) {
    .content-wrapper {
        max-width: 1400px;
        margin: 0 auto;
    }
}


/* ============================================================
   PAGE-SPECIFIC MOBILE STYLES
   ============================================================ */

/* Fund Page */
.fund-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.fund-header h1 {
    font-size: 24px !important;
}

.fund-header-logo {
    width: 40px !important;
    height: 40px !important;
}

.fund-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 16px !important;
    padding-bottom: 8px;
}

.fund-tab {
    font-size: 14px !important;
    white-space: nowrap;
    min-height: 44px;
    display: flex;
    align-items: center;
}

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

/* Fund Info Grid */
.fund-info-grid,
.info-grid,
.bottom-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
}

.info-card,
.fund-info-card {
    padding: 16px !important;
}

.info-card h3,
.fund-info-card h3 {
    font-size: 12px !important;
}

/* AUM Card */
.aum-card {
    padding: 20px !important;
}

.aum-value {
    font-size: 28px !important;
}

.aum-chart {
    height: 150px !important;
}

/* Strategies/Hedge Fund Page */
.strategy-badge {
    padding: 6px 10px !important;
    font-size: 11px !important;
}

.fund-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

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

/* Holdings Table on mobile */
.holdings-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.holdings-table th,
.holdings-table td {
    padding: 10px 8px !important;
    font-size: 12px !important;
    white-space: nowrap;
}

/* Core Holdings Cards */
.holdings-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
}

.holding-card {
    padding: 14px !important;
}

/* Performance Page */
.perf-stat-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

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

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

/* Benchmark Table */
.benchmark-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.benchmark-table th,
.benchmark-table td {
    padding: 10px 8px !important;
    font-size: 11px !important;
    white-space: nowrap;
}

/* Transactions Page */
.transactions-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.transactions-filters {
    flex-direction: column;
    width: 100%;
    gap: 8px;
}

.filter-btn,
.filter-select {
    width: 100%;
    min-height: 44px;
}

.transactions-table {
    display: block;
}

.transactions-table thead {
    display: none;
}

.transactions-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transactions-table tr {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.transactions-table td {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
}

.transactions-table td:last-child {
    border-bottom: none;
}

.transactions-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #64748b;
    font-size: 11px;
    text-transform: uppercase;
}

/* Documents/Reports Page */
.documents-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
}

.document-card {
    padding: 14px !important;
}

.document-icon {
    width: 36px !important;
    height: 36px !important;
}

/* Profile Page */
.profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
}

.profile-avatar {
    width: 80px !important;
    height: 80px !important;
}

.profile-form {
    gap: 12px !important;
}

.form-row {
    flex-direction: column;
    gap: 12px;
}

.form-group {
    width: 100% !important;
}

/* Contact/Team Cards */
.team-grid,
.contact-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
}

.team-card,
.contact-card {
    padding: 16px !important;
}

.team-avatar {
    width: 60px !important;
    height: 60px !important;
}

/* News Cards */
.news-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
}

.news-card {
    padding: 14px !important;
}

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

/* ============ TABLET OVERRIDES (768px+) ============ */
@media (min-width: 768px) {
    .fund-header {
        flex-direction: row;
        align-items: center;
    }
    
    .fund-header h1 {
        font-size: 36px !important;
    }
    
    .fund-meta {
        flex-direction: row;
        align-items: center;
    }
    
    .fund-info-grid,
    .info-grid,
    .bottom-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .transactions-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .transactions-filters {
        flex-direction: row;
        width: auto;
    }
    
    .filter-btn,
    .filter-select {
        width: auto;
    }
    
    .transactions-table {
        display: table;
    }
    
    .transactions-table thead {
        display: table-header-group;
    }
    
    .transactions-table tbody {
        display: table-row-group;
    }
    
    .transactions-table tr {
        display: table-row;
        padding: 0;
        box-shadow: none;
    }
    
    .transactions-table td {
        display: table-cell;
        padding: 16px 20px;
    }
    
    .transactions-table td::before {
        display: none;
    }
    
    .perf-stat-item {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .documents-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .team-grid,
    .contact-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .profile-header {
        flex-direction: row;
        text-align: left;
    }
    
    .form-row {
        flex-direction: row;
    }
    
    .form-group {
        width: 50% !important;
    }
}

/* ============ DESKTOP OVERRIDES (1024px+) ============ */
@media (min-width: 1024px) {
    .fund-info-grid,
    .info-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .bottom-grid {
        grid-template-columns: 1fr 2fr !important;
    }
    
    .documents-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .team-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .news-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ============ TEXT WRAPPING & OVERFLOW FIXES ============ */

/* Force text to wrap on mobile */
.metric-label,
.stat-label,
.card-title,
.section-label,
.perf-stat-label,
.capital-label,
.term-label {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Make values stack if too wide */
.metric-card,
.stat-item {
    text-align: center;
}

/* Strategy text wrap */
.strategy-text {
    word-wrap: break-word;
    line-height: 1.6;
}

/* Term rows - stack on mobile */
.term-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px;
}

.term-label {
    font-size: 11px;
    color: #64748b;
}

.term-value {
    font-size: 14px;
    font-weight: 600;
}

/* Capital rows - already stacking, ensure proper display */
.capital-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px;
}

.capital-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.capital-value {
    font-size: 16px;
    font-weight: 600;
}

/* Performance stat items - stack label/value */
.perf-stat-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px;
    padding: 14px !important;
}

.perf-stat-label {
    font-size: 11px;
    color: #64748b;
}

.perf-stat-value {
    font-size: 18px;
    font-weight: 700;
}

/* Info cards - better text display */
.info-label {
    font-size: 11px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-value {
    font-size: 14px;
    font-weight: 500;
    word-break: break-word;
}

/* Fund tabs - horizontal scroll indicator */
.fund-tabs {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.fund-tabs::-webkit-scrollbar {
    display: none;
}

/* About text - proper line height */
.about-text,
.strategy-description,
.fund-description {
    font-size: 14px;
    line-height: 1.7;
    word-wrap: break-word;
}

/* General info cards */
.general-info-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.general-info-row:last-child {
    border-bottom: none;
}

/* Tablet+ restore horizontal layout */
@media (min-width: 768px) {
    .term-row {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .capital-row {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .perf-stat-item {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    
    .general-info-row {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}
