/* =============================================================
   assets/css/style.css
   Styling kustom SIKERTAS-RT — melapisi Bootstrap 5 default
   agar tampilan terasa dirancang, bukan template bawaan.
   ============================================================= */

:root {
    --rt-primary: #0d6efd;
    --rt-primary-dark: #0a4fbf;
    --rt-sidebar-bg: #1e2939;
    --rt-sidebar-hover: #2a3648;
    --rt-sidebar-active: #0d6efd;
    --rt-content-bg: #f4f6f9;
    --rt-card-radius: 0.65rem;
}

body {
    background-color: var(--rt-content-bg);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

/* ---------- Navbar ---------- */
.navbar {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.05rem;
}

.navbar-brand img.brand-logo {
    height: 32px;
    width: 32px;
    object-fit: cover;
    border-radius: 6px;
    background: #fff;
}

/* ---------- Sidebar ---------- */
.offcanvas-lg {
    background-color: var(--rt-sidebar-bg) !important;
    border: none !important;
}

.offcanvas-lg .list-group-item {
    background-color: transparent;
    color: #c7d0dc;
    border: none;
    border-radius: 0;
    padding: 0.75rem 1.25rem;
    font-size: 0.92rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.offcanvas-lg .list-group-item:hover {
    background-color: var(--rt-sidebar-hover);
    color: #fff;
}

.offcanvas-lg .list-group-item.active {
    background-color: var(--rt-sidebar-active) !important;
    color: #fff !important;
    font-weight: 500;
    border-left: 3px solid #fff;
}

.offcanvas-lg .list-group-item i {
    width: 20px;
    display: inline-block;
    text-align: center;
    margin-right: 0.4rem;
}

.sidebar-section-label {
    color: #7d8ba0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.9rem 1.25rem 0.3rem;
    font-weight: 600;
}

/* ---------- Cards ---------- */
.card {
    border: none;
    border-radius: var(--rt-card-radius);
}

.card.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

.card-header {
    border-radius: var(--rt-card-radius) var(--rt-card-radius) 0 0 !important;
    font-weight: 600;
}

/* ---------- Login Page ---------- */
.card-login {
    border-radius: 1.1rem;
    overflow: hidden;
}

.card-login .brand-logo-login {
    height: 64px;
    width: 64px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 0.5rem;
}

/* ---------- Tabel ---------- */
.table thead th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6c757d;
    border-bottom-width: 1px;
}

.table-hover tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.035);
}

/* ---------- Badge status ---------- */
.badge {
    font-weight: 500;
    padding: 0.4em 0.7em;
}

/* ---------- Grid Input Jimpitan ---------- */
#grid-jimpitan input.nominal-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.2);
    border-color: var(--rt-primary);
}

/* ---------- Alert auto-dismiss transition ---------- */
.alert {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.alert.rt-fade-out {
    opacity: 0;
    transform: translateY(-8px);
}

/* ---------- Avatar inisial (dipakai di navbar & manajemen pengguna) ---------- */
.rt-avatar-initial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--rt-primary);
    color: #fff;
    font-weight: 600;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.rt-avatar-initial.lg {
    width: 72px;
    height: 72px;
    font-size: 1.8rem;
}

/* ---------- Avatar foto (WebP hasil crop) — ukuran & bentuk konsisten dgn avatar inisial ---------- */
.rt-avatar-photo {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #fff;
}

.rt-avatar-photo.lg {
    width: 72px;
    height: 72px;
}

.rt-avatar-photo.sm, .rt-avatar-initial.sm {
    width: 26px !important;
    height: 26px !important;
    font-size: 0.7rem !important;
}

.rt-avatar-photo.xl {
    width: 120px;
    height: 120px;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* ---------- Logo preview di halaman pengaturan ---------- */
.rt-logo-preview {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    background: #fff;
}

/* ---------- Footer ---------- */
footer {
    background-color: #fff !important;
}

/* ---------- Utility ---------- */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media print {
    .navbar, .offcanvas-lg, footer, .btn, form { display: none !important; }
}
