/* Restorative Client Portal Styles */
* { box-sizing: border-box; }

/* ===== LOGIN PAGE ===== */
.rcp-login-wrap {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
}
.rcp-login-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}
.rcp-login-logo {
    text-align: center;
    margin-bottom: 30px;
}
.rcp-login-logo img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: contain;
    margin-bottom: 10px;
}
.rcp-login-logo h2 {
    color: #1a3c6e;
    font-size: 20px;
    margin: 0 0 4px;
}
.rcp-login-logo p {
    color: #666;
    font-size: 14px;
    margin: 0;
}
.rcp-field {
    margin-bottom: 18px;
}
.rcp-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}
.rcp-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s;
    outline: none;
}
.rcp-field input:focus {
    border-color: #1a3c6e;
}
.rcp-error {
    background: #fff0f0;
    border: 1px solid #ffcccc;
    color: #c0392b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}
.rcp-forgot {
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
}
.rcp-forgot a { color: #1a3c6e; }

/* ===== PORTAL ===== */
.rcp-portal-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Header */
.rcp-portal-header {
    background: linear-gradient(135deg, #1a3c6e 0%, #2563b0 100%);
    border-radius: 16px;
    padding: 24px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    color: #fff;
}
.rcp-portal-header h2 {
    margin: 0 0 4px;
    font-size: 22px;
    color: #fff;
}
.rcp-portal-header p {
    margin: 0;
    font-size: 13px;
    opacity: 0.8;
    color: #fff;
}
.rcp-logout-btn {
    background: rgba(255,255,255,0.15);
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    border: 1px solid rgba(255,255,255,0.3);
    transition: background 0.2s;
}
.rcp-logout-btn:hover { background: rgba(255,255,255,0.25); }

/* Stats Row */
.rcp-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}
.rcp-stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #eef0f4;
}
.rcp-stat-icon { font-size: 28px; }
.rcp-stat-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 2px;
}
.rcp-stat-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a3c6e;
}
.rcp-status-pending { color: #e67e22; }

/* Tabs */
.rcp-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.rcp-tab {
    padding: 10px 20px;
    border: 2px solid #dde3ee;
    background: #fff;
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    transition: all 0.2s;
}
.rcp-tab:hover {
    border-color: #1a3c6e;
    color: #1a3c6e;
}
.rcp-tab.active {
    background: #1a3c6e;
    border-color: #1a3c6e;
    color: #fff;
}
.rcp-tab-content {
    display: none;
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #eef0f4;
}
.rcp-tab-content.active { display: block; }

/* Section Header */
.rcp-section-header {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f4ff;
}
.rcp-section-header h3 {
    margin: 0 0 6px;
    font-size: 20px;
    color: #1a3c6e;
}
.rcp-section-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* JotForm */
.rcp-jotform-wrap {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eef0f4;
}

/* Status */
.rcp-status-grid { display: flex; flex-direction: column; gap: 16px; }
.rcp-status-item {
    background: #f8faff;
    border-radius: 10px;
    padding: 16px 20px;
    border: 1px solid #eef0f4;
}
.rcp-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.rcp-service-name { font-weight: 600; color: #333; font-size: 15px; }
.rcp-progress-bar {
    height: 8px;
    background: #e8ecf4;
    border-radius: 99px;
    overflow: hidden;
}
.rcp-progress-fill {
    height: 100%;
    background: #2563b0;
    border-radius: 99px;
    transition: width 0.5s;
}
.rcp-fill-green { background: #27ae60; }
.rcp-fill-yellow { background: #e67e22; }
.rcp-notice {
    margin-top: 20px;
    background: #fff8e8;
    border: 1px solid #ffd980;
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 14px;
    color: #7a5c00;
}

/* Badges */
.rcp-badge {
    padding: 4px 12px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
}
.rcp-badge-active { background: #e8f8ee; color: #1a7a3e; }
.rcp-badge-pending { background: #fff3e0; color: #e65100; }
.rcp-badge-progress { background: #e3f0ff; color: #1a3c6e; }

/* Payments */
.rcp-payment-box { max-width: 500px; }
.rcp-invoice-card {
    border: 2px solid #eef0f4;
    border-radius: 14px;
    overflow: hidden;
}
.rcp-invoice-header {
    background: #1a3c6e;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}
.rcp-invoice-body { padding: 20px; }
.rcp-invoice-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
    color: #444;
}
.rcp-invoice-total {
    font-weight: 700;
    font-size: 16px;
    color: #1a3c6e;
    border-bottom: none;
}
.rcp-payment-actions {
    padding: 16px 20px;
    background: #f8faff;
    text-align: center;
}
.rcp-payment-note {
    font-size: 12px;
    color: #888;
    margin: 8px 0 0;
}

/* Support */
.rcp-support-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.rcp-support-card {
    text-align: center;
    padding: 24px 20px;
    background: #f8faff;
    border-radius: 14px;
    border: 1px solid #eef0f4;
}
.rcp-support-icon { font-size: 36px; margin-bottom: 12px; }
.rcp-support-card h4 {
    margin: 0 0 6px;
    color: #1a3c6e;
    font-size: 16px;
}
.rcp-support-card p {
    color: #666;
    font-size: 13px;
    margin: 0 0 14px;
}

/* Buttons */
.rcp-btn-primary {
    display: inline-block;
    background: #1a3c6e;
    color: #fff !important;
    padding: 12px 28px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: center;
    transition: background 0.2s;
}
.rcp-btn-primary:hover { background: #15305a; }
.rcp-btn-outline {
    display: inline-block;
    border: 2px solid #1a3c6e;
    color: #1a3c6e !important;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}
.rcp-btn-outline:hover {
    background: #1a3c6e;
    color: #fff !important;
}

/* Responsive */
@media (max-width: 768px) {
    .rcp-stats-row { grid-template-columns: repeat(2, 1fr); }
    .rcp-support-grid { grid-template-columns: 1fr; }
    .rcp-portal-header { flex-direction: column; gap: 16px; text-align: center; }
    .rcp-tabs { gap: 6px; }
    .rcp-tab { font-size: 13px; padding: 8px 14px; }
}
@media (max-width: 480px) {
    .rcp-stats-row { grid-template-columns: 1fr 1fr; }
    .rcp-tab-content { padding: 20px 16px; }
}

/* Invoice extras */
.rcp-invoice-meta {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 13px;
    color: #555;
    flex-wrap: wrap;
    gap: 6px;
}
.rcp-invoice-divider {
    height: 1px;
    background: #eef0f4;
    margin: 8px 0;
}
.rcp-invoice-services-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 0 4px;
}
.rcp-badge-grey {
    background: #f0f0f0;
    color: #666;
}

/* Deposit row styling - highlighted */
.rcp-invoice-deposit {
    background: linear-gradient(135deg, #1a3c6e, #2563b0);
    border-radius: 10px;
    padding: 14px 16px !important;
    font-weight: 700;
    font-size: 16px;
    color: #fff !important;
    margin: 8px 0;
    border: none !important;
    box-shadow: 0 4px 12px rgba(37,99,176,0.3);
}
.rcp-invoice-deposit span {
    color: #fff !important;
}
.rcp-deposit-amount {
    color: #fff !important;
    font-weight: 800;
    font-size: 18px;
}
.rcp-deposit-label {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rcp-deposit-badge {
    background: #f59e0b;
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 99px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Pay Now Box */
.rcp-pay-now-box {
    background: #f8faff;
    border-radius: 12px;
    padding: 20px;
    border: 2px solid #e0e8f8;
}
.rcp-pay-now-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 14px;
    color: #555;
    font-weight: 600;
}
.rcp-pay-now-amount {
    font-size: 28px;
    font-weight: 800;
    color: #1a3c6e;
}
.rcp-btn-pay {
    display: block;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff !important;
    padding: 16px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(22,163,74,0.35);
    letter-spacing: 0.3px;
}
.rcp-btn-pay:hover {
    background: linear-gradient(135deg, #15803d, #166534);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(22,163,74,0.4);
    color: #fff !important;
}

/* Deposit highlight fix */
.rcp-invoice-deposit {
    background: linear-gradient(135deg, #1a3c6e, #2563b0) !important;
    border-radius: 10px !important;
    padding: 14px 16px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    color: #fff !important;
    margin: 8px 0 !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(37,99,176,0.3) !important;
}
.rcp-invoice-deposit span,
.rcp-invoice-deposit .rcp-deposit-label,
.rcp-invoice-deposit .rcp-deposit-amount {
    color: #fff !important;
}
.rcp-invoice-deposit .rcp-deposit-amount {
    font-size: 18px !important;
    font-weight: 800 !important;
}
.rcp-deposit-badge {
    background: #f59e0b !important;
    color: #fff !important;
    font-size: 11px !important;
    padding: 3px 8px !important;
    border-radius: 99px !important;
    font-weight: 700 !important;
}
