:root {
    --green-light: #198754;
    --green-main: #198754;
    --green-dark: #156b45;
    --green-emerald: #1f8f5b;
    --gold-soft: #e8cfa3;
    --bg-premium: #f7faf7;
    --border-premium: rgba(25,135,84,0.12);
}

/* Global */
html, body {
    background: var(--bg-premium);
    font-family: "Poppins", sans-serif;
    color: #1d2d2d;
    scroll-behavior: smooth;
    font-size: 13px;
}

/* ───────────────────── NAVBAR PREMIUM SUPER MODERN ───────────────────── */
.navbar {
    background: linear-gradient(180deg, #18774e, #198754);
    -webkit-backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.65rem 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transition: 0.3s ease;
}

/* BRAND */
.brand-title {
    font-weight: 600;
    font-size: 1.15rem;
    letter-spacing: 0.5px;
    color: #ffffff !important;
}

/* NAVLINK STYLE */
.navbar .nav-link {
    color: rgba(255,255,255,0.92) !important;
    font-weight: 500;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    transition: 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
}

/* Hover glow */
.navbar .nav-link:hover {
    background: rgba(255,255,255,0.22);
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255,255,255,0.25);
}

/* Active */
.navbar .nav-link.active {
    background: #e3f7eb;
    color: var(--green-main) !important;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

/* Underline animation */
.navbar .nav-link::after {
    content: "";
    width: 0;
    height: 2.5px;
    background: #ffffffb7;
    border-radius: 10px;
    position: absolute;
    bottom: 6px;
    left: 50%;
    transition: 0.3s ease;
    transform: translateX(-50%);
}

.navbar .nav-link:hover::after { width: 70%; }
.navbar .nav-link.active::after {
    width: 80%;
    background: var(--green-main);
}

/* ───────────────────── DROPDOWN - ANIMASI PREMIUM ───────────────────── */

/* Dropdown base */
.navbar .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(14px);
    transition: 0.25s ease;
    border-radius: 14px;
    padding: 0.4rem;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

/* Dropdown item */
.navbar .dropdown-item {
    border-radius: 10px;
    padding: 0.55rem 1rem;
    transition: 0.25s ease;
    margin-bottom: 2px;
}

.navbar .dropdown-item:hover {
    background: rgba(31,143,91,0.18);
    color: var(--green-main);
}

.navbar .dropdown-item.active {
    background: rgba(31,143,91,0.18);
    color: var(--green-main);
}

/* ──────────────── SHOW DROPDOWN ON HOVER (DESKTOP ONLY) ─────────────── */
@media (min-width: 992px) {
    .navbar .dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(6px);
    }
}

/* MOBILE FIX: dropdown tetap klik, bukan hover */
@media (max-width: 991px) {
    .navbar .dropdown-menu {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
    }
}

