.thca-ourservices-portal {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f8fafc;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    margin: 20px auto;
    max-width: 1150px;
}

.thca-portal-header h2 {
    margin: 0 0 4px;
    font-size: 1.7rem;
    color: #111827; /* black / near-black */
}

.thca-portal-header p {
    margin: 0 0 16px;
    color: #4b5563;
    font-size: 0.98rem;
}

.thca-tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 6px;
}

.thca-tab {
    border: none;
    background: #f3e8ff; /* very light purple */
    color: #111827;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
    white-space: nowrap;
}

.thca-tab:hover {
    background: #e9ddff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.thca-tab.active {
    background: linear-gradient(135deg, #8b5cf6, #a855f7); /* light/soft purple tones */
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(76, 29, 149, 0.35);
}

.thca-tabs-content {
    background: #ffffff;
    border-radius: 10px;
    padding: 20px 18px;
    border: 1px solid #e5e7eb;
}

.thca-tab-panel {
    display: none;
    animation: thcaFade 0.15s ease-out;
}

.thca-tab-panel.active {
    display: block;
}

@keyframes thcaFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.thca-summary-grid {
    list-style: none;
    padding: 0;
    margin: 12px 0 16px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.thca-summary-grid li {
    background: #f3f4f6; /* light silver-grey */
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.thca-summary-grid .label {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
}

.thca-summary-grid .value {
    font-size: 1.08rem;
    font-weight: 600;
    color: #111827;
}

.thca-note {
    margin-top: 8px;
    font-size: 0.82rem;
    color: #6b7280;
    font-style: italic;
}

.thca-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.thca-form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.thca-form-row-inline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.thca-form-row label {
    font-size: 0.86rem;
    font-weight: 600;
    color: #111827;
}

.thca-form-row input,
.thca-form-row textarea,
.thca-form-row select {
    border-radius: 6px;
    border: 1px solid #d1d5db;
    padding: 8px 9px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.12s ease, box-shadow 0.12s ease;
    background: #ffffff;
    color: #111827;
}

.thca-form-row input:focus,
.thca-form-row textarea:focus,
.thca-form-row select:focus {
    border-color: #a855f7;
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.25);
}

.thca-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 6px 10px;
    font-size: 0.86rem;
}

.thca-checkbox-grid label {
    font-weight: 400;
    color: #111827;
}

.thca-form-actions {
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.thca-btn-primary,
.thca-btn-secondary {
    border-radius: 999px;
    padding: 8px 18px;
    border: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: not-allowed;
    opacity: 0.75;
}

.thca-btn-primary {
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    color: #ffffff;
}

.thca-btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.required {
    color: #dc2626;
    margin-left: 2px;
}

.thca-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 0.88rem;
}

.thca-table thead {
    background: #f3f4f6;
}

.thca-table th,
.thca-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
}

.thca-table th {
    font-weight: 600;
    color: #111827;
}

.thca-placeholder-row td {
    color: #9ca3af;
    font-style: italic;
}

.thca-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ede9fe;
    color: #4c1d95;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
}

.thca-help-grid,
.thca-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

.thca-help-grid article,
.thca-services-grid article {
    background: #f9fafb;
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
}

.thca-help-grid h4,
.thca-services-grid h4 {
    margin: 0 0 4px;
    font-size: 0.98rem;
    color: #111827;
}

.thca-help-grid p,
.thca-services-grid p {
    margin: 0;
    font-size: 0.86rem;
    color: #4b5563;
}

.thca-message-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.thca-message-list li {
    background: #f9fafb;
    border-radius: 8px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
}

.thca-debug-list {
    margin: 8px 0 0;
    padding-left: 18px;
    font-size: 0.88rem;
    color: #374151;
}

@media (max-width: 640px) {
    .thca-ourservices-portal {
        padding: 16px;
    }

    .thca-tabs-nav {
        overflow-x: auto;
        white-space: nowrap;
    }

    .thca-tab {
        flex: 0 0 auto;
    }
}
