/* ============================================================
   PORTAL.CSS — Sistema MEYA · Município do Cuima
   Design: Organic/Civic · Refined & Trustworthy
   ============================================================ */

/* ============================================================
   VARIÁVEIS
   ============================================================ */
:root {
    --ink:          #0d1f2d;
    --ink-soft:     #3d5166;
    --muted:        #6b8194;
    --line:         rgba(13, 31, 45, 0.08);
    --surface:      #f2f7fb;
    --surface-alt:  #e8f1f8;
    --white:        #ffffff;
    --primary:      #0277bd;
    --primary-deep: #01579b;
    --primary-pale: rgba(2, 119, 189, 0.08);
    --accent:       #38b2e8;
    --accent-warm:  #0ec2a0;
    --shadow-sm:    0 2px 8px rgba(2, 119, 189, 0.10);
    --shadow-md:    0 8px 32px rgba(2, 119, 189, 0.14);
    --shadow-lg:    0 20px 60px rgba(2, 119, 189, 0.18);
    --radius-sm:    12px;
    --radius-md:    20px;
    --radius-lg:    32px;
    --radius-pill:  999px;
    --font-display: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-body:    'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body.portal-body {
    font-family: var(--font-body);
    color: var(--ink);
    background-color: var(--surface);
    background-image:
        radial-gradient(ellipse 80% 50% at 20% -10%, rgba(56, 178, 232, 0.18) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 85% 5%,  rgba(2, 119, 189, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 40% 60% at 50% 100%, rgba(14, 194, 160, 0.08) 0%, transparent 50%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

body.portal-community-body {
    background-image:
        radial-gradient(ellipse 70% 45% at 0% 0%,   rgba(2, 119, 189, 0.12) 0%, transparent 55%),
        radial-gradient(ellipse 55% 35% at 100% 15%, rgba(56, 178, 232, 0.10) 0%, transparent 50%),
        radial-gradient(ellipse 50% 55% at 30% 100%, rgba(14, 194, 160, 0.07) 0%, transparent 50%);
}

/* ============================================================
   SHELL
   ============================================================ */
.portal-shell {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 48px) 64px;
}

/* ============================================================
   TOPBAR
   ============================================================ */
.portal-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 20px 0 32px;
    position: relative;
}

.portal-topbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--line), transparent);
}

/* Brand */
.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--ink);
    text-decoration: none !important;
    transition: opacity 0.2s;
}

.portal-brand:hover { opacity: 0.82; }

.portal-brand-mark {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, var(--primary) 0%, var(--primary-deep) 100%);
    color: var(--white);
    font-size: 1.4rem;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(2, 119, 189, 0.30), inset 0 1px 0 rgba(255,255,255,0.18);
}

.portal-brand strong {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.1;
    color: var(--ink);
}

.portal-brand small {
    display: block;
    font-size: 0.76rem;
    color: var(--muted);
    font-weight: 400;
    line-height: 1.3;
}

/* Topbar actions */
.portal-topbar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-portal-primary,
.btn-portal-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border-radius: var(--radius-pill);
    padding: 0.65rem 1.4rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: none !important;
    transition: all 0.22s var(--ease-out);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.btn-portal-primary {
    color: var(--white);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-deep) 100%);
    box-shadow: 0 4px 14px rgba(2, 119, 189, 0.32);
}

.btn-portal-primary:hover,
.btn-portal-primary:focus {
    color: var(--white);
    background: linear-gradient(135deg, #0288d1 0%, var(--primary) 100%);
    box-shadow: 0 8px 24px rgba(2, 119, 189, 0.42);
    transform: translateY(-1px);
}

.btn-portal-primary:active { transform: translateY(0); }

.btn-portal-ghost {
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    backdrop-filter: blur(8px);
}

.btn-portal-ghost:hover,
.btn-portal-ghost:focus {
    color: var(--ink);
    background: var(--white);
    border-color: rgba(2, 119, 189, 0.20);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.btn-lg { padding: 0.85rem 1.8rem; font-size: 1rem; }

/* ============================================================
   KICKER LABELS
   ============================================================ */
.portal-kicker,
.portal-card-kicker,
.portal-panel-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--primary);
    margin-bottom: 12px;
}