/* ───────────────────── BUTTON PREMIUM (User Dropdown) ───────────────────── */
.btn-premium {
    background: linear-gradient(180deg, #1f8f5b, #198754);
    color: #fff;
    padding: 0.55rem 1.1rem;
    border-radius: 50px;
    border: 1px solid rgba(255,255,255,0.20);
    font-weight: 500;
    box-shadow: 0 4px 14px rgba(25,135,84,0.25);
    transition: all 0.3s ease;
}

.btn-premium:hover {
    background: linear-gradient(180deg, #27a166, #198754);
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(25,135,84,0.35);
}


/* ───────────────────────────────────────────
   SIDEBAR + SUBMENU (OFFCANVAS) PREMIUM
─────────────────────────────────────────── */

/* Sidebar container */
.offcanvas {
    background: #ffffff;
    border-right: 1px solid rgba(0,0,0,0.05);
    padding-top: 1.2rem;
    border-radius: 0 16px 16px 0;
}

/* Logo */
.offcanvas-header .brand-mobile {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--green-main);
}

/* Menu list */
.offcanvas .nav {
    padding: 0 1rem;
}

/* Menu item */
.offcanvas .nav-link {
    font-weight: 600;
    border-radius: 14px;
    padding: 0.78rem 1rem;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #444;
    transition: 0.25s ease;
}

/* Left text + icon */
.offcanvas .nav-link .menu-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Icon style */
.offcanvas .nav-link i {
    font-size: 1.1rem;
    color: var(--green-main);
    opacity: 0.8;
    transition: 0.25s;
}

/* Hover */
.offcanvas .nav-link:hover {
    background: rgba(31,143,91,0.12);
    color: var(--green-main);
    transform: translateX(4px);
}

/* Active */
.offcanvas .nav-link.active {
    background: rgba(31,143,91,0.18);
    color: var(--green-main);
    font-weight: 700;
}

/* Dropdown arrow */
.menu-arrow {
    transition: 0.25s;
    font-size: 0.95rem;
    opacity: 0.7;
}

/* Rotate arrow when expanded */
.nav-link[aria-expanded="true"] .menu-arrow {
    transform: rotate(90deg);
    opacity: 1;
}

/* SUBMENU container */
.submenu {
    padding-left: 1.7rem;
    margin-bottom: 6px;
}

/* Submenu link */
.submenu .sub-link {
    padding: 0.6rem 0.9rem;
    border-radius: 12px;
    display: block;
    color: #555;
    font-weight: 500;
    transition: 0.25s ease;
}

.submenu .sub-link:hover {
    background: rgba(31,143,91,0.12);
    color: var(--green-main);
}

/* Active submenu */
.submenu .sub-link.active {
    background: rgba(31,143,91,0.18);
    color: var(--green-main);
    font-weight: 600;
}

/* Divider */
.sidebar-divider {
    border-bottom: 1px solid rgba(0,0,0,0.06);
    margin: 1rem 0;
}

/* Logout button */
.btn-logout {
    margin-top: 10px;
    width: 100%;
    padding: 0.75rem;
    border-radius: 14px;
    background: rgba(220,53,69,0.12);
    color: #dc3545;
    font-weight: 600;
    transition: 0.25s ease;
}

.btn-logout:hover {
    background: rgba(220,53,69,0.18);
    color: #c82333;
}



/* ───────────────────── SUMMARY CARDS ───────────────────── */
.summary-card {
    background: #ffffff;
    border: 1px solid var(--border-premium);
    border-radius: 16px;
    padding: 1.35rem;
    transition: 0.28s ease;
    box-shadow: 0 6px 14px rgba(0,0,0,0.03);
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.08);
    border-color: var(--green-main);
}

.summary-icon {
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(25,135,84,0.10), rgba(25,135,84,0.05));
    font-size: 1.6rem;
    color: var(--green-main);
}

/* ───────────────────── CHART PLACEHOLDER ───────────────────── */
.chart-placeholder {
    height: 340px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff, #f8fbf9);
    border: 1px dashed rgba(25,135,84,0.18);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #889;
    font-size: 1.05rem;
}

/* ───────────────────────────────
    BASE WRAPPER (Responsive)
────────────────────────────────*/
.table-responsive-premium {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    padding-bottom: 8px;
}

.table-responsive-premium::-webkit-scrollbar {
    height: 6px;
}

.table-responsive-premium::-webkit-scrollbar-thumb {
    background: #c7e7d3;
    border-radius: 10px;
}

/* ───────────────────────────────
    CARD WRAPPER
────────────────────────────────*/
.table-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 1.2rem;
    box-shadow: 0 8px 22px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    transition: 0.3s ease;
}

.table-card:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.08);
}

/* ───────────────────────────────
    MODERN TABLE
────────────────────────────────*/
.modern-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px; /* jarak antar row */
}

