/* ════════════════════════════════════════════════════════════
   ANGLICAN CARE PORTAL — Frontend Stylesheet
   Brand Colors: Navy #1B2A4A | Blue #0A3161 | Gold #C4A747
                 Cream #F8F5F0 | Red #D44E5C | Grey #6B7280
   Fonts: Headings - Merriweather, serif | Body - Inter, sans-serif
   All classes prefixed with ac-portal-
   ════════════════════════════════════════════════════════════ */

/* ── Google Fonts Import ── */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700;900&family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables ── */
:root {
    --ac-navy: #1B2A4A;
    --ac-blue: #0A3161;
    --ac-gold: #C4A747;
    --ac-cream: #F8F5F0;
    --ac-red: #D44E5C;
    --ac-grey: #6B7280;
    --ac-white: #FFFFFF;
    --ac-light-gold: #E8D98C;
    --ac-light-grey: #E5E7EB;
    --ac-cream-hover: #F0EBE3;
    --ac-navy-light: #2B3D63;
    --ac-success: #16A34A;
    --ac-error: #DC2626;
    --ac-font-head: 'Merriweather', Georgia, serif;
    --ac-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --ac-sidebar-width: 260px;
    --ac-radius: 10px;
    --ac-radius-sm: 6px;
    --ac-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --ac-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* ── Reset / Base ── */
.ac-portal-wrap,
.ac-portal-enrollment-wrap {
    --ac-navy: #1B2A4A;
    --ac-blue: #0A3161;
    --ac-gold: #C4A747;
    --ac-cream: #F8F5F0;
    --ac-red: #D44E5C;
    --ac-grey: #6B7280;
    font-family: var(--ac-font-body);
    color: var(--ac-navy);
    box-sizing: border-box;
}

.ac-portal-wrap *,
.ac-portal-enrollment-wrap * {
    box-sizing: border-box;
}

/* ════════════════════════════════════════════════════════════
   PORTAL LAYOUT — Sidebar + Content
   ════════════════════════════════════════════════════════════ */

.ac-portal-wrap {
    display: flex;
    min-height: 100vh;
    background: var(--ac-white);
}

/* ── Sidebar ── */
.ac-portal-sidebar {
    width: var(--ac-sidebar-width);
    background: var(--ac-navy);
    color: var(--ac-white);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    flex-shrink: 0;
}

.ac-portal-sidebar-header {
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.ac-portal-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--ac-gold);
    color: var(--ac-navy);
    font-family: var(--ac-font-head);
    font-weight: 900;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
}

.ac-portal-sidebar-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--ac-white);
}

.ac-portal-sidebar-code {
    font-size: 12px;
    color: var(--ac-gold);
    margin-top: 2px;
    letter-spacing: 1px;
}

.ac-portal-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.ac-portal-nav-item {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    border-left: 3px solid transparent;
}

.ac-portal-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--ac-white);
}

.ac-portal-nav-item.active {
    background: rgba(196, 167, 71, 0.15);
    color: var(--ac-gold);
    border-left-color: var(--ac-gold);
}

.ac-portal-nav-icon {
    display: inline-block;
    width: 28px;
    font-size: 16px;
    text-align: center;
}

.ac-portal-sidebar-footer {
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ac-portal-logout {
    color: rgba(255, 255, 255, 0.5);
}

.ac-portal-logout:hover {
    color: var(--ac-red);
    background: rgba(212, 78, 92, 0.1);
}

/* ── Content Area ── */
.ac-portal-content {
    flex: 1;
    margin-left: var(--ac-sidebar-width);
    padding: 32px 40px;
    background: var(--ac-white);
    max-width: 100%;
    overflow-x: hidden;
}

.ac-portal-mobile-nav-toggle {
    display: none;
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 200;
    background: var(--ac-navy);
    border: none;
    padding: 10px 12px;
    border-radius: var(--ac-radius-sm);
    cursor: pointer;
}

.ac-portal-mobile-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ac-white);
    margin: 4px 0;
    transition: 0.3s;
}

/* ════════════════════════════════════════════════════════════
   PAGE HEADER
   ════════════════════════════════════════════════════════════ */

.ac-portal-page-header {
    margin-bottom: 28px;
}

.ac-portal-title {
    font-family: var(--ac-font-head);
    font-size: 28px;
    font-weight: 700;
    color: var(--ac-navy);
    margin: 0 0 4px;
}

