﻿/* =========================================================
   iFAS ERP — MODERN CLEAN APP.CSS
   ========================================================= */

/* =========================================================
   RESET
========================================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 13px;
    background: #f5f6fa;
    color: #1f2937;
}

/* =========================================================
   ROOT VARIABLES
========================================================= */
:root {
    --sidebar-width: 240px;
    --primary: #5b3df5;
    --primary-dark: #2a1b75;
    --primary-light: #ede9ff;
    --border: #e5e7eb;
    --text-soft: #6b7280;
    --bg-soft: #f8fafc;
}

/* =========================================================
   LINKS
========================================================= */
a {
    text-decoration: none;
}

/* =========================================================
   MAIN LAYOUT
========================================================= */
.ifas-page {
    display: flex;
    min-height: 100vh;
    background: #f5f6fa;
}

/* =========================================================
   SIDEBAR
========================================================= */
.ifas-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    /*overflow-y: auto;*/
    background: linear-gradient( 180deg, #16112e 0%, #251a52 45%, #3d2f85 100% );
    color: white;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    z-index: 100;
}

/* =========================================================
   MAIN AREA
========================================================= */
.ifas-main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =========================================================
   TOPBAR
========================================================= */
.ifas-topbar {
    height: 58px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.ifas-topbar-left {
    display: flex;
    flex-direction: column;
}

.ifas-topbar-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

.ifas-topbar-greeting {
    font-size: 11px;
    color: var(--text-soft);
    margin-top: 2px;
}

.ifas-topbar-right {
    display: flex;
    align-items: center;
}

.ifas-topbar-date {
    background: #f3f4f6;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 12px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* =========================================================
   CONTENT
========================================================= */
.ifas-content {
    padding: 24px;
    flex: 1;
}

/* =========================================================
   HOME HERO
========================================================= */
.home-hero {
    background: linear-gradient( 135deg, #251a52 0%, #3d2f85 60%, #6d5dfc 100% );
    border-radius: 16px;
    padding: 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

    .home-hero h1 {
        margin: 0;
        font-size: 22px;
        font-weight: 700;
    }

    .home-hero p {
        margin-top: 8px;
        color: rgba(255,255,255,0.75);
        font-size: 13px;
    }

/* =========================================================
   QUICK MENU GRID
========================================================= */
.home-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.home-quick-card {
    background: white;
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 18px;
    transition: 0.2s;
    cursor: pointer;
}

    .home-quick-card:hover {
        transform: translateY(-2px);
        border-color: #c4b5fd;
        box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    }

.home-qc-label {
    margin-top: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.home-qc-desc {
    margin-top: 4px;
    font-size: 12px;
    color: var(--text-soft);
}

.home-qc-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

    .home-qc-icon i {
        font-size: 28px;
    }

/* =========================================================
   PANEL
========================================================= */
.home-bottom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 22px;
}

.home-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
}

.home-panel-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}

/* =========================================================
   LOGIN
========================================================= */
.login-layout {
    width: 100vw;
    height: 100vh;
}

.login-container {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient( 135deg, #16112e 0%, #2d1f69 55%, #5f46ff 100% );
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 34px;
    border-radius: 22px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
    color: white;
}

/* =========================================================
   LOGIN LOGO
========================================================= */
.logo-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-circle {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

    .logo-circle img {
        width: 56px;
        height: 56px;
        object-fit: contain;
    }

/* =========================================================
   LOGIN TITLE
========================================================= */
.login-title-area {
    text-align: center;
    margin-bottom: 24px;
}

    .login-title-area h2 {
        margin: 0;
        font-size: 24px;
        font-weight: 700;
    }

    .login-title-area p {
        margin-top: 6px;
        font-size: 13px;
        color: rgba(255,255,255,0.7);
    }

/* =========================================================
   FORM
========================================================= */
.login-form-group {
    margin-bottom: 16px;
}

    .login-form-group label {
        display: block;
        margin-bottom: 6px;
        font-size: 13px;
        font-weight: 600;
    }

    .login-form-group .form-control,
    .login-form-group .form-select {
        height: 44px;
        border-radius: 10px;
        border: none;
    }

/* =========================================================
   BUTTON
========================================================= */
.login-btn {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 10px;
    background: #6d5dfc;
    color: white;
    font-weight: 600;
    transition: 0.2s;
}

    .login-btn:hover {
        background: #5a49f0;
    }

/* =========================================================
   IDLE POPUP
========================================================= */
.idle-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.idle-popup {
    width: 320px;
    background: white;
    border-radius: 14px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

/* =========================================================
   BLAZOR ERROR
========================================================= */
#blazor-error-ui {
    background: #fef3c7;
    color: #92400e;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 10px 16px;
    z-index: 99999;
    font-size: 13px;
}

/* =========================================================
   MOBILE
========================================================= */
@media (max-width: 768px) {

    .ifas-sidebar {
        display: none;
    }

    .ifas-main {
        margin-left: 0;
        width: 100%;
    }

    .home-quick-grid {
        grid-template-columns: 1fr;
    }

    .home-bottom-row {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   NAVMENU
========================================================= */

.ifas-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.sap-menu {
    flex: 1;
    overflow-y: auto;
}

.sap-footer {
    margin-top: auto;
}

.ifas-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.ifas-logo img {
    width: 38px;
    height: 38px;
}

.ifas-title {
    font-size: 15px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.ifas-subtitle {
    font-size: 10px;
    color: rgba(255,255,255,0.55);
}

.ifas-menu {
    padding: 14px 10px;
    flex: 1;
}

.ifas-menu-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: rgba(255,255,255,0.45);
    margin: 18px 10px 8px;
}

.ifas-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 10px;
    color: rgba(255,255,255,0.78);
    transition: 0.2s;
}

    .ifas-link:hover {
        background: rgba(255,255,255,0.08);
        color: white;
    }

    .ifas-link.active {
        background: rgba(255,255,255,0.14);
        color: white;
        font-weight: 600;
    }

    .ifas-link i {
        font-size: 15px;
        width: 18px;
    }

.ifas-sidebar-footer {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 11px;
    color: rgba(255,255,255,0.5);
}

/* =========================================
   SIDEBAR FIX
========================================= */

.ifas-sidebar {
    width: 240px;
    min-width: 240px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: linear-gradient(180deg, #081f5c 0%, #3b0764 100%);
    overflow-y: auto;
    z-index: 100;
}

.ifas-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ifas-main {
    margin-left: 240px;
    width: calc(100% - 240px);
}

/* MENU */

.ifas-link,
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    text-decoration: none;
}

    .nav-link i,
    .ifas-link i {
        width: 18px;
        text-align: center;
    }

    /* supaya text tidak turun */
    .nav-link span,
    .ifas-link span {
        display: inline-block;
    }

/* =========================================================
   FIX NAVMENU STRUCTURE
========================================================= */

.sap-menu {
    padding: 12px;
}

.sap-group {
    margin-top: 18px;
    margin-bottom: 8px;
    padding: 0 10px;
    font-size: 11px;
    font-weight: 700;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.6px;
}

.sap-item,
.sap-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    border-radius: 10px;
    color: rgba(255,255,255,0.82);
    cursor: pointer;
    transition: 0.2s;
    text-decoration: none;
    font-size: 13px;
}

    .sap-item:hover,
    .sap-link:hover {
        background: rgba(255,255,255,0.08);
        color: white;
    }

    .sap-link.active {
        background: rgba(255,255,255,0.14);
        color: white;
        font-weight: 600;
    }

    .sap-item i,
    .sap-link i {
        width: 18px;
        text-align: center;
        font-size: 14px;
        flex-shrink: 0;
    }

    .sap-item span,
    .sap-link span {
        flex: 1;
        white-space: nowrap;
    }

.sap-arrow {
    font-size: 11px !important;
    width: auto !important;
}

.sap-sub {
    margin-left: 14px;
    border-left: 1px solid rgba(255,255,255,0.08);
    padding-left: 10px;
}

/* =========================================================
   FINAL SIDEBAR FIX
========================================================= */

.ifas-sidebar,
.sap-shell {
    width: 260px;
    min-width: 260px;
    height: 100vh;
    background: linear-gradient(180deg, #081f5c 0%, #3b0764 100%);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/* SIDEBAR STRUCTURE */

.ifas-sidebar-inner {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

/* HEADER FIXED */
.sap-brand {
    flex-shrink: 0;
}

/* MENU SCROLL ONLY */
.sap-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

/* FOOTER FIXED BOTTOM */
.sap-footer {
    margin-top: auto;
    flex-shrink: 0;
}
/* MAIN CONTENT */
.ifas-main {
    margin-left: 260px;
    width: calc(100% - 260px);
}

/* BRAND */
.sap-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: relative;
}

.sap-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.sap-brand-text {
    flex: 1;
}

.sap-title {
    font-size: 18px;
    font-weight: 700;
    color: white;
    line-height: 1.1;
}

.sap-subtitle {
    font-size: 11px;
    color: rgba(255,255,255,0.65);
    margin-top: 3px;
}

/* COLLAPSE BUTTON */
.sap-collapse-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: rgba(255,255,255,0.12);
    color: white;
}

/* USER */
.sap-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    color: white;
}

    .sap-user i {
        font-size: 28px;
    }

.sap-user-name {
    font-size: 13px;
    font-weight: 600;
}

.sap-user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.6);
}

/* =========================================================
   DASHBOARD CONTENT FIX
========================================================= */

/* QUICK ACCESS TITLE */
.home-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 14px;
}

/* QUICK CARD */
.home-quick-card {
    padding: 22px;
}

.home-qc-label {
    font-size: 15px;
    font-weight: 700;
    margin-top: 14px;
    color: #111827;
}

.home-qc-desc {
    font-size: 13px;
    color: #6b7280;
    margin-top: 6px;
    line-height: 1.5;
}

/* PANEL */
.home-panel {
    padding: 22px;
}

.home-panel-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 18px;
    color: #111827;
}