/* HEADER */
.modern-table thead tr {
    background: linear-gradient(90deg, #198754, #27a86d);
}

.modern-table thead th {
    color: #fff;
    padding: 14px;
    text-transform: uppercase;
    font-size: 0.78rem;
    border: none !important;
    letter-spacing: 0.5px;
}

/* BODY */
.modern-table tbody tr {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 5px 14px rgba(0,0,0,0.06);
    transition: 0.25s ease;
}

.modern-table tbody tr td:first-child {
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
}

.modern-table tbody tr td:last-child {
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

.modern-table td {
    padding: 14px;
    vertical-align: middle;
    border: none;
    font-size: 0.95rem;
}

/* HOVER EFFECT */
.modern-table tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.10);
    background: #f3fff6;
}

/* ───────────────────────────────
    BUTTONS
────────────────────────────────*/
.btn-action {
    border: none;
    padding: 6px 14px;
    border-radius: 10px;
    font-weight: 500;
    transition: 0.25s;
    font-size: 0.85rem;
    margin: 2px;
}

.btn-edit {
    background: #ffcc85;
    color: #6a3c00;
}

.btn-edit:hover {
    background: #ffb963;
}

.btn-delete {
    background: #ff6b6b;
    color: #fff;
}

.btn-delete:hover {
    background: #ff3a3a;
}

.btn-add,
.btn-eximport {
    background: #198754;
    color: #fff;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
    transition: 0.25s ease;
}

.btn-add:hover {
    transform: translateY(-2px);
    background: #1fa066;
}

.btn-eximport:hover {
    transform: translateY(-2px);
    background: #1fa066;
}

/* ───────────────────────────────
    RESPONSIVE TWEAK
────────────────────────────────*/
@media (max-width: 768px) {
    .modern-table thead {
        display: none; /* hide header di mobile */
    }

    .modern-table tbody tr {
        display: block;
        margin-bottom: 14px;
    }

    .modern-table td {
        display: flex;
        justify-content: space-between;
        padding: 12px;
        font-size: 0.9rem;
    }

    .modern-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #198754;
    }
}

/* ======================================================
   CARD WRAPPER — Clean & Modern
====================================================== */
.modern-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: 0.25s ease;
    border: none;
}

/* ======================================================
   BUTTON TAMBAH — Minimalis
====================================================== */

.btn-add,
.btn-eximport {
    background-color: #198754;
    color: #fff;
    border-radius: 8px;
    padding: 6px 14px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: 0.2s;
}
.btn-add:hover {
    background-color: #159347;
}
.btn-eximport:hover {
    background-color: #159347;
}

/* ======================================================
   TABLE HEADER — Modern & Elegan (Standar + Rounded)
====================================================== */
table.modern-table thead {
    background-color: #28a745; /* Warna standar hijau */
}

table.modern-table thead tr {
    color: #ffffff !important;
    font-weight: 600;
    letter-spacing: 0.5px;
}

table.modern-table thead th {
    padding: 12px 15px;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    background-color: #198754 !important;
    color: #ffffff !important;
}

/* Border radius untuk ujung kiri & kanan */
table.modern-table thead th:first-child {
    border-top-left-radius: 8px;
}

table.modern-table thead th:last-child {
    border-top-right-radius: 8px;
}



/* ======================================================
   TABLE BODY — Modern Clean
====================================================== */
table.modern-table tbody tr {
    background-color: #ffffff;
    border-radius: 8px;
    transition: 0.2s;
}
table.modern-table tbody tr:hover {
    background-color: #f0fdf4;
}
table.modern-table tbody td {
    padding: 10px;
    border-top: 1px solid #efefef;
    vertical-align: middle;
}

/* Rounded corners for first & last td */
table.modern-table tbody tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}
table.modern-table tbody tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* ======================================================
   ACTION BUTTONS — Modern & Subtle
====================================================== */
.btn-action {
    border: none;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    transition: 0.2s;
    margin: 2px;
}

.btn-edit {
    background-color: #fbcf82;
    color: #5a3600;
}
.btn-edit:hover {
    background-color: #f9b75b;
}