.ac-portal-subtitle {
    font-size: 15px;
    color: var(--ac-grey);
    margin: 0;
}

/* ════════════════════════════════════════════════════════════
   STAT CARDS
   ════════════════════════════════════════════════════════════ */

.ac-portal-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.ac-portal-stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.ac-portal-stats-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.ac-portal-stat-card {
    background: var(--ac-cream);
    border-top: 4px solid var(--ac-gold);
    border-radius: var(--ac-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--ac-shadow);
}

.ac-portal-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--ac-radius-sm);
    color: var(--ac-white);
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ac-portal-stat-body {
    flex: 1;
    min-width: 0;
}

.ac-portal-stat-value {
    font-family: var(--ac-font-head);
    font-size: 24px;
    font-weight: 700;
    color: var(--ac-navy);
    line-height: 1.2;
}

.ac-portal-stat-label {
    font-size: 12px;
    color: var(--ac-grey);
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ════════════════════════════════════════════════════════════
   TIER PROGRESS
   ════════════════════════════════════════════════════════════ */

.ac-portal-tier-progress-wrap {
    background: var(--ac-cream);
    border-radius: var(--ac-radius);
    padding: 20px;
    margin-bottom: 28px;
    box-shadow: var(--ac-shadow);
}

.ac-portal-tier-progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    color: var(--ac-grey);
}

.ac-portal-progress-bar {
    width: 100%;
    height: 8px;
    background: var(--ac-light-grey);
    border-radius: 4px;
    overflow: hidden;
}

.ac-portal-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ac-gold), var(--ac-navy));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.ac-portal-tier-badge {
    display: inline-block;
    background: var(--ac-gold);
    color: var(--ac-navy);
    font-weight: 700;
    font-size: 14px;
    padding: 8px 20px;
    border-radius: 30px;
    margin-bottom: 28px;
}

/* ════════════════════════════════════════════════════════════
   CARDS
   ════════════════════════════════════════════════════════════ */

.ac-portal-card {
    background: var(--ac-cream);
    border-top: 4px solid var(--ac-gold);
    border-radius: var(--ac-radius);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--ac-shadow);
}

.ac-portal-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ac-portal-card-header h2 {
    font-family: var(--ac-font-head);
    font-size: 20px;
    font-weight: 700;
    color: var(--ac-navy);
    margin: 0;
}

.ac-portal-link {
    color: var(--ac-blue);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.ac-portal-link:hover {
    color: var(--ac-gold);
}

.ac-portal-card-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--ac-navy);
    margin: 0 0 12px;
}

/* ════════════════════════════════════════════════════════════
   TABLES
   ════════════════════════════════════════════════════════════ */

.ac-portal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.ac-portal-table thead th {
    background: var(--ac-navy);
    color: var(--ac-white);
    font-weight: 600;
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ac-portal-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--ac-light-grey);
    color: var(--ac-navy);
}

.ac-portal-table tbody tr:hover {
    background: rgba(196, 167, 71, 0.08);
}

.ac-portal-table-striped tbody tr:nth-child(even) {
    background: rgba(248, 245, 240, 0.5);
}

.ac-portal-table code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: var(--ac-light-grey);
    padding: 2px 6px;
    border-radius: 3px;
}

/* ════════════════════════════════════════════════════════════
   BADGES
   ════════════════════════════════════════════════════════════ */

.ac-portal-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.ac-portal-badge-green {
    background: rgba(22, 163, 74, 0.12);
    color: var(--ac-success);
}

.ac-portal-badge-gold {
    background: rgba(196, 167, 71, 0.15);
    color: #9A8030;
}

.ac-portal-badge-grey {
    background: rgba(107, 114, 128, 0.12);
    color: var(--ac-grey);
}

.ac-portal-badge-red {
    background: rgba(212, 78, 92, 0.12);
    color: var(--ac-red);
}

.ac-portal-badge-blue {
    background: rgba(10, 49, 97, 0.12);
    color: var(--ac-blue);
}

/* ════════════════════════════════════════════════════════════
   TOOLBAR / SEARCH
   ════════════════════════════════════════════════════════════ */

.ac-portal-toolbar {
    margin-bottom: 20px;
}

