/**
 * HRIS Hadir PJT 1 — Module Master Data Pegawai & Akun
 * 100% Standardized Enterprise Table, Multi-Select Filter, Action Buttons & Modals
 */

/* Quick Metrics */
.metrics-slider-container {
    margin-bottom: 24px;
}
.stat-card-hover {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
}
.stat-card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

/* Search input */
.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.search-input-wrapper .search-icon {
    position: absolute;
    left: 12px;
    font-size: 16px;
    color: #94a3b8;
    pointer-events: none;
}
.search-input-control {
    width: 100%;
    height: 38px;
    padding: 8px 36px 8px 36px;
    font-size: 12.5px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #1e293b;
    transition: all 0.2s ease;
}
.search-input-control:focus {
    background: #ffffff;
    border-color: #1877F2;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.12);
    outline: none;
}
.search-clear-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Table Toolbar Buttons */
.btn-toolbar-filter {
    font-size: 12.5px;
    font-weight: 600;
    padding: 7px 14px;
    border-color: #e2e8f0;
    color: #475569;
    background: #ffffff;
    transition: all 0.15s;
}
.btn-toolbar-filter:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}
.btn-toolbar-filter.has-active-filter {
    border-color: #1877F2 !important;
    background: #EFF6FF !important;
    color: #1877F2 !important;
}

/* =========================================================================
   COMPACT ACTIVE FILTER CHIPS (Inline, Subtle & Clean)
   ========================================================================= */
.active-filter-chip {
    background: #F0F7FF !important;
    border: 1px solid #D0E3FF !important;
    border-radius: 6px !important;
    padding: 3px 8px !important;
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: #1D4ED8 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    height: 28px !important;
}

.active-filter-chip strong {
    font-weight: 600 !important;
}

.active-filter-chip .chip-remove {
    cursor: pointer;
    color: #93C5FD;
    font-size: 14px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    line-height: 1;
    transition: color 0.15s ease;
}

.active-filter-chip .chip-remove:hover {
    color: #EF4444;
}

/* =========================================================================
   MULTI-SELECT CHIP STYLING FOR FILTER MODAL
   ========================================================================= */
.btn-chip-select {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: #F8FAFC !important;
    color: #475569 !important;
    border: 1px solid #CBD5E1 !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
    user-select: none !important;
}

.btn-chip-select:hover {
    background: #F1F5F9 !important;
    color: #1E293B !important;
    border-color: #94A3B8 !important;
}

.btn-chip-select .chip-check-icon {
    display: none !important;
    font-size: 13px !important;
    margin: 0 !important;
}

.btn-check:checked + .btn-chip-select {
    background: #EFF6FF !important;
    color: #1D4ED8 !important;
    border-color: #3B82F6 !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 3px rgba(59, 130, 246, 0.15) !important;
}

.btn-check:checked + .btn-chip-select .chip-check-icon {
    display: inline-flex !important;
}

/* Segmented Control in Modals */
.segmented-control-group {
    background: #F1F5F9 !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 8px !important;
    gap: 4px;
}

.btn-segmented {
    border: none !important;
    background: transparent !important;
    color: #64748B !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    transition: all 0.15s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
}

.btn-segmented:hover {
    color: #1E293B !important;
}

.btn-check:checked + .btn-segmented {
    background: #FFFFFF !important;
    color: #1D4ED8 !important;
    font-weight: 700 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.btn-check:checked + .btn-segmented.text-danger {
    color: #DC2626 !important;
}

.btn-check:checked + .btn-segmented.text-success {
    color: #059669 !important;
}

/* =========================================================================
   ENTERPRISE DATA TABLE
   ========================================================================= */
.location-data-table th {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 12px 14px;
    border-bottom: 1.5px solid #e2e8f0;
}
.location-data-table td {
    padding: 13px 14px;
    font-size: 13px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.location-data-table tr:hover td {
    background-color: #f8fafc;
}
.location-data-table th.sortable {
    cursor: pointer;
    user-select: none;
}
.location-data-table th.sortable:hover {
    color: #1877F2;
}
.sort-icon {
    font-size: 13px;
    vertical-align: -1.5px;
    margin-left: 3px;
    color: #94a3b8;
}
th.sortable:hover .sort-icon {
    color: #1877F2;
}

/* Employee Avatar Circle */
.employee-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e0f2fe;
    color: #0284c7;
    font-weight: 700;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}

/* Hover Primary text link */
.hover-primary {
    transition: color 0.15s ease;
}
.hover-primary:hover {
    color: #1877F2 !important;
}

/* =========================================================================
   STANDARDIZED INLINE ROW ACTION BUTTONS & GROUP (8px Spacing Standard)
   ========================================================================= */
.btn-row-action-group {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important; /* Standarisasi Jarak Rapi 8px */
    justify-content: flex-end !important;
}

.btn-row-action {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 7px !important;
    font-size: 15px !important;
    border: 1px solid #E2E8F0 !important;
    background: #ffffff !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1) !important;
    color: #475569 !important;
    flex-shrink: 0 !important;
}
.btn-row-action:hover {
    background: #F1F5F9 !important;
    border-color: #CBD5E1 !important;
    transform: translateY(-1.5px) !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08) !important;
}