.btn-delete {
    background-color: #ff6b6b;
    color: #fff;
}
.btn-delete:hover {
    background-color: #e03e3e;
}

.btn-detail {
    background-color: #4dabf7;
    color: #fff;
}
.btn-detail:hover {
    background-color: #339af0;
}

/* ======================================================
   DATA TABLE TOP CONTROLS — Paksa Kiri/Kanan selalu
====================================================== */
.dataTables_wrapper .dataTables_top {
    display: flex !important;
    justify-content: space-between !important; /* kiri-kanan */
    align-items: center !important;            /* vertikal sejajar */
    flex-wrap: nowrap !important;              /* jangan wrap */
    gap: 5px;
    margin-bottom: 12px;
    box-sizing: border-box;
    height: auto;
}

/* Container select & input */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    display: flex !important;
    align-items: center !important;
    gap: 5px;
    margin: 0;
    font-size: 0.9rem;
    flex: 0 0 auto;   /* paksa anak tetap ukuran otomatis, jangan stretch */
}

/* Hilangkan label text tapi tetap pakai flex untuk input */
.dataTables_wrapper .dataTables_length label,
.dataTables_wrapper .dataTables_filter label {
    display: flex !important;
    align-items: center !important;
    font-size: 0; 
    margin: 0;
    padding: 0;
}

/* Styling select & input */
.dataTables_wrapper .dataTables_length select{
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    font-size: 0.85rem;
    outline: none;
    transition: 0.2s;
    margin: 0;
    box-sizing: border-box;
}

.dataTables_wrapper .dataTables_filter input {
    padding: 5px 10px;
    border-radius: 6px;
    border: 1px solid #ced4da;
    font-size: 0.85rem;
    outline: none;
    transition: 0.2s;
    margin: 0;
    box-sizing: border-box;
    min-width: 300px;
    pasholder: 'Search';
}

/* Dorong search ke kanan */
.dataTables_wrapper .dataTables_filter {
    justify-content: flex-end !important;
}

/* Fokus styling */
.dataTables_wrapper .dataTables_length select:focus,
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #198754;
    box-shadow: 0 0 5px rgba(25,135,84,0.3);
}

/* ======================================================
   Responsive HP — tetap kiri-kanan, tidak stack
====================================================== */
@media (max-width: 1020px) {
    .dataTables_wrapper .dataTables_top {
        flex-direction: row !important;  /* tetap kiri-kanan */
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;     /* jangan wrap */
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        flex: 0 0 auto !important;        /* ukuran otomatis */
        width: auto !important;           /* jangan full width */
        margin-bottom: 0 !important;
    }
}


/* ======================================================
   DATA TABLE FOOTER (INFO + PAGINATION) — Centered
====================================================== */
.dataTables_wrapper .dataTables_bottom {
    display: flex;
    flex-direction: column; /* info di atas pagination */
    justify-content: center;
    align-items: center; /* center horizontal */
    margin-top: 12px;
    gap: 6px; /* jarak antara info dan pagination */
}

/* Info di atas pagination */
.dataTables_wrapper .dataTables_info {
    font-size: 0.85rem;
    color: #6c757d;
    width: 100%;
    text-align: center;
    float: none !important;
    margin: 0 !important;
}

/* Wrapper pagination */
.dataTables_wrapper .dataTables_paginate {
    width: 100%;
    text-align: center;       
    float: none !important;   
    margin: 0 !important;
    display: flex !important; 
    justify-content: center !important; 
    gap: 4px;                 /* jarak antar button */
}

/* Pagination buttons */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-block;   /* penting agar sejajar */
    background: #ffffff;
    border: 1px solid #ced4da;
    color: #198754;
    border-radius: 6px;
    padding: 3px 8px;
    margin: 2px;               /* gap sudah di wrapper */
    transition: 0.2s;
    cursor: pointer;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #198754;
    color: #fff !important;
    border: 1px solid #198754;
}