.ac-portal-search-form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.ac-portal-search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 1px solid var(--ac-light-grey);
    border-radius: var(--ac-radius-sm);
    font-size: 14px;
    font-family: var(--ac-font-body);
    color: var(--ac-navy);
    background: var(--ac-white);
}

.ac-portal-filter-select {
    padding: 10px 16px;
    border: 1px solid var(--ac-light-grey);
    border-radius: var(--ac-radius-sm);
    font-size: 14px;
    font-family: var(--ac-font-body);
    color: var(--ac-navy);
    background: var(--ac-white);
}

/* ════════════════════════════════════════════════════════════
   BUTTONS
   ════════════════════════════════════════════════════════════ */

.ac-portal-btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: var(--ac-radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--ac-font-body);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    line-height: 1.4;
}

.ac-portal-btn-primary {
    background: var(--ac-red);
    color: var(--ac-white);
}

.ac-portal-btn-primary:hover {
    background: #C03B48;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 78, 92, 0.3);
}

.ac-portal-btn-secondary {
    background: var(--ac-navy);
    color: var(--ac-white);
}

.ac-portal-btn-secondary:hover {
    background: var(--ac-navy-light);
}

.ac-portal-btn-small {
    padding: 6px 14px;
    font-size: 12px;
}

.ac-portal-btn-full {
    width: 100%;
    text-align: center;
    padding: 14px 24px;
    margin-top: 8px;
}

.ac-portal-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* ════════════════════════════════════════════════════════════
   FORMS
   ════════════════════════════════════════════════════════════ */

.ac-portal-form {
    max-width: 100%;
}

.ac-portal-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 18px;
}

.ac-portal-field {
    flex: 1;
    margin-bottom: 18px;
}

.ac-portal-form-row .ac-portal-field {
    margin-bottom: 0;
}

.ac-portal-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--ac-navy);
    margin-bottom: 6px;
}

.ac-portal-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--ac-light-grey);
    border-radius: var(--ac-radius-sm);
    font-size: 14px;
    font-family: var(--ac-font-body);
    color: var(--ac-navy);
    background: var(--ac-cream);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ac-portal-input:focus {
    outline: none;
    border-color: var(--ac-gold);
    box-shadow: 0 0 0 3px rgba(196, 167, 71, 0.15);
    background: var(--ac-white);
}

.ac-portal-input[readonly] {
    background: var(--ac-light-grey);
    cursor: not-allowed;
}

.ac-portal-textarea {
    resize: vertical;
    min-height: 80px;
}

.ac-portal-required {
    color: var(--ac-red);
}

/* ── Checkbox & Radio Groups ── */
.ac-portal-checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 18px;
}

.ac-portal-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ac-navy);
    cursor: pointer;
    padding: 8px 14px;
    border: 1px solid var(--ac-light-grey);
    border-radius: var(--ac-radius-sm);
    background: var(--ac-white);
    transition: border-color 0.2s, background 0.2s;
}

.ac-portal-check-label:hover {
    border-color: var(--ac-gold);
}

.ac-portal-check-label input[type="checkbox"],
.ac-portal-check-label input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ac-gold);
    cursor: pointer;
}

.ac-portal-check-label-full {
    display: flex;
    align-items: flex-start;
    width: 100%;
    padding: 14px 16px;
    line-height: 1.5;
}

.ac-portal-check-label-full input {
    margin-top: 2px;
    flex-shrink: 0;
}

/* ── Info Grid ── */
.ac-portal-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1px;
    background: var(--ac-light-grey);
    border-radius: var(--ac-radius-sm);
    overflow: hidden;
}

.ac-portal-info-row {
    display: flex;
    background: var(--ac-white);
    padding: 14px 18px;
    align-items: center;
}

.ac-portal-info-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ac-grey);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex: 1;
}

.ac-portal-info-value {
    font-size: 15px;
    color: var(--ac-navy);
    font-weight: 500;
}

/* ════════════════════════════════════════════════════════════
   PAGINATION
   ════════════════════════════════════════════════════════════ */

.ac-portal-pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 24px;
}

.ac-portal-page-link {
    padding: 8px 14px;
    border: 1px solid var(--ac-light-grey);
    border-radius: var(--ac-radius-sm);
    font-size: 14px;
    text-decoration: none;
    color: var(--ac-navy);
    background: var(--ac-white);
    transition: all 0.2s;
}

