/* ===============================
GLOBAL
================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: #f2f4f7;
}

/* ===============================
   RESPONSIVE FOUNDATION
   - Tidak mengubah tampilan desktop
   - Sidebar menjadi off-canvas di mobile
================================== */
.mobile-menu-btn{
    display:none; /* aktif di mobile via media query */
    background: transparent;
    border: 0;
    color: #0B5345;
    font-size: 22px;
    line-height: 1;
    padding: 8px 10px;
    border-radius: 10px;
}
.mobile-menu-btn:active{ transform: scale(0.98); }

.mobile-overlay{ display:none; }

.topbar-left{
    display:flex;
    align-items:center;
    gap: 10px;
}

/* ===============================
SIDEBAR PREMIUM
================================== */

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #148F77 0%, #0B5345 70%, #073627 100%);
    color: #fff;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 14px rgba(0,0,0,0.18);
    z-index: 10;
}

.sidebar-header {
    padding: 18px 16px 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: space-between;
    backdrop-filter: blur(4px);
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
}

.sidebar-title-big {
    font-weight: 800;
    font-size: 26px;
    letter-spacing: 1px;
    line-height: 1.1;
}

.sidebar-subtitle {
    font-size: 12px;
    opacity: 0.92;
    margin-top: 2px;
}

.sidebar-logo {
    width: 52px;
    height: auto;
    margin-left: 10px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}

/* NAV MENU */

.sidebar-nav {
    padding: 14px 10px 10px 10px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    flex-direction: column;
    padding: 8px 12px 8px 16px;
    margin-bottom: 6px;
    color: #ecf0f1;
    text-decoration: none;
    border-radius: 10px;
    position: relative;
    transition: background .15s, transform .12s, box-shadow .12s;
}

.sidebar-link-main {
    font-size: 14px;
    font-weight: 600;
}

.sidebar-link-sub {
    font-size: 11px;
    opacity: 0.85;
}

/* garis aksen kiri */
.sidebar-link::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 999px;
    background: transparent;
    transition: background .15s;
}

/* hover */
.sidebar-link:hover {
    background: rgba(255,255,255,0.09);
    box-shadow: 0 3px 8px rgba(0,0,0,0.18);
    transform: translateY(-1px);
}

/* aktif */
.sidebar-link.active {
    background: rgba(255,255,255,0.15);
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.sidebar-link.active::before {
    background: #F4D03F; /* kuning aksen Kemenkes */
}

/* FOOTER DI BAWAH SIDEBAR */

.sidebar-footer {
    padding: 10px 14px 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 11px;
    opacity: 0.9;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.12), transparent 55%);
}

.sidebar-footer-title {
    font-weight: 600;
}

.sidebar-footer-sub {
    opacity: 0.85;
    margin-top: 2px;
}

/* ===============================
   MAIN LAYOUT
================================== */

.main {
    margin-left: 260px;
    width: calc(100% - 260px);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* TOPBAR (akan di-upgrade lagi di bagian bawah) */
.topbar {
    background: #ffffff;
    padding: 14px 20px;
    border-bottom: 1px solid #d9d9d9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-title {
    font-size: 20px;
    font-weight: 600;
}

.topbar-user {
    font-size: 14px;
    color: #444;
}

.content {
    padding: 20px;
}

/* ===============================
   CARD
================================== */

.card {
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}


.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.card-subtitle {
    font-size: 14px;
    margin-bottom: 10px;
    opacity: 0.8;
}

.card-compact {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 0;
}

/* ===============================
   TABLE
================================== */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 10px;
}

.table th, .table td {
    padding: 10px 8px;
    border-bottom: 1px solid #eee;
}

.table th {
    background: #f2f2f2;
    text-align: left;
}

/* ===============================
   BUTTON
================================== */

.btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: #1E8449;
    color: #fff;
}

.btn-secondary {
    background: #2E86C1;
    color: #fff;
}

.btn-danger {
    background: #C0392B;
    color: #fff;
}

.btn:hover {
    opacity: 0.9;
}

/* ===============================
   BADGE STATUS
================================== */