.portal-kicker::before,
.portal-card-kicker::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.portal-hero {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 32px;
    align-items: stretch;
    padding: 48px 0 40px;
}

.portal-hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portal-hero-copy h1 {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 4.5vw, 4.2rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0 0 20px;
    max-width: 14ch;
}

.portal-hero-copy > p {
    font-size: 1.05rem;
    line-height: 1.72;
    color: var(--ink-soft);
    max-width: 52ch;
    margin-bottom: 0;
}

.portal-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

/* Hero card */
.portal-hero-card {
    position: relative;
    display: flex;
    flex-direction: column;
}

.portal-hero-panel {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(14px);
    box-shadow: var(--shadow-lg);
    padding: 32px;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.portal-hero-panel::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 178, 232, 0.14) 0%, transparent 70%);
    pointer-events: none;
}

.portal-panel-label {
    margin-bottom: 4px;
}

.portal-hero-panel h2 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--ink);
    margin: 6px 0 24px;
    line-height: 1.25;
}

/* Process steps */
.portal-process { display: grid; gap: 20px; }

.portal-process-item {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 16px;
    align-items: start;
}

.portal-process-item > span {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-pale) 0%, rgba(56, 178, 232, 0.10) 100%);
    color: var(--primary-deep);
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    border: 1px solid rgba(2, 119, 189, 0.10);
}

.portal-process-item strong {
    display: block;
    font-size: 0.95rem;
    color: var(--ink);
    margin-bottom: 4px;
}

.portal-process-item p {
    margin: 0;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* ============================================================
   STATS BAND
   ============================================================ */
.portal-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 8px 0 40px;
}

.portal-stat-card {
    background: rgba(255, 255, 255, 0.80);
    border: 1px solid rgba(255, 255, 255, 0.90);
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 24px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
}

.portal-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.portal-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
}

.portal-stat-card:nth-child(1) .portal-stat-icon { background: rgba(2, 119, 189, 0.10); color: var(--primary); }
.portal-stat-card:nth-child(2) .portal-stat-icon { background: rgba(14, 194, 160, 0.12); color: var(--accent-warm); }
.portal-stat-card:nth-child(3) .portal-stat-icon { background: rgba(56, 178, 232, 0.12); color: var(--accent); }

.portal-stat-card strong {
    display: block;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
    margin-bottom: 4px;
}

.portal-stat-card small {
    color: var(--muted);
    font-size: 0.84rem;
}

/* ============================================================
   INFO GRID
   ============================================================ */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 8px;
}

.portal-info-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.90);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 32px;
    transition: transform 0.22s var(--ease-out), box-shadow 0.22s var(--ease-out);
}

.portal-info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.portal-info-card h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--ink);
    margin: 6px 0 16px;
    line-height: 1.25;
}

.portal-info-card > p {
    color: var(--ink-soft);
    font-size: 0.96rem;
    line-height: 1.7;
}

.portal-info-accent {
    background: linear-gradient(145deg, rgba(2, 119, 189, 0.07) 0%, rgba(255, 255, 255, 0.88) 60%);
    border-color: rgba(2, 119, 189, 0.14);
}

.portal-bullets {
    list-style: none;
    padding: 0;
    margin: 0;
}

.portal-bullets li {
    position: relative;
    padding: 8px 0 8px 22px;
    color: var(--ink-soft);
    font-size: 0.93rem;
    line-height: 1.55;
    border-bottom: 1px solid var(--line);
}

.portal-bullets li:last-child { border-bottom: none; }

.portal-bullets li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 17px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
}

/* ============================================================
   FOOTER
   ============================================================ */
.portal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 24px 0 0;
    margin-top: 48px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.86rem;
}

/* ============================================================
   COMMUNITY PAGE
   ============================================================ */