.ac-portal-page-link:hover {
    border-color: var(--ac-gold);
    background: var(--ac-cream);
}

.ac-portal-page-link.active {
    background: var(--ac-navy);
    color: var(--ac-white);
    border-color: var(--ac-navy);
}

/* ════════════════════════════════════════════════════════════
   LOGIN FORM
   ════════════════════════════════════════════════════════════ */

.ac-portal-login-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    padding: 40px 20px;
    background: var(--ac-cream);
}

.ac-portal-login-card {
    background: var(--ac-white);
    border-top: 4px solid var(--ac-gold);
    border-radius: var(--ac-radius);
    padding: 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--ac-shadow-lg);
    text-align: center;
}

.ac-portal-login-logo {
    font-family: var(--ac-font-head);
    font-size: 28px;
    font-weight: 900;
    color: var(--ac-navy);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.ac-portal-login-title {
    font-family: var(--ac-font-head);
    font-size: 22px;
    font-weight: 700;
    color: var(--ac-navy);
    margin: 16px 0 20px;
}

.ac-portal-login-message {
    font-size: 14px;
    color: var(--ac-grey);
    margin-bottom: 16px;
    line-height: 1.5;
}

.ac-portal-login-form {
    text-align: left;
}

.ac-portal-login-help {
    font-size: 13px;
    color: var(--ac-grey);
    margin-top: 20px;
}

.ac-portal-login-help a {
    color: var(--ac-blue);
    text-decoration: none;
}

.ac-portal-login-help a:hover {
    text-decoration: underline;
}

/* ════════════════════════════════════════════════════════════
   LINK INPUT + COPY
   ════════════════════════════════════════════════════════════ */

.ac-portal-link-input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid var(--ac-light-grey);
    border-radius: var(--ac-radius-sm);
    font-size: 12px;
    font-family: 'Courier New', monospace;
    background: var(--ac-cream);
    color: var(--ac-navy);
}

/* ════════════════════════════════════════════════════════════
   ELIGIBILITY STATUS
   ════════════════════════════════════════════════════════════ */

.ac-portal-eligibility {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: var(--ac-radius);
    margin-bottom: 8px;
}

.ac-portal-eligibility-active {
    background: rgba(22, 163, 74, 0.08);
    border: 1px solid rgba(22, 163, 74, 0.2);
}

.ac-portal-eligibility-inactive {
    background: rgba(196, 167, 71, 0.08);
    border: 1px solid rgba(196, 167, 71, 0.3);
}

.ac-portal-eligibility-icon {
    font-size: 28px;
    font-weight: 700;
    flex-shrink: 0;
}

.ac-portal-eligibility-active .ac-portal-eligibility-icon {
    color: var(--ac-success);
}

.ac-portal-eligibility-inactive .ac-portal-eligibility-icon {
    color: #9A8030;
}

.ac-portal-eligibility h3 {
    font-family: var(--ac-font-head);
    font-size: 18px;
    margin: 0 0 4px;
    color: var(--ac-navy);
}

.ac-portal-eligibility p {
    font-size: 14px;
    color: var(--ac-grey);
    margin: 0;
    line-height: 1.5;
}

/* ════════════════════════════════════════════════════════════
   STRIPE ELEMENT
   ════════════════════════════════════════════════════════════ */

.ac-portal-stripe-wrap {
    margin-bottom: 18px;
}

.ac-portal-stripe-element {
    padding: 12px 14px;
    border: 1px solid var(--ac-light-grey);
    border-radius: var(--ac-radius-sm);
    background: var(--ac-cream);
    min-height: 44px;
}

/* ════════════════════════════════════════════════════════════
   EMPTY + DISCLAIMER
   ════════════════════════════════════════════════════════════ */

.ac-portal-empty {
    text-align: center;
    padding: 32px 20px;
    color: var(--ac-grey);
    font-size: 15px;
    font-style: italic;
}

.ac-portal-disclaimer {
    font-size: 13px;
    color: var(--ac-grey);
    line-height: 1.6;
    padding: 16px;
    background: rgba(107, 114, 128, 0.05);
    border-radius: var(--ac-radius-sm);
    margin-top: 16px;
}

.ac-portal-disclaimer strong {
    color: var(--ac-navy);
}

.ac-portal-disclaimer p {
    margin: 0 0 8px;
}

