/* ============================================
   INVESTMENT DETAILS PAGE - MOBILE APP STYLE
   Admin Configurable Color Theme
   ============================================ */

.investment-details-page {
    min-height: 100vh;
    background: var(--bg-secondary);
    padding-bottom: 40px;
}

/* Header */
.page-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    padding: 25px 0 35px 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.header-gradient {
    position: absolute;
    top: -30%;
    right: -20%;
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.header-label {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    margin-bottom: 4px;
}

.header-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0 0 4px 0;
}

.header-subtitle {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
    margin: 0;
}

.back-link {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    border-radius: 40px;
    padding: 8px 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.back-link:active {
    transform: scale(0.96);
}

/* Status Badge */
.status-container {
    margin-top: -20px;
    position: relative;
    z-index: 10;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.status-success {
    background: linear-gradient(135deg, #28c76f, #1e9b53);
    color: white;
}

.status-warning {
    background: linear-gradient(135deg, #ff9f43, #e67e22);
    color: white;
}

.status-info {
    background: linear-gradient(135deg, #00cfe8, #0099cc);
    color: white;
}

.status-danger {
    background: linear-gradient(135deg, #ea5455, #c0392b);
    color: white;
}

/* Pending Card */
.pending-card {
    background: var(--bg-primary);
    border-radius: 24px;
    border-left: 4px solid #ff9f43;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.pending-header {
    background: rgba(255, 159, 67, 0.1);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #ff9f43;
    border-bottom: 1px solid var(--border-color);
}

.pending-body {
    padding: 16px;
}

.pending-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.info-item {
    flex: 1;
    min-width: 100px;
}

.info-item .label {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
}

.info-item .value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.info-item .value.pending {
    color: #ff9f43;
}

/* Alert Card */
.alert-card {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 16px;
    display: flex;
    gap: 12px;
    border: 1px solid var(--border-color);
}

.alert-card.warning {
    border-left-color: #ff9f43;
    border-left-width: 4px;
}

.alert-card i {
    font-size: 24px;
    color: #ff9f43;
}

.alert-content strong {
    display: block;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.alert-content p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 4px 0;
}

.alert-content small {
    font-size: 10px;
    color: var(--text-muted);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 14px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.stat-icon-primary {
    background: var(--primary-soft);
}
.stat-icon-primary i {
    color: var(--primary);
}

.stat-icon-success {
    background: rgba(40, 199, 111, 0.1);
}
.stat-icon-success i {
    color: #28c76f;
}

.stat-icon-info {
    background: rgba(59, 130, 246, 0.1);
}
.stat-icon-info i {
    color: #3b82f6;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: block;
}

/* Progress Section */
.progress-section {
    background: var(--bg-primary);
    border-radius: 20px;
    padding: 16px;
    border: 1px solid var(--border-color);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.progress-bar-container {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.progress-stats span:first-child {
    color: var(--text-secondary);
}

.progress-stats span:last-child {
    color: var(--text-primary);
    font-weight: 500;
}

/* Accordion */
.info-accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.accordion-item {
    background: var(--bg-primary);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.accordion-header:active {
    background: var(--bg-secondary);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-left i {
    font-size: 18px;
    color: var(--primary);
}

.accordion-icon {
    color: var(--text-muted);
    transition: transform 0.2s;
}

.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
}

.accordion-body {
    padding: 0 16px 16px 16px;
    display: none;
    border-top: 1px solid var(--border-color);
}

.accordion-item.open .accordion-body {
    display: block;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

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

.info-row .value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.badge-success {
    background: rgba(40, 199, 111, 0.1);
    color: #28c76f;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
}

.badge-danger {
    background: rgba(234, 84, 85, 0.1);
    color: #ea5455;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 11px;
}

/* Action Button */
.action-section {
    margin-top: 20px;
}

.capital-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 44px;
    padding: 16px;
    color: white;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.capital-btn:active {
    transform: scale(0.97);
}

/* Transaction History */
.history-section {
    margin-top: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 0 4px;
}

.section-header i {
    font-size: 18px;
    color: var(--primary);
}

.section-header span {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.section-count {
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: auto;
}

.transactions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.transaction-card {
    background: var(--bg-primary);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.transaction-main {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
}

.transaction-icon {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.transaction-icon.credit {
    background: rgba(40, 199, 111, 0.1);
    color: #28c76f;
}

.transaction-icon.debit {
    background: rgba(234, 84, 85, 0.1);
    color: #ea5455;
}

.transaction-icon i {
    font-size: 18px;
}

.transaction-info {
    flex: 1;
}

.transaction-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.transaction-meta {
    display: flex;
    gap: 12px;
    font-size: 10px;
    color: var(--text-muted);
}

.transaction-meta i {
    margin-right: 4px;
}

.transaction-amount {
    font-size: 16px;
    font-weight: 700;
}

.transaction-amount.positive {
    color: #28c76f;
}

.transaction-amount.negative {
    color: #ea5455;
}

.transaction-chevron {
    color: var(--text-muted);
    font-size: 12px;
    transition: transform 0.2s;
}

.transaction-card.open .transaction-chevron {
    transform: rotate(180deg);
}

.transaction-detail {
    padding: 0 14px 14px 14px;
    display: none;
    border-top: 1px solid var(--border-color);
}

.transaction-card.open .transaction-detail {
    display: block;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 12px;
    border-bottom: 1px solid var(--border-color);
}

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

.detail-row .label {
    color: var(--text-muted);
}

.detail-row .value {
    color: var(--text-primary);
    font-weight: 500;
    text-align: right;
    word-break: break-word;
    max-width: 60%;
}

/* Empty State */
.empty-state {
    background: var(--bg-primary);
    border-radius: 24px;
    padding: 40px 20px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.empty-state i {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
    display: block;
}

.empty-state h5 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 12px;
    color: var(--text-muted);
}

/* Modal */
.modal-content {
    background: var(--bg-primary);
    border-radius: 28px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.form-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-primary);
    width: 100%;
}

.form-text {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.capital-info {
    margin-top: 20px;
}

.info-alert {
    background: rgba(59, 130, 246, 0.1);
    border-radius: 16px;
    padding: 12px;
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.info-alert i {
    color: #3b82f6;
    font-size: 18px;
}

.info-alert strong {
    font-size: 12px;
    color: var(--text-primary);
    display: block;
    margin-bottom: 6px;
}

.info-alert ul {
    margin: 0;
    padding-left: 20px;
    font-size: 11px;
    color: var(--text-secondary);
}

.info-alert li {
    margin-bottom: 4px;
}

.fee-calculation {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 12px;
}

.fee-calculation h6 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 6px 0;
    color: var(--text-secondary);
}

.calc-row.total {
    border-top: 1px solid var(--border-color);
    margin-top: 6px;
    padding-top: 10px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 16px 20px;
    display: flex;
    gap: 12px;
}

.btn-cancel {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
}

.btn-submit {
    flex: 2;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 40px;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.pagination .page-item {
    display: inline-block;
}

.pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.pagination .active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Desktop */
@media (min-width: 768px) {
    .investment-details-page {
        max-width: 800px;
        margin: 0 auto;
    }
    
    .stats-grid {
        gap: 16px;
    }
}

/* Dark Theme */
body.dark-theme .stat-card,
body.dark-theme .pending-card,
body.dark-theme .progress-section,
body.dark-theme .accordion-item,
body.dark-theme .transaction-card,
body.dark-theme .empty-state {
    background: var(--dark-bg-secondary);
    border-color: var(--dark-border);
}

body.dark-theme .stat-value,
body.dark-theme .info-row .value,
body.dark-theme .transaction-title,
body.dark-theme .detail-row .value,
body.dark-theme .modal-title,
body.dark-theme .form-select,
body.dark-theme .info-item .value,
body.dark-theme .alert-content strong,
body.dark-theme .section-header span,
body.dark-theme .calc-row.total,
body.dark-theme .fee-calculation h6 {
    color: var(--dark-text-primary);
}

body.dark-theme .stat-label,
body.dark-theme .progress-header,
body.dark-theme .progress-stats,
body.dark-theme .info-row .label,
body.dark-theme .transaction-meta,
body.dark-theme .detail-row .label,
body.dark-theme .empty-state p,
body.dark-theme .info-item .label,
body.dark-theme .alert-content p,
body.dark-theme .form-label,
body.dark-theme .info-alert ul,
body.dark-theme .calc-row {
    color: var(--dark-text-secondary);
}

/* Animations */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card, .accordion-item, .transaction-card {
    animation: slideUp 0.3s ease-out;
}