.community-layout {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 32px;
    align-items: start;
    padding-top: 40px;
}

/* Left copy panel */
.community-panel-copy {
    position: sticky;
    top: 24px;
}

.community-panel-copy h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.5vw, 3.4rem);
    font-weight: 700;
    line-height: 1.06;
    letter-spacing: -0.02em;
    color: var(--ink);
    margin: 0 0 18px;
    max-width: 16ch;
}

.community-panel-copy > p {
    font-size: 1rem;
    line-height: 1.72;
    color: var(--ink-soft);
    max-width: 52ch;
}

/* Highlights */
.community-highlights {
    display: grid;
    gap: 14px;
    margin: 28px 0;
}

.community-highlight {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 14px;
    align-items: start;
}

.community-highlight i {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    background: var(--primary-pale);
    color: var(--primary);
    flex-shrink: 0;
    border: 1px solid rgba(2, 119, 189, 0.10);
}

.community-highlight:nth-child(2) i { background: rgba(14, 194, 160, 0.10); color: var(--accent-warm); border-color: rgba(14, 194, 160, 0.12); }
.community-highlight:nth-child(3) i { background: rgba(56, 178, 232, 0.10); color: var(--accent); border-color: rgba(56, 178, 232, 0.12); }

.community-highlight strong {
    display: block;
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 3px;
}

.community-highlight p {
    margin: 0;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

/* Before-send note */
.community-note {
    background: rgba(2, 119, 189, 0.04);
    border: 1px solid rgba(2, 119, 189, 0.10);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    margin-top: 4px;
}

.community-note h3 {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary-deep);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.community-note .portal-bullets li {
    font-size: 0.86rem;
    padding-top: 6px;
    padding-bottom: 6px;
    color: var(--ink-soft);
}

/* Right form panel */
.community-panel-form {
    background: rgba(255, 255, 255, 0.90);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
    padding: 36px;
    position: relative;
    overflow: hidden;
}

.community-panel-form::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 178, 232, 0.10) 0%, transparent 70%);
    pointer-events: none;
}

.community-form-head {
    margin-bottom: 28px;
}

.community-form-head h2 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ink);
    margin: 6px 0 8px;
    line-height: 1.15;
}

.community-form-head p {
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.6;
    margin: 0;
}

/* Divider */
.community-form-head + .community-form {
    border-top: 1px solid var(--line);
    padding-top: 26px;
}

/* Form fields */
.community-form .form-label {
    font-weight: 600;
    font-size: 0.86rem;
    color: var(--ink);
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

.community-form .form-label .text-danger { color: var(--primary) !important; }

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

.community-form .form-control,
.community-form .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--line);
    background: rgba(255, 255, 255, 0.85);
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.93rem;
    color: var(--ink);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    width: 100%;
}

.community-form .form-control:focus,
.community-form .form-select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(2, 119, 189, 0.12);
}

.community-form .form-control::placeholder { color: var(--muted); font-weight: 400; }

.community-form .form-select.form-select-lg {
    font-size: 0.96rem;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    border-width: 1.5px;
}

.community-form textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* Grid gap override */
.community-form .row.g-3 { --bs-gutter-y: 1rem; }

/* Submit area */
.community-form-actions {
    margin-top: 28px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.community-form-actions .btn-portal-primary {
    align-self: stretch;
    justify-content: center;
    padding: 1rem 1.8rem;
    font-size: 1rem;
    border-radius: var(--radius-sm);
}

.btn-sm {
    padding: 0.55rem 1rem;
    font-size: 0.82rem;
}

.community-form-helper {
    color: var(--muted);
    font-size: 0.83rem;
    line-height: 1.55;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.community-form-helper::before {
    content: '\F5A3'; /* Bootstrap Icons shield-check */
    font-family: 'bootstrap-icons';
    font-size: 0.88rem;
    color: var(--accent-warm);
    flex-shrink: 0;
    margin-top: 1px;
}

/* Alert feedback */
#mensagemReportePublico {
    border-radius: var(--radius-sm);
    border: none;
    font-size: 0.92rem;
    padding: 14px 16px;
}

#mensagemReportePublico.alert-success {
    background: rgba(14, 194, 160, 0.10);
    color: #0a7a65;
    border-left: 3px solid var(--accent-warm);
}

