/* filament-admin.css
   Admin Panel Custom Styles
   Focus on dashboard cards and widgets only, keeping default Filament colors
*/

/* ========================================
   COMPANY SWITCHER SIDEBAR
   ======================================== */

.fi-sidebar-company-switcher {
    margin: 0.1rem 0.1rem 0.1rem 0.1rem;
}

.company-switcher-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 0.75rem;
    padding: 0.875rem;
    transition: all 0.2s ease;
}

.dark .company-switcher-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-color: rgba(37, 99, 235, 0.2);
}

.company-switcher-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.15);
}

.dark .company-switcher-card:hover {
    border-color: #60a5fa;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
}

/* Label */
.company-switcher-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: #1e40af;
}

.dark .company-switcher-label {
    color: #93c5fd;
}

.company-switcher-label svg {
    width: 0.875rem;
    height: 0.875rem;
}

/* Select Container */
.company-switcher-select-wrapper {
    position: relative;
}

.company-switcher-select {
    width: 100%;
    appearance: none;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1f2937;
    cursor: pointer;
    transition: all 0.2s ease;
    line-height: 1.25;
}

.dark .company-switcher-select {
    background-color: rgb(31 41 55);
    border-color: rgb(55 65 81);
    color: #f3f4f6;
}

.company-switcher-select:hover {
    border-color: #3b82f6;
}

.dark .company-switcher-select:hover {
    border-color: #60a5fa;
}

.company-switcher-select:focus {
    outline: none;
    border-color: #3b82f6;
    ring: 2px;
    ring-color: rgba(59, 130, 246, 0.2);
}

.dark .company-switcher-select:focus {
    border-color: #60a5fa;
    ring-color: rgba(96, 165, 250, 0.2);
}

.company-switcher-select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Dropdown Icon */
.company-switcher-icon {
    position: absolute;
    right: 0.625rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
    transition: color 0.2s ease;
}

.dark .company-switcher-icon {
    color: #9ca3af;
}

.company-switcher-select:hover ~ .company-switcher-icon {
    color: #3b82f6;
}

.dark .company-switcher-select:hover ~ .company-switcher-icon {
    color: #60a5fa;
}

.company-switcher-icon svg {
    width: 1rem;
    height: 1rem;
}

/* Badge */
.company-switcher-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0.625rem;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid #d1d5db;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 500;
}

.dark .company-switcher-badge {
    background-color: rgba(31, 41, 55, 0.8);
    border-color: rgb(55 65 81);
}

.company-switcher-badge-dot {
    width: 0.375rem;
    height: 0.375rem;
    background-color: #22c55e;
    border-radius: 9999px;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.company-switcher-badge-text {
    color: #1f2937;
}

.dark .company-switcher-badge-text {
    color: #e5e7eb;
}

/* Loading State */
.company-switcher-loading {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.company-switcher-loading.active {
    opacity: 1;
    visibility: visible;
}

.dark .company-switcher-loading {
    background-color: rgba(17, 24, 39, 0.9);
}

.company-switcher-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.company-switcher-spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 9999px;
    animation: spin 0.6s linear infinite;
}

.dark .company-switcher-spinner {
    border-color: rgb(55 65 81);
    border-top-color: #60a5fa;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.company-switcher-loading-text {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
}

.dark .company-switcher-loading-text {
    color: #9ca3af;
}

/* ========================================
   DASHBOARD STATS WIDGETS
   ======================================== */
.fi-wi-chart {
    min-height: 300px !important;
}

.fi-wi-chart canvas {
    max-height: 300px !important;
}

/* ========================================
   CUSTOM WIDGET STYLES
   ======================================== */

/* Quick Actions Widget */
.dimensi-quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .dimensi-quick-actions {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

.dimensi-action-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    padding: 1rem;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}

.dimensi-action-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.dimensi-action-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.75rem;
    background: rgba(255,255,255,0.2);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dimensi-action-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

@media (min-width: 640px) {
    .dimensi-action-icon {
        width: 3rem;
        height: 3rem;
    }
    .dimensi-action-icon svg {
        width: 1.5rem;
        height: 1.5rem;
    }
}

.dimensi-action-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0;
}

@media (min-width: 640px) {
    .dimensi-action-title {
        font-size: 1rem;
    }
}

