:root {
    --primary: #059669;
    --primary-dark: #047857;
    --primary-light: #10b981;
    --accent: #0d9488;
    --accent-orange: #ea580c;
    --success: #059669;
    --danger: #dc2626;
    --bg: #f8fafc;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --radius: 14px;
    --shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    --hero-gradient: linear-gradient(135deg, #047857 0%, #059669 45%, #10b981 100%);
    --primary-soft-bg: #ecfdf5;
    --primary-soft-border: #a7f3d0;
    --primary-soft-text: #047857;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background: linear-gradient(160deg, var(--primary-soft-bg) 0%, var(--bg) 45%, #f9fafb 100%);
    color: var(--text);
    min-height: 100vh;
}

.page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.brand h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
}

.brand p {
    margin: 0.15rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 1rem 2rem;
}

.card {
    width: 100%;
    max-width: 480px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.75rem;
    border: 1px solid var(--border);
}

.card-wide {
    max-width: 620px;
}

.main-wide {
    align-items: flex-start;
    padding-top: 1.5rem;
}

.card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.4rem;
}

.card .subtitle {
    margin: 0 0 1.5rem;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 1.1rem;
}

.lookup-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.35rem;
}

.lookup-option {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 500;
    cursor: pointer;
}

.lookup-option input[type="radio"] {
    width: auto;
    margin: 0;
}

.captcha-group {
    margin-top: 0.5rem;
}

.captcha-row {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
    flex-wrap: nowrap;
}

.captcha-question {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 108px;
    min-height: 2.4rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background-color: #e8edf3;
    background-image:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.35) 0 1px, transparent 1px 4px),
        repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.04) 0 1px, transparent 1px 5px),
        repeating-linear-gradient(45deg, rgba(71, 85, 105, 0.08) 0 2px, transparent 2px 7px);
    user-select: none;
    transform: skewX(-3deg);
}

.captcha-question::before,
.captcha-question::after {
    content: "";
    position: absolute;
    left: -8%;
    right: -8%;
    height: 1px;
    background: rgba(100, 116, 139, 0.35);
    pointer-events: none;
    transform: rotate(-8deg);
}

.captcha-question::before {
    top: 38%;
}

.captcha-question::after {
    top: 62%;
    transform: rotate(6deg);
}

.captcha-char {
    display: inline-block;
    position: relative;
    z-index: 1;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
    line-height: 1;
    text-shadow:
        1px 1px 0 rgba(255, 255, 255, 0.55),
        -1px 0 1px rgba(15, 23, 42, 0.18);
}

.captcha-char.captcha-char-space {
    min-width: 0.35rem;
}

.captcha-refresh-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    padding: 0.2rem 0.35rem;
    margin: 0;
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
}

.captcha-refresh-link:hover,
.captcha-refresh-link:focus {
    color: var(--primary);
    outline: none;
}

label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
}

label.required::after {
    content: " *";
    color: var(--danger);
    font-weight: 700;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="file"],
select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    line-height: 1.25;
    transition: border-color 0.15s, box-shadow 0.15s;
    background-color: #fff;
    box-sizing: border-box;
    min-height: 2.75rem;
}

input[type="date"] {
    font-family: inherit;
    color: var(--text);
}

input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.75;
}

select {
    appearance: auto;
    cursor: pointer;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.input-hint {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.consent-group {
    margin-top: 0.25rem;
}

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    cursor: pointer;
    font-weight: 500;
}

.consent-label input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: auto;
}

.consent-text {
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
    font-weight: 400;
}

.error {
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 0.35rem;
}

.alert {
    padding: 0.75rem 0.9rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

.alert-info {
    background: var(--primary-soft-bg);
    color: var(--primary-soft-text);
    border: 1px solid var(--primary-soft-border);
}

.alert-success {
    background: #def7ec;
    color: #03543f;
    border: 1px solid #84e1bc;
}

.alert-error {
    background: #fde8e8;
    color: #9b1c1c;
    border: 1px solid #f8b4b4;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, transform 0.1s;
}

.btn:active {
    transform: scale(0.99);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #fff;
    color: var(--primary);
    border: 1px solid var(--border);
    margin-top: 0.75rem;
}

.btn-secondary:hover {
    background: #f9fafb;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #9b1c1c;
}

.otp-input,
.pin-input {
    letter-spacing: 0.35em;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Portal layout */
.portal-page {
    min-height: 100vh;
    background: var(--bg);
}

.portal-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.04);
}

