/* Investor Portal — Frontend Styles (MV Capital Brand) */

/* ============================================
   BRAND PALETTE (matches mvcapital.fund)
   Primary Gold:   #ffc03d
   Hover Gold:     #f8b526
   Navy Dark:      #212d45
   Light Gray BG:  #f5f5f5
   ============================================ */

/* Reset within portal */
.ip-portal *, .ip-portal *::before, .ip-portal *::after {
    box-sizing: border-box;
}

.ip-portal {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #212d45;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    font-size: 15px;
}

.ip-portal h2,
.ip-portal h3 {
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    color: #212d45;
}

/* ===== LOGIN ===== */
.ip-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 500px;
    padding: 40px 20px;
}

.ip-login-card {
    background: #ffffff;
    border-radius: 0;
    box-shadow: 0 4px 24px rgba(33, 45, 69, 0.1), 0 1px 4px rgba(33, 45, 69, 0.05);
    padding: 48px 40px;
    width: 100%;
    max-width: 480px;
    border-top: 4px solid #ffc03d;
}

.ip-login-header {
    text-align: center;
    margin-bottom: 32px;
}

.ip-login-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #ffc03d;
    color: #212d45;
    margin-bottom: 20px;
}

.ip-login-icon-2fa {
    background: #212d45;
    color: #ffc03d;
}

.ip-login-header h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 700;
    color: #212d45;
    font-family: 'Montserrat', sans-serif;
}

.ip-login-header p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* Alerts */
.ip-alert {
    padding: 14px 18px;
    border-radius: 0;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.ip-alert-error {
    background: #fef2f2;
    color: #991b1b;
    border-left: 4px solid #dc2626;
}

.ip-alert-info {
    background: #fef8e6;
    color: #8a5a00;
    border-left: 4px solid #ffc03d;
}

/* Forms */
.ip-form-group {
    margin-bottom: 22px;
}

.ip-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #212d45;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.ip-input-wrapper {
    position: relative;
}

.ip-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.ip-input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 1px solid #e0e0e0;
    border-radius: 0;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #ffffff;
    color: #212d45;
}

.ip-input-wrapper input:focus {
    outline: none;
    border-color: #ffc03d;
    box-shadow: 0 0 0 3px rgba(255, 192, 61, 0.2);
}

.ip-code-input {
    text-align: center;
    font-size: 24px !important;
    font-weight: 700;
    letter-spacing: 8px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    padding-left: 15px !important;
}

/* Buttons */
.ip-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 45px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.25s;
    border: 0;
    text-decoration: none;
}

.ip-btn-primary {
    background: #ffc03d;
    color: #212d45;
}

.ip-btn-primary:hover {
    background: #f8b526;
    color: #212d45;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 192, 61, 0.35);
}

.ip-btn-secondary {
    background: #f5f5f5;
    color: #212d45;
}

.ip-btn-secondary:hover {
    background: #e5e5e5;
    color: #212d45;
    text-decoration: none;
}

.ip-btn-outline {
    background: transparent;
    border: 1px solid #212d45;
    color: #212d45;
    padding: 10px 20px;
    font-size: 12px;
}

.ip-btn-outline:hover {
    background: #212d45;
    color: #ffc03d;
    text-decoration: none;
}

.ip-btn-sm {
    padding: 10px 20px;
    font-size: 12px;
}

.ip-btn-full {
    width: 100%;
}

.ip-btn-logout {
    border-color: #dc2626;
    color: #dc2626;
}

.ip-btn-logout:hover {
    background: #dc2626;
    color: #fff;
}

.ip-forgot-link {
    text-align: center;
    margin-top: 18px;
}

.ip-forgot-link a {
    font-size: 13px;
    color: #212d45;
    text-decoration: none;
    font-weight: 600;
}

.ip-forgot-link a:hover {
    color: #f8b526;
    text-decoration: underline;
}

.ip-login-footer {
    text-align: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.ip-login-footer p {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

.ip-login-footer a {
    color: #212d45;
    text-decoration: none;
    font-weight: 600;
}

.ip-login-footer a:hover {
    color: #f8b526;
    text-decoration: underline;
}

/* ===== DASHBOARD ===== */
.ip-dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

.ip-dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ffc03d;
}

.ip-dash-welcome h2 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #212d45;
    font-family: 'Montserrat', sans-serif;
}

