:root {
    --jhim-primary: #043915;
    --jhim-primary-light: #065a22;
    --jhim-success: #28a745;
    --jhim-warning: #ffc107;
    --jhim-danger: #dc3545;
    --jhim-light: #f8f9fa;
    --jhim-border: #dee2e6;
    --jhim-text: #333;
    --jhim-text-muted: #6c757d;
}

.jhim-investor-portal {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.jhim-portal-header {
    text-align: center;
    margin-bottom: 30px;
}

.jhim-portal-header h2 {
    color: var(--jhim-primary);
    margin: 0 0 10px;
    font-size: 28px;
}

.jhim-portal-header p {
    color: var(--jhim-text-muted);
    margin: 0;
}

.jhim-login-form {
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid var(--jhim-border);
    border-radius: 8px;
    padding: 30px;
}

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

.jhim-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--jhim-text);
}

.jhim-form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--jhim-border);
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
}

.jhim-form-group input:focus {
    outline: none;
    border-color: var(--jhim-primary);
    box-shadow: 0 0 0 3px rgba(4, 57, 21, 0.1);
}

.jhim-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

.jhim-btn-primary {
    background: var(--jhim-primary);
    color: #fff;
    width: 100%;
}

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

.jhim-btn-whatsapp {
    background: #25D366;
    color: #fff;
}

.jhim-btn-whatsapp:hover {
    background: #128C7E;
    color: #fff;
}

.jhim-error-message {
    margin-top: 15px;
    padding: 12px;
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 4px;
    color: var(--jhim-danger);
    text-align: center;
}

.jhim-back-link {
    margin-bottom: 20px;
}

.jhim-back-link a {
    color: var(--jhim-text-muted);
    text-decoration: none;
}

.jhim-back-link a:hover {
    color: var(--jhim-primary);
}

.jhim-info-card,
.jhim-progress-card,
.jhim-schedule-card,
.jhim-support-card,
.jhim-next-payment-card {
    background: #fff;
    border: 1px solid var(--jhim-border);
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
}

.jhim-info-card h3,
.jhim-progress-card h3,
.jhim-schedule-card h3,
.jhim-support-card h3,
.jhim-next-payment-card h3 {
    color: var(--jhim-primary);
    margin: 0 0 20px;
    font-size: 18px;
    border-bottom: 2px solid var(--jhim-primary);
    padding-bottom: 10px;
}

.jhim-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.jhim-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

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

.jhim-value {
    font-size: 16px;
    color: var(--jhim-text);
    font-weight: 500;
}

.jhim-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    text-transform: capitalize;
}

.jhim-status-badge.active {
    background: rgba(40, 167, 69, 0.1);
    color: var(--jhim-success);
}

.jhim-status-badge.pending {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.jhim-status-badge.completed {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.jhim-progress-bar-container {
    height: 20px;
    background: var(--jhim-light);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.jhim-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--jhim-primary), var(--jhim-success));
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0;
}

.jhim-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--jhim-text-muted);
}

.jhim-next-payment-info {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.jhim-next-date,
.jhim-next-amount,
.jhim-next-type {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 15px;
    background: var(--jhim-light);
    border-radius: 8px;
}

.jhim-next-date strong,
.jhim-next-amount strong {
    display: block;
    font-size: 20px;
    color: var(--jhim-primary);
    margin-bottom: 5px;
}

.jhim-schedule-table-wrapper {
    overflow-x: auto;
}

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

.jhim-schedule-table th,
.jhim-schedule-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--jhim-border);
}

.jhim-schedule-table th {
    background: var(--jhim-light);
    font-weight: 600;
    color: var(--jhim-text);
}

.jhim-schedule-table tbody tr:hover {
    background: rgba(4, 57, 21, 0.02);
}

.jhim-schedule-table .final-row {
    background: rgba(255, 193, 7, 0.1);
    font-weight: 600;
}

.jhim-schedule-table .paid-row {
    background: rgba(40, 167, 69, 0.05);
}

.jhim-payment-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.jhim-payment-status.paid {
    background: rgba(40, 167, 69, 0.1);
    color: var(--jhim-success);
}

.jhim-payment-status.pending {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

.jhim-slip-link {
    color: var(--jhim-primary);
    text-decoration: none;
}

.jhim-slip-link:hover {
    text-decoration: underline;
}

.jhim-support-card {
    text-align: center;
}

.jhim-support-card p {
    color: var(--jhim-text-muted);
    margin-bottom: 20px;
}

.jhim-whatsapp-icon {
    font-size: 18px;
}

.jhim-loading {
    text-align: center;
    padding: 40px;
    color: var(--jhim-text-muted);
}

.jhim-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--jhim-border);
    border-top-color: var(--jhim-primary);
    border-radius: 50%;
    animation: jhim-spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes jhim-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .jhim-investor-portal {
        padding: 10px;
    }
    
    .jhim-login-form {
        padding: 20px;
    }
    
    .jhim-info-grid {
        grid-template-columns: 1fr;
    }
    
    .jhim-next-payment-info {
        flex-direction: column;
    }
    
    .jhim-schedule-table th,
    .jhim-schedule-table td {
        padding: 8px 10px;
        font-size: 13px;
    }
}

.jhim-invoices-section {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.jhim-invoice-btn {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #043915 0%, #065a22 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.jhim-invoice-btn:hover {
    background: linear-gradient(135deg, #065a22 0%, #043915 100%);
    transform: translateY(-1px);
}

.jhim-invoice-actions {
    display: flex;
    gap: 6px;
}

.jhim-invoice-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    padding: 20px;
}

.jhim-invoice-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.jhim-invoice-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.jhim-invoice-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #043915;
}

.jhim-invoice-modal-actions {
    display: flex;
    gap: 8px;
}

.jhim-invoice-modal-body {
    flex: 1;
    overflow: auto;
    padding: 0;
}

.jhim-invoice-modal-body iframe {
    width: 100%;
    height: 70vh;
    border: none;
}

.jhim-modal-close {
    background: #6c757d !important;
}

.jhim-modal-close:hover {
    background: #5a6268 !important;
}