.dimensi-action-desc {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-top: 0.25rem;
    display: none;
}

@media (min-width: 640px) {
    .dimensi-action-desc {
        display: block;
    }
}

/* Service Progress Widget */
.dimensi-service-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dimensi-service-item {
    background: linear-gradient(to right, #f0f9ff, #ffffff);
    border-radius: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #e0f2fe;
}

.dark .dimensi-service-item {
    background: linear-gradient(to right, rgb(31 41 55), rgb(17 24 39));
    border-color: rgb(55 65 81);
}

.dimensi-service-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 640px) {
    .dimensi-service-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.dimensi-service-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dimensi-service-icon {
    padding: 0.375rem;
    border-radius: 0.375rem;
    flex-shrink: 0;
}

.dimensi-service-icon svg {
    width: 1rem;
    height: 1rem;
}

@media (min-width: 640px) {
    .dimensi-service-icon svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

.dimensi-service-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #1f2937;
}

.dark .dimensi-service-name {
    color: #e5e7eb;
}

.dimensi-service-label {
    font-size: 0.75rem;
    color: #6b7280;
}

.dark .dimensi-service-label {
    color: #9ca3af;
}

.dimensi-service-quality {
    text-align: right;
    flex-shrink: 0;
}

.dimensi-service-quality-value {
    font-size: 1.25rem;
    font-weight: 700;
}

.dimensi-service-quality-max {
    font-size: 0.75rem;
    color: #9ca3af;
}

.dimensi-progress-bar {
    width: 100%;
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.dark .dimensi-progress-bar {
    background: rgb(55 65 81);
}

.dimensi-progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: width 0.5s ease-out;
}

/* Branch Overview Widget */
.dimensi-branch-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .dimensi-branch-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.dimensi-branch-card {
    background: linear-gradient(135deg, var(--dimensi-blue-500), var(--dimensi-blue-600));
    border-radius: 0.75rem;
    padding: 1rem;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Dark mode - same blue gradient, works well */
.dark .dimensi-branch-card {
    background: linear-gradient(135deg, #0369a1, #075985);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.dimensi-branch-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.dimensi-branch-name {
    font-weight: 700;
    font-size: 0.875rem;
    color: white;
}

@media (min-width: 640px) {
    .dimensi-branch-name {
        font-size: 1rem;
    }
}

.dimensi-branch-type {
    font-size: 0.625rem;
    background: rgba(255,255,255,0.2);
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    margin-top: 0.25rem;
    display: inline-block;
    color: white;
}

.dimensi-branch-stats {
    display: flex;
    gap: 0.5rem;
    text-align: center;
}

.dimensi-branch-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: white;
}

@media (min-width: 640px) {
    .dimensi-branch-stat-value {
        font-size: 1.125rem;
    }
}

.dimensi-branch-stat-label {
    font-size: 0.625rem;
    opacity: 0.8;
    color: white;
}

.dimensi-branch-divider {
    width: 1px;
    background: rgba(255,255,255,0.2);
}

.dimensi-branch-services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.375rem;
}

.dimensi-branch-service {
    background: rgba(255,255,255,0.1);
    border-radius: 0.5rem;
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s;
}

.dimensi-branch-service:hover {
    background: rgba(255,255,255,0.2);
}

.dark .dimensi-branch-service {
    background: rgba(255,255,255,0.1);
}

.dark .dimensi-branch-service:hover {
    background: rgba(255,255,255,0.15);
}

.dimensi-branch-service-icon {
    width: 1.75rem;
    height: 1.75rem;
    margin: 0 auto 0.25rem;
    background: rgba(255,255,255,0.2);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 640px) {
    .dimensi-branch-service-icon {
        width: 2rem;
        height: 2rem;
    }
}

.dimensi-branch-service-icon svg {
    width: 0.875rem;
    height: 0.875rem;
    color: white;
}

@media (min-width: 640px) {
    .dimensi-branch-service-icon svg {
        width: 1rem;
        height: 1rem;
    }
}

.dimensi-branch-service-count {
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
}

@media (min-width: 640px) {
    .dimensi-branch-service-count {
        font-size: 1rem;
    }
}

.dimensi-branch-service-name {
    font-size: 0.625rem;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: white;
}



/* ========================================
   STATS MODAL STYLES
   ======================================== */

/* Modal Heading */
.dimensi-modal-heading {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dimensi-modal-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1f2937;
}

.dark .dimensi-modal-title {
    color: #f3f4f6;
}

.dimensi-modal-branch {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dimensi-blue-600);
}