#mensagemReportePublico.alert-danger {
    background: rgba(220, 53, 69, 0.08);
    color: #b91c2d;
    border-left: 3px solid #dc3545;
}

.portal-status-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.portal-status-chip {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(2, 119, 189, 0.06);
    border: 1px solid rgba(2, 119, 189, 0.08);
}

.portal-status-chip strong {
    display: block;
    font-size: 1.3rem;
    color: var(--ink);
    line-height: 1.1;
}

.portal-status-chip small {
    color: var(--muted);
    font-size: 0.8rem;
}

.portal-status-chip.is-ok {
    background: rgba(40, 167, 69, 0.08);
    border-color: rgba(40, 167, 69, 0.12);
}

.portal-status-chip.is-alert {
    background: rgba(255, 193, 7, 0.12);
    border-color: rgba(255, 193, 7, 0.18);
}

.portal-status-chip.is-danger {
    background: rgba(220, 53, 69, 0.08);
    border-color: rgba(220, 53, 69, 0.12);
}

.portal-source-list {
    display: grid;
    gap: 12px;
}

.portal-source-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.portal-source-item strong {
    display: block;
    color: var(--ink);
    font-size: 0.95rem;
}

.portal-source-item small {
    color: var(--muted);
    font-size: 0.82rem;
}

.portal-source-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-pill);
    font-size: 0.74rem;
    font-weight: 700;
    white-space: nowrap;
}

.portal-source-badge.estado-funcional {
    background: rgba(40, 167, 69, 0.1);
    color: #1f7a36;
}

.portal-source-badge.estado-avariada {
    background: rgba(220, 53, 69, 0.1);
    color: #b91c2d;
}

.portal-source-badge.estado-manutencao {
    background: rgba(255, 193, 7, 0.16);
    color: #9a6a00;
}

.community-data-card {
    margin-top: 18px;
    padding: 20px 22px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-sm);
}

.community-data-card h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.community-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.community-divider span {
    flex: 1;
    height: 1px;
    background: var(--line);
}

.portal-empty-note {
    display: inline-block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.82rem;
}

.portal-receipt,
.portal-tracking-card {
    margin-top: 22px;
    padding: 22px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(2, 119, 189, 0.1);
    box-shadow: var(--shadow-sm);
}

.portal-receipt-head,
.portal-tracking-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.portal-receipt-head h3,
.portal-tracking-head h3 {
    margin: 4px 0 0;
    font-size: 1.15rem;
    color: var(--ink);
}

.portal-receipt-grid,
.portal-tracking-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.portal-receipt-grid div,
.portal-tracking-grid div {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(2, 119, 189, 0.05);
    border: 1px solid rgba(2, 119, 189, 0.08);
}