.ac-portal-disclaimer p:last-child {
    margin-bottom: 0;
}

/* ════════════════════════════════════════════════════════════
   ENROLLMENT FORM
   ════════════════════════════════════════════════════════════ */

.ac-portal-enrollment-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: var(--ac-white);
}

/* ── Progress Bar ── */
.ac-portal-enrollment-progress-bar {
    margin-bottom: 32px;
    position: sticky;
    top: 0;
    background: var(--ac-white);
    padding: 16px 0;
    z-index: 50;
}

.ac-portal-enrollment-progress-bar .ac-portal-progress-bar {
    height: 6px;
    margin-bottom: 12px;
}

.ac-portal-enrollment-progress-bar .ac-portal-progress-fill {
    transition: width 0.4s ease;
}

.ac-portal-progress-steps {
    display: flex;
    justify-content: space-between;
}

.ac-portal-progress-step {
    font-size: 13px;
    font-weight: 600;
    color: var(--ac-grey);
    transition: color 0.3s;
}

.ac-portal-progress-step.active {
    color: var(--ac-navy);
}

.ac-portal-progress-step.completed {
    color: var(--ac-gold);
}

/* ── Broker Info Banner ── */
.ac-portal-enrollment-broker-info {
    background: var(--ac-cream);
    border-left: 4px solid var(--ac-gold);
    padding: 14px 18px;
    border-radius: var(--ac-radius-sm);
    margin-bottom: 24px;
}

.ac-portal-enrollment-broker-info p {
    margin: 0;
    font-size: 14px;
    color: var(--ac-navy);
}

.ac-portal-enrollment-broker-info strong {
    color: var(--ac-blue);
}

/* ── Form Pages ── */
.ac-portal-enrollment-form {
    width: 100%;
}

.ac-portal-form-page {
    display: none;
    animation: ac-portal-fade-in 0.3s ease;
}

.ac-portal-form-page.active {
    display: block;
}

@keyframes ac-portal-fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Section Headers ── */
.ac-portal-section-header {
    margin-bottom: 24px;
}

.ac-portal-section-header h3 {
    font-family: var(--ac-font-head);
    font-size: 20px;
    font-weight: 700;
    color: var(--ac-white);
    background: var(--ac-navy);
    padding: 14px 20px;
    border-radius: var(--ac-radius-sm);
    margin: 0 0 12px;
}

.ac-portal-section-header-sub h3 {
    font-size: 16px;
    background: var(--ac-blue);
    padding: 10px 16px;
}

.ac-portal-gold-divider {
    height: 3px;
    background: linear-gradient(90deg, var(--ac-gold), transparent);
    border-radius: 2px;
    margin-bottom: 20px;
}

/* ── Dependent Blocks ── */
.ac-portal-dependent-block {
    background: var(--ac-cream);
    border-radius: var(--ac-radius-sm);
    padding: 16px 20px;
    margin-bottom: 16px;
    border-left: 3px solid var(--ac-gold);
}

.ac-portal-dependent-header {
    font-family: var(--ac-font-head);
    font-size: 15px;
    font-weight: 700;
    color: var(--ac-navy);
    margin-bottom: 14px;
}

/* ── Faith Intro ── */
.ac-portal-faith-intro {
    background: var(--ac-cream);
    padding: 18px 20px;
    border-radius: var(--ac-radius-sm);
    margin-bottom: 20px;
}

.ac-portal-faith-intro p {
    margin: 0;
    font-size: 14px;
    color: var(--ac-navy);
    line-height: 1.6;
}

/* ── Consent Items ── */
.ac-portal-consent-items {
    margin-bottom: 20px;
}

.ac-portal-consent-item {
    margin-bottom: 12px;
}

/* ── Scripture ── */
.ac-portal-scripture {
    text-align: center;
    padding: 24px;
    margin: 24px 0;
    background: var(--ac-cream);
    border-radius: var(--ac-radius);
    border: 1px solid var(--ac-light-gold);
}

.ac-portal-scripture p {
    font-family: var(--ac-font-head);
    font-style: italic;
    font-size: 18px;
    color: var(--ac-navy);
    margin: 0 0 8px;
    line-height: 1.6;
}

.ac-portal-scripture cite {
    font-size: 14px;
    color: var(--ac-gold);
    font-style: normal;
    font-weight: 600;
}