.badge-status {
    padding: 4px 9px;
    border-radius: 6px;
    font-size: 12px;
    color: #fff;
}

.badge-status.sehat { background: #27AE60; }
.badge-status.observasi { background: #E67E22; }
.badge-status.tinggi { background: #C0392B; }

/* ===============================
   FORM INPUT
================================== */

input[type=text],
input[type=number],
input[type=date],
input[type=password],
input[type=email],
select,
textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-top: 4px;
    margin-bottom: 12px;
    font-size: 14px;
}

textarea {
    min-height: 70px;
}

/* ===============================
   DASHBOARD LAYOUT
================================== */

.dashboard-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-main {
    display: grid;
    grid-template-columns: 1.4fr 1.6fr;
    gap: 16px;
}

@media (max-width: 992px) {
    .dashboard-main {
        grid-template-columns: 1fr;
    }
}

.dashboard-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
}

@media (max-width: 768px) {
    .dashboard-cards-grid {
        grid-template-columns: 1fr;
    }
}

.stat-value {
    font-size: 22px;
    font-weight: bold;
}

.profile-card-scroll {
    max-height: 220px;
    overflow-y: auto;
}

/* ===============================
   CHART WRAPPER
================================== */

.chart-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
    margin-bottom: 10px;

    /* BATASI TINGGI AGAR TIDAK NGULUR KE BAWAH */
    height: 260px;              /* kamu boleh coba 230–280 kalau mau */
    max-height: 260px;
    display: flex;
    flex-direction: column;
}

.chart-wrapper h3 {
    margin-bottom: 6px;
    font-size: 14px;
}

/* Paksa canvas ikut tinggi container, bukan tinggi tak terbatas */
.chart-wrapper canvas {
    flex: 1;
    height: 210px !important;   /* sedikit lebih kecil dari height wrapper */
}

/* ===============================
   ALERT & FORM GROUP (UMUM)
================================== */

.alert {
    padding: 8px 10px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 8px;
}

.alert-success {
    background: #eafaf1;
    color: #1e8449;
}

.alert-error {
    background: #fdecea;
    color: #c0392b;
}

.form-group {
    margin-bottom: 10px;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
}

/* ===============================
   PROFILE PAGE (EMIS STYLE)
================================== */

.profile-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-layout {
    display: grid;
    grid-template-columns: 0.42fr 0.58fr;
    gap: 18px;
}

@media (max-width: 992px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

.profile-main {
    min-width: 260px;
}

.profile-side {
    min-width: 280px;
}

.profile-avatar-img {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* KARTU KIRI */

.profile-card-left {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px 18px;
    border: 1px solid #dde3ee;
    text-align: center;
}

.profile-avatar-ring {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid #e3f3ea;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px auto;
}

.profile-avatar-big {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1E8449, #148F77);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
}

.profile-left-name {
    font-size: 18px;
    font-weight: 700;
    margin-top: 6px;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.profile-left-sub {
    font-size: 13px;
    color: #34495e;
    margin-bottom: 8px;
}

.profile-left-nip {
    font-weight: 600;
    color: #1E8449;
}

.profile-left-extra {
    font-size: 12px;
    text-align: left;
    margin-top: 4px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #ffffff;
    border: 1px dashed #d5dbe5;
}

.profile-left-extra div {
    margin-bottom: 3px;
}

.profile-left-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 14px;
}

/* KARTU KANAN (PROFILE ACCOUNT) */

.profile-card-right {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 18px 18px 18px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    margin-bottom: 14px;
    border: 1px solid #e1e5ec;
}

.profile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 10px;
    border-bottom: 1px solid #e1e5ec;
    padding-bottom: 6px;
}

.profile-card-title-text {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #34495e;
}

.profile-card-tab {
    font-size: 13px;
    font-weight: 600;
    color: #148F77;
    border-bottom: 2px solid #148F77;
    padding-bottom: 2px;
}

/* BLOCK DALAM KARTU KANAN */

.profile-section-block {
    margin-bottom: 8px;
}

.profile-section-block h4 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #555;
}

/* =========================================================
   UPGRADE: TOPBAR & USER HEADER PREMIUM
   ========================================================= */

