/* ==========================================================================
   PT. MULTI MEDIKA MANDIRI - E-PRESENSI DIGITAL
   MASTER STYLESHEET (CLEAN & TERPUSAT)
   ========================================================================== */

/* ==========================================================================
   1. GLOBAL RESET & BODY LAYOUT
   ========================================================================== */
body {
    min-height: 100vh;
    background-color: #f5f7fa !important;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

body.login-page {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%) !important;
    padding: 10px !important;
}

.login-logo-img {
    max-height: 85px;
    width: 85px;
    border-radius: 50%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.1));
}

/* ==========================================================================
   2. NAVBAR & HEADER & ALERT BANNER
   ========================================================================== */
.navbar-fixed nav {
    background-color: #1565c0 !important;
}

.nav-left-group {
    gap: 12px;
    height: 100%;
}

.brand-logo-unified {
    gap: 10px;
    text-decoration: none !important;
}

.nav-erp-chip {
    height: 28px !important;
    line-height: 28px !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
}

.nav-erp-chip-icon {
    margin-right: 4px !important;
    line-height: 28px !important;
}

.brand-logo-custom {
    font-size: 1.1rem !important;
    font-weight: bold !important;
    white-space: nowrap !important;
}

.brand-logo-mobile {
    font-size: 0.95rem !important;
    margin-left: 55px !important;
    font-weight: bold !important;
    white-space: nowrap !important;
}

.main-wrapper {
    padding-top: 25px;
    padding-bottom: 40px;
}

.app-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px 18px;
    color: #78909c;
    text-align: center;
    font-size: 0.75rem;
}

.app-version {
    color: #90a4ae;
}

.alert-pulang-banner {
    width: 100%;
    padding: 8px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 996;
    position: relative;
}

.alert-belum-masuk {
    background-color: #2e7d32;
}

.alert-banner-content {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 15px;
}

.alert-banner-text {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
}

.alert-banner-text i.material-icons {
    font-size: 22px;
}

.alert-btn-absen {
    border-radius: 20px !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
}

@media (max-width: 600px) {
    .alert-banner-content {
        flex-direction: column !important;
        text-align: center;
        gap: 8px;
    }
    
    .alert-banner-text {
        font-size: 0.8rem;
    }

    .alert-btn-absen {
        width: 100%;
    }
}

/* ==========================================================================
   3. SPACING & LAYOUT UTILITY CLASSES
   ========================================================================== */
.display-none { display: none !important; }
.display-block { display: block !important; }
.display-flex { display: flex !important; }
.flex-1 { flex: 1 !important; }

.m-0 { margin: 0 !important; }
.m-auto { margin: 0 auto !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 2px !important; }
.mb-4 { margin-bottom: 4px !important; }
.mb-5 { margin-bottom: 5px !important; }
.mb-8 { margin-bottom: 8px !important; }
.mb-10 { margin-bottom: 10px !important; }
.mb-15 { margin-bottom: 15px !important; }
.mb-20 { margin-bottom: 20px !important; }
.mb-25 { margin-bottom: 25px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-4 { margin-top: 4px !important; }
.mt-5 { margin-top: 5px !important; }
.mt-6 { margin-top: 6px !important; }
.mt-10 { margin-top: 10px !important; }
.mt-12 { margin-top: 12px !important; }
.mt-15 { margin-top: 15px !important; }
.mt-20 { margin-top: 20px !important; }
.mt-25 { margin-top: 25px !important; }

.p-0 { padding: 0 !important; }
.p-10 { padding: 10px !important; }
.p-15 { padding: 15px !important; }
.p-20 { padding: 20px !important; }

.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }

.max-w-420 { max-width: 420px !important; }
.max-w-500 { max-width: 500px !important; }
.max-w-520 { max-width: 520px !important; }
.max-w-600 { max-width: 600px !important; }
.max-w-700 { max-width: 700px !important; }
.max-w-750 { max-width: 750px !important; }
.max-w-800 { max-width: 800px !important; }
.max-w-850 { max-width: 850px !important; }
.max-w-900 { max-width: 900px !important; }
.max-w-950 { max-width: 950px !important; }
.max-w-1000 { max-width: 1000px !important; }
.max-w-1100 { max-width: 1100px !important; }

.font-075 { font-size: 0.75rem !important; }
.font-08 { font-size: 0.8rem !important; }
.font-085 { font-size: 0.85rem !important; }
.font-09 { font-size: 0.9rem !important; }
.font-10 { font-size: 1rem !important; }
.font-11 { font-size: 1.1rem !important; }
.font-12 { font-size: 1.25rem !important; }
.font-13 { font-size: 1.3rem !important; }
.font-14 { font-size: 1.4rem !important; }
.font-18 { font-size: 1.8rem !important; }

.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

.flex-center { display: flex !important; align-items: center !important; justify-content: center !important; }
.flex-between { display: flex !important; align-items: center !important; justify-content: space-between !important; }
.flex-wrap { flex-wrap: wrap !important; }

.gap-4 { gap: 4px !important; }
.gap-6 { gap: 6px !important; }
.gap-8 { gap: 8px !important; }
.gap-10 { gap: 10px !important; }
.gap-12 { gap: 12px !important; }
.gap-15 { gap: 15px !important; }

.rounded-4 { border-radius: 4px !important; }
.rounded-6 { border-radius: 6px !important; }
.rounded-8 { border-radius: 8px !important; }
.rounded-10 { border-radius: 10px !important; }
.rounded-12 { border-radius: 12px !important; }
.rounded-20 { border-radius: 20px !important; }

/* ==========================================================================
   4. LOGIN PAGE COMPONENTS
   ========================================================================== */
.login-card {
    width: 100%;
    max-width: 420px;
    padding: 20px 15px;
    border-radius: 12px;
    margin: 0 auto;
}

.login-content {
    padding: 15px;
}

.g-recaptcha-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 15px 0;
    overflow: hidden;
}

@media (max-width: 400px) {
    .g-recaptcha {
        transform: scale(0.85);
        -webkit-transform: scale(0.85);
        transform-origin: center center;
        -webkit-transform-origin: center center;
    }
}

@media (max-width: 330px) {
    .g-recaptcha {
        transform: scale(0.75);
        -webkit-transform: scale(0.75);
    }
}

/* ==========================================================================
   5. DASHBOARD COMPONENTS
   ========================================================================== */
