/* ==========================================================================
   LAKUKERAS DASHBOARD SYSTEM - COMPLETE DESIGN SYSTEM (CSS)
   ========================================================================== */

:root {
    --primary-blue: #4F46E5;
    --primary-blue-hover: #4338CA;
    --bg-main: #F8FAFC;
    --bg-card: #FFFFFF;
    --border-color: #E2E8F0;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --sidebar-bg: #0D5CFF;
    --sidebar-text: #FFFFFF;
    --badge-green-bg: #D1FAE5;
    --badge-green-text: #065F46;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body.lakukeras-theme {
    background-color: #F1F5F9;
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    background: #0052CC;
    color: #FFFFFF;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1rem;
    flex-shrink: 0;
    min-height: 100vh;
}

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
}

.brand-logo-icon {
    width: 32px;
    height: 32px;
    background: #FFFFFF;
    color: #0052CC;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.1rem;
}

.company-switcher {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    cursor: pointer;
}

.company-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.company-avatar {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.company-name {
    font-size: 0.85rem;
    font-weight: 700;
}

.company-sub {
    font-size: 0.7rem;
    opacity: 0.75;
}

.sidebar-search {
    position: relative;
    margin-bottom: 1.25rem;
}

.sidebar-search i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    font-size: 0.85rem;
}

.sidebar-search input {
    width: 100%;
    padding: 0.5rem 0.5rem 0.5rem 2.25rem;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 0.825rem;
}

.sidebar-search input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.nav-section-title {
    font-size: 0.675rem;
    font-weight: 800;
    opacity: 0.6;
    letter-spacing: 0.05em;
    margin: 0.75rem 0 0.5rem 0.5rem;
    text-transform: uppercase;
}

.nav-list {
    list-style: none;
    margin-bottom: 1rem;
}

.nav-list li {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255, 255, 255, 0.18);
    color: #FFFFFF;
    font-weight: 700;
}

.nav-link i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
}

/* MAIN WORKSPACE */
.main-workspace {
    flex: 1;
    padding: 1.75rem 2rem;
    overflow-y: auto;
}

/* HEADER SUPERIOR */
.view-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 1.5rem !important;
    width: 100% !important;
    flex-wrap: wrap !important;
    gap: 1rem !important;
}

.view-title {
    font-size: 1.625rem;
    font-weight: 800;
    color: #0F172A;
    margin-bottom: 0.25rem;
}

.view-subtitle {
    font-size: 0.875rem;
    color: #64748B;
}

.header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    margin-left: auto !important;
}

.header-actions .btn-icon {
    width: 42px !important;
    height: 42px !important;
    border-radius: 12px !important;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #475569 !important;
    cursor: pointer !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}

.header-actions .date-badge {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.625rem 1rem !important;
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 12px !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    color: #334155 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}

/* KPI CARDS GRID */
.kpi-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 1.25rem !important;
    margin-bottom: 1.5rem !important;
}

.kpi-card {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    border-radius: 16px !important;
    padding: 1.25rem 1.5rem !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.kpi-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.kpi-value-group {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.kpi-number {
    font-size: 2.25rem;
    font-weight: 900;
    color: #0F172A;
    line-height: 1;
}

.badge-success {
    background: #D1FAE5;
    color: #065F46;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
}

.kpi-subtext {
    font-size: 0.8rem;
    color: #64748B;
    margin-bottom: 1rem;
}

/* PROGRESS BAR SEGMENTED */
.progress-segmented {
    display: flex;
    height: 8px;
    border-radius: 9999px;
    overflow: hidden;
    gap: 2px;
    margin-bottom: 1rem;
    background: #F1F5F9;
}

.segment {
    height: 100%;
}
.bg-blue { background: #3B82F6; }
.bg-pink { background: #EC4899; }
.bg-dark { background: #1E293B; }
.bg-orange { background: #F97316; }
.bg-teal { background: #14B8A6; }
.bg-red { background: #EF4444; }

/* LEGEND */
.kpi-legend {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem 1rem;
    font-size: 0.775rem;
    color: #475569;
}

.kpi-legend div {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* TOP LIST (CARD 3) */
.top-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
}

.top-list li {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    background: #F8FAFC !important;
    padding: 0.625rem 0.875rem !important;
    border-radius: 12px !important;
    border: 1px solid #F1F5F9 !important;
}

.rank {
    width: 24px;
    height: 24px;
    background: #E0E7FF;
    color: #3730A3;
    font-weight: 800;
    font-size: 0.75rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
}

.list-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.list-info strong {
    font-size: 0.85rem;
    color: #0F172A;
}

.list-info small {
    font-size: 0.75rem;
    color: #64748B;
}

.list-val {
    font-size: 0.875rem;
    font-weight: 800;
    color: #4F46E5;
}

/* GAUGE CHART (CARD 2) */
.gauge-container {
    position: relative;
    width: 140px;
    margin: 0 auto 0.75rem auto;
    text-align: center;
}

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

.gauge-value {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.35rem;
    font-weight: 900;
    color: #0F172A;
}

.kpi-footer-box {
    background: #F8FAFC;
    border: 1px solid #F1F5F9;
    border-radius: 10px;
    padding: 0.625rem 0.875rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* TABLES & CARDS */
.table-card-lakukeras {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    gap: 1rem;
}

.search-box {
    position: relative;
    min-width: 280px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 0.875rem;
}

.search-box input {
    width: 100%;
    padding: 0.625rem 0.75rem 0.625rem 2.25rem;
    border: 1px solid #CBD5E1;
    border-radius: 10px;
    font-size: 0.875rem;
    outline: none;
}

.lakukeras-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.lakukeras-table th {
    background: #F8FAFC;
    color: #64748B;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #E2E8F0;
    text-align: left;
}

.lakukeras-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid #F1F5F9;
    color: #334155;
}

.lakukeras-table tr:hover td {
    background: #F8FAFC;
}

/* BUTTONS */
.btn-corp-blue {
    padding: 0.625rem 1.375rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #FFFFFF;
    background: #4F46E5;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s ease;
}

.btn-corp-blue:hover {
    background: #4338CA;
}

.btn-utility {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    cursor: pointer;
}

.btn-utility.active {
    background: #4F46E5;
    color: #FFFFFF;
    border-color: #4F46E5;
}

/* BADGES & ICONS */
.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}



/* UNIFIED STANDARDIZED SEARCH BOX (ROUNDED PILL MODEL) */
.search-box-unified {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    min-width: 260px !important;
    max-width: 380px !important;
    width: 100% !important;
}

.search-box-unified i {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #94A3B8 !important;
    font-size: 0.875rem !important;
    pointer-events: none !important;
    z-index: 10 !important;
}

.search-box-unified input {
    width: 100% !important;
    height: 38px !important;
    padding-left: 2.6rem !important;
    padding-right: 1.25rem !important;
    border: 1.5px solid #CBD5E1 !important;
    border-radius: 20px !important;
    background: #FFFFFF !important;
    font-size: 0.85rem !important;
    color: #1E293B !important;
    outline: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.03) !important;
    transition: all 0.2s ease-in-out !important;
}

.search-box-unified input::placeholder {
    color: #64748B !important;
    font-size: 0.85rem !important;
}

.search-box-unified input:focus {
    border-color: #4F46E5 !important;
    background: #FFFFFF !important;
    box-shadow: 0 0 0 3px rgba(79,70,229,0.12) !important;
}