/* Remove extra borders from table */
table.modern-table,
table.modern-table th,
table.modern-table td {
    border: none;
}

/* Responsive fix tambahan untuk HP */
@media (max-width: 768px) {
    .dataTables_wrapper .dataTables_bottom {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        width: 100%;
        text-align: center;
        float: none !important;
        margin: 0 !important;
    }
    .dataTables_wrapper .dataTables_paginate {
        justify-content: center !important;
        display: flex !important;
    }
}


/* ======================================================
   RESPONSIVE MOBILE FIX
====================================================== */
@media (max-width: 768px) {
    table.modern-table thead { display: none; }

    table.modern-table tbody tr {
        display: block;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        border-radius: 8px;
        padding: 10px;
    }

    table.modern-table tbody td {
        display: flex;
        justify-content: space-between;
        padding: 8px 10px;
        font-size: 0.875rem;
        border-bottom: 1px solid #efefef;
    }

    table.modern-table tbody td:last-child { border-bottom: none; }

    table.modern-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #198754;
        margin-right: 8px;
        flex: 1;
    }

    table.modern-table tbody td span {
        flex: 2;
        text-align: right;
    }

    /* Top & Bottom controls responsive */
    .dataTables_wrapper .dataTables_top,
    .dataTables_wrapper .dataTables_bottom {
        flex-direction: column;
        align-items: center; /* tetap center di mobile */
        gap: 10px;
    }

    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dataTables_info,
    .dataTables_wrapper .dataTables_paginate {
        margin-bottom: 6px;
    }
}


/* ============================================================
   ★★★ GLOBAL CARD STYLE (Berlaku untuk Potret & Landscape) ★★★
   ============================================================ */
.id-card-potret, 
.id-card-lemscape {
    background: var(--bg) center/cover no-repeat;
    border-radius: 14px;
    overflow: hidden;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.22);
}

/* ─── Ukuran Card ─── */
.id-card-potret {
    width: 300px;
    height: 480px;
}

.id-card-lemscape {
    width: 480px;
    height: 300px;
}

/* ─── Inner Wrapper ─── */
.card-inner {
    width: 100%;
    height: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* ============================================================
   ★★★ POTRET (VERTICAL) CARD LAYOUT ★★★
   ============================================================ */
.id-card-potret .card-inner {
    justify-content: flex-start;
}

/* Logo */
.card-logo {
    width: 250px;
    margin-bottom: 6px;
}

.card-logo img {
    width: 100%;
    object-fit: contain;
}

/* Title */
.card-title {
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    margin-bottom: 14px;
    text-align: center;
}

/* Foto */
.id-card-potret .photo-wrapper {
    width: 80px;
    height: 170px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    background: #fff;
}

.id-card-potret .photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Data */
.id-card-potret .card-info {
    text-align: center;
    margin-bottom: 16px;
}

.card-info .nama {
    font-size: 15px;
    font-weight: bold;
}
.card-info .nis,
.card-info .kelas,
.card-info .alamat {
    font-size: 12px;
    margin-top: 3px;
}

/* QR */
.id-card-potret .qr-wrapper {
    width: 160px;
    height: 160px;
}

.qr-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* ============================================================
   ★★★ LANDSCAPE (HORIZONTAL) CARD LAYOUT ★★★
   ============================================================ */
.id-card-lemscape .card-inner {
    align-items: center;
}

/* Logo */
.id-card-lemscape .card-logo {
    width: 250px;
    margin: 0 auto 6px auto;
}

/* Title */
.id-card-lemscape .card-title {
    width: 100%;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    margin-bottom: 10px;
}

/* Wrapper FOTO + DATA + QR */
.landscape-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

/* Foto kiri */
.id-card-lemscape .photo-wrapper {
    width: 80px;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    margin-right: 5px;
    background: #fff;
}

.id-card-lemscape .photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.id-card-lemscape .landscape-content {
    justify-content: flex-start;
}

.id-card-lemscape .qr-wrapper {
    margin-left: auto;  /* dorong QR ke kanan */
}

/* Data → berada di bawah foto */
.id-card-lemscape .card-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start !important;
    text-align: left !important;
}