.welcome-card {
    background: linear-gradient(135deg, #1565c0 0%, #0d47a1 100%);
    color: #ffffff;
    border-radius: 12px;
    padding: 22px 25px;
    margin-top: 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(13, 71, 161, 0.25);
}

.welcome-row {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.welcome-clock-col {
    border-left: 1px solid rgba(255,255,255,0.25);
    padding-left: 15px;
}

.live-clock {
    margin: 0;
    font-family: monospace;
    font-size: 1.8rem;
    font-weight: bold;
}

.stat-card-box {
    border-radius: 12px;
    padding: 18px 20px;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100px;
    margin-bottom: 15px;
    transition: transform 0.2s ease;
}

.stat-card-box:hover {
    transform: translateY(-2px);
}

.stat-card-info h5 {
    margin: 4px 0 2px 0;
    font-weight: 700;
    font-size: 1.5rem;
}

.stat-card-info small {
    font-size: 0.8rem;
    opacity: 0.9;
}

.stat-card-icon i {
    font-size: 2.8rem !important;
    opacity: 0.85;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 22px 15px;
    border-radius: 12px;
    color: #ffffff !important;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 120px;
}

.quick-action-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

.quick-action-btn i {
    font-size: 2.5rem !important;
    margin-bottom: 8px;
    line-height: 1 !important;
}

.quick-action-btn span {
    font-weight: 700;
    font-size: 0.95rem;
    text-align: center;
    line-height: 1.2;
}

@media (max-width: 992px) {
    .quick-action-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .quick-action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .quick-action-btn {
        padding: 16px 10px;
        min-height: 105px;
    }
    .quick-action-btn i {
        font-size: 2rem !important;
    }
    .quick-action-btn span {
        font-size: 0.85rem;
    }
}

.recent-activity-list {
    border: none;
    margin: 0;
}

.recent-activity-item {
    padding-left: 55px;
    min-height: 50px;
    border-bottom: 1px solid #f0f0f0;
}

.recent-activity-icon {
    width: 36px;
    height: 36px;
    line-height: 36px;
    font-size: 1.2rem;
}

.recent-activity-title {
    font-size: 12.5px;
    color: #212121;
    font-weight: bold;
}

.recent-activity-meta {
    font-size: 11px;
    margin: 2px 0 0 0;
}

.recent-activity-photo {
    width: 36px;
    height: 36px;
    margin-top: 0;
    object-fit: cover;
}

.card-title-header {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* ==========================================================================
   6. FORM PRESENSI & KAMERA & ATTACHMENT
   ========================================================================== */
.form-group-custom {
    margin-bottom: 20px;
}

.form-label-custom {
    font-size: 0.85rem;
    font-weight: 700;
    color: #1565c0;
    display: block;
    margin-bottom: 6px;
}

.select-browser-custom {
    width: 100%;
    height: 42px;
    padding: 8px 12px;
    border: 1px solid #b0bec5;
    border-radius: 6px;
    background-color: #ffffff;
    font-size: 0.9rem;
    color: #37474f;
    outline: none;
    transition: border-color 0.2s ease;
}

.select-browser-custom:focus {
    border-color: #1565c0;
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.15);
}

.jenis-absen-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 20px;
}

.jenis-absen-grid label {
    margin: 0;
    cursor: pointer;
    display: block;
}

.jenis-absen-grid input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.btn-toggle-custom {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px 4px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.78rem;
    text-align: center;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
    user-select: none;
    white-space: nowrap;
}

.btn-toggle-custom i.material-icons {
    font-size: 16px;
    margin: 0;
    line-height: 1;
}

.btn-toggle-masuk {
    background-color: #e3f2fd;
    color: #1565c0;
    border-color: #90caf9;
}

.btn-toggle-pulang {
    background-color: #ffebee;
    color: #c62828;
    border-color: #ef9a9a;
}

.btn-toggle-izin {
    background-color: #fff3e0;
    color: #e65100;
    border-color: #ffe0b2;
}

.jenis-absen-grid input[type="radio"]:checked + .btn-toggle-masuk {
    background-color: #1565c0;
    color: #ffffff;
    border-color: #0d47a1;
    box-shadow: 0 3px 8px rgba(21, 101, 192, 0.35);
}

.jenis-absen-grid input[type="radio"]:checked + .btn-toggle-pulang {
    background-color: #c62828;
    color: #ffffff;
    border-color: #b71c1c;
    box-shadow: 0 3px 8px rgba(198, 40, 40, 0.35);
}

.jenis-absen-grid input[type="radio"]:checked + .btn-toggle-izin {
    background-color: #e65100;
    color: #ffffff;
    border-color: #bf360c;
    box-shadow: 0 3px 8px rgba(230, 81, 0, 0.35);
}

.kantor-radio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
    margin-top: 6px;
    margin-bottom: 15px;
}

.kantor-radio-grid label {
    margin: 0;
    cursor: pointer;
    display: block;
}

.kantor-radio-grid input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.btn-toggle-kantor {
    background-color: #f1f5f9;
    color: #334155;
    border-color: #cbd5e1;
}

.kantor-radio-grid input[type="radio"]:checked + .btn-toggle-kantor {
    background-color: #0d47a1;
    color: #ffffff;
    border-color: #0a3880;
    box-shadow: 0 3px 8px rgba(13, 71, 161, 0.35);
}

.camera-responsive-box {
    position: relative;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    background: #000000;
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

#webcam, #photoPreview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #000000;
}

.mirror-mode {
    transform: scaleX(-1);
}

.camera-tools-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 500px;
    margin: 0 auto 6px auto;
}

.btn-switch-camera {
    border-radius: 20px;
    text-transform: none;
    font-size: 0.75rem;
}

.btn-switch-camera i {
    font-size: 16px;
}

