/* ===========================
   GLOBAL
=========================== */
body {
    font-family: 'Neuron Angled', sans-serif;
}

.link_menu_page {
    color: #222d32;
}

/* Font */
@font-face {
    font-family: 'Neuron Angled';
    src: url('/fonts/neuron-angled/Neuron Angled.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Neuron Angled';
    src: url('/fonts/neuron-angled/Neuron Angled Bd.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
}

/* ===========================
   UTILITIES
=========================== */
.hidden { display: none !important; }

a.btn.disabled {
    pointer-events: none;
    opacity: 0.6;
}

.form-label {
    font-weight: bold;
    font-size: 1rem;
    margin-bottom: 8px;
    display: block;
    text-align: center;
}

/* ===========================
   FLASH MESSAGE
=========================== */
.flash-message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    padding: 20px 30px;
    background-color: #fff;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.9);
    border-radius: 5px;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
    min-width: 140px;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.btn-forms {
    width: 20%;
}

.btn-actions,
.table .btn-action {
    min-width: auto;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin: 0 2px;
}

.btn-actions i,
.table .btn-action i {
    margin: 0;
}

.btn-success {
    background: linear-gradient(45deg, #28a745, #218838);
    border: 0;
}

.btn-warning {
    background: linear-gradient(45deg, #ffc107, #e0a800);
    border: 0;
    color: #fff;
}

/* ===========================
   TABLE
=========================== */
#yajra thead th {
    text-align: center !important;
    vertical-align: middle !important;
}

#tables1 thead th {
    text-align: center !important;
    vertical-align: middle !important;
}

#tables1 td {
    white-space: normal !important;
    word-wrap: break-word;
    text-align: center; /* konten td rata tengah */
    vertical-align: middle; /* vertikal tengah */
}

#yajra td {
    white-space: normal !important;
    word-wrap: break-word;
    text-align: center; /* konten td rata tengah */
    vertical-align: middle; /* vertikal tengah */
}

#tables1 img {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    display: block;       /* agar margin auto bekerja */
    margin: 0 auto;       /* gambar di tengah */
}

#yajra img {
    max-width: 200px;
    height: auto;
    border-radius: 4px;
    display: block;       /* agar margin auto bekerja */
    margin: 0 auto;       /* gambar di tengah */
}

/* ===========================
   BADGES
=========================== */
/* Base style untuk semua badge */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0.45em 0.85em;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    border-radius: 30px;
    border: 1px solid transparent;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Warna badge seperti badge-active */
.badge-primary {
    background: #e6f0ff;
    color: #007bff;
    border-color: #007bff;
}

.badge-success {
    background: #e6f9f0;
    color: #28a745;
    border-color: #28a745;
}

.badge-warning {
    background: #fff8e6;
    color: #ffc107;
    border-color: #ffc107;
}

.badge-danger {
    background: #fdecea;
    color: #dc3545;
    border-color: #dc3545;
}

.badge-info {
    background: #e6f9fb;
    color: #17a2b8;
    border-color: #17a2b8;
}

.badge-secondary {
    background: #f1f1f1;
    color: #6c757d;
    border-color: #6c757d;
}

/* Custom status badges */
.badge-status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5em 0.8em;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-active {
    background: #e6f9f0;
    color: #28a745;
    border: 1px solid #28a745;
    box-shadow: 0 2px 6px rgba(40,167,69,0.2);
}

.badge-inactive {
    background: #fdecea;
    color: #dc3545;
    border: 1px solid #dc3545;
    box-shadow: 0 2px 6px rgba(220,53,69,0.2);
}

/* ===========================
   IMAGE STYLING
=========================== */
.img-table {
    max-width: 200px;
    max-height: 150px;
    display: block;
}

#preview-image {
    display: none;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

#preview-image:hover {
    transform: scale(1.05);
}

/* ===========================
   SIGNATURE PAD
=========================== */
#signature-pad {
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
}

/* ===========================
   CAMERA CARD
=========================== */
.camera-card {
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    padding: 16px;
}

.camera-title {
    text-align: center;
    margin: 0 0 12px;
    font-weight: 600;
}

.camera-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
}

@supports not (aspect-ratio: 4 / 3) {
    .camera-wrap::before {
        content: '';
        display: block;
        padding-top: 75%; /* 4:3 fallback */
    }
}

.camera-wrap video,
.camera-wrap canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* mirror front-camera */
}

.back-camera .camera-wrap video,
.back-camera .camera-wrap canvas {
    transform: none;
}

.camera-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 12px;
}

/* ===========================
   SWITCH TOGGLE
=========================== */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #007bff;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
    .kodeetik {
        max-width: 100%;
    }

    .btn-forms {
        width: 70%;
    }

    #tables1 img {
        max-width: 50px;
    }
}

.kodeetik {
    max-width: 60%;
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td.child ul li,
table.dataTable.dtr-inline.collapsed>tbody>tr>th.child ul li {
    display: flex;
    justify-content: flex-start; /* semua rata kiri */
    align-items: flex-start;
    padding: 4px 0;
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td.child ul li .dtr-title {
    min-width: 120px; /* biar label rata sejajar */
    font-weight: 600; /* tebalkan label */
    color: #444;
    text-align: left;
}

table.dataTable.dtr-inline.collapsed>tbody>tr>td.child ul li .dtr-data {
    margin-left: 8px;
    text-align: left;
}