.portal-nav-inner,
.section-inner,
.hero-inner,
.portal-footer-inner {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
}

.portal-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
}

.portal-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.portal-logo-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--hero-gradient);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.portal-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.portal-logo-text strong {
    font-size: 1.05rem;
}

.portal-logo-text small {
    color: var(--muted);
    font-size: 0.78rem;
}

.portal-nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
}

.nav-link:hover {
    color: var(--primary);
    background: var(--primary-soft-bg);
}

.nav-link-cta {
    background: var(--primary);
    color: #fff !important;
}

.nav-link-cta:hover {
    background: var(--primary-dark);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-soft-bg);
}

.nav-link-cta.active {
    background: var(--primary-dark);
}

/* Admin console layout */
.admin-page {
    background: #eef2f7;
    min-height: 100vh;
}

.admin-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #e2e8f0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.25);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
}

.admin-header-inner {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 0.75rem 0;
    min-height: 64px;
}

.admin-brand {
    display: flex;
    align-items: center;
    min-width: 0;
    flex-shrink: 0;
}

.admin-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.admin-brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}

.admin-brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    min-width: 0;
}

.admin-brand-copy strong {
    font-size: 0.98rem;
    color: #f8fafc;
}

.admin-brand-copy small {
    font-size: 0.76rem;
    color: #94a3b8;
}

.admin-subnav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
}

.admin-subnav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.85rem;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    white-space: nowrap;
}

.admin-subnav-link:hover,
.admin-subnav-link:focus {
    color: #f8fafc;
    background: rgba(148, 163, 184, 0.12);
}

.admin-subnav-link.active {
    color: #ecfdf5;
    background: rgba(16, 185, 129, 0.22);
    box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.35);
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-shrink: 0;
}

.admin-portal-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
}

.admin-portal-link:hover,
.admin-portal-link:focus {
    color: #6ee7b7;
    text-decoration: underline;
}

.admin-user-name {
    font-size: 0.82rem;
    color: #cbd5e1;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.15);
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-admin-logout {
    border: 1px solid rgba(148, 163, 184, 0.45);
    background: transparent;
    color: #e2e8f0;
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-admin-logout:hover,
.btn-admin-logout:focus {
    background: rgba(248, 250, 252, 0.08);
    border-color: #94a3b8;
}

.admin-header-login .admin-header-inner {
    padding: 0.85rem 0;
}

.admin-page .admin-main {
    width: min(1200px, calc(100% - 2rem));
    max-width: none;
    margin: 0 auto;
    align-items: stretch;
    padding: 1.5rem 0 2rem;
    flex: 1;
}

.admin-card {
    width: 100%;
    max-width: none;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.admin-page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.admin-page-header h2 {
    margin: 0 0 0.35rem;
}

.admin-page-header .subtitle {
    margin: 0;
}

.admin-page-header .btn {
    width: auto;
    flex: 0 0 auto;
}

.admin-login-card {
    max-width: 420px;
    margin: 0 auto;
}

.admin-search-form {
    margin: 0 0 1.25rem;
    padding: 1rem 1.1rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.admin-search-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 0.85rem 1rem;
    align-items: end;
}

.admin-search-form .form-group {
    margin: 0;
    min-width: 0;
}

.admin-search-form label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.admin-search-input {
    display: block;
    width: 100%;
    min-width: 0;
}

.admin-search-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.admin-search-actions .btn {
    width: auto;
    flex: 0 0 auto;
    padding: 0.5rem 0.85rem;
    font-size: 0.875rem;
    margin-top: 0;
}

.hero {
    background: var(--hero-gradient);
    color: #fff;
    padding: 3.5rem 0 4rem;
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2rem;
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-copy h1 {
    margin: 0 0 1rem;
    font-size: clamp(1.9rem, 4vw, 2.8rem);
    line-height: 1.15;
}

.text-highlight {
    color: #fde68a;
}

.hero-lead {
    margin: 0 0 1.5rem;
    font-size: 1.05rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.92);
    max-width: 38rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-actions .btn {
    width: auto;
    min-width: 160px;
}

.hero-actions .btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
}

.hero-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hero-pricing-card {
    background: rgba(255, 255, 255, 0.98);
    color: var(--text);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.pricing-tag {
    display: inline-block;
    background: #ecfdf5;
    color: var(--success);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.pricing-amount {
    display: flex;
    align-items: flex-start;
    gap: 0.15rem;
    margin-bottom: 0.2rem;
}

.pricing-currency {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0.35rem;
}

.pricing-value {
    font-size: 3rem;
    line-height: 1;
    font-weight: 800;
    color: var(--primary);
}

.pricing-unit {
    margin: 0 0 1rem;
    color: var(--muted);
}

.pricing-features {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--muted);
    line-height: 1.7;
}

.pricing-features-detail {
    font-size: 0.82rem;
    color: var(--muted);
}

.features,
.how-it-works,
.subscribe-section {
    padding: 3rem 0;
}

.portal-stats {
    padding: 0 0 2.5rem;
    margin-top: -1.5rem;
}

.portal-notifications {
    display: none;
}

.subscribe-side {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-height: 100%;
}

.notifications-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    max-width: none;
    padding: 1.1rem 1.15rem;
}

.notifications-box-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
    flex-shrink: 0;
}

.notifications-box-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.notifications-box-header h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--primary);
}

