/* ============================================================================
   aj-integrasi.css — halaman Integrasi (integrasi.html), dalam desain baru
   beranda.

   Sengaja sedikit kata (permintaan user: "jangan kebanyakan bacot, orang ga
   bakal baca"): tiap integrasi satu kartu — tiruan aplikasinya di atas
   tekstur beranda, lalu nama + satu kalimat — dalam grid seperti kartu Fitur
   beranda. Yang dipakai bersama (token, navbar, hero .h4-page-*, seksi
   .h4-sec, penutup, footer) ada di aj-home4.css; berkas ini cuma deret ikon
   aplikasi di hero, grid kartunya, dan tiruan UI-nya — tetap terang di tema
   gelap seperti potongan UI beranda, tanpa bayangan di tema gelap.

   Tiruan UI (kartu jadwal klien, "Akun yang terhubung") memakai palet tema
   terang aplikasi (src/assets/main.css), sama dengan potongan UI beranda:
   ink #27354A, ink-soft #5A6880, line #CFD6E0, canvas #F5F6FA, surface-muted
   #EAECEF, tint #EAEAFA, brand #0161E9, success #0F7A55, danger #C2352B.
   ========================================================================== */

.h4-integrasi {
    --h4ig-ease: cubic-bezier(0.22, 1, 0.36, 1);

    --h4ig-a-canvas: #f5f6fa;
    --h4ig-a-surface: #ffffff;
    --h4ig-a-muted: #eaecef;
    --h4ig-a-tint: #eaeafa;
    --h4ig-a-line: #cfd6e0;
    --h4ig-a-ink: #27354a;
    --h4ig-a-soft: #5a6880;
    --h4ig-a-brand: #0161e9;
    --h4ig-a-success: #0f7a55;
    --h4ig-a-success-soft: #e6f7f2;
    --h4ig-a-danger: #c2352b;

    /* Tiruan UI melayang di atas teksturnya; di tema gelap tanpa bayangan. */
    --h4ig-lift: 0 14px 30px -12px rgba(12, 16, 40, 0.42);
}