.dark .dimensi-modal-branch {
    color: var(--dimensi-blue-400);
}

/* Stats Container */
.dimensi-stats-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Gauge Section */
.dimensi-gauge-section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 768px) {
    .dimensi-gauge-section {
        grid-template-columns: 280px 1fr;
        gap: 2rem;
    }
}

/* Gauge Wrapper */
.dimensi-gauge-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.dimensi-gauge-container {
    position: relative;
    width: 240px;
    height: 240px;
}

.dimensi-gauge-svg {
    width: 100%;
    height: 100%;
}

.dimensi-gauge-track {
    color: #e5e7eb;
}

.dark .dimensi-gauge-track {
    color: #374151;
}

.dimensi-gauge-label {
    fill: #6b7280;
    font-size: 11px;
    font-weight: 600;
}

.dark .dimensi-gauge-label {
    fill: #9ca3af;
}

.dimensi-gauge-sublabel {
    fill: #9ca3af;
    font-size: 12px;
    font-weight: 500;
}

.dark .dimensi-gauge-sublabel {
    fill: #6b7280;
}

.dimensi-gauge-score {
    fill: #1f2937;
    font-size: 32px;
    font-weight: 700;
}

.dark .dimensi-gauge-score {
    fill: #f3f4f6;
}

.dimensi-gauge-needle {
    filter: drop-shadow(0 2px 4px rgba(37, 99, 235, 0.3));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.dimensi-gauge-center {
    filter: drop-shadow(0 2px 3px rgba(37, 99, 235, 0.4));
}

.dimensi-gauge-max {
    fill: #9ca3af;
    font-size: 11px;
    font-weight: 500;
}

.dark .dimensi-gauge-max {
    fill: #6b7280;
}

/* Legend */
.dimensi-legend-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.dimensi-legend-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.dark .dimensi-legend-title {
    color: #f3f4f6;
}

.dimensi-legend-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dimensi-legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.dimensi-legend-item:hover {
    transform: translateX(4px);
}

.dimensi-legend-color {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 9999px;
    margin-right: 0.625rem;
    flex-shrink: 0;
}

.dimensi-legend-label {
    font-size: 0.875rem;
    font-weight: 500;
    flex: 1;
}

.dimensi-legend-range {
    font-size: 0.875rem;
    font-weight: 400;
    opacity: 0.7;
}

/* Legend color variants */
.dimensi-legend-red {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
}

.dimensi-legend-red .dimensi-legend-color {
    background-color: #dc2626;
}

.dimensi-legend-red .dimensi-legend-label,
.dimensi-legend-red .dimensi-legend-range {
    color: #991b1b;
}

.dimensi-legend-orange {
    background-color: #fff7ed;
    border: 1px solid #fed7aa;
}

.dimensi-legend-orange .dimensi-legend-color {
    background-color: #f97316;
}

.dimensi-legend-orange .dimensi-legend-label,
.dimensi-legend-orange .dimensi-legend-range {
    color: #9a3412;
}

.dimensi-legend-yellow {
    background-color: #fefce8;
    border: 1px solid #fef08a;
}

.dimensi-legend-yellow .dimensi-legend-color {
    background-color: #fbbf24;
}

.dimensi-legend-yellow .dimensi-legend-label,
.dimensi-legend-yellow .dimensi-legend-range {
    color: #854d0e;
}

.dimensi-legend-lime {
    background-color: #f7fee7;
    border: 1px solid #d9f99d;
}

.dimensi-legend-lime .dimensi-legend-color {
    background-color: #84cc16;
}

.dimensi-legend-lime .dimensi-legend-label,
.dimensi-legend-lime .dimensi-legend-range {
    color: #3f6212;
}

.dimensi-legend-green {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.dimensi-legend-green .dimensi-legend-color {
    background-color: #22c55e;
}

.dimensi-legend-green .dimensi-legend-label,
.dimensi-legend-green .dimensi-legend-range {
    color: #166534;
}

/* Dark mode legend */
.dark .dimensi-legend-red {
    background-color: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.2);
}

.dark .dimensi-legend-red .dimensi-legend-label,
.dark .dimensi-legend-red .dimensi-legend-range {
    color: #fca5a5;
}

.dark .dimensi-legend-orange {
    background-color: rgba(249, 115, 22, 0.1);
    border-color: rgba(249, 115, 22, 0.2);
}

.dark .dimensi-legend-orange .dimensi-legend-label,
.dark .dimensi-legend-orange .dimensi-legend-range {
    color: #fdba74;
}

.dark .dimensi-legend-yellow {
    background-color: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.2);
}