/* QR kanan */
.id-card-lemscape .qr-wrapper {
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.items-card-center {
    display: flex;
    justify-content: center; /* horizontal */
    align-items: center;     /* vertical */
    flex-direction: column;  /* kalau dua card ditumpuk vertikal */
}

    /* ==========================================
   CARD FOTO SANTRI
========================================== */
.card-foto-santri {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

/* FOTOR SANTRI PREVIEW */
.foto-santri {
    width: 160px;
    height: 160px;
    background: #f3f5f9;
    border-radius: 50%;
    border: 2px solid #ced4da;
    box-shadow: 4px 4px 12px rgba(0,0,0,0.08), -4px -4px 12px rgba(255,255,255,0.9);
    background-size: cover;
    background-position: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.foto-santri:hover {
    transform: scale(1.05);
    box-shadow: 6px 6px 16px rgba(0,0,0,0.12), -6px -6px 16px rgba(255,255,255,0.95);
}

/* INPUT FILE */
.card-foto-santri input[type="file"] {
    width: 100%;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid #ced4da;
    transition: border-color 0.3s ease;
}

.card-foto-santri input[type="file"]:hover {
    border-color: #28a745;
}

/* OPTIONAL: ICON ADD/CHANGE FOTO (bisa ditambahkan di atas div.foto-santri) */
.foto-santri::after {
    content: '📷';
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: 24px;
    background: rgba(255,255,255,0.8);
    border-radius: 50%;
    padding: 4px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.foto-santri:hover::after {
    transform: scale(1.2);
}

.foto-santri-list {
    width: 45px;
    height: 45px;
    background: #f3f5f9;
    border-radius: 50%;
    border: 2px solid #ced4da;
    box-shadow: 4px 4px 12px rgba(0,0,0,0.08), -4px -4px 12px rgba(255,255,255,0.9);
    background-size: cover;
    background-position: center;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}


/* ============================================================
   ★★★ GLOBAL CARD STYLE (Berlaku untuk Potret & Landscape) ★★★
   ============================================================ */
.id-card-potret, 
.id-card-lemscape {
    background: var(--bg) center/cover no-repeat;
    border-radius: 18px;
    overflow: hidden;
    padding: 10px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-shadow: 0 8px 18px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.22);
}

/* ─── Ukuran Card ─── */
.id-card-potret {
    width: 300px;
    height: 480px;
}

.id-card-lemscape {
    width: 480px;
    height: 300px;
}

/* ─── Inner Wrapper ─── */
.card-inner {
    width: 100%;
    height: 100%;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}


/* ============================================================
   ★★★ POTRET (VERTICAL) CARD LAYOUT ★★★
   ============================================================ */
.id-card-potret .card-inner {
    justify-content: flex-start;
}

/* Logo */
.card-logo {
    width: 250px;
    margin-bottom: 6px;
}

.card-logo img {
    width: 100%;
    object-fit: contain;
}

/* Title */
.card-title {
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    margin-bottom: 14px;
    text-align: center;
}

/* Foto */
.id-card-potret .photo-wrapper {
    width: 80px;
    height: 170px;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 12px;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
    background: #fff;
}

.id-card-potret .photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Data */
.id-card-potret .card-info {
    text-align: center;
    margin-bottom: 16px;
}

.card-info .nama {
    font-size: 15px;
    font-weight: bold;
}
.card-info .nis,
.card-info .kelas,
.card-info .alamat {
    font-size: 12px;
    margin-top: 3px;
}

/* QR */
.id-card-potret .qr-wrapper {
    width: 140px;
    height: 140px;
}

.qr-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* ============================================================
   ★★★ LANDSCAPE (HORIZONTAL) CARD LAYOUT ★★★
   ============================================================ */
.id-card-lemscape .card-inner {
    align-items: center;
}

/* Logo */
.id-card-lemscape .card-logo {
    width: 250px;
    margin: 0 auto 6px auto;
}

/* Title */
.id-card-lemscape .card-title {
    width: 100%;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    text-decoration: underline;
    margin-bottom: 10px;
}

/* Wrapper FOTO + DATA + QR */
.landscape-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

/* Foto kiri */
.id-card-lemscape .photo-wrapper {
    width: 80px;
    height: 100px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.4);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    margin-right: 5px;
    background: #fff;
}

.id-card-lemscape .photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Data → berada di bawah foto */
.id-card-lemscape .card-info {
    margin-top: 6px;
    margin: 0 10px;
    /*text-align: center;*/
}

/* QR kanan */
.id-card-lemscape .qr-wrapper {
    width: 140px;
    height: 140px;
    flex-shrink: 0;
}

.items-card-center {
    display: flex;
    justify-content: center; /* horizontal */
    align-items: center;     /* vertical */
    flex-direction: column;  /* kalau dua card ditumpuk vertikal */
}


/* Container grid */
.scan-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    margin-top: 20px;
}

/* Card Wrapper */
.scan-item a {
    text-decoration: none;
}

/* Card Style */
.scan-card {
    background: #1B8F5A; /* hijau modern lebih cerah */
    border-radius: 20px;
    padding: 25px 10px;
    text-align: center;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    transition: all .25s ease;
    border: 2px solid #28A06B; /* border hijau lebih fresh */
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Hover Effect */
.scan-card:hover {
    transform: translateY(-6px);
    background: #15794C;  /* sedikit lebih gelap tapi tetap soft */
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.25);
}

/* Ripple soft light */
.scan-card::before {
    content: "";
    position: absolute;
    top: -80px;
    left: -80px;
    width: 160px;
    height: 160px;
    background: rgba(255,255,255,0.12); /* lebih terang dari sebelumnya */
    border-radius: 50%;
    transition: 0.4s;
}

.scan-card:hover::before {
    top: -30px;
    left: -30px;
}

/* Image style */
.scan-card img {
    width: 85px;
    margin-bottom: 12px;
    border-radius: 14px; /* tetap ada border radius */
    filter: drop-shadow(0 4px 4px rgba(0,0,0,0.25));
}

/* Title */
.scan-card h6 {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Badge dalam tabel - tidak melebar, tapi tetap fleksibel */
table.dataTable tbody tr td span.badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    white-space: nowrap !important;
    width: max-content !important;     /* <- magic utama */
    max-width: max-content !important; /* <- mencegah melebar */
    padding: 3px 4px;
    font-size: 10px;
    border-radius: 6px;
    margin-left: 5px;
}

/* Daterangepicker Custom Styles (Green Theme) */
.daterangepicker .applyBtn {
    background-color: var(--green-main);
    border-color: var(--green-dark);
}
.daterangepicker .applyBtn:hover {
    background-color: var(--green-dark);
    border-color: var(--green-dark);
}

.daterangepicker .ranges li.active {
    background-color: var(--green-main);
}

.daterangepicker td.active, .daterangepicker td.active:hover {
    background-color: var(--green-main);
}

/* --- Daterangepicker Single Month View --- */
.daterangepicker {
    width: auto !important; /* Adjust container width to fit one calendar */
}

.daterangepicker .drp-calendar.right {
    display: none !important; /* Hide the right-side calendar */
}

.daterangepicker .drp-calendar.left {
    margin-right: 0 !important; /* Remove margin from the left calendar */
}

/* --- Daterangepicker Hide Cancel Button --- */
.daterangepicker .cancelBtn {
    display: none !important;
}