.uc-dark .h4-integrasi {
    --h4ig-lift: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* ── Hero: deret ikon aplikasi ──────────────────────────────────────────── */

/* Ubin putih seperti ikon aplikasi di layar HP — di kedua tema. Di ponsel
   kelimanya dibagi rata selebar konten; mulai tablet ukurannya tetap. Tepi
   kiri ubin pertama sejajar judul: barisnya digeser sebesar sisa lebar item
   di kiri ubinnya ((item − ubin) / 2). */
.h4ig-dock {
    display: flex;
    justify-content: space-between;
    gap: 2px;
    margin: 40px -2px 0;
}

.h4ig-dock-item {
    display: flex;
    flex: 0 1 60px;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #ffffff;
    text-decoration: none;
}

.h4ig-dock-ico {
    display: grid;
    place-items: center;
    width: min(56px, 100%);
    aspect-ratio: 1 / 1;
    border-radius: 16px;
    background: #ffffff;
    transition: transform 0.3s var(--h4ig-ease);
}

.h4ig-dock-ico img {
    display: block;
    width: 54%;
    height: auto;
}

.h4ig-dock-name {
    font-family: var(--h4-text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    text-wrap: balance;
}

.h4ig-dock-item:focus-visible {
    outline: none;
}

.h4ig-dock-item:focus-visible .h4ig-dock-ico {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
}

@media (hover: hover) {
    .h4ig-dock-item:hover .h4ig-dock-ico {
        transform: translateY(-4px);
    }
}

@media (min-width: 600px) {
    .h4ig-dock {
        justify-content: flex-start;
        gap: 20px;
        margin: 48px 0 0 -8px;
    }

    .h4ig-dock-item {
        flex: none;
        width: 96px;
        gap: 12px;
    }

    .h4ig-dock-ico {
        width: 80px;
        border-radius: 22px;
    }

    .h4ig-dock-name {
        font-size: 14px;
    }
}

@media (min-width: 900px) {
    .h4ig-dock {
        gap: 20px;
        margin: 56px 0 0 -12px;
    }

    .h4ig-dock-item {
        width: 128px;
        gap: 14px;
    }

    .h4ig-dock-ico {
        width: 104px;
        border-radius: 28px;
    }

    .h4ig-dock-ico img {
        width: 50%;
    }

    .h4ig-dock-name {
        font-size: 15px;
    }
}

/* ── Kartu integrasi ────────────────────────────────────────────────────── */

.h4ig-sec {
    padding-top: 40px;
}

/* Ponsel satu kolom; tablet dua (kartu terakhir selebar baris); desktop dua
   kartu lebar lalu tiga kartu sempit. Kartu sebaris sama tinggi: teksturnya
   mengisi sisa tinggi kartu, isinya di tengah. */
.h4ig-grid {
    display: grid;
    gap: 40px;
}

.h4ig-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    scroll-margin-top: calc(var(--h4-nav-h) + 16px);
}

.h4ig-card > .h4ig-tex {
    flex: 1 1 auto;
}

.h4ig-card-text {
    padding: 18px 2px 0;
}

.h4ig-card-name {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-family: var(--h4-display);
    font-size: 22px;
    font-weight: 400;
    line-height: 1.15;
    letter-spacing: 0;
}

.h4ig-card-name img {
    display: block;
    flex: none;
    width: 28px;
    height: 28px;
}

.h4ig-card-line {
    max-width: 30em;
    margin: 8px 0 0;
    font-family: var(--h4-text);
    font-size: 16px;
    line-height: 1.5;
    color: var(--h4-sec-soft);
    text-wrap: pretty;
}

/* "Tanpa setup" — kapsul kecil di samping nama. */
.h4ig-chip {
    flex: none;
    margin-left: 4px;
    padding: 4px 10px;
    border-radius: 9999px;
    background: var(--h4-card);
    color: var(--h4-sec-soft);
    font-family: var(--h4-text);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

@media (min-width: 700px) and (max-width: 1099.98px) {
    .h4ig-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 48px 24px;
    }

    .h4ig-card:last-child {
        grid-column: 1 / -1;
    }
}

@media (min-width: 1100px) {
    .h4ig-sec {
        padding-top: 72px;
    }

    .h4ig-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 56px clamp(20px, 1.8vw, 32px);
    }

    .h4ig-card.is-half {
        grid-column: span 3;
    }

    .h4ig-card.is-third {
        grid-column: span 2;
    }

    /* Bantalan lebih tipis: kartu sepertiga cuma ±420 px, tiruan UI-nya
       (yang mengecil mengikuti lebar) butuh ruang. */
    .h4ig-card.is-third > .h4ig-tex {
        min-height: 500px;
        padding: 40px 22px;
    }

    .h4ig-card-text {
        padding-top: 22px;
    }

    .h4ig-card-name {
        font-size: clamp(24px, 1.9vw, 30px);
    }

    .h4ig-card-name img {
        width: 32px;
        height: 32px;
    }

    .h4ig-card-line {
        font-size: 17px;
    }
}

/* ── Kartu bertekstur + tiruan UI ───────────────────────────────────────── */

.h4ig-stage {
    min-width: 0;
    margin: 0;
}

/* Warna rata-rata teksturnya (--h4-wait di markup) tampil selama teksturnya
   dimuat — seperti kartu Fitur beranda. */
.h4ig-tex {
    position: relative;
    display: grid;
    /* Kolomnya selebar kartu, bukan selebar isi: baris nowrap di tiruan UI
       (email, nomor) tidak boleh mendorongnya melewati tepi. */
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    overflow: hidden;
    isolation: isolate;
    padding: 32px 14px;
    border-radius: 20px;
    background: var(--h4-wait, var(--h4-sec-wait));
}

.h4ig-tex-img {
    position: absolute;
    inset: 0;
    z-index: -1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Pratinjau sinkronisasi (gambar transparan dari aplikasinya) di kartu 4:3. */
.h4ig-tex.is-shot {
    aspect-ratio: 4 / 3;
    padding: 0;
}

.h4ig-shot {
    position: absolute;
    top: 7%;
    left: 4%;
    display: block;
    width: 92%;
    height: 86%;
    object-fit: contain;
}


.h4ig-ui {
    position: relative;
    width: 100%;
    color: var(--h4ig-a-ink);
    font-family: var(--h4-text);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    letter-spacing: 0;
    text-align: left;
    box-shadow: var(--h4ig-lift);
    pointer-events: none;
}

/* Kartu jadwal klien — salinan InvoiceScheduleCard.vue (rounded-2xl,
   border-line, bg-surface, p-4, gap-4). */
.h4ig-sched {
    display: flex;
    max-width: 400px;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--h4ig-a-line);
    border-radius: 16px;
    background: var(--h4ig-a-surface);
}

.h4ig-sched-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.h4ig-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 9999px;
    background: rgba(1, 97, 233, 0.1);
    color: var(--h4ig-a-brand);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.h4ig-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 9999px;
    background: currentColor;
}