/* Override topbar lama */
.topbar {
    background: #f6fbf8; /* hijau sangat muda */
    padding: 10px 20px;
    border-bottom: 1px solid #d9e5da;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 20;
}

/* Judul di kiri (Dashboard, Data Pegawai, dll) */
.topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: #1b5e20;
}

/* Container kanan */
.topbar-user {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* CHIP USER PREMIUM */

.user-chip {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px 4px 6px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #dbe7dd;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

.user-chip:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
    transform: translateY(-1px);
    border-color: #c0d8c6;
}

.user-avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2e7d32, #66bb6a);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    flex-shrink: 0;
}

.user-chip-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-chip-name {
    font-size: 14px;
    font-weight: 600;
    color: #244b37;
}

.user-chip-role {
    margin-top: 2px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 500;
}

/* Badge warna berbeda untuk admin & pegawai */
.role-admin {
    background: rgba(255, 193, 7, 0.16);
    color: #8a5b00;
}

.role-pegawai {
    background: rgba(25, 118, 210, 0.15);
    color: #0d47a1;
}

.user-chip-caret {
    font-size: 10px;
    color: #607d8b;
    margin-left: 4px;
}

/* Dropdown menu */
.user-menu-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    padding: 6px 0;
    min-width: 170px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all .18s ease-out;
    z-index: 50;
}

.user-menu-dropdown a {
    display: block;
    padding: 8px 14px;
    font-size: 13px;
    color: #37474f;
    text-decoration: none;
}

.user-menu-dropdown a:hover {
    background: #f1f8f4;
    color: #1b5e20;
}

/* Tampilkan menu saat hover chip */
.user-chip:hover .user-menu-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ===============================
   DASHBOARD PREMIUM LAYOUT
================================== */

/* Hero / kartu selamat datang */
.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.dashboard-hero-main {
    flex: 1;
}

.hero-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #7b8a8f;
    margin-bottom: 4px;
}

.hero-title {
    font-size: 22px;
    font-weight: 750;
    color: #263238;
    margin-bottom: 4px;
}

.hero-subtitle {
    font-size: 13px;
    color: #546e7a;
}

.hero-role-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e8f5e9;
    color: #1b5e20;
    font-size: 11px;
    font-weight: 600;
    margin-top: 8px;
}

.hero-role-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2e7d32;
}

/* info kecil di kanan hero */
.dashboard-hero-side {
    min-width: 180px;
    text-align: right;
    font-size: 11px;
    color: #78909c;
}

.dashboard-hero-side strong {
    display: block;
    font-size: 13px;
    color: #37474f;
}

/* Kolom dalam dashboard-main */
.dashboard-col {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Kartu KPI kecil (Total Pegawai, Total Pemeriksaan, dsb) */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.kpi-card {
    border-radius: 10px;
    padding: 10px 12px;
    background: #f8fbf9;
    border: 1px solid #e1ece4;
}

.kpi-label {
    font-size: 12px;
    color: #607d8b;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 22px;
    font-weight: 700;
    color: #1b5e20;
}

.kpi-note {
    font-size: 11px;
    color: #90a4ae;
}

/* judul kecil di atas chart / section */
.section-caption {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #90a4ae;
    margin-bottom: 4px;
}

/* buat dashboard sedikit lebih padat lagi */
.dashboard-main {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1.15fr);
    gap: 12px;
    align-items: flex-start;
}

@media (max-width: 992px) {
    .dashboard-main {
        grid-template-columns: 1fr;
    }
}

/* batasi tinggi profil BKK agar tak terlalu panjang */
.dashboard-profile-card {
    max-height: 210px;
    overflow-y: auto;
}

/* ===== TUNING DASHBOARD SUPAYA LEBIH RAPI & PREMIUM ===== */

.dashboard-wrapper {
    max-width: 1180px;
    margin: 0 auto;
}

.dashboard-hero.card {
    padding: 10px 16px;
    margin-bottom: 12px;
}

.dashboard-main .card {
    padding: 10px 12px;
    margin-bottom: 8px;
}

