/* ============================================================
   Halaman Pengaturan Akun (Account.html)
   Mengikuti token visual global.css: Inter, kartu putih di atas
   #E9EAEE, aksen hijau #10B981, radius 16px, border #EDEEF1.
   ============================================================ */

.ac-shell {
    padding: 18px 0 40px;
}

/* ---------- Tab Privacy / Profile ---------- */

.ac-tabs {
    display: flex;
    align-items: center;
    gap: 18px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 14px;
    margin-bottom: 26px;
}

.ac-tab {
    background: none;
    border: none;
    padding: 0 4px 2px;
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.18s ease;
}

.ac-tab:hover { color: var(--text-secondary); }

.ac-tab[aria-selected="true"] {
    color: #10B981;
    font-weight: 700;
}

.ac-tab-sep {
    width: 2px;
    height: 26px;
    background-color: var(--border-color);
    border-radius: 2px;
}

/* ---------- Judul halaman ---------- */

.ac-head {
    margin-bottom: 28px;
}

.ac-head h1 {
    font-size: clamp(1.5rem, 2.2vw, 2rem);
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 8px;
}

.ac-head p {
    font-size: 0.98rem;
    color: var(--text-muted);
    margin: 0;
}

/* ---------- Grid dua kolom ---------- */

.ac-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 2fr));
    align-items: start;
    gap: 24px;
}

.ac-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

/* ---------- Kartu ---------- */

.ac-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    padding: 28px;
    box-shadow: var(--shadow-card, 0 2px 8px rgba(16, 24, 40, 0.06));
}

.ac-card h2 {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 22px;
}

.ac-card-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: -14px 0 22px;
    line-height: 1.5;
}

/* ---------- Field dengan ikon ---------- */

.ac-field {
    margin-bottom: 18px;
    min-width: 0;
}

.ac-field label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.ac-input {
    position: relative;
    display: flex;
    align-items: center;
}

.ac-input svg {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-subtle);
    pointer-events: none;
    flex-shrink: 0;
}

.ac-input input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    border: 1px solid var(--border-medium);
    border-radius: 10px;
    background-color: var(--surface-color);
    font-size: 0.92rem;
    color: var(--text-color);
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ac-input input::placeholder { color: var(--text-subtle); }

.ac-input input:disabled {
    background-color: var(--surface-alt);
    color: var(--text-muted);
    cursor: not-allowed;
}

.ac-hint {
    display: block;
    font-size: 0.76rem;
    color: var(--text-subtle);
    line-height: 1.45;
    margin-top: 7px;
}

/* Netralkan warna merah muda bawaan Bootstrap untuk <code>. */
.ac-hint code {
    color: var(--text-muted);
    background-color: var(--surface-muted);
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 0.95em;
}

.ac-input input:focus {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Tombol mata pada field kata sandi */
.ac-input:has(.ac-eye) input { padding-right: 46px; }

.ac-eye {
    position: absolute;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--text-subtle);
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.ac-eye svg {
    position: static;
    left: auto;
    pointer-events: none;
}

.ac-eye:hover {
    color: var(--text-secondary);
    background-color: var(--surface-muted);
}

/* ---------- Tombol ---------- */

.ac-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: none;
    border-radius: 10px;
    padding: 12px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #FFFFFF;
    cursor: pointer;
    transition: background-color 0.18s ease, opacity 0.18s ease;
}