.dark .dimensi-legend-yellow .dimensi-legend-label,
.dark .dimensi-legend-yellow .dimensi-legend-range {
    color: #fde047;
}

.dark .dimensi-legend-lime {
    background-color: rgba(132, 204, 22, 0.1);
    border-color: rgba(132, 204, 22, 0.2);
}

.dark .dimensi-legend-lime .dimensi-legend-label,
.dark .dimensi-legend-lime .dimensi-legend-range {
    color: #bef264;
}

.dark .dimensi-legend-green {
    background-color: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.2);
}

.dark .dimensi-legend-green .dimensi-legend-label,
.dark .dimensi-legend-green .dimensi-legend-range {
    color: #86efac;
}

/* Section Titles */
.dimensi-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.75rem 0;
}

.dark .dimensi-section-title {
    color: #f3f4f6;
}

/* Metrics Section */
.dimensi-metrics-section {
    padding-top: 0.5rem;
}

.dimensi-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .dimensi-metrics-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.dimensi-metric-card {
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #bfdbfe;
    text-align: center;
    transition: all 0.2s ease;
}

.dimensi-metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.1);
}

.dark .dimensi-metric-card {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.05));
    border-color: rgba(37, 99, 235, 0.2);
}

.dimensi-metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0.25rem;
}

.dark .dimensi-metric-value {
    color: #93c5fd;
}

.dimensi-metric-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #1e40af;
    opacity: 0.8;
}

.dark .dimensi-metric-label {
    color: #93c5fd;
}

/* Services Section */
.dimensi-services-section {
    padding-top: 0.5rem;
}

.dimensi-services-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .dimensi-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .dimensi-services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.dimensi-service-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem;
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.dimensi-service-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

.dark .dimensi-service-card {
    background-color: rgb(31 41 55);
    border-color: rgb(55 65 81);
}

.dark .dimensi-service-card:hover {
    border-color: #3b82f6;
}

.dimensi-service-card-icon {
    padding: 0.5rem;
    background-color: #dbeafe;
    border-radius: 0.5rem;
    flex-shrink: 0;
}

.dimensi-service-card-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #2563eb;
}

.dark .dimensi-service-card-icon {
    background-color: rgba(37, 99, 235, 0.1);
}

.dark .dimensi-service-card-icon svg {
    color: #60a5fa;
}

.dimensi-service-card-name {
    font-size: 0.875rem;
    font-weight: 500;
    color: #1f2937;
    flex: 1;
    margin: 0 0.75rem;
}

.dark .dimensi-service-card-name {
    color: #f3f4f6;
}

.dimensi-service-card-score {
    text-align: right;
    flex-shrink: 0;
}

.dimensi-service-card-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
    line-height: 1;
}

.dark .dimensi-service-card-value {
    color: #60a5fa;
}

.dimensi-service-card-label {
    font-size: 0.625rem;
    font-weight: 500;
    color: #6b7280;
    margin-top: 0.125rem;
}

.dark .dimensi-service-card-label {
    color: #9ca3af;
}

/* Modal responsiveness */
@media (max-width: 640px) {
    .dimensi-gauge-container {
        width: 200px;
        height: 200px;
    }
    
    .dimensi-gauge-score {
        font-size: 28px;
    }
}
/* Memaksa teks filter tetap 1 baris dengan ellipsis (...) */
.fi-select-input-btn > div {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    overflow: hidden !important;
    gap: 0.25rem !important;
}

.fi-select-input-btn > div > span {
    flex: 1 1 0% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    text-align: left !important;
    display: block !important;
}

/* ========================================
   TOPBAR GRADIENT (UNIVERSAL)
   ======================================== */