.portal-receipt-grid small,
.portal-tracking-grid small,
.portal-tracking-description small {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.portal-receipt-grid strong,
.portal-tracking-grid strong {
    display: block;
    color: var(--ink);
    font-size: 0.95rem;
    line-height: 1.45;
}

.portal-receipt-actions {
    margin-top: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.portal-tracking-description {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.portal-tracking-description p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.65;
}

.portal-proof-layout {
    padding-top: 34px;
}

.portal-proof-card {
    max-width: 920px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.94);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 34px;
}

.portal-proof-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.portal-proof-head h1 {
    margin: 6px 0 8px;
    font-size: 2rem;
    color: var(--ink);
}

.portal-proof-head p {
    margin: 0;
    color: var(--muted);
}

.portal-proof-code {
    padding: 18px 20px;
    border-radius: var(--radius-md);
    background: rgba(2, 119, 189, 0.08);
    border: 1px solid rgba(2, 119, 189, 0.12);
    margin-bottom: 18px;
}

.portal-proof-code small,
.portal-proof-grid small,
.portal-proof-description small {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.portal-proof-code strong {
    font-size: 1.7rem;
    color: var(--primary-deep);
}

.portal-proof-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.portal-proof-grid div {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.portal-proof-grid strong {
    display: block;
    color: var(--ink);
    line-height: 1.5;
}

.portal-proof-description {
    margin-top: 18px;
    padding: 18px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
}

.portal-proof-description p {
    margin: 0;
    color: var(--ink-soft);
    line-height: 1.7;
}

.portal-proof-footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.85rem;
}

.portal-tracking-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* ============================================================
   PANEL (generic card used for hero panel + community panel)
   ============================================================ */
.portal-hero-panel,
.portal-info-card,
.portal-stat-card,
.community-panel-form {
    animation: fadeUpIn 0.5s var(--ease-out) both;
}

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

.portal-stats .portal-stat-card:nth-child(1) { animation-delay: 0.05s; }
.portal-stats .portal-stat-card:nth-child(2) { animation-delay: 0.10s; }
.portal-stats .portal-stat-card:nth-child(3) { animation-delay: 0.15s; }
.portal-grid  .portal-info-card:nth-child(1)  { animation-delay: 0.08s; }
.portal-grid  .portal-info-card:nth-child(2)  { animation-delay: 0.14s; }

/* ============================================================
   RESPONSIVE — Tablet
   ============================================================ */
@media (max-width: 1023.98px) {
    .portal-hero { grid-template-columns: 1fr; gap: 24px; padding: 32px 0 28px; }
    .portal-hero-copy h1 { max-width: none; font-size: clamp(2.2rem, 5vw, 3.4rem); }
    .portal-hero-panel { padding: 26px; }
    .portal-stats { grid-template-columns: repeat(3, 1fr); }
    .portal-grid  { grid-template-columns: 1fr; }
    .community-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 28px; }
    .community-panel-copy { position: static; }
    .community-panel-copy h1 { max-width: none; }
    .community-panel-form { padding: 28px; }
    .portal-status-grid { grid-template-columns: 1fr; }
    .portal-receipt-grid,
    .portal-tracking-grid,
    .portal-proof-grid { grid-template-columns: 1fr; }
    .portal-proof-card { padding: 24px; }
    .portal-proof-head,
    .portal-tracking-head { flex-direction: column; }
}

/* ============================================================
   RESPONSIVE — Mobile
   ============================================================ */
@media (max-width: 767.98px) {
    .portal-shell { padding: 0 16px 48px; }

    .portal-topbar {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 0 24px;
        gap: 14px;
    }

    .portal-topbar-actions {
        width: 100%;
    }

    .portal-topbar-actions a {
        flex: 1;
        justify-content: center;
    }

    .portal-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .portal-stat-card {
        padding: 18px 20px;
    }

    .portal-hero-actions {
        flex-direction: column;
    }

    .portal-hero-actions a {
        width: 100%;
        justify-content: center;
    }

    .portal-info-card { padding: 24px; }
    .portal-hero-panel { padding: 22px; }
    .community-panel-form { padding: 22px; border-radius: var(--radius-md); }
    .community-panel-form::before { display: none; }

    .community-form-actions .btn-portal-primary {
        width: 100%;
    }
}

/* ============================================================
   RESPONSIVE — Small Mobile
   ============================================================ */
@media (max-width: 479.98px) {
    .portal-shell { padding: 0 14px 40px; }
    .portal-brand-mark { width: 44px; height: 44px; font-size: 1.2rem; border-radius: 14px; }
    .portal-brand strong { font-size: 0.96rem; }
    .portal-brand small { font-size: 0.7rem; }
    .portal-hero-copy h1 { font-size: 2rem; }
    .community-panel-copy h1 { font-size: 1.9rem; }
    .portal-hero-panel, .community-panel-form { padding: 18px; border-radius: var(--radius-md); }
    .community-form .form-control,
    .community-form .form-select { font-size: 1rem; } /* prevent iOS zoom */
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}
