/* Kad PBUHub (kongsi semua halaman) — reka bentuk SAMA untuk web dan telefon.
   Kad ringkasan & Akses Pantas: latar lembut + ikon/nilai berwarna ikut jenis maklumat (tone).
   Hanya bilangan lajur berubah ikut lebar skrin. */

/* ---------- Kad ringkasan (stat) ---------- */
.app-page .stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.app-page .stat-card {
    --tone: #1462DA;
    --tone-ink: #0F4FB5;
    --tone-soft: #EAF2FF;
    --tone-line: #D3E3FF;
    position: relative;
    display: block;
    min-height: 0;
    padding: 18px 18px 16px;
    border: 1px solid var(--tone-line);
    border-top: 3px solid var(--tone);
    border-radius: 16px;
    background: linear-gradient(160deg, var(--tone-soft) 0%, #FFFFFF 78%);
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.app-page .stat-card--blue   { --tone: #1462DA; --tone-ink: #0F4FB5; --tone-soft: #EAF2FF; --tone-line: #D3E3FF; }
.app-page .stat-card--purple { --tone: #7C3AED; --tone-ink: #6D28D9; --tone-soft: #F4EDFF; --tone-line: #E4D6FF; }
.app-page .stat-card--green  { --tone: #16A34A; --tone-ink: #15803D; --tone-soft: #EAF8EF; --tone-line: #CBEED7; }
.app-page .stat-card--orange { --tone: #D97706; --tone-ink: #B45309; --tone-soft: #FFF4E3; --tone-line: #FDE2B5; }
.app-page .stat-card--red    { --tone: #DC2626; --tone-ink: #B91C1C; --tone-soft: #FEEEEE; --tone-line: #FBD0D0; }
.app-page .stat-card--teal   { --tone: #0D9488; --tone-ink: #0F766E; --tone-soft: #E6F7F4; --tone-line: #C4EDE6; }

.app-page .stat-card .stat-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.15rem;
    background: var(--tone);
    color: #FFFFFF;
}

.app-page .stat-card .stat-body { min-width: 0; }

.app-page .stat-card .stat-label {
    padding-right: 48px;
    min-height: 2.5em;
    font-size: .8rem;
    line-height: 1.25;
    font-weight: 700;
    color: #1B2E50;
}

.app-page .stat-card .stat-value {
    margin-top: 4px;
    font-size: 1.9rem;
    line-height: 1.05;
    color: var(--tone-ink);
}

.app-page .stat-card .stat-sub {
    margin-top: 4px;
    font-size: .72rem;
    line-height: 1.3;
    color: #5D6B82;
}

.app-page .stat-card .stat-link {
    margin-top: 8px;
    font-size: .72rem;
    color: var(--tone-ink);
}

/* ---------- Akses Pantas ---------- */
.app-page .quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.app-page .quick-card {
    min-height: 0;
    padding: 11px 10px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.app-page .quick-card .quick-icon {
    width: 36px;
    height: 36px;
    font-size: 1.05rem;
}

.app-page .quick-card strong {
    margin-top: 0;
    font-size: .76rem;
    line-height: 1.25;
}

.app-page .quick-card .arrow { display: none; }

/* ---------- Lajur ikut lebar skrin ---------- */
@media (max-width: 1200px) {
    .app-page .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
    .app-page .stat-grid { gap: 10px; margin-bottom: 14px; }
    .app-page .stat-card { padding: 14px 13px 12px; border-radius: 14px; }
    .app-page .stat-card .stat-icon { top: 12px; right: 11px; width: 32px; height: 32px; border-radius: 10px; font-size: .95rem; }
    .app-page .stat-card .stat-label { padding-right: 36px; font-size: .74rem; }
    .app-page .stat-card .stat-value { font-size: 1.6rem; }
    .app-page .stat-card .stat-sub { font-size: .68rem; }
    .app-page .stat-card .stat-link { margin-top: 6px; font-size: .68rem; }
    .app-page .quick-card .quick-icon { width: 34px; height: 34px; font-size: 1rem; }
    .app-page .quick-card strong { font-size: .74rem; }
}

/* Telefon sangat kecil: kurangkan saiz nilai supaya kekal 2 sebaris. */
@media (max-width: 359.98px) {
    .app-page .stat-card { padding: 12px 10px 10px; }
    .app-page .stat-card .stat-value { font-size: 1.35rem; }
    .app-page .stat-card .stat-icon { width: 28px; height: 28px; font-size: .85rem; }
    .app-page .stat-card .stat-label { padding-right: 30px; }
}

/* Grid kad dengan bilangan lajur tetap (desktop) — telefon tetap 2 sebaris. */
.app-page .stat-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.app-page .stat-grid.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.app-page .stat-grid.cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1200px) {
    .app-page .stat-grid.cols-5, .app-page .stat-grid.cols-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
    .app-page .stat-grid.cols-3, .app-page .stat-grid.cols-5, .app-page .stat-grid.cols-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Lencana status data akaun (Fasa 3B) */
.data-badge { display: inline-block; margin-top: 3px; padding: 1px 7px; border-radius: 999px; font-size: .66rem; font-weight: 700; }
.data-badge.is-verified { background: #EAF8EF; color: #15803D; }
.data-badge.is-fake { background: #FFF4E3; color: #B45309; }

/* Nilai teks (cth IC bertopeng, tarikh, kod) dalam kad stat */
.app-page .stat-card .stat-value.is-text { font-size: 1.1rem; line-height: 1.3; word-break: break-word; }