/* ── Payment Method Group ── */
.ac-portal-payment-method-group {
    margin-bottom: 24px;
}

.ac-portal-payment-section {
    background: var(--ac-cream);
    border-radius: var(--ac-radius);
    padding: 20px 24px;
    margin-bottom: 20px;
}

/* ── Form Navigation ── */
.ac-portal-form-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--ac-light-grey);
    gap: 12px;
}

/* ── Form Messages ── */
#ac-portal-enrollment-message,
#ac-portal-gen-link-result,
#ac-portal-profile-result,
#ac-portal-payment-result {
    margin-top: 16px;
}

.ac-portal-message-success {
    background: rgba(22, 163, 74, 0.1);
    border: 1px solid rgba(22, 163, 74, 0.3);
    color: var(--ac-success);
    padding: 14px 18px;
    border-radius: var(--ac-radius-sm);
    font-size: 14px;
}

.ac-portal-message-error {
    background: rgba(220, 38, 38, 0.08);
    border: 1px solid rgba(220, 38, 38, 0.2);
    color: var(--ac-error);
    padding: 14px 18px;
    border-radius: var(--ac-radius-sm);
    font-size: 14px;
}

.ac-portal-message-loading {
    color: var(--ac-grey);
    font-size: 14px;
    padding: 14px 0;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    .ac-portal-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ac-portal-stats-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Sidebar collapses to top nav */
    .ac-portal-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        padding-bottom: 0;
    }

    .ac-portal-sidebar-header {
        width: 100%;
        padding: 16px;
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    .ac-portal-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin: 0;
    }

    .ac-portal-sidebar-name {
        font-size: 14px;
    }

    .ac-portal-sidebar-code {
        font-size: 11px;
    }

    .ac-portal-nav {
        display: none;
        width: 100%;
        flex-direction: column;
        padding: 0;
    }

    .ac-portal-nav.open {
        display: flex;
    }

    .ac-portal-nav-item {
        padding: 14px 20px;
        border-left: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .ac-portal-sidebar-footer {
        width: 100%;
        border-top: none;
        padding: 8px 0;
    }

    .ac-portal-mobile-nav-toggle {
        display: block;
    }

    .ac-portal-content {
        margin-left: 0;
        padding: 60px 20px 32px;
    }

    .ac-portal-stats-grid,
    .ac-portal-stats-grid-3,
    .ac-portal-stats-grid-2 {
        grid-template-columns: 1fr;
    }

    .ac-portal-form-row {
        flex-direction: column;
        gap: 0;
    }

    .ac-portal-info-grid {
        grid-template-columns: 1fr;
    }

    .ac-portal-card {
        padding: 16px;
    }

    .ac-portal-table {
        font-size: 13px;
    }

    .ac-portal-table thead {
        display: none;
    }

    .ac-portal-table tbody tr {
        display: block;
        margin-bottom: 12px;
        border: 1px solid var(--ac-light-grey);
        border-radius: var(--ac-radius-sm);
        padding: 8px 0;
    }

    .ac-portal-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 8px 16px;
        border-bottom: 1px solid var(--ac-light-grey);
    }

    .ac-portal-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--ac-grey);
        font-size: 12px;
    }

    .ac-portal-title {
        font-size: 24px;
    }

    .ac-portal-enrollment-wrap {
        padding: 12px;
    }

    .ac-portal-progress-steps {
        flex-direction: column;
        gap: 4px;
    }

    .ac-portal-section-header h3 {
        font-size: 18px;
        padding: 12px 16px;
    }

    .ac-portal-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .ac-portal-search-input,
    .ac-portal-filter-select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ac-portal-stat-card {
        flex-direction: column;
        text-align: center;
        padding: 16px;
    }

    .ac-portal-stat-icon {
        margin: 0 auto 8px;
    }

    .ac-portal-login-card {
        padding: 24px 20px;
    }

    .ac-portal-form-nav {
        flex-direction: column;
    }

    .ac-portal-form-nav .ac-portal-btn {
        width: 100%;
        text-align: center;
    }
}

/* ════════════════════════════════════════════════════════════
   UTILITY
   ════════════════════════════════════════════════════════════ */

.ac-portal-hidden {
    display: none !important;
}

.ac-portal-clearfix::after {
    content: '';
    display: table;
    clear: both;
}