/* Status Badges */
.badge-status-active {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    padding: 2.5px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
}
.badge-status-inactive {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 2.5px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 600;
}

.badge-group-pill {
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

/* =========================================================================
   EXPORT TOOLS GROUP (Solid White Standard)
   ========================================================================= */
.export-btn-group {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    border: 1px solid #CBD5E1 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    margin-right: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    display: inline-flex !important;
    align-items: center !important;
}

.btn-export-tool {
    background: #FFFFFF !important;
    background-color: #FFFFFF !important;
    border: none !important;
    border-right: 1px solid #E2E8F0 !important;
    border-radius: 0 !important;
    padding: 8px 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    font-size: 12.5px !important;
    font-weight: 600 !important;
    color: #334155 !important;
    transition: all 0.15s ease !important;
    cursor: pointer !important;
    line-height: 1 !important;
}

.btn-export-tool:last-child {
    border-right: none !important;
}

.btn-export-tool:hover {
    background: #F8FAFC !important;
    background-color: #F8FAFC !important;
    color: #1877F2 !important;
}

.btn-export-tool:active {
    background: #EFF6FF !important;
    background-color: #EFF6FF !important;
}

.btn-export-tool .export-icon {
    font-size: 16px !important;
    margin: 0 !important;
}

.btn-export-tool .export-btn-label {
    font-size: 12.5px !important;
    font-weight: 600 !important;
}

/* =========================================================================
   FLOATING BULK ACTION BAR
   ========================================================================= */
.bulk-action-floating-bar {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    background: #ffffff;
    border: 1.5px solid #1877F2;
    border-radius: 14px;
    padding: 4px 8px;
    box-shadow: 0 10px 30px rgba(24, 119, 242, 0.2) !important;
    animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes slideUp {
    from { transform: translate(-50%, 40px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

/* Mobile Card Item */
.mobile-card-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    transition: all 0.15s ease;
}
.mobile-card-item:hover {
    border-color: #93c5fd;
    background: #f8fafc;
}

/* Custom form inputs */
.custom-input {
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 9px 13px;
    font-size: 13px;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.15s;
}
.custom-input:focus {
    background: #ffffff;
    border-color: #1877F2;
    box-shadow: 0 0 0 3px rgba(24, 119, 242, 0.12);
    outline: none;
}

/* Custom Detail Tabs */
.custom-detail-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    padding: 8px 16px;
}
.custom-detail-tabs .nav-link.active {
    color: #1877F2;
    border-bottom-color: #1877F2;
    background: transparent;
}
/* =========================================================================
   STANDARDIZED RESPONSIVE TABLE (Applied to all enterprise data tables)
   ========================================================================= */

/* Force table to not break layout on smaller screens */
.location-data-table {
    table-layout: auto !important;
    width: 100% !important;
    min-width: 900px !important; /* Ensures horizontal scroll on narrow viewports */
}

/* Prevent text wrapping in key columns */
.location-data-table td,
.location-data-table th {
    white-space: nowrap !important;
}

/* Allow wrapping only in name/description columns that need it */
.location-data-table td.cell-wrap,
.location-data-table th.cell-wrap {
    white-space: normal !important;
    min-width: 200px;
}

/* Ensure table-responsive container works correctly */
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
}

/* Subtle scrollbar for the table container */
.table-responsive::-webkit-scrollbar {
    height: 6px;
}
.table-responsive::-webkit-scrollbar-track {
    background: #F1F5F9;
    border-radius: 3px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}