.ip-dash-welcome p {
    margin: 4px 0 0;
    font-size: 14px;
    color: #6b7280;
}

.ip-dash-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Main Value Card */
.ip-value-card {
    background: #212d45;
    color: #ffffff;
    border-radius: 0;
    padding: 40px 32px;
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(33, 45, 69, 0.15);
    border-top: 4px solid #ffc03d;
}

.ip-value-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffc03d;
    margin-bottom: 12px;
    font-weight: 600;
}

.ip-value-amount {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 14px;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
}

.ip-value-change {
    font-size: 18px;
    font-weight: 600;
}

.ip-value-change.ip-positive {
    color: #86efac;
}

.ip-value-change.ip-negative {
    color: #fca5a5;
}

.ip-value-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
    margin-left: 6px;
    color: #ffffff;
}

.ip-value-nav-info {
    font-size: 12px;
    opacity: 0.7;
    margin-top: 14px;
    color: #ffffff;
}

/* Stats Row */
.ip-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ip-stat-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 24px 20px;
    text-align: center;
    border-top: 3px solid #ffc03d;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ip-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(33, 45, 69, 0.08);
}

.ip-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 600;
}

.ip-stat-val {
    font-size: 22px;
    font-weight: 700;
    color: #212d45;
    font-family: 'Montserrat', sans-serif;
}

/* Profit/Loss Detail */
.ip-pl-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 28px;
}

.ip-pl-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #ffc03d;
    border-radius: 0;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ip-pl-label {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
}

.ip-pl-val {
    font-size: 20px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
}

.ip-pl-val.ip-positive {
    color: #16a34a;
}

.ip-pl-val.ip-negative {
    color: #dc2626;
}

/* Sections */
.ip-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    padding: 28px;
    margin-bottom: 20px;
}

.ip-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #ffc03d;
}

.ip-section-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #212d45;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tables */
.ip-table-wrap {
    overflow-x: auto;
}

.ip-table {
    width: 100%;
    border-collapse: collapse;
}

.ip-table th {
    background: #212d45;
    padding: 14px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #ffc03d;
    border-bottom: 2px solid #ffc03d;
}

.ip-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 14px;
    color: #212d45;
}

.ip-table tbody tr:hover {
    background: #fef8e6;
}

/* Transaction Badges */
.ip-tx-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ip-tx-subscription {
    background: #dcfce7;
    color: #166534;
}

.ip-tx-redemption {
    background: #fef8e6;
    color: #8a5a00;
}

/* Transaction Summary */
.ip-tx-summary {
    display: flex;
    gap: 24px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px solid #ffc03d;
    flex-wrap: wrap;
}

.ip-tx-summary-item {
    display: flex;
    gap: 8px;
    font-size: 14px;
    color: #6b7280;
}

.ip-tx-summary-item strong {
    color: #212d45;
    font-weight: 700;
}

