/* =========================
   LOGO
========================= */
.fi-topbar .fi-logo {
    height: 32px !important;
}

.fi-simple-layout .fi-logo {
    height: 64px !important;
    margin-bottom: 10px;
}

/* =========================
   PRIMARY BUTTON (BRAND)
========================= */
.fi-btn.fi-btn-primary {
    background-color: #3d8240 !important;
    color: #ffffff !important;
}

.fi-btn.fi-btn-primary:hover {
    background-color: #2f6b33 !important;
}

.fi-btn.fi-btn-primary:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(61, 130, 64, 0.3) !important;
}

/* force text white */
.fi-btn.fi-btn-primary * {
    color: #ffffff !important;
}

/* secondary */
.fi-btn-color-gray {
    background-color: #f3f4f6 !important;
    border: none;
}

/* =========================
   SIDEBAR
========================= */
.fi-sidebar {
    border-right: 1px solid #f1f5f9;
    background-color: #fafafa;
}

.fi-sidebar-item {
    border-radius: 8px;
}

/* active */
.fi-sidebar-item-active {
    background-color: rgba(61, 130, 64, 0.1);
    border-left: 3px solid #3d8240;
}

/* =========================
   MAIN
========================= */
.fi-main {
    background-color: #f9fafb;
}

/* =========================
   DASHBOARD LAYOUT
========================= */
.fi-dashboard-widget {
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 12px !important;
}

.fi-dashboard-widget > * {
    height: 100%;
}

.fi-widget {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* =========================
   KPI (STATS OVERVIEW)
========================= */

/* horizontal layout */
.fi-stats-overview-stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* icon */
.fi-stats-overview-stat svg {
    width: 22px;
    height: 22px;
    color: #3d8240 !important;
    flex-shrink: 0;
}

/* text wrapper */
.fi-stats-overview-stat > div {
    display: flex;
    flex-direction: column;
}

/* label */
.fi-stats-overview-stat-label {
    font-size: 13px;
    opacity: 0.7;
}

/* value */
.fi-stats-overview-stat-value {
    font-size: 24px !important;
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* =========================
   TABLE
========================= */
.fi-table-cell {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
}

.fi-table-row:hover {
    background-color: rgba(61, 130, 64, 0.04);
}

.fi-table-empty-state {
    opacity: 0.8;
    padding: 30px 0;
}

/* =========================
   CHART
========================= */
.fi-wi-chart {
    height: auto !important;
    min-height: unset !important;
    padding-bottom: 0 !important;
}

.fi-wi-chart > div {
    height: auto !important;
}

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

/* ⚠️ remove fake empty state (biar nggak glitch) */
canvas:empty::after {
    display: none;
}

/* =========================
   CARD
========================= */
.fi-card {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    border-radius: 12px;
}

.fi-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.fi-card-header {
    align-items: center;
}

/* =========================
   SECTION
========================= */
.fi-section {
    margin-bottom: 12px !important;
}

.fi-section-header-heading {
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* =========================
   INPUT
========================= */
.fi-input {
    border-radius: 10px;
}

/* =========================
   MICRO POLISH
========================= */
.fi-stats-overview-stat-description {
    font-size: 12px;
    opacity: 0.7;
}

/* =========================
   LOGIN PAGE — PREMIUM
========================= */

/* Split layout: brand kiri, form kanan */
.fi-simple-layout {
    display: flex !important;
    flex-direction: row !important;
    min-height: 100vh !important;
    background: #f1f5f9 !important;
    align-items: stretch !important;
}

/* ---- Kiri: Brand Panel ---- */
.fi-login-brand {
    width: 400px;
    flex-shrink: 0;
    background: linear-gradient(150deg, #1b381c 0%, #29582b 55%, #3d8240 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    text-align: center;
}

.fi-login-brand__blob {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.fi-login-brand__blob--top {
    width: 340px;
    height: 340px;
    top: -110px;
    right: -90px;
}

.fi-login-brand__blob--bottom {
    width: 260px;
    height: 260px;
    bottom: -90px;
    left: -70px;
}

.fi-login-brand__grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

.fi-login-brand__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.fi-login-brand__logo {
    width: 110px;
    height: auto;
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.45));
}

.fi-login-brand__text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fi-login-brand__title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.3px;
    margin: 0;
    line-height: 1.2;
}

.fi-login-brand__subtitle {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin: 0;
}

.fi-login-brand__rule {
    width: 36px;
    height: 2px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.fi-login-brand__desc {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.8;
    margin: 0;
}

.fi-login-brand__copy {
    position: absolute;
    bottom: 24px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.25);
    margin: 0;
    letter-spacing: 0.5px;
}

/* ---- Kanan: Form area ---- */
.fi-simple-main-ctn {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 48px 32px !important;
    background: #f1f5f9 !important;
}

.fi-simple-main {
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.08), 0 1px 4px rgba(0, 0, 0, 0.04) !important;
    padding: 40px 36px !important;
    width: 100% !important;
}

/* Logo di form card */
.fi-simple-layout .fi-logo {
    height: 64px !important;
    margin-bottom: 4px;
}

/* ---- Mobile: sembunyikan panel kiri ---- */
@media (max-width: 768px) {
    .fi-login-brand {
        display: none !important;
    }

    .fi-simple-layout {
        background: #f1f5f9 !important;
    }

    .fi-simple-main-ctn {
        padding: 24px 16px !important;
    }

    .fi-simple-main {
        padding: 28px 20px !important;
        border-radius: 16px !important;
    }
}

/* =========================
   LAPORAN PRESENSI
========================= */
.laporan-keterangan-grid {
    display: grid;
    gap: 12px;
    font-size: 0.875rem;
    color: #4b5563;
}

@media (min-width: 640px) {
    .laporan-keterangan-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.laporan-keterangan-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
}

.laporan-keterangan-item svg {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    margin-top: 2px;
}

/* =========================
   WIDGET — PENGAJUAN PENDING (kartu amber, responsive)
========================= */
.mmp-leave-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mmp-leave-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
}