.ac-btn svg {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.ac-btn-green { background-color: #16A34A; }
.ac-btn-green:hover:not(:disabled) { background-color: #15803D; }

.ac-btn-blue { background-color: #2563EB; }
.ac-btn-blue:hover:not(:disabled) { background-color: #1D4ED8; }

.ac-btn:disabled {
    background-color: var(--disabled-bg);
    cursor: not-allowed;
}

.ac-btn-full {
    width: 100%;
    margin-top: 4px;
}

/* ---------- Kartu Status Akun ---------- */

.ac-status-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

.ac-status-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background-color: var(--green-bg);
    color: #16A34A;
}

.ac-status-ico svg { width: 22px; height: 22px; }

.ac-status-head h2 {
    margin: 0 0 3px;
}

.ac-status-head p {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin: 0;
}

.ac-divider {
    height: 1px;
    background-color: var(--border-soft);
    border: none;
    margin: 0 0 18px;
}

.ac-status-label {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin: 0 0 12px;
}

.ac-status-value {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.ac-status-value svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    flex-shrink: 0;
}

/* ---------- Toggle 2FA ---------- */

.ac-toggle-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
}

.ac-toggle-row > span:first-child {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.ac-switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

/* Checkbox asli disembunyikan tapi tetap fokusable dan terbaca screen reader. */
.ac-switch input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.ac-switch-track {
    display: block;
    width: 58px;
    height: 32px;
    border-radius: 999px;
    background-color: var(--track-off);
    transition: background-color 0.2s ease;
}

.ac-switch-track::after {
    content: "";
    display: block;
    width: 26px;
    height: 26px;
    margin: 3px;
    border-radius: 50%;
    background-color: #FFFFFF;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s ease;
}

.ac-switch input:checked + .ac-switch-track {
    background-color: #16A34A;
}

.ac-switch input:checked + .ac-switch-track::after {
    transform: translateX(26px);
}

.ac-switch input:focus-visible + .ac-switch-track {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.3);
}

.ac-toggle-state {
    font-size: 0.95rem;
    font-weight: 600;
    color: #16A34A;
}

.ac-toggle-state[data-on="false"] { color: var(--text-subtle); }

/* ---------- Kotak notifikasi ---------- */

.ac-note {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 12px;
    background-color: var(--green-soft-bg);
    border: 1px solid var(--green-border);
    font-size: 0.88rem;
    color: var(--green-text);
    line-height: 1.5;
}

.ac-note svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

.ac-note[hidden] { display: none; }

.ac-2fa-confirm {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border-soft);
}

.ac-2fa-confirm[hidden] { display: none; }

.ac-2fa-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ---------- Pesan hasil aksi ---------- */

.ac-msg {
    font-size: 0.85rem;
    margin: 12px 0 0;
    min-height: 1.2em;
}

.ac-msg[data-kind="ok"] { color: var(--green-text); }
.ac-msg[data-kind="err"] { color: var(--red-text); }

/* ---------- Responsif ---------- */

@media (max-width: 1080px) {
    .ac-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .ac-shell {
        /* Ruang untuk bottom-nav yang menggantikan sidebar di layar kecil. */
        padding-bottom: calc(var(--bottom-nav-height, 62px) + 28px);
    }

    .ac-card { padding: 20px; }

    .ac-tabs {
        gap: 12px;
        margin-bottom: 20px;
    }

    .ac-tab { font-size: 1.12rem; }

    .ac-grid { gap: 18px; }
    .ac-col { gap: 18px; }
}

/* ============================================================
   Tab "Account info"
   ============================================================ */

.ac-panel[hidden] { display: none; }

/* ---------- Banner status vendor ---------- */

.ac-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    padding: 20px 24px;
    margin-bottom: 24px;
    border-radius: 14px;
    background-color: var(--green-soft-bg);
    border: 1px solid var(--green-bg);
}

.ac-banner-ico {
    display: flex;
    flex-shrink: 0;
    color: #16A34A;
}

.ac-banner-ico svg { width: 30px; height: 30px; }

.ac-banner-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-color);
}

.ac-banner-meta {
    margin-left: auto;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
}

.ac-banner-meta span {
    font-weight: 500;
    color: var(--text-subtle);
}

/* ---------- Kartu versi lembut (abu, tanpa border tegas) ---------- */

.ac-card-soft {
    background-color: var(--surface-alt);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
    margin-bottom: 24px;
}

.ac-card-head {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
}

/* Ukuran eksplisit — jangan bergantung pada default Bootstrap. */
.ac-card-head h2 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 600;
    color: var(--text-color);
}

.ac-card-head p {
    font-size: 0.92rem;
    color: var(--text-subtle);
    margin: 4px 0 0;
    line-height: 1.5;
}

.ac-card-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--surface-color);
}

.ac-card-ico svg { width: 28px; height: 28px; }

.ac-ico-green {
    color: #16A34A;
    box-shadow: inset 0 0 0 1px var(--green-border);
}

.ac-ico-blue {
    color: #2563EB;
    box-shadow: inset 0 0 0 1px var(--blue-border);
}

/* ---------- Grid data perusahaan (bukan tabel) ---------- */

.ac-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 56px;
    margin: 0;
}

/* Tiap baris: ikon | label | nilai rata kanan. */
.ac-info-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    padding: 18px 4px;
    border-bottom: 1px solid var(--border-medium);
    min-width: 0;
}

/* Baris terakhir tiap kolom tanpa garis. */
.ac-info-row:nth-last-child(-n + 2) { border-bottom: none; }

.ac-info-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563EB;
    flex-shrink: 0;
}

.ac-info-ico svg { width: 22px; height: 22px; }

.ac-info-row dt {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 0;
}