/* html:not(.dark) .fi-topbar { */
.fi-topbar {
    background: linear-gradient(270deg, #1A3A8C 0%, #E91E8C 100%) !important;
    border-bottom: none !important;
    position: relative !important;
}

.fi-topbar, .fi-topbar-content {
    position: relative !important;
}
/* Ensure contrast for elements in topbar */
/* html:not(.dark) .fi-topbar .fi-breadcrumbs span,
html:not(.dark) .fi-topbar .fi-breadcrumbs a,
html:not(.dark) .fi-topbar .fi-topbar-item-label,
html:not(.dark) .fi-topbar .fi-user-menu-label,
html:not(.dark) .fi-topbar .fi-icon-btn svg,
html:not(.dark) .fi-topbar .fi-topbar-item-icon { */
/* Ensure contrast for elements in topbar (Universal) */
.fi-topbar .fi-breadcrumbs span,
.fi-topbar .fi-breadcrumbs a,
.fi-topbar .fi-topbar-item-label,
.fi-topbar .fi-user-menu-label,
.fi-topbar .fi-icon-btn svg,
.fi-topbar .fi-topbar-item-icon {
    color: white !important;
}

/* html:not(.dark) .fi-topbar .fi-topbar-search-input { */
.fi-topbar .fi-topbar-search-input {
    background-color: rgba(255, 255, 255, 0.2) !important;
    color: white !important;
}

html:not(.dark) .fi-topbar .fi-topbar-search-input::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* ========================================
   LOGIN PAGE & SIMPLE LAYOUT GRADIENT (UNIVERSAL)
   ======================================== */
/* html:not(.dark) .fi-simple-layout { */
.fi-simple-layout {
    background: linear-gradient(135deg, #1A3A8C 0%, #E91E8C 100%) !important;
    min-height: 100vh !important;
}

/* Pastikan kartu login terlihat premium dengan gaya dark glass (Universal) */
/* html:not(.dark) .fi-simple-main { */
.fi-simple-main {
    background: rgba(15, 23, 42, 0.6) !important;
    backdrop-filter: blur(16px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(16px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    border-radius: 1.5rem !important;
}
/* Adjust text and label colors for dark card readability (Light Mode Only) */
/* html:not(.dark) .fi-simple-main h1, 
html:not(.dark) .fi-simple-main label,
html:not(.dark) .fi-simple-main p,
html:not(.dark) .fi-simple-main span:not(.fi-btn-label) { */
/* Sesuaikan warna teks agar mudah dibaca di atas kartu gelap (Universal) */
.fi-simple-main h1, 
.fi-simple-main label,
.fi-simple-main p,
.fi-simple-main span:not(.fi-btn-label) {
    color: white !important;
}

/* html:not(.dark) .fi-simple-main .fi-input-wrp,
html:not(.dark) .fi-simple-main .fi-input { */
/* Tampilan input field pada dark glass (Universal) */
.fi-simple-main .fi-input-wrp,
.fi-simple-main .fi-input {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important;
}

/* html:not(.dark) .fi-simple-main input { */
.fi-simple-main input {
    color: white !important;
    background-color: transparent !important;
}

/* html:not(.dark) .fi-simple-main input::placeholder { */
.fi-simple-main input::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* html:not(.dark) .fi-simple-main .fi-checkbox-input { */
/* Checkbox dan label (Universal) */
.fi-simple-main .fi-checkbox-input {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

/* html:not(.dark) .fi-simple-main .fi-checkbox-input-label { */
.fi-simple-main .fi-checkbox-input-label {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* html:not(.dark) .fi-simple-main input:-webkit-autofill,
html:not(.dark) .fi-simple-main input:-webkit-autofill:hover, 
html:not(.dark) .fi-simple-main input:-webkit-autofill:focus, 
html:not(.dark) .fi-simple-main input:-webkit-autofill:active { */
/* Perbaikan Browser Autofill (Universal) */
.fi-simple-main input:-webkit-autofill,
.fi-simple-main input:-webkit-autofill:hover, 
.fi-simple-main input:-webkit-autofill:focus, 
.fi-simple-main input:-webkit-autofill:active {
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s !important;
    background-color: transparent !important;
}

/* Footer links agar tetap terbaca (Universal) */
/* html:not(.dark) .fi-simple-footer a { */
.fi-simple-footer a {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* html:not(.dark) .fi-simple-footer a:hover { */
.fi-simple-footer a:hover {
    color: white !important;
}