.camera-action-wrapper {
    margin-top: 12px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-camera-action {
    width: 100%;
    border-radius: 6px;
    font-weight: bold;
}

#map {
    width: 100%;
    height: 220px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.geo-status-card {
    margin-top: 10px;
    padding: 10px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-submit-presensi {
    width: 100%;
    font-weight: bold;
    border-radius: 8px;
}

.section-izin-box {
    background: #fff8e1;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ffe0b2;
    margin-bottom: 20px;
}

.attachment-card-col {
    margin-bottom: 10px;
}

.attachment-card-panel {
    padding: 10px;
    position: relative;
}

.attachment-remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 5;
}

.attachment-img-preview {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.attachment-pdf-box {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eee;
    border-radius: 4px;
}

.upload-progress-container {
    max-width: 500px;
    margin: 14px auto 0;
    padding: 10px 12px;
    background: #f5f7fa;
    border: 1px solid #d7e0ea;
    border-radius: 6px;
    text-align: left;
}

.upload-progress-label {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
    color: #455a64;
    font-size: 0.78rem;
}

.upload-progress-track {
    width: 100%;
    height: 7px;
    overflow: hidden;
    background: #dce5ec;
    border-radius: 4px;
}

.upload-progress-bar {
    width: 0;
    height: 100%;
    background: #00897b;
    transition: width 0.2s ease;
}

.table-riwayat-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-top: 10px;
}

.riwayat-mobile-view { display: none; }

.riwayat-mobile-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.riwayat-mobile-header,
.riwayat-mobile-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.riwayat-mobile-header { border-bottom: 1px solid #eeeeee; padding-bottom: 8px; }
.riwayat-mobile-body { align-items: flex-start; padding-top: 10px; }
.riwayat-mobile-photo { text-align: right; min-width: 55px; }

table.table-riwayat {
    width: 100%;
}

table.table-riwayat td img.riwayat-img-thumb,
.riwayat-img-thumb {
    width: 50px !important;
    height: 40px !important;
    max-width: 50px !important;
    max-height: 40px !important;
    object-fit: cover !important;
    border-radius: 6px !important;
    border: 1px solid #1565c0 !important;
    display: inline-block !important;
}

@media (max-width: 400px) {
    .btn-toggle-custom {
        font-size: 0.7rem;
        padding: 8px 2px;
        gap: 2px;
    }
    .btn-toggle-custom i.material-icons {
        font-size: 14px;
    }
}

@media (max-width: 991px) {
    .riwayat-desktop-view { display: none; }
    .riwayat-mobile-view { display: block; }
}

/* ==========================================================================
   7. TABLE DESKTOP & MOBILE CARDS (KANTOR, KARYAWAN, REKAP)
   ========================================================================== */
.table-desktop-container {
    display: none;
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    margin-top: 15px;
}

table.kantor-table,
table.karyawan-table,
table.rekap-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

table.kantor-table th,
table.karyawan-table th,
table.rekap-table th {
    background-color: #1565c0 !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-align: center !important;
    padding: 12px 8px !important;
}

table.kantor-table td,
table.karyawan-table td,
table.rekap-table td {
    padding: 10px 8px !important;
    font-size: 12.5px !important;
    vertical-align: middle !important;
    text-align: center !important;
}

.mobile-cards-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.kantor-card,
.emp-card,
.data-card {
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    padding: 15px;
}

.kantor-card-header,
.data-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.emp-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.emp-card-body,
.data-card-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 12px;
}

.data-card-full {
    grid-column: span 2;
}

.detail-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(100px, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.detail-summary-grid div {
    padding: 9px;
    background: #f5f9fc;
    border-left: 3px solid #1565c0;
    border-radius: 4px;
    font-size: 12px;
}

.detail-print-button { background: #2e7d32 !important; margin-left: 6px; }

.kantor-card-footer,
.emp-card-footer,
.data-card-footer {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
}

.select-elegan {
    width: 100% !important;
    padding: 8px 12px !important;
    border: 1px solid #cfd8dc !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    color: #37474f !important;
    font-size: 13px !important;
    outline: none !important;
}

.label-select-elegan {
    font-size: 0.8rem !important;
    font-weight: bold !important;
    color: #1565c0 !important;
    margin-bottom: 4px !important;
    display: block !important;
}

.dataTables_length {
    margin-bottom: 15px;
}

.dataTables_length label {
    color: #37474f !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.dataTables_length select {
    display: inline-block !important;
    width: auto !important;
    height: 36px !important;
    padding: 4px 10px !important;
    border: 1px solid #cfd8dc !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    cursor: pointer !important;
    font-size: 13px !important;
}

@media (min-width: 992px) {
    .table-desktop-container { display: block; }
    .mobile-cards-container { display: none !important; }
}

@media (max-width: 991px) {
    .main-wrapper { width: 100% !important; padding: 15px 8px 30px !important; }
    .card-custom .card-content { padding: 16px 12px !important; }
    .card-title { font-size: 1.15rem !important; line-height: 1.35 !important; }
    .table-desktop-container { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table-desktop-container.has-mobile-cards,
    .table-desktop-container:has(+ .mobile-cards-container),
    .table-desktop-container:has(~ .mobile-cards-container) { display: none !important; }
    .mobile-cards-container { display: flex !important; }
    .table-desktop-container table { min-width: 680px; }
    .modal { width: 96% !important; max-height: 90% !important; }
    .modal-content { padding: 18px 14px !important; }
    .modal-footer { padding: 8px 12px !important; }
    .modal-footer .btn { margin-left: 4px; }
    .btn, .btn-large, .btn-small { min-height: 36px; }
    .sidenav { width: min(320px, 88vw); }
    .brand-logo-mobile { max-width: calc(100vw - 110px); overflow: hidden; text-overflow: ellipsis; }
    .schedule-row, .penalty-row { border-bottom: 1px solid #eceff1; padding: 8px 0; }
    .schedule-row .btn-small, .penalty-row .btn-small { margin-top: 8px; }
}

/* Fix label overlap & dynamic form inputs inside modal */
.schedule-row, .penalty-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 8px;
    margin-bottom: 12px !important;
}

.schedule-row .input-field,
.penalty-row .input-field,
#modalSetting .input-field {
    margin-top: 8px !important;
    margin-bottom: 8px !important;
}

#modalSetting label {
    font-size: 0.85rem !important;
}

#modalSetting .input-field label.active {
    transform: translateY(-14px) scale(0.85) !important;
    transform-origin: 0 0 !important;
    color: #1565c0 !important;
    font-weight: 600 !important;
}

@media (max-width: 600px) {
    .flex-between { align-items: flex-start !important; }
    .flex-between > .btn { width: 100%; margin-top: 10px; }
    .alert-banner-content { padding-left: 10px; padding-right: 10px; }
    .dataTables_wrapper .dataTables_filter input { width: 130px; }
    .detail-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ==========================================================================
   8. PROFIL USER COMPONENTS
   ========================================================================== */
.profile-card-user {
    border-radius: 12px;
    padding: 20px 15px;
}

.profile-avatar-circle {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border: 3px solid #1565c0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.section-header-mat {
    color: #1565c0;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 8px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.field-block {
    margin-bottom: 20px;
}

.field-block label {
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    color: #1565c0 !important;
    display: block !important;
    margin-bottom: 6px !important;
}

.select-browser-clean {
    width: 100% !important;
    height: 42px !important;
    padding: 8px 12px !important;
    border: 1px solid #9e9e9e !important;
    border-radius: 6px !important;
    background-color: #ffffff !important;
    font-size: 0.95rem !important;
    color: #333333 !important;
    outline: none !important;
    box-sizing: border-box !important;
}

.select-browser-clean:disabled {
    background-color: #f5f5f5 !important;
    color: #888888 !important;
    cursor: not-allowed !important;
    border-color: #e0e0e0 !important;
}

.select-browser-clean:focus:not(:disabled) {
    border-color: #1565c0 !important;
    box-shadow: 0 0 0 2px rgba(21, 101, 192, 0.2) !important;
}

.info-item-row {
    margin-bottom: 8px;
    font-size: 0.88rem;
}

/* ==========================================================================
   9. REKAPITULASI & MODAL APPROVAL COMPONENTS & GROUPED LOGS
   ========================================================================== */
.tabs-rekap-wrapper {
    margin-top: 15px;
    border-radius: 6px;
}

.tabs .tab a {
    color: #1565c0;
    font-weight: bold;
}

.tabs .tab a:hover, 
.tabs .tab a.active {
    color: #0d47a1;
    background-color: #e3f2fd;
}

.tabs .indicator {
    background-color: #1565c0;
}

.filter-box-panel {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    margin-bottom: 10px;
}

.filter-control-input {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 100%;
    background: #ffffff;
}

.filter-btn-container {
    margin-top: 22px;
}

.modal-approval-box {
    max-width: 500px;
    border-radius: 8px;
}

.modal-title-custom {
    margin-top: 0;
}

.info-pemohon-panel {
    padding: 10px;
    margin-bottom: 15px;
    font-size: 12px;
}

.input-label-fix {
    transform: translateY(-14px);
}

.catatan-approval-box {
    margin-top: 20px;
}

.modal-action-row {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.btn-flex-1 {
    flex: 1;
}

.log-card-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.log-card-entry {
    background: #fafafa;
    border-left: 4px solid #1565c0;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 11.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.log-card-entry.entry-pulang {
    border-left-color: #c62828;
    background: #fff8f8;
}

.log-entry-info {
    flex: 1;
}

.log-entry-media {
    display: flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 991px) {
    .log-card-entry {
        flex-wrap: wrap;
        align-items: flex-start;
    }

    .log-entry-info,
    .log-entry-media {
        flex: 0 0 100%;
        width: 100%;
    }

    .log-entry-media {
        padding-top: 8px;
        border-top: 1px solid #e0e0e0;
        justify-content: flex-start;
    }
}

/* ==========================================================================
   10. DYNAMIC DOKUMENTASI & TABLE THUMBNAIL CLASSES (AJAX ENDPOINTS)
   ========================================================================== */
.docs-flex-wrapper {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}

.thumb-img-rounded {
    border-radius: 4px;
    object-fit: cover;
}

.pdf-modal-container {
    display: none;
    width: 80vw;
    height: 80vh;
}

.btn-action-wrapper {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.gps-status-text {
    display: block;
    margin-top: 4px;
    font-size: 11px;
}

/* ==========================================================================
   11. PORTOFOLIO PRINT COMPONENTS
   ========================================================================== */
.portfolio-header {
    border-bottom: 2px solid #1565c0;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.portfolio-user-panel {
    display: flex;
    gap: 20px;
    align-items: center;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.portfolio-photo {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #1565c0;
}

.portfolio-section-title {
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
    margin-top: 15px;
    font-size: 1rem;
}

.table-portfolio {
    font-size: 12.5px;
    width: 100%;
    margin-bottom: 20px;
}

.table-portfolio-col {
    width: 35%;
}

.portfolio-sign-row {
    margin-top: 35px;
    display: flex;
    justify-content: space-between;
    text-align: center;
    font-size: 12px;
}

.portfolio-sign-box {
    width: 200px;
}

/* ==========================================================================
   12. DASHBOARD REDESIGN & ADDITIONAL REPORTS (NO INLINE CSS)
   ========================================================================== */

/* Recent Activity Sidebar Overhaul */
.recent-activity-list {
    border: none !important;
    background: transparent !important;
    margin: 0 !important;
}
.recent-activity-item {
    background: #ffffff !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    border-left: 4px solid #e0e0e0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
    transition: all 0.3s ease !important;
    padding: 12px 12px 12px 70px !important;
    min-height: 74px !important;
    position: relative;
}
.recent-activity-item:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
}
.activity-masuk {
    border-left-color: #2e7d32 !important;
}
.activity-pulang {
    border-left-color: #c62828 !important;
}
.activity-izin {
    border-left-color: #ef6c00 !important;
}
.recent-activity-icon-container {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}
.recent-activity-icon {
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 20px !important;
    text-align: center;
    border-radius: 50%;
    color: #fff;
    margin: 0 !important;
}
.icon-masuk {
    background-color: #e8f5e9 !important;
    color: #2e7d32 !important;
    border: 1px solid #c8e6c9;
}
.icon-pulang {
    background-color: #ffebee !important;
    color: #c62828 !important;
    border: 1px solid #ffcdd2;
}
.icon-izin {
    background-color: #fff3e0 !important;
    color: #ef6c00 !important;
    border: 1px solid #ffe0b2;
}
.recent-activity-photo {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.recent-activity-title {
    font-weight: 600 !important;
    font-size: 13.5px !important;
    color: #37474f !important;
    display: block;
    margin-bottom: 4px;
}
.recent-activity-meta {
    font-size: 11.5px !important;
    color: #78909c !important;
    margin: 0 !important;
    line-height: 1.4;
}
.activity-meta-time {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    margin-bottom: 2px !important;
}
.activity-meta-status {
    display: inline-block !important;
    margin-top: 4px !important;
}
.activity-badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
    margin-left: 5px;
}
.badge-masuk {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}
.badge-pulang {
    background-color: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}
.badge-izin {
    background-color: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}
.activity-status-pill {
    display: inline-block;
    padding: 1px 6px;
    font-size: 10.5px;
    border-radius: 4px;
    font-weight: 600;
}
.status-success-light {
    background-color: #e8f5e9;
    color: #2e7d32;
}
.status-danger-light {
    background-color: #ffebee;
    color: #c62828;
}
.status-warning-light {
    background-color: #fff3e0;
    color: #ef6c00;
}

/* Digital Clock Widget Card */
.widget-clock-card {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%) !important;
    border-radius: 16px !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.15) !important;
    margin-bottom: 20px !important;
    overflow: hidden;
}
.widget-clock-content {
    padding: 20px !important;
    position: relative;
}
.widget-clock-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    right: -30px;
    top: -30px;
    pointer-events: none;
}
.widget-clock-time {
    font-size: 2rem !important;
    font-weight: 800 !important;
    margin: 0 !important;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.widget-clock-date {
    font-size: 0.9rem !important;
    opacity: 0.9;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.widget-clock-quote {
    margin-top: 15px !important;
    padding-top: 12px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15) !important;
    font-size: 0.78rem !important;
    opacity: 0.8;
    font-style: italic;
    line-height: 1.4;
}

/* Additional Reports Grid and Items */
.report-section-title {
    font-size: 1.15rem !important;
    font-weight: 700 !important;
    color: #1565c0 !important;
    margin-bottom: 15px !important;
    display: flex;
    align-items: center;
    gap: 8px;
}
.report-analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 10px;
}
.report-card-box {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 16px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease !important;
}
.report-card-box:hover {
    background: #ffffff !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    border-color: #cbd5e1 !important;
}
.report-card-info {
    display: flex;
    flex-direction: column;
}
.report-card-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}
.report-card-value {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    margin: 4px 0 2px 0 !important;
}
.report-card-desc {
    font-size: 0.75rem;
    color: #94a3b8;
}
.report-card-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
}
.bg-light-blue {
    background-color: #e0f2fe;
    color: #0369a1;
}
.bg-light-green {
    background-color: #dcfce7;
    color: #15803d;
}
.bg-light-purple {
    background-color: #f3e8ff;
    color: #6b21a8;
}
.bg-light-amber {
    background-color: #fef3c7;
    color: #b45309;
}