/* Box grafik yang fixed height */
.chart-wrapper {
    background: #fff;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.05);
    margin-bottom: 10px;

    height: 220px;
    max-height: 220px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chart-wrapper h3 {
    margin-bottom: 6px;
    font-size: 14px;
}

.chart-wrapper canvas {
    flex: 1;
    width: 100% !important;
    height: 170px !important;
}
/* ==========================================
   TUNING DASHBOARD – BERSIH & PROFESIONAL
   ========================================== */

/* Batasi lebar area konten supaya tidak terlalu melebar */
.dashboard-wrapper {
    max-width: 1180px;
    margin: 0 auto 20px;
}

/* HERO / HEADER DASHBOARD */
.dashboard-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 18px;
    margin-bottom: 16px;
}

.dashboard-hero-main {
    flex: 1;
    min-width: 0;
}

.hero-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #9ca3af;
    margin-bottom: 4px;
}

.dashboard-hero-main h2 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 4px;
    color: #111827;
}

.dashboard-hero-main p {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

/* chip user di kanan tetap, cuma dipadatin sedikit */
.dashboard-hero-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.user-info-chip {
    padding: 4px 10px;
}

.hero-role-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e4f7eb;
    font-size: 11px;
    color: #166534;
}

.hero-role-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
}

/* LAYOUT 2 KOLOM: KPI + GRAFIK */
.dashboard-main {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.dashboard-col {
    flex: 1;
    min-width: 0;
}

/* Judul kecil di atas kolom ("Ringkasan Pegawai & Pemeriksaan") */
.section-caption {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #9ca3af;
}

/* GRID KPI – 2 kolom */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 1fr;
    gap: 10px;
}

/* Tampilan kartu KPI */
.kpi-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
    border: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.kpi-label {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 4px;
}

.kpi-value {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 2px;
}

.kpi-note {
    font-size: 11px;
    color: #9ca3af;
}

/* Card biasa di dalam dashboard dibuat sedikit lebih tipis */
.dashboard-main .card {
    padding: 10px 12px;
    margin-bottom: 10px;
}

