/* ============================================================
   OneFIS - components.css
   Komponen UI yang dipakai berulang lintas halaman: kartu,
   tombol, tabs, dan utilitas layout baris (dipakai di SEMUA
   halaman).
   ============================================================ */

/* ---------- Kartu umum ---------- */
.card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 1.25rem;
    box-shadow: 0 2px 12px -4px rgba(0,0,0,0.05);
    padding: 1rem;
}
.card + .card { margin-top: 1rem; }

/* ---------- Tombol ---------- */
.btn-primary {
    width: 100%;
    padding: 0.875rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 8px 20px -6px rgba(37,99,235,0.5);
    transition: background 0.15s ease, transform 0.1s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-primary:hover { background: #1d4ed8; }
.btn-primary:active { transform: scale(0.98); }
.btn-primary:disabled {
    background: #e2e8f0; color: #94a3b8; box-shadow: none; cursor: not-allowed;
}
.btn-primary svg,
.btn-outline svg {
    width: 1.0625rem; height: 1.0625rem; flex-shrink: 0;
    fill: none; stroke: currentColor; stroke-width: 2;
}

.btn-outline {
    padding: 0.875rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.9375rem;
    border: 2px solid #e2e8f0;
    background: #f8fafc;
    color: #475569;
}
.btn-outline:hover { background: #f1f5f9; }

.btn-ghost {
    flex: 1;
    padding: 0.875rem;
    border-radius: 0.75rem;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    font-weight: 700;
    font-size: 0.9375rem;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.btn-ghost:hover { background: #f8fafc; color: #475569; }

.btn-choice {
    flex: 1;
    padding: 0.8125rem 0.5rem;
    border-radius: 0.625rem;
    font-size: 0.9375rem;
    font-weight: 500;
    border: 1px solid transparent;
    background: #fff;
    text-align: center;
}
.btn-choice.red { border-color: #ef4444; color: #ef4444; }
.btn-choice.red:hover { background: #fef2f2; }
.btn-choice.blue { border: 1px solid #2563eb; background: #eff6ff; color: #1d4ed8; }
.btn-choice.blue:hover { background: #dbeafe; }

.row { display: flex; gap: 0.5rem; }
.row-3 { display: flex; gap: 0.75rem; }

/* ---------- Tabs ---------- */
.tabs {
    display: flex; gap: 1rem; background: #fff;
    padding: 0.75rem 1rem 0 1rem; border-bottom: 1px solid #f1f5f9;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.tab {
    flex: 1; padding-bottom: 0.625rem; text-align: center;
    font-size: 0.875rem; font-weight: 700; color: #94a3b8;
    border-bottom: 2px solid transparent;
}
.tab.active { color: #2563eb; border-color: #2563eb; }
/* ---------- Toast notifikasi sukses (flash message) ---------- */
.toast-success {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 4.25rem);
    left: 1.25rem;
    right: 1.25rem;
    margin-left: auto;
    z-index: 999;
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    max-width: 22rem;
    width: fit-content;
    background: #16a34a;
    color: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.875rem 1.125rem;
    border-radius: 0.875rem;
    box-shadow: 0 10px 25px -8px rgba(22,163,74,0.5);
    opacity: 0;
    transform: translateY(-0.75rem);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}
.toast-success.is-visible { opacity: 1; transform: translateY(0); }
.toast-success.is-leaving { opacity: 0; transform: translateY(-0.75rem); }
.toast-success-icon {
    flex-shrink: 0;
    width: 1.25rem; height: 1.25rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex; align-items: center; justify-content: center;
    margin-top: 0.0625rem;
}
.toast-success-icon svg {
    width: 0.8125rem; height: 0.8125rem;
    fill: none; stroke: #fff; stroke-width: 3;
    stroke-linecap: round; stroke-linejoin: round;
}
.toast-success-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}
.toast-success-title { font-size: 0.9375rem; font-weight: 700; }
.toast-success.has-title .toast-success-body { font-weight: 400; opacity: 0.92; }