.mmp-leave-card__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #fef3c7;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mmp-leave-card__body {
    flex: 1;
    min-width: 0;
}

.mmp-leave-card__title {
    margin: 0;
    font-size: 0.875rem;
    color: #111827;
    line-height: 1.4;
}

.mmp-leave-card__meta {
    margin: 2px 0 0;
    font-size: 0.75rem;
    color: #9ca3af;
}

.mmp-leave-card__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #374151;
    text-decoration: none;
    transition: background 0.15s;
}

.mmp-leave-card__btn:hover {
    background: #f9fafb;
}

/* HP sempit: tombol turun ke bawah jadi full-width, ikon + teks tetap sebaris */
@media (max-width: 480px) {
    .mmp-leave-card {
        flex-wrap: wrap;
    }

    .mmp-leave-card__btn {
        width: 100%;
        justify-content: center;
        margin-top: 4px;
    }
}

/* =========================
   SETTINGS — FOTO PROFIL
========================= */
.mmp-alert-success {
    margin-bottom: 12px;
    padding: 10px 14px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #166534;
    font-size: 14px;
}

.mmp-photo-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mmp-photo-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mmp-photo-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mmp-photo-initial {
    font-size: 32px;
    color: #9ca3af;
    line-height: 1;
}

.mmp-photo-btn {
    cursor: pointer;
    display: inline-block;
    padding: 8px 16px;
    background: #1e3a2f;
    color: #ffffff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
}

.mmp-photo-hint {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
}

.mmp-photo-error {
    font-size: 12px;
    color: #dc2626;
    margin-top: 4px;
}

/* HP sempit: avatar & tombol turun ke bawah */
@media (max-width: 480px) {
    .mmp-photo-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}

/* =========================
   FORM KARYAWAN — PORTAL ACCESS (placeholder value)
========================= */
.mmp-portal-value {
    font-size: 18px;
    font-weight: 700;
    color: #3d8240;
    font-family: monospace;
    letter-spacing: 1px;
}

.mmp-portal-value--warn {
    color: #f59e0b;
}

/* =========================
   CHART — FILTER SEGMENTED PILLS
========================= */
.mmp-chart-filter {
    display: inline-flex;
    gap: 4px;
    background: #f1f5f9;
    padding: 3px;
    border-radius: 9px;
}

.mmp-chart-filter__btn {
    border: none;
    background: transparent;
    padding: 5px 12px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    transition: color 0.15s, background 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.mmp-chart-filter__btn:hover {
    color: #374151;
}

.mmp-chart-filter__btn--active {
    background: #ffffff;
    color: #3d8240;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

/* chart diredupkan selama ambil data periode baru */
.mmp-chart-busy {
    opacity: 0.5;
    transition: opacity 0.2s ease;
}