/* Security Info Bar */
.ip-security-info {
    display: flex;
    justify-content: space-between;
    padding: 14px 22px;
    background: #f5f5f5;
    border: 1px solid #e5e7eb;
    border-radius: 0;
    font-size: 12px;
    color: #6b7280;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

.ip-positive {
    color: #16a34a;
}

.ip-negative {
    color: #dc2626;
}

.ip-empty {
    text-align: center;
    color: #9ca3af;
    padding: 40px 20px;
    font-size: 15px;
}

/* ===== 2FA SETUP ===== */
.ip-2fa-setup-container {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.ip-card {
    background: #ffffff;
    border-radius: 0;
    box-shadow: 0 4px 24px rgba(33, 45, 69, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 520px;
    border-top: 4px solid #ffc03d;
}

.ip-card h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 700;
    color: #212d45;
    font-family: 'Montserrat', sans-serif;
}

.ip-card > p {
    margin: 0 0 24px;
    font-size: 14px;
    color: #6b7280;
}

.ip-2fa-qr {
    text-align: center;
    padding: 24px;
    background: #f5f5f5;
    border-radius: 0;
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}

.ip-2fa-qr img {
    border-radius: 0;
}

.ip-2fa-manual {
    text-align: center;
    margin-bottom: 24px;
}

.ip-2fa-manual p {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 10px;
}

.ip-secret-code {
    display: inline-block;
    background: #212d45;
    color: #ffc03d;
    padding: 12px 24px;
    border-radius: 0;
    font-size: 16px;
    letter-spacing: 2px;
    font-weight: 700;
    user-select: all;
    font-family: 'SF Mono', monospace;
}

.ip-2fa-form .ip-form-group {
    margin-bottom: 18px;
}

.ip-2fa-actions {
    display: flex;
    gap: 12px;
}

.ip-2fa-actions .ip-btn {
    flex: 1;
    text-align: center;
}

/* ===== FUND TABS ===== */
.ip-fund-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    overflow-x: auto;
}

.ip-fund-tab {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6b7280;
    text-decoration: none;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
    font-family: 'Montserrat', sans-serif;
}

.ip-fund-tab:hover {
    color: #212d45;
    text-decoration: none;
}

.ip-fund-tab.active {
    color: #212d45;
    border-bottom-color: #ffc03d;
}

/* ===== PERFORMANCE CHART ===== */
.ip-chart-container {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-top: 4px solid #ffc03d;
    padding: 24px;
    margin-bottom: 24px;
}

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

.ip-chart-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #212d45;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ip-range-selector {
    display: flex;
    gap: 4px;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 0;
}

.ip-range-btn {
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s;
    font-family: 'Montserrat', sans-serif;
}

.ip-range-btn:hover {
    color: #212d45;
}

.ip-range-btn.active {
    background: #ffc03d;
    color: #212d45;
}

.ip-chart-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.ip-chart-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ip-chart-stat-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #6b7280;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.ip-chart-stat-val {
    font-size: 16px;
    font-weight: 700;
    color: #212d45;
    font-family: 'Montserrat', sans-serif;
}

.ip-chart-canvas-wrap {
    position: relative;
    height: 280px;
}

.ip-chart-range-label {
    text-align: center;
    margin-top: 12px;
    font-size: 12px;
    color: #6b7280;
    font-style: italic;
}

.ip-chart-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6b7280;
    font-size: 14px;
}

.ip-empty-state {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-top: 4px solid #ffc03d;
    padding: 48px 24px;
    text-align: center;
    margin-bottom: 24px;
}

.ip-empty-state h3 {
    margin: 0 0 8px;
    color: #212d45;
}

.ip-empty-state p {
    color: #6b7280;
    margin: 0;
}

.ip-doc-cat-heading {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #212d45;
    margin: 24px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #ffc03d;
    font-family: 'Montserrat', sans-serif;
}

.ip-doc-cat-heading:first-of-type {
    margin-top: 0;
}

/* ===== DOCUMENTS ===== */
.ip-documents-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.ip-document-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    background: #f9f9f9;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #ffc03d;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ip-document-card:hover {
    background: #fef8e6;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(33, 45, 69, 0.08);
}

.ip-document-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #212d45;
    color: #ffc03d;
    border-radius: 0;
}

.ip-document-info {
    flex: 1;
    min-width: 0;
}

.ip-document-title {
    font-size: 15px;
    font-weight: 700;
    color: #212d45;
    margin-bottom: 2px;
    font-family: 'Montserrat', sans-serif;
}

.ip-document-desc {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 6px;
}

.ip-document-meta {
    display: flex;
    gap: 14px;
    font-size: 12px;
    color: #9ca3af;
}

.ip-document-category {
    background: #ffc03d;
    color: #212d45;
    padding: 2px 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 10px;
}

.ip-document-download {
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .ip-document-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .ip-document-download {
        width: 100%;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .ip-dash-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ip-value-amount {
        font-size: 36px;
    }

    .ip-stats-row {
        grid-template-columns: 1fr 1fr;
    }

    .ip-pl-detail {
        grid-template-columns: 1fr;
    }

    .ip-login-card {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .ip-stats-row {
        grid-template-columns: 1fr;
    }

    .ip-value-amount {
        font-size: 30px;
    }

    .ip-value-card {
        padding: 28px 18px;
    }

    .ip-btn {
        padding: 14px 28px;
    }
}