.h4ig-sched-id {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: -6px;
    padding: 4px 6px;
    color: var(--h4ig-a-soft);
    font-size: 14px;
    line-height: 20px;
}

.h4ig-sched-id svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.h4ig-sched-main {
    display: flex;
    align-items: center;
}

.h4ig-sched-tile {
    display: grid;
    flex: none;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-right: 12px;
    border-radius: 12px;
}

.h4ig-sched-tile.is-online {
    background: var(--h4ig-a-muted);
}

.h4ig-sched-tile.is-onsite {
    background: var(--h4ig-a-tint);
    color: var(--h4ig-a-brand);
}

.h4ig-sched-tile img {
    display: block;
    width: 24px;
    height: 24px;
}

.h4ig-sched-tile svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.h4ig-sched-info {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.h4ig-sched-title {
    display: -webkit-box;
    overflow: hidden;
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    letter-spacing: -0.01em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.h4ig-sched-date {
    margin-top: 6px;
    font-size: 14px;
    line-height: 16px;
}

.h4ig-sched-time {
    margin-top: 4px;
    color: var(--h4ig-a-soft);
    font-size: 12px;
    line-height: 16px;
}

.h4ig-sched-time .is-ink {
    color: var(--h4ig-a-ink);
}

.h4ig-sched-rows {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.h4ig-sched-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.h4ig-sched-ico {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    fill: var(--h4ig-a-soft);
}

.h4ig-sched-col {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.h4ig-sched-strong {
    overflow: hidden;
    font-size: 14px;
    line-height: 20px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.h4ig-sched-strong.is-clamp {
    display: -webkit-box;
    white-space: normal;
    overflow-wrap: break-word;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.h4ig-sched-soft {
    overflow: hidden;
    color: var(--h4ig-a-soft);
    font-size: 12px;
    line-height: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.h4ig-sched-note {
    margin-top: 2px;
    color: var(--h4ig-a-soft);
    font-size: 12px;
    line-height: 16px;
}

/* Tombol aksi di bawah teks: "Buka link" / "Buka peta". */
.h4ig-sched-action {
    display: flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    margin: 4px 0 0 -6px;
    padding: 4px 6px;
    border-radius: 6px;
    color: var(--h4ig-a-brand);
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
}

.h4ig-sched-action svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* "Akun yang terhubung" — salinan IntegrationIndex.vue, dibingkai warna
   canvas halaman aplikasinya supaya judul bagiannya terbaca di atas tekstur.
   Baris ini baru rapi selebar ±440 px aplikasi, jadi di kartu yang lebih
   sempit (ponsel) seluruhnya mengecil, seperti potongan UI beranda: tiap
   ukuran = piksel aplikasinya x --p, dan --p = 1px selama muat. */
.h4ig-tex.is-acct {
    container-type: inline-size;
}

.h4ig-acct {
    --p: min(1px, calc(100cqw / 440));
    width: calc(440 * var(--p));
    padding: calc(16 * var(--p));
    border-radius: calc(20 * var(--p));
    background: var(--h4ig-a-canvas);
    font-size: calc(14 * var(--p));
    line-height: calc(20 * var(--p));
}

.h4ig-acct-h {
    margin: 0 0 calc(8 * var(--p));
    padding: 0 calc(4 * var(--p));
    color: var(--h4ig-a-soft);
    font-size: calc(12 * var(--p));
    font-weight: 600;
    line-height: calc(16 * var(--p));
}

.h4ig-acct-card {
    overflow: hidden;
    border: 1px solid var(--h4ig-a-line);
    border-radius: calc(16 * var(--p));
    background: var(--h4ig-a-surface);
}

.h4ig-acct-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: calc(12 * var(--p));
    padding: calc(16 * var(--p));
    border-bottom: 1px solid rgba(207, 214, 224, 0.7);
}

.h4ig-acct-row:last-child {
    border-bottom: 0;
}

.h4ig-acct-ico {
    display: grid;
    flex: none;
    place-items: center;
    width: calc(40 * var(--p));
    height: calc(40 * var(--p));
    border: 1px solid var(--h4ig-a-line);
    border-radius: calc(12 * var(--p));
    background: var(--h4ig-a-canvas);
}

.h4ig-acct-ico img {
    display: block;
    width: calc(20 * var(--p));
    height: calc(20 * var(--p));
}

.h4ig-acct-text {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
}

.h4ig-acct-name {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: calc(8 * var(--p));
    font-size: calc(14 * var(--p));
    font-weight: 600;
    line-height: calc(20 * var(--p));
}

.h4ig-acct-pill {
    padding: calc(2 * var(--p)) calc(8 * var(--p));
    border-radius: 9999px;
    background: var(--h4ig-a-canvas);
    color: var(--h4ig-a-soft);
    font-size: calc(12 * var(--p));
    font-weight: 600;
    line-height: calc(16 * var(--p));
}

.h4ig-acct-pill.is-on {
    background: var(--h4ig-a-success-soft);
    color: var(--h4ig-a-success);
}

.h4ig-acct-mail {
    margin-top: calc(2 * var(--p));
    overflow: hidden;
    color: var(--h4ig-a-soft);
    font-size: calc(12 * var(--p));
    line-height: calc(16 * var(--p));
    text-overflow: ellipsis;
    white-space: nowrap;
}

.h4ig-acct-btn {
    flex: none;
    padding: calc(8 * var(--p)) calc(20 * var(--p));
    border: 1px solid var(--h4ig-a-line);
    border-radius: 9999px;
    color: var(--h4ig-a-ink);
    font-size: calc(14 * var(--p));
    font-weight: 600;
    line-height: calc(20 * var(--p));
}

.h4ig-acct-btn.is-danger {
    border-color: var(--h4ig-a-danger);
    color: var(--h4ig-a-danger);
}

/* Tombol yang sedang "ditunjuk" — rupa hover-nya di aplikasi
   (lg:hover:border-brand/40 lg:hover:text-brand). */
.h4ig-acct-btn.is-cta {
    border-color: rgba(1, 97, 233, 0.4);
    color: var(--h4ig-a-brand);
}

/* Percakapan WhatsApp — rupa WhatsApp sendiri (bukan UI Aturjadwal), versi
   terang. Isi pesannya template asli dari backend. */
.h4ig-wa {
    --h4ig-wa-bg: #efeae2;
    --h4ig-wa-bar: #f0f2f5;
    --h4ig-wa-bubble: #ffffff;
    --h4ig-wa-ink: #111b21;
    --h4ig-wa-meta: #667781;
    --h4ig-wa-link: #027eb5;
    --h4ig-wa-day: #ffffff;

    display: flex;
    max-width: 380px;
    flex-direction: column;
    overflow: hidden;
    border-radius: 20px;
    background: var(--h4ig-wa-bg);
}

.h4ig-wa-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--h4ig-wa-bar);
    color: var(--h4ig-wa-ink);
}

.h4ig-wa-back {
    width: 22px;
    height: 22px;
    margin-left: -4px;
    fill: currentColor;
}

.h4ig-wa-avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9999px;
    background: #ffffff;
    box-shadow: 0 0 0 1px rgba(11, 20, 26, 0.08);
}

.h4ig-wa-avatar img {
    display: block;
    width: 20px;
    height: 20px;
}

.h4ig-wa-name {
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
}

.h4ig-wa-chat {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px 18px 22px;
}

.h4ig-wa-day {
    align-self: center;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--h4ig-wa-day);
    color: var(--h4ig-wa-meta);
    font-size: 12px;
    line-height: 16px;
    box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

.h4ig-wa-msg {
    position: relative;
    max-width: 92%;
    padding: 8px 10px 22px;
    border-radius: 0 10px 10px 10px;
    background: var(--h4ig-wa-bubble);
    color: var(--h4ig-wa-ink);
    font-size: 14px;
    line-height: 20px;
    box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
}

/* ekor gelembung di kiri atas */
.h4ig-wa-msg::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    width: 8px;
    height: 13px;
    background: var(--h4ig-wa-bubble);
    clip-path: polygon(0 0, 100% 0, 100% 100%);
}

.h4ig-wa-msg p {
    margin: 0 0 10px;
    overflow-wrap: anywhere;
}

.h4ig-wa-msg p:last-of-type {
    margin-bottom: 0;
}

.h4ig-wa-msg b {
    font-weight: 700;
}

.h4ig-wa-link {
    color: var(--h4ig-wa-link);
}

.h4ig-wa-time {
    position: absolute;
    right: 10px;
    bottom: 5px;
    color: var(--h4ig-wa-meta);
    font-size: 12px;
    line-height: 14px;
}

/* ── Layar lebih lebar ──────────────────────────────────────────────────── */

@media (min-width: 600px) {
    .h4ig-tex {
        padding: 48px 40px;
    }

    .h4ig-tex.is-shot {
        padding: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .h4ig-dock-ico {
        transition: none;
    }

    .h4ig-dock-item:hover .h4ig-dock-ico {
        transform: none;
    }
}