/* WRAPPER GRAFIK – tinggi tetap supaya tidak bikin scroll panjang */
.chart-wrapper {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 1px 5px rgba(15, 23, 42, 0.06);
    margin-bottom: 10px;

    height: 230px;
    max-height: 230px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chart-wrapper h3 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.chart-wrapper canvas {
    flex: 1;
    width: 100% !important;
    height: 180px !important; /* ini yang bikin grafik tidak memanjang */
}

/* RESPONSIVE: kalau layar sempit, 2 kolom turun jadi 1 */
@media (max-width: 1024px) {
    .dashboard-main {
        flex-direction: column;
    }

    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-hero-side {
        align-items: flex-start;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   TABLE ACTION HELPERS
================================== */
.btn-group{
    display:flex;
    gap:8px;
    align-items:center;
    flex-wrap:wrap;
}
.inline-form{
    display:inline;
    margin:0;
}

/* =========================================================
   PREMIUM LOGIN PAGE
   ========================================================= */
.login-body{
  min-height: 100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 28px 16px;
  background:
    radial-gradient(1000px 500px at 20% 20%, rgba(20,143,119,.18), transparent 55%),
    radial-gradient(900px 500px at 90% 10%, rgba(30,132,73,.14), transparent 55%),
    radial-gradient(900px 500px at 70% 90%, rgba(244,208,63,.10), transparent 55%),
    #f4f7fb;
}

.login-page{
  width: 100%;
  display:flex;
  justify-content:center;
}

.login-card-premium{
  width: 100%;
  max-width: 460px;
  background: rgba(255,255,255,.90);
  border: 1px solid rgba(226,232,240,.95);
  border-radius: 18px;
  box-shadow: 0 20px 55px rgba(2,6,23,.12);
  padding: 18px 18px 16px;
  backdrop-filter: blur(10px);
}

/* garis aksen premium (nuansa Kemenkes) */
.login-card-premium::before{
  content:"";
  display:block;
  height: 6px;
  border-radius: 14px;
  margin: -6px 0 14px 0;
  background: linear-gradient(90deg, #148F77 0%, #2E86C1 52%, #F4D03F 100%);
}

.login-brand{
  display:flex;
  flex-direction: column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap: 10px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef2f7;
  margin-bottom: 12px;
}

/* Logo utama BKK Kupang (tengah atas & lebih besar) */
.login-logo-main{
  width: 220px;
  max-width: 80%;
  height: auto;
  filter: drop-shadow(0 10px 18px rgba(2,6,23,.16));
}

@media (max-width: 420px){
  .login-logo-main{ width: 190px; }
}

.login-brand-title{
  font-size: 20px;
  font-weight: 900;
  letter-spacing: .6px;
  /* perpaduan warna ala Kemenkes */
  background: linear-gradient(90deg, #148F77 0%, #2E86C1 55%, #F4D03F 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}

.login-brand-sub{
  margin-top: 2px;
  font-size: 12px;
  color:#64748b;
  line-height: 1.35;
}

/* logo kecil legacy (kalau masih dipakai di halaman lain) */
.login-brand-logo{
  width: 46px;
  height: auto;
  filter: drop-shadow(0 6px 14px rgba(2,6,23,.12));
}

.login-heading{
  margin: 12px 0 4px;
  font-size: 18px;
  font-weight: 800;
  color:#0f172a;
}

.login-desc{
  margin: 0 0 12px;
  font-size: 13px;
  color:#64748b;
  line-height: 1.5;
}

.login-form{
  display:flex;
  flex-direction:column;
  gap: 12px;
  margin-top: 6px;
}

.login-field label{
  display:block;
  font-size: 12px;
  font-weight: 700;
  color:#334155;
  margin-bottom: 6px;
}

.login-input{
  width:100%;
  height: 42px;
  border: 1px solid #dbe3ef;
  background: #ffffff;
  border-radius: 12px;
  padding: 0 12px;
  outline:none;
  font-size: 13px;
}

.login-input:focus{
  border-color: rgba(34,197,94,.55);
  box-shadow: 0 0 0 4px rgba(34,197,94,.14);
}

.login-passwrap{
  position:relative;
}

.login-passwrap .login-input{
  padding-right: 44px;
}

.login-toggle{
  position:absolute;
  top:50%;
  right: 8px;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color:#334155;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}

.login-toggle:hover{
  transform: translateY(-50%) translateY(-1px);
  box-shadow: 0 10px 20px rgba(2,6,23,.10);
  border-color:#cbd5e1;
}

.login-toggle svg{
  width: 18px;
  height: 18px;
}

.login-toggle .icon-hide{ display:none; }
.login-toggle.is-visible .icon-show{ display:none; }
.login-toggle.is-visible .icon-hide{ display:block; }

.login-btn{
  height: 44px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(180deg, #1E8449, #148F77);
  color:#ffffff;
  font-weight: 900;
  font-size: 13px;
  cursor:pointer;
  transition: transform .14s ease, box-shadow .14s ease, opacity .14s ease;
}

.login-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(20,143,119,.20);
}

.login-note{
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  font-size: 12px;
  color:#475569;
  line-height: 1.55;
}

.login-error{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fee2e2;
  color: #991b1b;
  font-size: 13px;
  margin-bottom: 10px;
}

.login-meta{
  text-align:center;
  margin-top: 12px;
  font-size: 11px;
  color:#94a3b8;
}


/* === Compatibility Patch: jika masih ada tabel class="table" === */
.table-wrap { overflow: auto; border-radius: 14px; border: 1px solid #e5e7eb; background: #fff; }

.table, .data-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 720px; }
.table thead th, .data-table thead th {
  position: sticky; top: 0;
  background: #f9fafb;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 12px;
  color: #64748b;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e7eb;
  z-index: 1;
}
.table tbody td, .data-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}
.table tbody tr:hover td, .data-table tbody tr:hover td { background: #fbfdff; }
.table-empty { text-align: center; padding: 18px; color: #6b7280; }

.action-group, .btn-group { display: inline-flex; gap: 8px; align-items: center; justify-content: flex-end; }
.td-wrap { white-space: normal; line-height: 1.25; }

/* ===============================
   DASHBOARD (COMPAT)
   - Pastikan blok Aksi Cepat & Ringkasan Skrining
     tetap rapi di desktop maupun mobile
================================== */

/* Ringkasan Skrining (dipakai di dashboard operator) */
.skrining-grid{
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}
@media (max-width: 640px){
    .skrining-grid{ grid-template-columns: 1fr; }
}

.skrining-card{
    position: relative;
    padding: 12px 12px 10px 14px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.06);
    background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.85));
    box-shadow: 0 10px 26px rgba(16,24,40,.05);
    overflow: hidden; /* untuk accent bar */
}
.skrining-card:before{
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    opacity: .9;
}
.accent-green:before{ background:#10b981; }
.accent-blue:before{  background:#3b82f6; }
.accent-orange:before{background:#f59e0b; }
.accent-purple:before{background:#8b5cf6; }

.k-label{ font-weight: 800; font-size: 12px; color:#111827; }
.k-sub{ font-size: 12px; color:#6b7280; margin-top: 2px; }
.k-value{ font-size: 22px; font-weight: 900; color:#0f172a; margin-top: 8px; line-height: 1; }

/* ===============================
   MOBILE LAYOUT (<= 900px)
   - Sidebar tersembunyi (slide)
   - Konten full width
   - Tombol hamburger muncul
================================== */
@media (max-width: 900px){
    /* Topbar: rapikan agar tidak kepotong di layar HP */
    .topbar{
        padding: 10px 12px;
        gap: 10px;
    }
    .topbar-left{
        min-width: 0;
    }
    .topbar-title{
        /* sedikit lebih kecil agar hemat ruang & lebih smooth */
        font-size: 16px;
        line-height: 1.15;
        /* biar judul bisa turun baris jika panjang */
        white-space: normal;
    }
    .topbar-user{
        max-width: 70vw;
    }
    .user-chip{
        max-width: 70vw;
    }
    .user-chip-text{
        min-width: 0;
        max-width: 48vw;
    }
    .user-chip-name{
        max-width: 48vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 12px;
    }
    .user-chip-role{
        max-width: 48vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 10px;
        padding: 1px 6px;
    }

    /* Rapikan chip agar lebih ringkas */
    .user-avatar-circle{ width: 30px; height: 30px; font-size: 15px; }
    .user-chip{ padding: 4px 10px 4px 6px; }
    .user-chip-caret{ font-size: 9px; }

    /* ===============================
       FIX UTAMA: Card terpotong (Aksi Cepat & Ringkasan Skrining)
       - paksa 1 kolom di layar HP
       - pastikan tidak ada parent yang memotong shadow / radius
    ================================ */
    .dash-card,
    .dash-card-body,
    .dashboard-wrapper{ overflow: visible !important; }

    .dash-top{ margin-top: 12px; }
    .dash-card{ margin-bottom: 14px; }

    /* Aksi cepat: 1 kolom agar tidak kepotong */
    .quick-actions{ grid-template-columns: 1fr !important; }

    /* Ringkasan skrining: 1 kolom agar tidak kepotong */
    .skrining-grid{ grid-template-columns: 1fr !important; }

    /* Sedikit ruang dalam konten agar card tidak "nempel" tepi layar */
    .content{ padding: 14px 12px; }

    .sidebar{
        width: 280px;
        max-width: 85vw;
        transform: translateX(-105%);
        transition: transform .25s ease;
        z-index: 9999;
    }
    .sidebar.is-open{ transform: translateX(0); }

    .main{
        margin-left: 0 !important;
        width: 100% !important;
    }

    .mobile-menu-btn{
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .mobile-overlay{
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        z-index: 9998;
        display: none;
    }
    .mobile-overlay.show{ display:block; }

    body.menu-open{ overflow: hidden; }
}

/* HP kecil: ringkas chip user agar tidak makan tempat */
@media (max-width: 420px){
    .topbar-user{ max-width: 65vw; }
    .user-chip{ max-width: 65vw; padding-right: 10px; }
    .user-chip-caret{ display:none; }
    .user-chip-role{ display:none; }
    .user-chip-text{ max-width: 52vw; }
    .user-chip-name{ max-width: 52vw; font-size: 13px; }
}