.notification-list-viewport {
    flex: 1;
    overflow: visible;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: none;
    transform: none;
}

.notification-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 3px solid var(--primary);
    border-radius: 10px;
    padding: 0.75rem 0.9rem;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #334155;
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1rem;
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    margin-bottom: 0.35rem;
}

.stat-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.stat-hint {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
}

.section-title {
    text-align: center;
    margin: 0 0 2rem;
    font-size: 1.8rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow);
}

.feature-card h3 {
    margin: 0.5rem 0;
    font-size: 1.05rem;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.feature-icon {
    font-size: 1.6rem;
}

.feature-card-blue { border-top: 4px solid #10b981; }
.feature-card-green { border-top: 4px solid #10b981; }
.feature-card-purple { border-top: 4px solid #8b5cf6; }
.feature-card-orange { border-top: 4px solid #f97316; }

.how-it-works {
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.step {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
}

.step-number {
    display: inline-grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 50%;
    background: var(--primary-soft-bg);
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.step h3 {
    margin: 0 0 0.5rem;
    font-size: 1rem;
}

.step p {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.subscribe-section {
    background: #ecfdf5;
}

.subscribe-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 1.5rem;
    align-items: stretch;
}

.subscribe-intro h2 {
    margin: 0 0 0.75rem;
    font-size: 1.8rem;
}

.subscribe-intro p {
    margin: 0 0 1.25rem;
    color: var(--muted);
    line-height: 1.6;
}

.rate-banner {
    display: inline-flex;
    flex-direction: column;
    gap: 0.2rem;
    background: #fff;
    border: 1px solid var(--primary-soft-border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

.rate-banner span {
    color: var(--muted);
    font-size: 0.85rem;
}

.rate-banner strong {
    color: var(--primary);
    font-size: 1.1rem;
}

.subscribe-card {
    max-width: none;
}

.portal-main {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.portal-main .card-wide.faq-page,
.portal-main .card-wide.policy-page,
.portal-main .card-wide.kb-page {
    max-width: min(1120px, calc(100% - 2rem));
}

.portal-footer {
    background: #064e3b;
    color: #d1fae5;
    padding: 1.25rem 0;
    font-weight: 400;
}

.portal-footer-inner {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 2rem;
}

.portal-footer-brand {
    flex: 1 1 16rem;
    min-width: 0;
}

.portal-footer-aside {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    flex: 0 1 auto;
}

.portal-footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.portal-footer-copy {
    margin: 0;
    font-size: 0.88rem;
}

.portal-footer-support {
    text-align: left;
}

.portal-footer-support-title {
    margin: 0 0 0.5rem;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #a7f3d0;
}

.portal-footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.35rem;
}

.portal-footer-contact li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    align-items: baseline;
    font-size: 0.88rem;
}

.contact-label {
    color: #94a3b8;
    min-width: 4.5rem;
}

.portal-footer a {
    color: #6ee7b7;
    text-decoration: none;
    font-weight: 400;
    font-size: 0.88rem;
}

.portal-footer a:hover,
.portal-footer a:focus {
    text-decoration: underline;
}

.success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #def7ec;
    color: var(--success);
    display: grid;
    place-items: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.summary {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.25rem 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.45rem 0;
    font-size: 0.95rem;
}

.summary-row + .summary-row {
    border-top: 1px solid var(--border);
}

.summary-row span:first-child {
    color: var(--muted);
}

.amount-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary-soft-bg);
    border: 1px solid var(--primary-soft-border);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.95rem;
}

.amount-box strong,
.amount-highlight {
    color: var(--primary);
    font-size: 1.2rem;
}

.amount-row strong {
    color: var(--primary);
    font-size: 1.1rem;
}

.bank-box {
    background: #f9fafb;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin: 1.25rem 0;
}

.bank-box h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.pending-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fef3c7;
    color: #b45309;
    display: grid;
    place-items: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

.status-pending {
    color: #b45309;
}

.status-active {
    color: var(--success);
}

.status-rejected {
    color: var(--danger);
}

.status-payment {
    color: var(--primary);
}

.home-link-wrap {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

.home-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.home-link:hover {
    text-decoration: underline;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.25rem;
}

.tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.tab:hover {
    color: var(--primary);
}

.tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--primary-soft-bg);
    color: var(--primary);
    font-size: 0.75rem;
}

.tab-panel {
    margin-bottom: 1.25rem;
}

.reason-cell {
    white-space: normal;
    min-width: 180px;
    max-width: 280px;
}

textarea {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15);
}

.reject-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.25rem 0;
}

.reject-box h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #991b1b;
}

.additional-subscription-box {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 1rem;
    margin: 1.25rem 0;
}

.additional-subscription-box h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: var(--primary);
}

.table-wrap {
    overflow-x: auto;
    margin: 1rem 0 1.25rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th,
.data-table td {
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    white-space: nowrap;
}

.data-table th {
    color: var(--muted);
    font-weight: 600;
}

.link-btn {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.action-row .btn,
.action-row .inline-form {
    width: auto;
    flex: 1 1 180px;
}

.inline-form {
    margin: 0;
}

.footer {
    text-align: center;
    padding: 1rem;
    color: var(--muted);
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .hero-inner,
    .subscribe-layout,
    .feature-grid,
    .steps,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .notifications-box {
        min-height: 160px;
    }

    .portal-footer-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .portal-footer-aside {
        flex-direction: column;
        gap: 1.25rem;
    }

    .portal-footer-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.75rem 1rem;
    }

    .portal-nav-links {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .admin-header-inner {
        flex-wrap: wrap;
        gap: 0.75rem;
        padding: 0.65rem 0;
    }

    .admin-brand {
        flex: 1 1 auto;
    }

    .admin-subnav {
        order: 3;
        flex: 1 1 100%;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.15rem;
    }

    .admin-header-actions {
        margin-left: auto;
    }

    .admin-search-grid {
        grid-template-columns: 1fr;
    }

    .admin-search-actions {
        width: 100%;
    }

    .admin-search-actions .btn {
        flex: 0 0 auto;
        width: auto;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .card {
        padding: 1.25rem;
        border-radius: 10px;
    }

    .brand h1 {
        font-size: 1.15rem;
    }

    .card h2 {
        font-size: 1.2rem;
    }
}

/* Accessibility toolbar */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    background: #0f172a;
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 0 0 8px 8px;
    text-decoration: none;
    font-weight: 700;
}

.skip-link:focus {
    left: 1rem;
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.a11y-toolbar {
    background: #f8fafc;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.a11y-toolbar-inner {
    width: min(1120px, calc(100% - 2rem));
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem 0.5rem;
    padding: 0.2rem 0;
    font-size: 0.65rem;
}

.a11y-toolbar-icon {
    font-size: 0.75rem;
    line-height: 1;
    color: #94a3b8;
    margin-right: 0.15rem;
}

.a11y-toolbar-group {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
}

.a11y-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    border-radius: 4px;
    padding: 0.1rem 0.35rem;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.3;
    cursor: pointer;
    min-width: 1.35rem;
}

.a11y-btn:hover,
.a11y-btn:focus {
    background: #f1f5f9;
    color: #334155;
    outline: 1px solid #94a3b8;
    outline-offset: 0;
}

.a11y-btn[aria-pressed="true"] {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #334155;
}

.a11y-btn-read {
    font-size: 0.7rem;
    padding: 0.1rem 0.3rem;
}

html.a11y-font-sm {
    font-size: 14px;
}

html.a11y-font-md {
    font-size: 16px;
}

html.a11y-font-lg {
    font-size: 18px;
}

html.a11y-font-xl {
    font-size: 20px;
}

html.a11y-contrast-high {
    --bg: #ffffff;
    --card: #ffffff;
    --text: #000000;
    --muted: #1f2937;
    --border: #000000;
    --primary: #047857;
    --primary-dark: #065f46;
    --primary-light: #059669;
    --shadow: 0 0 0 2px #000000;
}

html.a11y-contrast-high body {
    background: #ffffff;
}

html.a11y-contrast-high .btn-primary {
    background: #047857;
    border: 2px solid #000000;
}

html.a11y-contrast-high a:focus,
html.a11y-contrast-high button:focus,
html.a11y-contrast-high input:focus {
    outline: 3px solid #000000;
    outline-offset: 2px;
}

html.a11y-contrast-dark {
    --bg: #0b1220;
    --card: #111827;
    --text: #f8fafc;
    --muted: #cbd5e1;
    --border: #475569;
    --primary: #34d399;
    --primary-dark: #10b981;
    --primary-light: #6ee7b7;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

html.a11y-contrast-dark body {
    background: linear-gradient(160deg, #0f172a 0%, #0b1220 45%, #020617 100%);
    color: var(--text);
}

html.a11y-contrast-dark .portal-nav,
html.a11y-contrast-dark .portal-footer {
    background: #022c22;
}

html.a11y-contrast-dark .a11y-toolbar {
    background: #111827;
    border-color: #334155;
    color: #94a3b8;
}

html.a11y-contrast-dark .a11y-btn {
    background: #1e293b;
    border-color: #475569;
    color: #cbd5e1;
}

html.a11y-contrast-dark .notification-item,
html.a11y-contrast-dark .rate-banner,
html.a11y-contrast-dark .stat-card,
html.a11y-contrast-dark .feature-card,
html.a11y-contrast-dark .card {
    background: #111827;
    color: #f8fafc;
    border-color: #475569;
}

html.a11y-contrast-dark .hero {
    background: linear-gradient(135deg, #064e3b 0%, #047857 50%, #059669 100%);
}

/* FAQ page */
.faq-page h1 {
    margin-top: 0;
    font-size: 1.75rem;
}

.faq-list {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    background: #f8fafc;
}

.faq-item h2 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    color: var(--primary);
}

.faq-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.faq-item p + p,
.faq-item ul + p {
    margin-top: 0.75rem;
}

.faq-item ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    color: var(--muted);
    line-height: 1.6;
}

.faq-item p + ul {
    margin-top: 0.5rem;
}

.faq-item li {
    margin-bottom: 0.25rem;
}

.faq-item a {
    color: var(--primary);
    font-weight: 600;
}

.faq-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.kb-toc {
    margin: 1.25rem 0 0.5rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.kb-toc-title {
    margin: 0 0 0.65rem;
    font-size: 0.95rem;
    color: var(--text);
}

.kb-toc ul {
    margin: 0;
    padding-left: 1.2rem;
    columns: 2;
    column-gap: 2rem;
    line-height: 1.7;
}

.kb-toc a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.kb-toc a:hover,
.kb-toc a:focus {
    text-decoration: underline;
}

.kb-disclaimer {
    background: #fffbeb;
    border-color: #fcd34d;
}

.kb-workflow-title {
    margin: 1.25rem 0 0.75rem;
    font-size: 1rem;
    color: var(--text);
}

.kb-workflow {
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    counter-reset: kb-step;
    display: grid;
    gap: 0.75rem;
}

.kb-workflow li {
    counter-increment: kb-step;
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}

.kb-workflow li::before {
    content: counter(kb-step);
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.kb-workflow-content strong {
    display: block;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.kb-workflow-content p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
    font-size: 0.92rem;
}

.kb-workflow a {
    color: var(--primary);
    font-weight: 600;
}

@media (max-width: 640px) {
    .kb-toc ul {
        columns: 1;
    }
}

.policy-page h1 {
    margin-top: 0;
    font-size: 1.75rem;
}

.policy-updated {
    margin: -0.5rem 0 1.25rem;
    color: var(--muted);
    font-size: 0.88rem;
}

.policy-list {
    display: grid;
    gap: 1rem;
    margin: 1.5rem 0;
}

.policy-section {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1rem 1.1rem;
    background: #f8fafc;
}

.policy-section h2 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    color: var(--primary);
}

.policy-section p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.policy-section p + p,
.policy-section ul + p {
    margin-top: 0.75rem;
}

.policy-section ul {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    color: var(--muted);
    line-height: 1.6;
}

.policy-section p + ul {
    margin-top: 0.5rem;
}

.policy-section li {
    margin-bottom: 0.25rem;
}

.policy-section a {
    color: var(--primary);
    font-weight: 600;
}

.policy-contact {
    list-style: none;
    padding-left: 0;
}

@media (max-width: 600px) {
    .a11y-toolbar-inner {
        gap: 0.25rem 0.35rem;
        justify-content: flex-end;
    }
}