.ac-info-row dd {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: right;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* ---------- Grid informasi finansial ---------- */

.ac-fin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.ac-fin-grid .ac-field { margin-bottom: 0; }

.ac-fin-grid .ac-input input,
.ac-fin-grid .ac-select select {
    background-color: var(--surface-color);
    padding-block: 14px;
}

/* Dropdown bank: select tanpa panah bawaan + chevron sendiri. */
.ac-select select {
    width: 100%;
    padding: 14px 42px 14px 44px;
    border: 1px solid var(--border-medium);
    border-radius: 10px;
    font-size: 0.92rem;
    color: var(--text-color);
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.ac-select select:focus {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* `left` diwarisi dari `.ac-input svg`, harus dibatalkan agar chevron
   benar-benar menempel di kanan dan tidak menimpa ikon bank. */
.ac-select .ac-chevron {
    position: absolute;
    left: auto;
    right: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
}

/* Tombol salin nomor rekening. */
.ac-input:has(.ac-copy) input { padding-right: 46px; }

.ac-copy {
    position: absolute;
    right: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.ac-copy svg {
    position: static;
    left: auto;
    width: 18px;
    height: 18px;
    pointer-events: none;
}

.ac-copy:hover {
    color: #2563EB;
    background-color: var(--blue-soft-bg);
}

.ac-copy[data-copied="true"] { color: #16A34A; }

/* ---------- Responsif ---------- */

@media (max-width: 1080px) {
    .ac-fin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
    .ac-info-grid {
        grid-template-columns: minmax(0, 1fr);
        column-gap: 0;
    }

    /* Satu kolom: hanya baris paling akhir yang tanpa garis. */
    .ac-info-row:nth-last-child(-n + 2) { border-bottom: 1px solid var(--border-medium); }
    .ac-info-row:last-child { border-bottom: none; }
}

@media (max-width: 768px) {
    .ac-card-soft { padding: 20px; }

    .ac-fin-grid { grid-template-columns: minmax(0, 1fr); }

    .ac-banner {
        padding: 16px 18px;
        gap: 12px;
    }

    .ac-banner-meta {
        margin-left: 0;
        flex-basis: 100%;
        font-size: 0.9rem;
    }

    .ac-info-row {
        grid-template-columns: auto 1fr;
        row-gap: 4px;
    }

    /* Nilai pindah ke baris bawah, sejajar label. */
    .ac-info-row dd {
        grid-column: 2;
        text-align: left;
        font-weight: 600;
        color: var(--text-color);
    }
}

/* ---------- Aksi pada judul kartu (Ubah / Batal / Simpan) ---------- */

.ac-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.ac-head-actions [hidden] { display: none; }

.ac-btn-soft {
    background-color: var(--surface-color);
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
    border-radius: 10px;
    padding: 9px 18px;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease;
}

.ac-btn-soft:hover:not(:disabled) {
    background-color: var(--surface-muted);
    border-color: var(--border-color);
}

.ac-btn-soft:disabled { opacity: 0.55; cursor: not-allowed; }

.ac-btn-sm {
    padding: 9px 18px;
    font-size: 0.86rem;
}

/* Input inline saat baris data perusahaan masuk mode ubah. */
.ac-inline-input {
    width: 100%;
    padding: 8px 11px;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    background-color: var(--surface-color);
    font: inherit;
    font-size: 0.92rem;
    color: var(--text-color);
    text-align: right;
    outline: none;
    resize: vertical;
}

.ac-inline-input:focus {
    border-color: #10B981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

textarea.ac-inline-input {
    min-height: 62px;
    line-height: 1.45;
}

/* Beri ruang agar input tidak mepet ke label saat mode ubah aktif. */
.ac-info-row:has(.ac-inline-input) { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.4fr); }

/* ---------- Kaki kartu finansial ---------- */

.ac-fin-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.ac-fin-foot .ac-msg { margin: 0; }

@media (max-width: 768px) {
    .ac-card-head { flex-wrap: wrap; }

    .ac-head-actions {
        margin-left: 0;
        flex-basis: 100%;
    }

    .ac-info-row:has(.ac-inline-input) { grid-template-columns: auto 1fr; }
    .ac-inline-input { text-align: left; }

    .ac-fin-foot { justify-content: stretch; }
    .ac-fin-foot .ac-btn { width: 100%; }
}

/* Alamat kantor disimpan sebagai satu string multi-baris. */
.ac-info-row dd { white-space: pre-line; }
.ac-info-row dd:has(.ac-inline-input) { white-space: normal; }