/* Productivity Ratio Component */
.ratio-progress-panel {
    margin-top: 20px !important;
    padding: 15px !important;
    background: #f1f5f9 !important;
    border-radius: 12px !important;
}
.ratio-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.ratio-progress-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
}
.ratio-progress-pct {
    font-size: 0.9rem;
    font-weight: 800;
    color: #1565c0;
}
.ratio-progress-bar-bg {
    width: 100%;
    height: 8px;
    background-color: #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
}
.ratio-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #1565c0, #42a5f5);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* ==========================================================================
   WIDGET KALENDER & HARI LIBUR NASIONAL (SOFT & PASTEL STYLE)
   ========================================================================== */
.widget-calendar-card {
    border-radius: 14px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    overflow: hidden;
    margin-bottom: 20px !important;
}

.calendar-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}

.calendar-header-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #1e3a8a;
}

.calendar-header-title i {
    color: #2563eb;
}

.calendar-nav-btns {
    display: flex;
    align-items: center;
    gap: 4px;
}

.calendar-btn-nav {
    background: #ffffff !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-btn-nav:hover {
    background: #f1f5f9 !important;
    color: #1e293b !important;
}

.calendar-btn-today {
    background: #eff6ff !important;
    color: #1d4ed8 !important;
    border: 1px solid #bfdbfe !important;
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 16px;
    padding: 2px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-btn-today:hover {
    background: #dbeafe !important;
}

.calendar-grid-container {
    padding: 12px;
    background: #ffffff;
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendar-table th {
    text-align: center;
    padding: 6px 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
}

.calendar-table th.sun-header {
    color: #e11d48 !important;
}

.calendar-table td {
    text-align: center;
    padding: 2px;
    height: 42px;
    vertical-align: middle;
    position: relative;
}

.calendar-day-box {
    width: 34px;
    height: 34px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 500;
    color: #334155;
    position: relative;
    cursor: default;
    transition: all 0.2s ease;
}

.calendar-day-box.sun-day {
    color: #e11d48;
    font-weight: 600;
}

.calendar-day-box.other-month {
    color: #cbd5e1 !important;
    opacity: 0.5;
}

.calendar-day-box.today-box {
    background: #2563eb !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
}

.calendar-day-box.is-holiday-national {
    background-color: #fff1f2 !important;
    color: #be123c !important;
    font-weight: 700;
    border: 1px solid #fecdd3;
}

.calendar-day-box.is-holiday-cuti {
    background-color: #fffbeb !important;
    color: #b45309 !important;
    font-weight: 700;
    border: 1px solid #fde68a;
}

.holiday-dot-badge {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    position: absolute;
    bottom: 3px;
}

.holiday-dot-national {
    background-color: #e11d48;
}

.holiday-dot-cuti {
    background-color: #d97706;
}

.calendar-holiday-panel {
    border-top: 1px solid #f1f5f9;
    padding: 12px 16px;
    background: #f8fafc;
}

.holiday-panel-header {
    font-size: 0.82rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.holiday-list-group {
    max-height: 180px;
    overflow-y: auto;
    margin: 0;
    padding: 0;
    list-style: none;
}

.holiday-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px;
    border-radius: 8px;
    margin-bottom: 4px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
}

.holiday-badge-date {
    background: #fee2e2;
    color: #991b1b;
    font-weight: 700;
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.holiday-badge-cuti {
    background: #fef3c7 !important;
    color: #92400e !important;
}

.holiday-item-name {
    color: #1e293b;
    font-weight: 600;
    flex: 1;
}

.holiday-item-type {
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 4px;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 600;
}

.holiday-item-type.type-cuti {
    background: #fef3c7;
    color: #92400e;
}

/* ==========================================================================
   SOFT DASHBOARD STYLES (NO HARSH SHADOWS, SOFT PASTEL PALETTE)
   ========================================================================== */
.welcome-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    border-radius: 14px;
    padding: 20px 24px;
    margin-top: 10px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.welcome-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 0 !important;
}

.welcome-user-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.welcome-avatar-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.welcome-avatar-icon i {
    font-size: 26px;
    color: #1d4ed8;
}

.welcome-greeting {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.welcome-subtext {
    margin: 4px 0 0 0;
    font-size: 0.84rem;
    color: #64748b;
}

.welcome-badge {
    background: #dbeafe;
    color: #1e40af;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: 6px;
}

.welcome-date-tag {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #1e40af;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Stat Cards Soft Styling */
.stat-card-box {
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 102px;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.stat-card-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

/* Soft Pastel Backgrounds & Borders */
.stat-card-blue {
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    color: #0c4a6e !important;
}

.stat-card-red {
    background: #fff1f2 !important;
    border: 1px solid #fecdd3 !important;
    color: #881337 !important;
}

.stat-card-green {
    background: #f0fdf4 !important;
    border: 1px solid #bbf7d0 !important;
    color: #14532d !important;
}

.stat-card-orange {
    background: #fffbeb !important;
    border: 1px solid #fde68a !important;
    color: #78350f !important;
}

.stat-card-info small {
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.85;
}

.stat-card-info h5 {
    margin: 4px 0 4px 0;
    font-weight: 800;
    font-size: 1.45rem;
    letter-spacing: -0.02em;
}

.stat-card-blue .stat-card-info h5 { color: #0369a1 !important; }
.stat-card-red .stat-card-info h5 { color: #be123c !important; }
.stat-card-green .stat-card-info h5 { color: #15803d !important; }
.stat-card-orange .stat-card-info h5 { color: #b45309 !important; }

.stat-status-pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.72rem;
    font-weight: 700;
}

.stat-card-blue .stat-status-pill { background: #e0f2fe; color: #0369a1; }
.stat-card-red .stat-status-pill { background: #ffe4e6; color: #9f1239; }
.stat-card-green .stat-status-pill { background: #dcfce7; color: #15803d; }
.stat-card-orange .stat-status-pill { background: #fef3c7; color: #b45309; }

.stat-card-icon-bg {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card-blue .stat-card-icon-bg { background: #e0f2fe; }
.stat-card-blue .stat-card-icon-bg i { color: #0284c7 !important; }

.stat-card-red .stat-card-icon-bg { background: #ffe4e6; }
.stat-card-red .stat-card-icon-bg i { color: #e11d48 !important; }

.stat-card-green .stat-card-icon-bg { background: #dcfce7; }
.stat-card-green .stat-card-icon-bg i { color: #16a34a !important; }

.stat-card-orange .stat-card-icon-bg { background: #fef3c7; }
.stat-card-orange .stat-card-icon-bg i { color: #d97706 !important; }

.stat-card-purple {
    background: #faf5ff !important;
    border: 1px solid #e9d5ff !important;
    color: #581c87 !important;
}
.stat-card-purple .stat-card-info h5 { color: #7e22ce !important; }
.stat-card-purple .stat-status-pill { background: #f3e8ff; color: #7e22ce; }
.stat-card-purple .stat-card-icon-bg { background: #f3e8ff; }
.stat-card-purple .stat-card-icon-bg i { color: #9333ea !important; }

.stat-card-teal {
    background: #f0fdfa !important;
    border: 1px solid #99f6e4 !important;
    color: #134e4a !important;
}
.stat-card-teal .stat-card-info h5 { color: #0f766e !important; }
.stat-card-teal .stat-status-pill { background: #ccfbf1; color: #0f766e; }
.stat-card-teal .stat-card-icon-bg { background: #ccfbf1; }
.stat-card-teal .stat-card-icon-bg i { color: #14b8a6 !important; }

/* Quick Actions Soft Cards */
.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px;
    border-radius: 14px;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #334155 !important;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    min-height: 105px;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    background: #f8fafc !important;
    border-color: #cbd5e1 !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.btn-action-blue .quick-action-icon-circle { background: #eff6ff; }
.btn-action-blue .quick-action-icon-circle i { color: #2563eb !important; }

.btn-action-orange .quick-action-icon-circle { background: #fff7ed; }
.btn-action-orange .quick-action-icon-circle i { color: #ea580c !important; }

.btn-action-green .quick-action-icon-circle { background: #f0fdf4; }
.btn-action-green .quick-action-icon-circle i { color: #16a34a !important; }

.btn-action-purple .quick-action-icon-circle { background: #faf5ff; }
.btn-action-purple .quick-action-icon-circle i { color: #9333ea !important; }

.btn-action-cyan .quick-action-icon-circle { background: #ecfeff; }
.btn-action-cyan .quick-action-icon-circle i { color: #0891b2 !important; }

.btn-action-teal .quick-action-icon-circle { background: #f0fdfa; }
.btn-action-teal .quick-action-icon-circle i { color: #0d9488 !important; }

.btn-action-grey .quick-action-icon-circle { background: #f8fafc; }
.btn-action-grey .quick-action-icon-circle i { color: #475569 !important; }

.quick-action-icon-circle {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.quick-action-icon-circle i {
    font-size: 1.4rem !important;
    line-height: 1 !important;
}

.quick-action-btn span {
    font-weight: 700;
    font-size: 0.82rem;
    color: #334155;
    text-align: center;
    line-height: 1.25;
}

@media (max-width: 992px) {
    .quick-action-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 600px) {
    .quick-action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* Chart Filter Box & Custom Cards */
.card-custom {
    border-radius: 14px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid #e2e8f0 !important;
    margin-bottom: 20px !important;
    background: #ffffff !important;
    overflow: hidden;
}

.chart-filter-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 16px;
}

.label-select-elegan {
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    color: #475569 !important;
    margin-bottom: 4px !important;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.select-browser-clean {
    width: 100%;
    height: 38px;
    padding: 6px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #ffffff;
    font-size: 0.84rem;
    color: #1e293b;
    outline: none;
    transition: all 0.2s ease;
}

.select-browser-clean:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ========================================================================== 
   SIDENAV: USER VIEW ACTION LINKS (Profil Saya & Logout) + BETA BADGE
   ========================================================================== */
.sidenav .user-view .user-view-actions {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 14px;
}

.sidenav .user-view .user-view-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
    padding: 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.sidenav .user-view .user-view-button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 40px;
    box-sizing: border-box;
    text-decoration: none;
    white-space: nowrap;
}

.sidenav .user-view .user-view-profile {
    background-color: #ffffff;
    color: #145da0 !important;
    border: 1px solid #ffffff;
}

.sidenav .user-view .user-view-logout {
    border: 1px solid rgba(255, 255, 255, 0.55);
    background-color: rgba(183, 28, 28, 0.2);
    color: #ffffff !important;
}

.sidenav .user-view .user-view-action i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin: 0;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1;
}

.sidenav .user-view .user-view-profile i {
    background-color: #e3f2fd;
    color: #145da0 !important;
}

.sidenav .user-view .user-view-logout i {
    background-color: rgba(255, 255, 255, 0.16);
    color: #ffffff !important;
}

.sidenav .user-view .user-view-profile:hover,
.sidenav .user-view .user-view-profile:focus-visible {
    background-color: #f2f8ff;
    border-color: #bbdefb;
}

.sidenav .user-view .user-view-logout:hover,
.sidenav .user-view .user-view-logout:focus-visible {
    background-color: rgba(183, 28, 28, 0.42);
    border-color: #ffcdd2;
}

/* Badge "(beta release)" berwarna merah untuk menu & subheader sidenav */
.beta-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 4px;
    background-color: #fdecea;
    color: #d32f2f;
    border: 1px solid #fca5a5;
    font-size: 10px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0.3px;
    line-height: 15px;
    vertical-align: middle;
    white-space: nowrap;
    text-transform: none;
}

.sidenav li a.subheader .beta-badge {
    margin-left: 8px;
}

/* ==========================================================================
   MATERIALIZE MONTH INPUT & FILTER PANEL STYLES
   ========================================================================== */
input[type="month"],
input[type="month"].validate {
    background-color: transparent !important;
    border: none !important;
    border-bottom: 1px solid #9e9e9e !important;
    border-radius: 0 !important;
    outline: none !important;
    height: 3rem !important;
    width: 100% !important;
    font-size: 15px !important;
    font-family: inherit !important;
    color: #263238 !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    transition: all .3s !important;
}

input[type="month"]:focus:not([readonly]) {
    border-bottom: 2px solid #1565c0 !important;
    box-shadow: 0 1px 0 0 #1565c0 !important;
}

.input-field .prefix ~ input[type="month"] {
    margin-left: 3rem !important;
    width: calc(100% - 3rem) !important;
}

.filter-panel-card {
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    padding: 14px 18px !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

.filter-panel-card .input-field {
    margin-top: 5px !important;
    margin-bottom: 5px !important;
}

.filter-panel-card .input-field label {
    color: #455a64 !important;
    font-size: 0.95rem !important;
}

.filter-panel-card .input-field label.active {
    color: #1565c0 !important;
    font-weight: 600 !important;
}

.custom-badge-click {
    transition: all 0.2s ease-in-out !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 32px !important;
    height: 22px !important;
    line-height: 22px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.12) !important;
    user-select: none !important;
}

.custom-badge-click:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 4px 8px rgba(0,0,0,0.22) !important;
}

.modal-section-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px;
    margin-top: 12px;
}

/* ==========================================================================
   UNIFIED NAVBAR BRAND LOGO
   ========================================================================== */
.navbar-brand-logo {
    height: 38px;
    width: 38px;
    border-radius: 50%;
    object-fit: contain;
    vertical-align: middle;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.22));
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.brand-logo-unified:hover .navbar-brand-logo {
    transform: scale(1.08) rotate(3deg);
}

.brand-logo-unified {
    display: inline-flex !important;
    align-items: center !important;
    height: 100% !important;
    line-height: normal !important;
    text-decoration: none !important;
}

.brand-company-title {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    line-height: 1;
    letter-spacing: -0.2px;
}

@media (max-width: 600px) {
    .nav-left-group {
        gap: 8px !important;
    }
    .brand-logo-unified {
        gap: 8px !important;
    }
    .navbar-brand-logo {
        height: 32px !important;
        width: 32px !important;
    }
    .brand-company-title {
        font-size: 14.5px !important;
        letter-spacing: -0.3px !important;
    }
}

@media (max-width: 380px) {
    .nav-left-group {
        gap: 6px !important;
    }
    .brand-logo-unified {
        gap: 6px !important;
    }
    .navbar-brand-logo {
        height: 28px !important;
        width: 28px !important;
    }
    .brand-company-title {
        font-size: 13px !important;
        letter-spacing: -0.4px !important;
    }
}

/* ==========================================================================
   ELEGANT ACTION BUTTON GROUP
   ========================================================================== */
.btn-action-group {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 2px 4px !important;
    gap: 4px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.btn-action-item {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer !important;
    text-decoration: none !important;
    color: #ffffff !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important;
    line-height: normal !important;
}

.btn-action-item i.material-icons {
    font-size: 15px !important;
    line-height: 28px !important;
    margin: 0 !important;
}

.btn-action-item:hover {
    transform: translateY(-2px) scale(1.1) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

.btn-act-detail { background-color: #1e88e5 !important; }
.btn-act-detail:hover { background-color: #1565c0 !important; }

.btn-act-edit { background-color: #f59e0b !important; }
.btn-act-edit:hover { background-color: #d97706 !important; }

.btn-act-duplicate { background-color: #8b5cf6 !important; }
.btn-act-duplicate:hover { background-color: #7c3aed !important; }

.btn-act-delete { background-color: #ef4444 !important; }
.btn-act-delete:hover { background-color: #dc2626 !important; }

.btn-act-print { background-color: #06b6d4 !important; }
.btn-act-print:hover { background-color: #0891b2 !important; }

.btn-act-kwitansi { background-color: #10b981 !important; }
.btn-act-kwitansi:hover { background-color: #059669 !important; }

.btn-act-history { background-color: #6366f1 !important; color: #ffffff !important; }
.btn-act-history:hover { background-color: #4f46e5 !important; }
.btn-act-history i { color: #ffffff !important; }

/* ==========================================================================
   MODERN ERP DATATABLE STYLES (ENHANCED TYPOGRAPHY & SOFT VISUALS)
   ========================================================================== */
.table-desktop-container {
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02) !important;
}

.table-erp-modern {
    width: 100% !important;
    border-collapse: collapse !important;
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 12.5px !important;
    line-height: 1.45 !important;
    color: #334155 !important;
    margin: 0 !important;
}

.table-erp-modern th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700 !important;
    font-size: 11px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.6px !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid #cbd5e1 !important;
    border-top: none !important;
    white-space: nowrap !important;
    vertical-align: middle !important;
}

.table-erp-modern td {
    padding: 10px 14px !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9 !important;
    border-top: none !important;
    white-space: nowrap !important;
    color: #334155 !important;
}

.table-erp-modern tbody tr {
    transition: background-color 0.15s ease !important;
}

.table-erp-modern tbody tr:hover {
    background-color: #f8fafc !important;
}

.table-erp-modern b,
.table-erp-modern strong {
    color: #0f172a !important;
    font-weight: 600 !important;
}

.table-erp-modern small {
    font-size: 11.5px !important;
    line-height: 1.3 !important;
}

/* Custom Soft Badges */
.badge-soft {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
    padding: 3px 8px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: normal !important;
    letter-spacing: 0.2px !important;
}
.badge-soft-blue { background: #eff6ff !important; color: #1d4ed8 !important; border: 1px solid #dbeafe !important; }
.badge-soft-purple { background: #f5f3ff !important; color: #6d28d9 !important; border: 1px solid #ede9fe !important; }
.badge-soft-slate { background: #f1f5f9 !important; color: #334155 !important; border: 1px solid #e2e8f0 !important; }
.badge-soft-green { background: #ecfdf5 !important; color: #047857 !important; border: 1px solid #d1fae5 !important; }
.badge-soft-red { background: #fef2f2 !important; color: #b91c1c !important; border: 1px solid #fee2e2 !important; }
.badge-soft-amber { background: #fffbeb !important; color: #b45309 !important; border: 1px solid #fef3c7 !important; }

/* ==========================================================================
   MODERN MODAL FORM CONTROLS (PREVENTS FONT OVERLAP COMPLETELY)
   ========================================================================== */
.modal-form-group {
    margin-bottom: 12px !important;
}

.modal-form-label {
    display: block !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    margin-bottom: 5px !important;
    line-height: 1.3 !important;
    position: static !important;
    transform: none !important;
}

.modal-form-input,
.modal-form-textarea,
.modal-form-select {
    width: 100% !important;
    height: 38px !important;
    padding: 7px 12px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    color: #1e293b !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    margin: 0 !important;
}

.modal-form-input:focus,
.modal-form-textarea:focus,
.modal-form-select:focus {
    border-color: #2563eb !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.modal-form-input[readonly] {
    background-color: #f8fafc !important;
    color: #64748b !important;
    cursor: not-allowed !important;
}

.modal-form-textarea {
    height: 70px !important;
    resize: vertical !important;
}

.input-icon-box {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.input-icon-box .input-icon {
    position: absolute !important;
    left: 10px !important;
    color: #64748b !important;
    font-size: 18px !important;
    pointer-events: none !important;
}

.input-icon-box .modal-form-input {
    padding-left: 36px !important;
}

/* ==========================================================================
   SELECT2 STYLING IN MODALS & CARDS
   ========================================================================== */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--single {
    height: 38px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    background-color: #ffffff !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
}

.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
    outline: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px !important;
    padding-left: 12px !important;
    font-size: 13px !important;
    color: #1e293b !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px !important;
    right: 8px !important;
}

.select2-dropdown {
    border: 1px solid #cbd5e1 !important;
    border-radius: 6px !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important;
    z-index: 99999 !important;
}

.select2-results__option {
    font-size: 13px !important;
    padding: 8px 12px !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #1e88e5 !important;
    color: #ffffff !important;
}

@media (max-width: 991px) {
    .table-desktop-container {
        padding-bottom: 6px !important;
        margin-top: 10px !important;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05) !important;
    }
    .table-erp-modern {
        min-width: 900px !important;
    }
    .table-erp-modern th,
    .table-erp-modern td {
        padding: 8px 10px !important;
        font-size: 11.5px !important;
    }
    .btn-action-item {
        width: 26px !important;
        height: 26px !important;
    }
    .btn-action-item i.material-icons {
        font-size: 14px !important;
        line-height: 26px !important;
    }
}

/* ==========================================================================
   PRODUCT POPULATION & DISTRIBUTION DASHBOARD WIDGET
   ========================================================================== */
.dist-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}
@media (max-width: 768px) {
    .dist-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .dist-kpi-grid {
        grid-template-columns: 1fr;
    }
}
.dist-kpi-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dist-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
}
.dist-kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
}
.dist-kpi-card.kpi-blue::before { background: #3b82f6; }
.dist-kpi-card.kpi-amber::before { background: #f59e0b; }
.dist-kpi-card.kpi-emerald::before { background: #10b981; }
.dist-kpi-card.kpi-indigo::before { background: #6366f1; }

.dist-kpi-lbl {
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #64748b;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.dist-kpi-val {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    margin-bottom: 2px;
}
.dist-kpi-sub {
    font-size: 10.5px;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dist-view-toggle {
    display: inline-flex;
    background: #f1f5f9;
    padding: 2px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}
.dist-view-btn {
    border: none;
    background: transparent;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
}
.dist-view-btn.active {
    background: #ffffff;
    color: #1e3a8a;
    box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

.dist-table-wrapper {
    max-height: 310px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #ffffff;
}
.dist-table {
    width: 100%;
    font-size: 11.5px;
    border-collapse: collapse;
}
.dist-table th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 6px 10px;
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 1px solid #cbd5e1;
    font-size: 11px;
}
.dist-table td {
    padding: 6px 10px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}
.dist-table tr:hover {
    background: #f8fafc;
}
.dist-progress-bar-bg {
    width: 100%;
    height: 5px;
    background: #e2e8f0;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 3px;
}
.dist-progress-bar-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
}

.dist-empty-alert {
    background: #fffbeb;
    border: 1px solid #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.dist-empty-alert-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #92400e;
    font-size: 12px;
    line-height: 1.4;
}
.dist-empty-alert-content i {
    font-size: 20px;
    color: #d97706;
    flex-shrink: 0;
}
.dist-empty-btn-switch {
    background: #f59e0b;
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.15s ease;
}
.dist-empty-btn-switch:hover {
    background: #d97706;
}


