:root {
    --sim-primary: #1e3a5f;
    --sim-primary-light: #2c5282;
    --sim-accent: #0d9488;
    --sim-bg: #f4f6f9;
    --sim-card-border: #e5e9f0;
    --sim-text-muted: #6b7280;
}

* { font-family: 'Plus Jakarta Sans', sans-serif; }

body { background: var(--sim-bg); }

.app-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.app-sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--sim-primary) 0%, #14283f 100%);
    color: #fff;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 1030;
    transition: transform .25s ease;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 22px 20px;
    font-weight: 800; font-size: 1.15rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.sidebar-brand i { font-size: 1.5rem; color: var(--sim-accent); }
.sidebar-nav { padding: 14px 10px; }
.sidebar-nav .nav-link {
    color: rgba(255,255,255,.75);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 3px;
    font-size: .92rem;
    font-weight: 500;
    display: flex; align-items: center; gap: 10px;
}
.sidebar-nav .nav-link i { width: 18px; text-align: center; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--sim-accent); color: #fff; }
.nav-section-title {
    font-size: .7rem; text-transform: uppercase; letter-spacing: .05em;
    color: rgba(255,255,255,.4); padding: 16px 14px 6px;
}

/* Main */
.app-main { margin-left: 260px; flex-grow: 1; display: flex; flex-direction: column; min-height: 100vh; width: calc(100% - 260px); }
.app-topbar {
    background: #fff; border-bottom: 1px solid var(--sim-card-border);
    padding: 14px 24px; display: flex; align-items: center; gap: 12px;
    position: sticky; top: 0; z-index: 1020;
}
.topbar-title { font-weight: 700; color: var(--sim-primary); }
.app-content { padding: 24px; flex-grow: 1; }

.avatar-circle {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--sim-primary); color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem;
}
.role-badge { background: var(--sim-accent); color: #fff; font-weight: 600; padding: 5px 12px; border-radius: 20px; }

/* Cards */
.stat-card {
    background: #fff; border-radius: 14px; padding: 20px;
    border: 1px solid var(--sim-card-border);
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
    height: 100%;
}
.stat-card .stat-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: #fff; margin-bottom: 12px;
}
.stat-card .stat-value { font-size: 1.8rem; font-weight: 800; color: var(--sim-primary); }
.stat-card .stat-label { color: var(--sim-text-muted); font-size: .85rem; }

.card { border-radius: 14px; border: 1px solid var(--sim-card-border); box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--sim-card-border); font-weight: 700; color: var(--sim-primary); border-radius: 14px 14px 0 0 !important; }

.table thead th { background: #f8fafc; color: var(--sim-text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; border-bottom: 2px solid var(--sim-card-border); }

.btn-primary { background: var(--sim-primary); border-color: var(--sim-primary); }
.btn-primary:hover { background: var(--sim-primary-light); border-color: var(--sim-primary-light); }
.btn-accent { background: var(--sim-accent); border-color: var(--sim-accent); color: #fff; }

.service-card { border-radius: 16px; border: 1px solid var(--sim-card-border); transition: all .2s; }
.service-card:hover { box-shadow: 0 8px 24px rgba(30,58,95,.12); transform: translateY(-2px); }
.service-logo { width: 56px; height: 56px; object-fit: contain; border-radius: 10px; background: #f4f6f9; padding: 6px; }

.sortable-th a { color: inherit; text-decoration: none; }
.sortable-th a:hover { color: var(--sim-accent); }

/* Pagination (dipakai otomatis oleh resources/views/vendor/pagination/simadu.blade.php) */
.pagination .page-link { color: var(--sim-primary); border-color: var(--sim-card-border); }
.pagination .page-item.active .page-link { background: var(--sim-accent); border-color: var(--sim-accent); }
.pagination .page-item.disabled .page-link { color: #cbd5e1; }

@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.show { transform: translateX(0); }
    .app-main { margin-left: 0; width: 100%; }
}

/* Camera capture widget */
.camera-capture-box {
    border: 2px dashed #cbd5e1; border-radius: 12px; padding: 16px; text-align: center; background: #f8fafc;
}
.camera-capture-box img.preview { max-width: 100%; border-radius: 8px; margin-top: 10px; }