/* NOTIFICATION */
.home-notif-item {
    margin-bottom: 14px;
    line-height: 1.5;
    color: #374151;
    font-size: 13px;
}

.home-notif-time {
    font-size: 12px;
    color: #9ca3af;
}

/* SHORTCUT */
.home-shortcut {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 16px;
    margin-top: 8px;
    color: #374151;
    font-size: 13px;
}

/* =========================================================
   SIDEBAR FOOTER FIX
========================================================= */

.ifas-sidebar-footer,
.sap-footer {
    padding: 18px 16px 24px;
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255,255,255,0.72);
    border-top: 1px solid rgba(255,255,255,0.08);
}

    .ifas-sidebar-footer .status,
    .sap-footer .status {
        display: flex;
        align-items: center;
        gap: 6px;
        margin-bottom: 10px;
    }

    .ifas-sidebar-footer .dot,font-size:22px
    .sap-footer .dot {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #22c55e;
    }

/* =========================================================
   ACTION BUTTON
========================================================= */

.action-btn {
    width: 38px;
    height: 28px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.table-pos {
    font-size: 13px;
}

    .table-pos th {
        font-size: 13px;
    }

    .table-pos td {
        font-size: 13px;
    }

.form-check-label {
    font-size: 13px;
}

.form-label {
    font-size: 13px;
}
.void-label {
    text-align: center;
    font-weight: bold;
    font-size: 14px;
    border-top: 1px dashed #000;
    border-bottom: 1px dashed #000;
    padding: 4px 0;
    margin: 6px 0;

}
.receipt {
    width: 48mm;
    margin-left: 0;
    font-family: Consolas, monospace;
    font-size: 10px;
    color: #000;
    position: relative;
}

