/* =====================================================
   OPTIK MITRA
   Global Style
===================================================== */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    width:100%;
    height:100%;
    font-family:Arial,Helvetica,sans-serif;
    background:#f4f7fb;
    color:#333;
}

/* =====================================================
   Container
===================================================== */

.container{
    width:100%;
    max-width:1200px;
    margin:auto;
}

/* =====================================================
   Login
===================================================== */

.login-wrapper{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:20px;
}

.login-box{
    width:100%;
    max-width:420px;
    background:#fff;
    border-radius:16px;
    padding:35px;
    box-shadow:0 10px 30px rgba(0,0,0,.08);
}

.logo{
    text-align:center;
    margin-bottom:30px;
}

.logo h1{
    color:#2563eb;
    font-size:30px;
    margin-bottom:8px;
}

.logo p{
    color:#777;
    font-size:14px;
}

.form-group{
    margin-bottom:18px;
}

.form-group label{
    display:block;
    margin-bottom:8px;
    font-weight:600;
}

.form-control{
    width:100%;
    height:46px;
    border:1px solid #dcdcdc;
    border-radius:10px;
    padding:0 15px;
    font-size:15px;
    transition:.25s;
}

.form-control:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.15);
}

.btn{
    width:100%;
    height:48px;
    border:none;
    border-radius:10px;
    cursor:pointer;
    font-size:16px;
    font-weight:bold;
    transition:.25s;
}

.btn-primary{
    background:#2563eb;
    color:#fff;
}

.btn-primary:hover{
    background:#1d4ed8;
}
.customer-form{
    width:100%;
}

.customer-form .form-group{
    margin-bottom:18px;
}

.customer-form label{
    display:block;
    margin-bottom:7px;
    font-size:14px;
    font-weight:700;
    color:#1e293b;
}

.customer-form input{
    display:block;
    width:100%;
    height:44px;
    box-sizing:border-box;
    padding:0 14px;
    border:1px solid #dbe2ea;
    border-radius:10px;
    background:#fff;
    color:#1e293b;
    font-size:14px;
}

.customer-form input:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.10);
}

.customer-form-actions{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:22px;
}

.customer-form-actions .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto;
    min-width:120px;
    height:44px;
    box-sizing:border-box;
    padding:0 20px;
    border-radius:10px;
    text-decoration:none;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
}

.customer-form-actions .btn-primary{
    background:#2563eb;
    color:#fff;
    border:1px solid #2563eb;
}

.customer-form-actions .btn-primary:hover{
    background:#1d4ed8;
}

.customer-form-actions .btn-secondary{
    background:#fff;
    color:#2563eb;
    border:1px solid #2563eb;
}

.customer-form-actions .btn-secondary:hover{
    background:#eff6ff;
}



/* =====================================================
   AUTH FOOTER
===================================================== */

.auth-footer{
    margin-top:20px;
    text-align:center;
    font-size:14px;
    color:#666;
}

.auth-footer a{
    color:#2563eb;
    font-weight:600;
    text-decoration:none;
    transition:.2s;
}

.auth-footer a:hover{
    text-decoration:underline;
}
/* =====================================================
   Alert
===================================================== */

.alert{
    padding:12px 15px;
    border-radius:8px;
    margin-bottom:20px;
    font-size:14px;
}

.alert-success{
    background:#e7fff0;
    color:#00884d;
}

.alert-danger{
    background:#ffe8e8;
    color:#d40000;
}

/* =====================================================
   Responsive
===================================================== */

@media (max-width:480px){

    .login-box{
        padding:25px;
    }

}

/* =====================================================
   SIDEBAR
   ===================================================== */
.app-layout{
    display:flex;
    min-height:calc(100vh - 70px);
    position:relative;
}

.app-sidebar{
    position:fixed;
    top:0;
    left:0;
    width:260px;
    height:100vh;
    background:#ffffff;
    color:#1e293b;
    display:flex;
    flex-direction:column;
    padding:0;
    box-shadow:4px 0 18px rgba(0,0,0,.15);
    transform:translateX(-100%);
    transition:.3s ease;
    z-index:1001;
    overflow-y:auto;
}

.app-sidebar.open{
    transform:translateX(0);
}

/* Bagian atas sidebar saja yang biru */
.sidebar-brand{
    display:flex;
    align-items:center;
    gap:12px;
    min-height:92px;
    box-sizing:border-box;
    padding:18px 22px;
    background:#1e3a8a;
    color:#ffffff;
    border-bottom:1px solid rgba(255,255,255,.18);
    margin:0 0 12px;
    flex-shrink:0;
}

.sidebar-overlay{
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.45);
    opacity:0;
    visibility:hidden;
    transition:.3s;
    z-index:1000;
}

.sidebar-overlay.show{
    opacity:1;
    visibility:visible;
}

.brand-logo{
    width:46px;
    height:46px;
    border-radius:10px;
    background:#ffffff;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    flex-shrink:0;
}

.brand-logo img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.brand-text h2{
    color:#ffffff;
    font-size:20px;
    margin:0;
}

.brand-text small{
    color:#dbeafe;
    font-size:12px;
}

.sidebar-menu{
    padding:0 12px 20px;
}

.menu-title{
    font-size:11px;
    color:#64748b;
    font-weight:700;
    letter-spacing:1px;
    margin:20px 12px 8px;
    text-transform:uppercase;
}

.menu-item{
    display:flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
    color:#1e293b;
    padding:10px 14px;
    min-height:46px;
    box-sizing:border-box;
    border-radius:10px;
    transition:.25s;
    margin-bottom:4px;
    font-size:15px;
}

.menu-item:hover{
    background:#eff6ff;
    color:#1e293b;
}

.menu-item.active{
    background:#eff6ff;
    color:#1d4ed8;
    font-weight:600;
    border-left:4px solid #2563eb;
    padding-left:10px;
}

.menu-item.active:hover{
    background:#eff6ff;
}

.menu-icon{
    width:30px;
    height:30px;
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 30px;
    overflow:hidden;
}

.menu-icon img{
    width:30px;
    height:30px;
    display:block;
    object-fit:contain;
}

/* =====================================================
   HEADER
===================================================== */
.app-header{
    position:sticky;
    top:0;
    height:70px;
    background:#ffffff;
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:0 30px;
    border-bottom:1px solid #e5e7eb;
    z-index:999;
}

.header-left h2{
    margin:0;
    font-size:24px;
    color:#1e293b;
}

.header-left span{
    display:block;
    margin-top:4px;
    color:#64748b;
    font-size:14px;
}

.header-right{
    display:flex;
    align-items:center;
    gap:18px;
}

.user-info{
    display:flex;
    align-items:center;
    gap:12px;
}

.user-avatar{
    width:44px;
    height:44px;
    border-radius:50%;
    background:#2563eb;
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-weight:bold;
    font-size:18px;
}

.user-detail{
    display:flex;
    flex-direction:column;
}

.user-detail strong{
    color:#1e293b;
    font-size:15px;
}

.user-detail small{
    color:#64748b;
}

.logout-btn{
    background:#ef4444;
    color:#fff;
    text-decoration:none;
    padding:10px 18px;
    border-radius:8px;
    font-size:14px;
    font-weight:600;
    transition:.25s;
}

.logout-btn:hover{
    background:#dc2626;
}

/* =====================================================
   DASHBOARD
===================================================== */
.app-content{
    flex:1;
    width:100%;
    background:#f5f7fb;
    padding:25px;
}

.dashboard{
    display:flex;
    flex-direction:column;
    gap:24px;
}

.welcome-card{
    background:#2563eb;
    color:#fff;
    border-radius:16px;
    padding:30px;
}

.welcome-card h1{
    margin:0 0 10px;
}

.dashboard-cards{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:20px;
}

.card{
    background:#fff;
    border-radius:14px;
    padding:22px;
    display:flex;
    align-items:center;
    gap:18px;
    box-shadow:0 3px 15px rgba(0,0,0,.06);
}

.card-icon{
    width:60px;
    height:60px;
    border-radius:14px;
    background:#eff6ff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:28px;
}

.card-info h3{
    margin:0;
    font-size:15px;
    color:#64748b;
}

.card-info span{
    display:block;
    margin-top:6px;
    font-size:28px;
    font-weight:700;
    color:#1e293b;
}

.dashboard-grid{
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:20px;
}

.dashboard-box{
    background:#fff;
    border-radius:14px;
    padding:24px;
    box-shadow:0 3px 15px rgba(0,0,0,.06);
}

.dashboard-box h2{
    margin-top:0;
    margin-bottom:18px;
    color:#1e293b;
}

.dashboard-box ul{
    margin:0;
    padding-left:20px;
}

.dashboard-box li{
    margin-bottom:10px;
}

@media(max-width:992px){

    .dashboard-grid{
        grid-template-columns:1fr;
    }

}

/* =====================================================
   RESPONSIVE
===================================================== */
/* =====================================================
   PAGE
===================================================== */

.page{
    width:100%;
}
.page-header{
    margin-bottom:24px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
}

.page-title{
    font-size:28px;
    font-weight:700;
    color:#1e293b;
    margin-bottom:6px;
}

.page-subtitle{
    font-size:14px;
    color:#64748b;
}
.customer-search{
    display:flex;
    align-items:center;
    gap:10px;
    margin-bottom:20px;
}

.customer-search input{
    flex:1;
    width:100%;
    height:44px;
    padding:0 14px;
    border:1px solid #dbe2ea;
    border-radius:10px;
    background:#fff;
    color:#1e293b;
    font-size:14px;
}

.customer-search input:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.10);
}

.customer-search .btn{
    width:auto;
    min-width:90px;
    height:44px;
    padding:0 20px;
}
.customer-select-cell{
    padding:0 !important;
}
.customer-select-row{
    display:grid;
    grid-template-columns:220px 220px;
    align-items:center;
    gap:20px;
    width:100%;
    min-height:52px;
    box-sizing:border-box;
    padding:10px 14px;
    color:#1e293b;
    text-decoration:none;
    border-radius:8px;
    transition:.15s;
}

.customer-select-name{
    color:#1e293b;
    font-size:14px;
    font-weight:600;
}

.customer-select-phone{
    color:#1e293b;
    font-size:14px;
}
.customer-actions{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:8px;
    white-space:nowrap;
}

.customer-actions .btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:58px;
    min-width:58px;
    height:38px;
    padding:0 6px;
    box-sizing:border-box;
    text-decoration:none !important;
    line-height:1;
    margin:0;
}

.customer-actions .btn-primary{
    background:#2864e8;
    color:#fff !important;
    border:none;
}

.customer-actions .btn-danger{
    background:#ef4444;
    color:#fff !important;
    border:none;
}

.customer-actions .btn:hover{
    text-decoration:none !important;
}

.customer-actions .btn-danger{
    background:#ef4444;
    color:#fff;
    border-color:#ef4444;
}

.customer-actions .btn-danger:hover{
    background:#dc2626;
    border-color:#dc2626;
}

@media (max-width:700px){

    .customer-select-row{
        align-items:flex-start;
        flex-direction:column;
        gap:3px;
    }

    .customer-actions{
        flex-wrap:wrap;
    }

}
/* Tombol halaman */
.page-header a.btn,
.page-header a.btn-primary{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:auto;
    min-width:170px;
    height:44px;
    padding:0 20px;
    background:#2563eb;
    color:#ffffff;
    border:none;
    border-radius:10px;
    text-decoration:none;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
    transition:.2s;
    white-space:nowrap;
}

.page-header a.btn:hover,
.page-header a.btn-primary:hover{
    background:#1d4ed8;
}

/* =====================================================
   CONTENT BOX
===================================================== */

.content-box{
    background:#ffffff;
    border-radius:16px;
    box-shadow:0 3px 15px rgba(0,0,0,.06);
    overflow:hidden;
}

.content-body{
    padding:24px;
}

/* =====================================================
   TABLE
===================================================== */

.table-wrapper{
    width:100%;
    overflow-x:auto;
}

.data-table{
    width:100%;
    border-collapse:collapse;
}

.data-table thead{
    background:#f8fafc;
}

.data-table th{
    padding:16px;
    text-align:left;
    font-size:14px;
    font-weight:700;
    color:#334155;
    border-bottom:1px solid #e5e7eb;
}
.data-table td{
    padding:1px 16px;
    font-size:14px;
    color:#475569;
    border-bottom:1px solid #edf2f7;
}

.data-table tbody tr{
    transition:.2s;
}

.data-table tbody tr:hover{
    background:#f8fbff;
}

.data-table tbody tr:last-child td{
    border-bottom:none;
}

/* =====================================================
   CABANG
===================================================== */

.branch-code{
    font-weight:600;
    color:#1e293b;
}
.branch-link{
    color:#1e293b;
    text-decoration:none;
    font-weight:600;
    cursor:pointer;
}

.branch-link:hover{
    color:#1e293b;
    text-decoration:none;
}

.empty-data{
    text-align:center;
    padding:40px 20px !important;
    color:#94a3b8;
    font-style:italic;
}
.branch-dashboard{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
    gap:20px;
    margin-top:24px;
}

.branch-menu-card{
    display:flex;
    align-items:center;
    gap:18px;
    padding:22px;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:14px;
    text-decoration:none;
    color:#1e293b;
    transition:.2s;
}

.branch-menu-card:hover{
    border-color:#2563eb;
    box-shadow:0 10px 25px rgba(0,0,0,.08);
}

.branch-menu-icon{
    width:60px;
    height:60px;
    border-radius:12px;
    background:#eff6ff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:28px;
}

.branch-menu-content h3{
    margin:0 0 6px;
    font-size:18px;
}

.branch-menu-content p{
    margin:0;
    color:#64748b;
    line-height:1.5;
}
.finance-filter{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:20px;
}

.finance-filter label{
    font-weight:600;
}

.finance-filter select{
    width:220px;
}

.finance-summary{
    margin-top:20px;
    display:flex;
    justify-content:flex-end;
    gap:50px;
    font-size:15px;
}

.finance-summary div{
    display:flex;
    gap:10px;
}
.menu-toggle{
    width:42px;
    height:42px;
    border:none;
    background:transparent;
    cursor:pointer;
    font-size:28px;
    color:#1e293b;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    transition:.2s;
}

.menu-toggle:hover{
    background:#f1f5f9;
}

.header-left{
    display:flex;
    align-items:center;
    gap:12px;
}

.header-left h2{
    margin:0;
    font-size:26px;
    font-weight:700;
}
/* =====================================================
   KELOLA BARANG / INVENTORY
===================================================== */

/* FILTER */

.inventory-filter-card{
    display:block;
    margin-bottom:20px;
    padding:20px;
}

.inventory-filter{
    width:100%;
    display:flex;
    align-items:flex-end;
    gap:14px;
    flex-wrap:wrap;
}

.inventory-filter-item{
    display:flex;
    flex-direction:column;
    gap:7px;
    min-width:190px;
}

.inventory-filter-item label{
    font-size:13px;
    font-weight:600;
    color:#475569;
}

.inventory-filter-item select{
    width:100%;
    height:44px;
    background:#ffffff;
    color:#1e293b;
    border:1px solid #dbe2ea;
    border-radius:9px;
    padding:0 38px 0 12px;
    font-size:14px;
    cursor:pointer;
}

/*
 * Tetap memakai SELECT HTML normal.
 * Tidak memakai dropdown custom/overlay.
 */
.inventory-filter-item select:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.10);
}

.inventory-search{
    flex:1;
    min-width:250px;
}

.inventory-search-box{
    display:flex;
    gap:8px;
}

.inventory-search-box .form-control{
    flex:1;
    min-width:0;
    height:44px;
}

.inventory-search-box .btn{
    width:auto;
    height:44px;
    padding:0 20px;
    white-space:nowrap;
}


/* =====================================================
   CARD INVENTORY
===================================================== */

.inventory-card{
    display:block;
    width:100%;
    padding:0;
    margin-bottom:20px;
    overflow:hidden;
}

.inventory-table-wrap{
    width:100%;
    overflow-x:auto;
}


/* =====================================================
   TABLE BARANG BIASA
===================================================== */

.inventory-table{
    width:100%;
    border-collapse:collapse;
}

.inventory-table thead{
    background:#f8fafc;
}

.inventory-table th{
    padding:15px 18px;
    text-align:left;
    font-size:14px;
    font-weight:700;
    color:#334155;
    border-bottom:1px solid #e5e7eb;
}

.inventory-table td{
    padding:15px 18px;
    font-size:14px;
    color:#475569;
    border-bottom:1px solid #edf2f7;
}

.inventory-table tbody tr:last-child td{
    border-bottom:none;
}

.inventory-table tbody tr:hover{
    background:#f8fbff;
}

.inventory-quantity-column{
    width:150px;
    text-align:center !important;
}


/* =====================================================
   INLINE EDIT STOK
===================================================== */

.editable-stock-cell{
    width:150px;
    text-align:center;
    font-weight:700;
    cursor:pointer;
    border-radius:7px;
    transition:.2s;
}

.editable-stock-cell:hover{
    background:#eff6ff;
    color:#2563eb;
}

.stock-display{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-width:55px;
    min-height:34px;
}

.stock-input{
    width:90px;
    height:38px;
    padding:0 8px;
    border:1px solid #2563eb;
    border-radius:7px;
    text-align:center;
    font-size:14px;
    font-weight:700;
    background:#ffffff;
}

.stock-input:focus{
    outline:none;
    box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

.editable-stock-cell.is-editing{
    background:#eff6ff;
}


/* =====================================================
   AREA SIMPAN
===================================================== */

.inventory-save-area{
    display:flex;
    justify-content:flex-end;
    padding:16px 18px;
    border-top:1px solid #edf2f7;
    background:#ffffff;
}

.inventory-save-area .btn{
    width:auto;
    min-width:120px;
    height:42px;
    padding:0 22px;
}


/* =====================================================
   LENSA
===================================================== */

.lens-stock-card{
    display:block;
    padding:0;
}

.lens-product-header{
    padding:18px 20px;
    border-bottom:1px solid #e5e7eb;
    background:#ffffff;
}

.lens-product-header h3{
    margin:0;
    font-size:17px;
    font-weight:700;
    color:#1e293b;
}


/* =====================================================
   TABLE LENSA
===================================================== */

.lens-stock-table{
    width:100%;
    border-collapse:collapse;
    table-layout:fixed;
}

.lens-stock-table th{
    background:#f8fafc;
    padding:14px 12px;
    text-align:center;
    font-size:13px;
    font-weight:700;
    color:#334155;
    border-right:1px solid #e5e7eb;
    border-bottom:1px solid #e5e7eb;
}

.lens-stock-table th:last-child{
    border-right:none;
}

.lens-stock-table td{
    height:48px;
    padding:7px 10px;
    text-align:center;
    font-size:14px;
    color:#475569;
    border-right:1px solid #edf2f7;
    border-bottom:1px solid #edf2f7;
}

.lens-stock-table td:last-child{
    border-right:none;
}

.lens-stock-table tbody tr:last-child td{
    border-bottom:none;
}


/* =====================================================
   INLINE EDIT LENSA
===================================================== */

.lens-editable-cell{
    cursor:pointer;
    transition:.2s;
}

.lens-editable-cell:hover{
    background:#eff6ff;
    color:#2563eb;
}

.lens-editable-cell.is-editing{
    background:#eff6ff;
}

.lens-display{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:32px;
}

.lens-input{
    width:100%;
    max-width:110px;
    height:36px;
    padding:0 7px;
    margin:auto;
    border:1px solid #2563eb;
    border-radius:7px;
    background:#ffffff;
    text-align:center;
    font-size:14px;
}

.lens-input:focus{
    outline:none;
    box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

.new-lens-row{
    background:#f8fbff;
}

.new-lens-input{
    display:block;
}


/* =====================================================
   TOMBOL LENSA
===================================================== */

.lens-actions{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:16px 18px;
    border-top:1px solid #edf2f7;
}

.lens-actions .btn{
    width:auto;
    min-width:140px;
    height:42px;
    padding:0 18px;
}

.lens-actions .btn-secondary{
    background:#f1f5f9;
    color:#334155;
    border:1px solid #dbe2ea;
}

.lens-actions .btn-secondary:hover{
    background:#e2e8f0;
}


/* =====================================================
   DATA KOSONG
===================================================== */

.inventory-empty{
    width:100%;
    padding:25px;
    text-align:center;
    color:#94a3b8;
    font-size:14px;
}


/* =====================================================
   RESPONSIVE INVENTORY
===================================================== */

@media(max-width:768px){

    .inventory-filter-card{
        padding:15px;
    }

    /*
     * Filter turun rapi ke bawah.
     * Tidak menjadi overlay/dropdown custom.
     */
    .inventory-filter{
        display:grid;
        grid-template-columns:1fr;
        gap:12px;
    }

    .inventory-filter-item,
    .inventory-search{
        width:100%;
        min-width:0;
    }

    .inventory-filter-item select{
        width:100%;
        height:44px;
    }

    .inventory-search-box{
        width:100%;
    }

    .inventory-search-box .btn{
        flex:0 0 auto;
    }

    /*
     * Tabel tetap tabel.
     * Jika layar terlalu kecil, scroll horizontal.
     */
    .inventory-table-wrap{
        overflow-x:auto;
        -webkit-overflow-scrolling:touch;
    }

    .inventory-table{
        min-width:500px;
    }

    .lens-stock-table{
        min-width:500px;
    }

    .inventory-table th,
    .inventory-table td{
        padding:13px 14px;
    }

    .lens-actions{
        flex-direction:column;
    }

    .lens-actions .btn{
        width:100%;
    }

    .inventory-save-area .btn{
        width:100%;
    }

}


/* =====================================================
   HP KECIL
===================================================== */

@media(max-width:480px){

    .app-content{
        padding:15px;
    }

    .inventory-filter-card{
        border-radius:12px;
    }

    .inventory-search-box{
        display:grid;
        grid-template-columns:1fr auto;
    }

    .inventory-search-box .btn{
        padding:0 15px;
    }

    .lens-product-header{
        padding:15px;
    }

    .lens-product-header h3{
        font-size:16px;
    }

}
/* =====================================================
   TAB KATEGORI LAIN / LENSA
===================================================== */

.inventory-mode-tabs{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:18px;
}

/* Bentuk kedua tombol sama besar */
.inventory-mode-tabs .btn{
    width:150px;
    height:46px;
    padding:0 18px;

    display:flex;
    align-items:center;
    justify-content:center;

    border:none;
    border-radius:999px;

    font-size:14px;
    font-weight:700;
    text-decoration:none;
    color:#ffffff;

    cursor:pointer;
    transition:.2s;
}

/* Tombol yang sedang dipilih = BIRU */
.inventory-mode-tabs .btn-primary{
    background:#2563eb;
    color:#ffffff;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,.20),
        0 4px 10px rgba(37,99,235,.20);
}

/* Tombol yang tidak dipilih = MERAH */
.inventory-mode-tabs .btn-secondary{
    background:#ef4444;
    color:#ffffff;
    border:none;
    box-shadow:
        inset 0 2px 0 rgba(255,255,255,.20),
        0 4px 10px rgba(239,68,68,.18);
}

/* Hover tetap mengikuti warna masing-masing */
.inventory-mode-tabs .btn-primary:hover{
    background:#1d4ed8;
}

.inventory-mode-tabs .btn-secondary:hover{
    background:#dc2626;
}


/* =====================================================
   TAB INVENTORY - MOBILE
===================================================== */

@media(max-width:600px){

    .inventory-mode-tabs{
        width:100%;
        gap:10px;
    }

    .inventory-mode-tabs .btn{
        flex:1;
        width:auto;
        height:44px;
        padding:0 10px;
        font-size:13px;
    }

}
/* =====================================================
   PENGATURAN UMUM
===================================================== */

.general-settings-page{
    width:100%;
}

.general-settings-header{
    margin-bottom:24px;
}

.general-settings-header h1{
    margin:0;
    font-size:28px;
    line-height:1.2;
    color:#1e293b;
}

.general-settings-header p{
    margin:6px 0 0;
    font-size:14px;
    color:#64748b;
}

.general-settings-card{
    background:#ffffff;
    border:1px solid #e3e7ee;
    border-radius:16px;
    box-shadow:0 3px 15px rgba(0,0,0,.06);
    overflow:hidden;
}

.general-settings-card-header{
    padding:22px 24px;
    border-bottom:1px solid #e5e7eb;
}

.general-settings-card-header h2{
    margin:0;
    font-size:20px;
    color:#1e293b;
}

.general-settings-card-header p{
    margin:6px 0 0;
    font-size:14px;
    color:#64748b;
}

.general-settings-card-body{
    padding:24px;
}

.general-settings-field{
    margin-bottom:20px;
}

.general-settings-field label{
    display:block;
    margin-bottom:8px;
    font-size:14px;
    font-weight:600;
    color:#334155;
}

.general-settings-file{
    width:100%;
    min-height:46px;
    padding:9px 12px;
    border:1px solid #dbe2ea;
    border-radius:10px;
    background:#fff;
    font-size:14px;
    color:#334155;
    box-sizing:border-box;
}

.general-settings-file:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.10);
}

.general-logo-preview{
    margin-top:14px;
    width:110px;
    height:110px;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:10px;
    background:#fff;
    border:1px solid #e3e7ee;
    border-radius:12px;
    box-sizing:border-box;
}

.general-logo-preview img{
    display:block;
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}

.general-settings-actions{
    display:flex;
    justify-content:flex-end;
    padding-top:4px;
}

.general-settings-save{
    width:auto;
    min-width:120px;
    height:42px;
    padding:0 22px;
    border:0;
    border-radius:9px;
    background:#2563eb;
    color:#fff;
    font-size:14px;
    font-weight:600;
    cursor:pointer;
    transition:.2s;
}

.general-settings-save:hover{
    background:#1d4ed8;
}

@media(max-width:700px){

    .general-settings-header h1{
        font-size:24px;
    }

    .general-settings-card-body{
        padding:18px;
    }

    .general-settings-actions{
        justify-content:stretch;
    }

    .general-settings-save{
        width:100%;
    }

}

/* =====================================================
   KATEGORI & CABANG - MASTER DATA
   Tampilan disamakan dengan halaman Kelola Barang
   ===================================================== */

.category-page-actions{
    display:flex;
    justify-content:flex-end;
    align-items:center;
    margin-bottom:20px;
}

.category-add-btn{
    width:auto;
    min-width:170px;
    height:44px;
    padding:0 20px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.category-form-box{
    margin-bottom:20px;
}

.category-form-table{
    width:100%;
    border-collapse:separate;
    border-spacing:0;
}

.category-form-table td{
    padding:0 10px 0 0;
    vertical-align:bottom;
}

.category-form-table td:last-child{
    padding-right:0;
}

.category-form-table label{
    display:block;
    margin-bottom:8px;
    color:#334155;
    font-size:14px;
}

.category-form-btn,
.category-cancel-btn{
    width:auto;
    min-width:100px;
    height:44px;
    padding:0 18px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:10px;
    font-size:14px;
    font-weight:700;
    cursor:pointer;
}

.category-cancel-btn{
    background:#f1f5f9;
    color:#334155;
    border:1px solid #dbe2ea;
}

.category-cancel-btn:hover{
    background:#e2e8f0;
}

.category-table th,
.category-table td{
    padding:15px 18px;
    vertical-align:middle;
}

.category-table th:first-child,
.category-table td:first-child{
    width:70px;
    text-align:center;
}

.category-table th:nth-child(4),
.category-table td:nth-child(4){
    width:120px;
}

.category-table th:last-child,
.category-table td:last-child{
    width:150px;
    white-space:nowrap;
}

.category-table td:nth-child(2){
    color:#1e293b;
    font-weight:600;
}

.category-table td:nth-child(3){
    color:#64748b;
}

.category-edit-link{
    color:#2563eb;
    text-decoration:none;
    font-weight:600;
}

.category-edit-link:hover{
    color:#1d4ed8;
    text-decoration:underline;
}

.category-table td:last-child form{
    display:inline-flex !important;
    align-items:center;
    vertical-align:middle;
}

.category-table td:last-child > .category-edit-link{
    display:inline-flex;
    align-items:center;
    vertical-align:middle;
    margin-right:6px;
}

.branch-data-box{
    margin-top:0;
}

@media(max-width:768px){
    .category-page-actions{
        justify-content:stretch;
    }

    .category-add-btn{
        width:100%;
    }

    .category-form-table,
    .category-form-table tbody,
    .category-form-table tr,
    .category-form-table td{
        display:block;
        width:100% !important;
    }

    .category-form-table td{
        padding:0 0 14px;
    }

    .category-form-table td:last-child{
        padding-bottom:0;
    }

    .category-form-table td:last-child .category-form-btn,
    .category-form-table td:last-child .category-cancel-btn{
        width:100%;
        margin:0 0 8px;
    }

}


/* =====================================================
   CABANG - DAFTAR CABANG
   ===================================================== */

.branch-list{
    width:100%;
}

.branch-full-button{
    display:flex;
    align-items:center;
    gap:14px;
    width:100%;
    min-height:58px;
    margin:0;
    padding:0 18px;
    box-sizing:border-box;
    background:#fff;
    color:#14213d;
    border:0;
    border-bottom:1px solid #e5eaf0;
    text-decoration:none !important;
    text-align:left;
    cursor:pointer;
    transition:background-color .15s ease;
}

.branch-full-button:hover{
    background:#eef6ff;
}

.branch-full-button:focus-visible{
    outline:2px solid #2563eb;
    outline-offset:-2px;
    background:#eef6ff;
}

.branch-full-number{
    flex:0 0 auto;
    width:auto;
    margin:0;
    padding:0;
    text-align:left;
    font-size:14px;
    font-weight:500;
    color:#14213d;
}

.branch-full-name{
    flex:0 0 auto;
    width:auto;
    margin:0;
    padding:0;
    text-align:left;
    font-size:14px;
    font-weight:600;
    color:#14213d;
}

@media(max-width:768px){
    .branch-full-button{
        gap:12px;
        padding-left:14px;
        padding-right:14px;
    }
}
/* =====================================================
   HAK AKSES CABANG
   ===================================================== */

.branch-access-header{
    margin-bottom:24px;
}





.branch-access-title-row{
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:20px;
}

.branch-access-title-row .page-title{
    margin:0;
}

.branch-access-title-row .page-subtitle{
    margin:7px 0 0;
    white-space:nowrap;
}

.branch-access-box{
    overflow:hidden;
}

.branch-access-form{
    width:100%;
}

.branch-access-list{
    width:100%;
}

.branch-access-header-row{
    display:grid;
    grid-template-columns:1fr 110px;
    align-items:center;
    min-height:48px;
    padding:0 16px;
    box-sizing:border-box;
    background:#f8fafc;
    border-bottom:1px solid #e5e7eb;
    color:#334155;
    font-size:14px;
    font-weight:700;
}

.branch-access-header-row span:last-child{
    text-align:center;
}

.branch-access-row{
    display:grid;
    grid-template-columns:1fr 110px;
    align-items:center;
    width:100%;
    min-height:48px;
    margin:0;
    padding:0 16px;
    box-sizing:border-box;
    background:#fff;
    color:#1e293b;
    border-bottom:1px solid #edf2f7;
    cursor:pointer;
    transition:background-color .15s ease;
}

.branch-access-row:hover{
    background:#f8fbff;
}

.branch-access-row:last-child{
    border-bottom:none;
}

.branch-access-label{
    text-align:left;
    font-size:14px;
    font-weight:500;
}

.branch-access-check{
    display:flex;
    align-items:center;
    justify-content:center;
}

.branch-access-check input[type="checkbox"]{
    width:18px;
    height:18px;
    margin:0;
    cursor:pointer;
    accent-color:#2563eb;
}

.branch-access-actions{
    padding:18px 16px;
    border-top:1px solid #edf2f7;
    background:#fff;
}

.branch-access-save{
    width:100%;
    min-height:48px;
}

@media(max-width:600px){
    .branch-access-title-row{
        flex-direction:column;
        gap:4px;
    }

    .branch-access-title-row .page-subtitle{
        white-space:normal;
    }

    .branch-access-header-row,
    .branch-access-row{
        grid-template-columns:1fr 80px;
        padding-left:12px;
        padding-right:12px;
    }

    
}

/* Tombol kembali global menggunakan gambar yang sama dengan halaman Pelunasan Kredit. */




@media(max-width:600px){}





.dashboard-branch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:24px 0;align-items:stretch}
.dashboard-branch-card{display:block;min-width:0;background:#fff;border:1px solid #e3e7ee;border-radius:14px;padding:18px;text-decoration:none;color:inherit;transition:transform .15s ease,box-shadow .15s ease}
.dashboard-branch-card:hover{transform:translateY(-2px);box-shadow:0 10px 28px rgba(0,0,0,.08)}
.dashboard-branch-name{font-size:18px;line-height:1.25;font-weight:800;color:#14213d;margin-bottom:12px;overflow-wrap:anywhere}
.dashboard-branch-label{font-size:12px;color:#697386;font-weight:600;margin-bottom:5px}
.dashboard-branch-value{font-size:24px;line-height:1.25;font-weight:800;color:#0E78C8;overflow-wrap:anywhere}
.dashboard-branch-grid-branch{grid-template-columns:minmax(0,1fr)}
.dashboard-branch-grid-branch .dashboard-branch-card{width:100%;padding:20px}
.dashboard-branch-grid-branch .dashboard-branch-name{font-size:19px}
.dashboard-branch-grid-branch .dashboard-branch-value{font-size:27px}
.dashboard-activity-full{width:100%}.activity-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}.activity-head h2{margin:0}.activity-list{width:100%;overflow-x:auto}.activity-row{display:grid;grid-template-columns:170px 150px 160px minmax(260px,1fr);gap:12px;padding:12px 0;border-bottom:1px solid #edf0f4;font-size:13px;align-items:center}.activity-row-head{font-weight:700;color:#4b5563;background:#f8fafc;padding:11px;border-radius:8px}.activity-filter-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr auto;gap:14px;align-items:end;margin-bottom:20px}.activity-filter-grid label{display:block;margin-bottom:7px;font-size:13px;font-weight:600}
@media(max-width:900px){
 .dashboard-branch-grid-admin{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
 .dashboard-branch-grid-branch{grid-template-columns:minmax(0,1fr)}
 .dashboard-branch-grid-admin .dashboard-branch-card{padding:9px;border-radius:11px}
 .dashboard-branch-grid-admin .dashboard-branch-name{font-size:13px;margin-bottom:8px}
 .dashboard-branch-grid-admin .dashboard-branch-label{font-size:10px}
 .dashboard-branch-grid-admin .dashboard-branch-value{font-size:16px}
 .dashboard-branch-grid-admin .dashboard-stock-warning{margin-top:12px;padding-top:10px}
 .dashboard-branch-grid-admin .dashboard-stock-warning-item{padding:5px 4px;gap:2px}
 .dashboard-branch-grid-admin .dashboard-stock-warning-item strong{font-size:9px}
 .dashboard-branch-grid-admin .dashboard-stock-warning-item b{font-size:9px}
 .activity-row{grid-template-columns:150px 130px 130px minmax(220px,1fr)}
}
@media(max-width:600px){
 .dashboard-branch-grid-admin{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin:18px 0}
 .dashboard-branch-grid-branch{grid-template-columns:minmax(0,1fr);margin:18px 0}
 .dashboard-branch-grid-admin .dashboard-branch-card{padding:8px 6px}
 .dashboard-branch-grid-admin .dashboard-branch-name{font-size:12px;line-height:1.2}
 .dashboard-branch-grid-admin .dashboard-branch-value{font-size:14px}
 .dashboard-branch-grid-admin .dashboard-stock-warning-title{font-size:11px}
 .dashboard-branch-grid-admin .dashboard-stock-warning-item{padding:5px 4px}
 .dashboard-branch-grid-admin .dashboard-stock-warning-item strong,.dashboard-branch-grid-admin .dashboard-stock-warning-item b{font-size:8px}
 .dashboard-branch-grid-admin .dashboard-stock-warning-item small{font-size:8px}
 .dashboard-branch-grid-branch .dashboard-branch-card{padding:16px}
 .activity-filter-grid{grid-template-columns:1fr}.activity-row{min-width:680px}
}

/* Penyempurnaan dashboard & aktivitas */
.dashboard-activity-full .dashboard-box{width:100%;box-sizing:border-box}
.dashboard-activity-full .activity-head{display:grid;grid-template-columns:1fr auto;align-items:center;gap:18px;margin-bottom:18px}
.dashboard-activity-full .activity-head h2{font-size:22px;line-height:1.25;white-space:nowrap;margin:0}
.dashboard-activity-full .activity-head .btn{display:inline-flex;align-items:center;justify-content:center;min-width:105px;height:40px;padding:0 16px;background:#2563eb;color:#fff;border:1px solid #2563eb;border-radius:9px;text-decoration:none;font-weight:700;box-sizing:border-box}
.dashboard-activity-full .activity-head .btn:hover{background:#1d4ed8;border-color:#1d4ed8}
.dashboard-activity-full .activity-list{border:1px solid #edf0f4;border-radius:10px;overflow:hidden}
.dashboard-activity-full .activity-row{padding:12px 14px;margin:0}
.dashboard-activity-full .activity-row-head{border-radius:0;background:#f8fafc}
@media(max-width:600px){.dashboard-activity-full .activity-head{grid-template-columns:1fr}.dashboard-activity-full .activity-head h2{white-space:normal}.dashboard-activity-full .activity-head .btn{width:100%}}
.dashboard-branch-card-static{cursor:default}
.dashboard-branch-card-static:hover{transform:none;box-shadow:none}


/* =====================================================
   EXCEL / HEADER ACTIONS - PRODUK & PELANGGAN
   Semua tombol dibuat sama ukuran dengan Export Excel.
===================================================== */
.excel-actions,
.customer-excel-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:10px;
    flex-wrap:wrap;
}

.excel-actions .excel-action,
.excel-actions > a.btn,
.customer-excel-actions .excel-action,
.customer-excel-actions > a.btn,
.customer-excel-actions .excel-import-form{
    width:170px;
    min-width:170px;
    height:44px;
    min-height:44px;
    box-sizing:border-box;
}

.excel-actions .excel-action,
.customer-excel-actions .excel-action{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:0 20px;
    white-space:nowrap;
}

.excel-actions .excel-import-form,
.customer-excel-actions .excel-import-form{
    margin:0;
    padding:0;
}

.excel-actions .excel-hidden-input,
.customer-excel-actions .excel-hidden-input{
    display:none!important;
}

@media(max-width:700px){
    .excel-actions,
    .customer-excel-actions{
        width:100%;
        justify-content:flex-start;
    }

    .excel-actions .excel-action,
    .excel-actions > a.btn,
    .excel-actions .excel-import-form,
    .customer-excel-actions .excel-action,
    .customer-excel-actions > a.btn,
    .customer-excel-actions .excel-import-form{
        width:100%;
        min-width:0;
    }
}

/* Aktivitas: filter periode + custom date tanpa refresh halaman. */
.activity-filter-grid{display:grid;grid-template-columns:1.15fr .9fr 1.1fr;gap:14px;align-items:end;margin-bottom:20px}
.activity-filter-grid label{display:block;margin-bottom:7px;font-size:13px;font-weight:600}
.activity-custom-fields{grid-column:1 / -1;display:grid;grid-template-columns:1fr 1fr;gap:14px}
.activity-loading{display:none;margin:-8px 0 12px;font-size:12px;color:#697386}.activity-loading.show{display:block}
.activity-date-text{letter-spacing:.2px}
@media(max-width:700px){.activity-filter-grid{grid-template-columns:1fr}.activity-custom-fields{grid-column:auto;grid-template-columns:1fr}}


/* Pengaturan Umum - Teks Dasbor */
.general-settings-textarea{
    width:100%;
    min-height:110px;
    resize:vertical;
    box-sizing:border-box;
    font-family:inherit;
    line-height:1.5;
    padding:12px 14px;
}
.dashboard-welcome-text{
    margin:6px 0 0;
    white-space:normal;
}
.dashboard-stock-warning{margin-top:18px;padding-top:14px;border-top:1px solid #edf0f4;min-width:0}
.dashboard-stock-warning-title{font-size:13px;font-weight:800;color:#c2410c;margin-bottom:8px}
.dashboard-stock-warning-empty{font-size:13px;color:#697386}
.dashboard-stock-warning-list{display:flex;flex-direction:column;gap:6px;min-width:0}
.dashboard-stock-warning-item{display:flex;align-items:center;justify-content:space-between;gap:5px;min-width:0;padding:7px 8px;border-radius:8px;background:#fff7ed;color:#7c2d12;font-size:11px;line-height:1.25}
.dashboard-stock-item-name{display:block;flex:1;min-width:0;overflow-wrap:anywhere}
.dashboard-stock-warning-item strong{display:inline;color:#14213d;font-size:11px;font-weight:700;overflow-wrap:anywhere}
.dashboard-stock-warning-item small{display:block;color:#697386;margin-top:2px;font-size:10px;line-height:1.3;overflow-wrap:anywhere}
.dashboard-stock-warning-item b{flex:0 0 auto;white-space:nowrap;color:#c2410c;font-size:11px;font-weight:800}
.dashboard-branch-grid-admin .dashboard-stock-warning-item{padding:6px;gap:3px}
.dashboard-branch-grid-admin .dashboard-stock-warning-item strong{font-size:10px}
.dashboard-branch-grid-admin .dashboard-stock-warning-item b{font-size:10px}
.dashboard-branch-grid-admin .dashboard-branch-card{padding:12px}
.dashboard-branch-grid-admin .dashboard-branch-name{font-size:15px;margin-bottom:10px}
.dashboard-branch-grid-admin .dashboard-branch-value{font-size:20px}
.dashboard-branch-grid-admin .dashboard-stock-warning-title{font-size:12px}

/* ============================================================
   OPTIK MITRA - RESPONSIVE GLOBAL / FULL VIEW
   ------------------------------------------------------------
   HANYA TAMPILAN.
   Tidak mengubah PHP, JS, database, route, controller, model,
   atau alur aplikasi.

   Prinsip:
   - Semua halaman tetap 100% lebar viewport.
   - Tidak membuat halaman menjadi horizontal-scroll.
   - Tabel tetap terlihat seluruh kolom pada layar kecil dengan
     pengecilan font/padding dan wrapping.
   - Layout desktop dipertahankan semaksimal mungkin.
   - Portrait dan landscape memakai aturan yang sama.
   ============================================================ */

html,
body{
    width:100%;
    max-width:100%;
    min-width:0;
    overflow-x:hidden;
}

body,
.app-layout,
.app-content,
.page,
.container,
.content-box,
.content-body{
    min-width:0;
    max-width:100%;
}

.app-content{
    width:100%;
    max-width:100%;
    min-width:0;
    overflow-x:hidden;
}

.container{
    width:100%;
    max-width:1200px;
}

/* Semua tabel: jangan pernah memaksa lebar minimum */
.table-wrapper,
.inventory-table-wrap,
.category-table-wrap,
.report-table-wrap{
    width:100%;
    max-width:100%;
    min-width:0;
    overflow-x:visible;
}

table,
.data-table,
.inventory-table,
.lens-stock-table,
.category-table,
.orders-table,
.edit-nota-table,
.bk-sheet,
.finance-report-table,
.sales-report-table,
.stock-report-table,
.sales-table,
.credit-table{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    table-layout:fixed;
    border-collapse:collapse;
}

table th,
table td{
    min-width:0 !important;
    max-width:100%;
    overflow-wrap:anywhere;
    word-break:break-word;
    white-space:normal;
    box-sizing:border-box;
}

/* Elemen input/button tidak boleh membuat kolom melebar */
input,
select,
textarea,
button{
    max-width:100%;
    box-sizing:border-box;
}

/* Baris aktivitas juga harus selalu muat di viewport */
.activity-list{
    width:100%;
    max-width:100%;
    min-width:0;
    overflow-x:hidden !important;
}

.activity-row,
.activity-row-head{
    width:100%;
    min-width:0 !important;
    max-width:100%;
    box-sizing:border-box;
}

.activity-row{
    grid-template-columns:minmax(0,1.05fr) minmax(0,.9fr) minmax(0,.9fr) minmax(0,2fr);
}

.dashboard-activity-full .activity-list{
    overflow-x:hidden !important;
}

/* ============================================================
   TABLE DESKTOP
   ============================================================ */
.data-table th,
.data-table td{
    padding:12px 10px;
    font-size:13px;
}

.inventory-table th,
.inventory-table td{
    padding:12px 10px;
    font-size:13px;
}

.lens-stock-table th,
.lens-stock-table td{
    padding:9px 7px;
    font-size:12px;
}

.category-table th,
.category-table td{
    padding:11px 8px;
    font-size:13px;
}

.orders-table th,
.orders-table td,
.edit-nota-table th,
.edit-nota-table td,
.bk-sheet th,
.bk-sheet td,
.finance-report-table th,
.finance-report-table td,
.sales-report-table th,
.sales-report-table td,
.stock-report-table th,
.stock-report-table td,
.sales-table th,
.sales-table td,
.credit-table th,
.credit-table td{
    min-width:0 !important;
    padding:9px 7px;
    font-size:13px;
    overflow-wrap:anywhere;
    word-break:break-word;
}

/* Kolom nominal/angka tetap terbaca tanpa memaksa tabel melebar */
.amount,
.number,
.num{
    white-space:normal !important;
    overflow-wrap:anywhere;
}

/* ============================================================
   HEADER / FILTER / GRID
   ============================================================ */
.app-header{
    width:100%;
    max-width:100%;
    min-width:0;
}

.header-left,
.header-right,
.user-info,
.page-header,
.activity-head{
    min-width:0;
}

.header-left h2,
.user-detail strong,
.page-title,
.page-subtitle{
    max-width:100%;
    overflow-wrap:anywhere;
}

.dashboard-grid,
.dashboard-cards,
.branch-dashboard,
.dashboard-branch-grid,
.cards,
.report-summary,
.finance-summary{
    width:100%;
    max-width:100%;
    min-width:0;
}

.dashboard-branch-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
}

.dashboard-branch-card{
    min-width:0;
    max-width:100%;
}

.dashboard-branch-name,
.dashboard-branch-label,
.dashboard-branch-value{
    overflow-wrap:anywhere;
}

/* Form/grid tidak boleh membuat halaman melebar */
form,
.form-row,
.form-grid,
.filter-grid,
.finance-filter,
.inventory-filter,
.activity-filter-grid{
    max-width:100%;
    min-width:0;
}

.form-row > *,
.form-grid > *,
.filter-grid > *,
.finance-filter > *,
.inventory-filter > *,
.activity-filter-grid > *{
    min-width:0;
    max-width:100%;
}

/* ============================================================
   TABLE RESPONSIVE - PORTRAIT
   Semua kolom tetap ditampilkan, tanpa tombol geser.
   ============================================================ */
@media (max-width: 900px){
    .app-content{
        padding:18px;
    }

    .content-body{
        padding:18px;
    }

    .page-header{
        gap:12px;
    }

    .page-title{
        font-size:24px;
    }

    .dashboard-branch-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:12px;
    }

    .dashboard-branch-card{
        padding:14px;
    }

    .dashboard-branch-name{
        font-size:16px;
        margin-bottom:10px;
    }

    .dashboard-branch-value{
        font-size:21px;
    }

    .activity-row{
        grid-template-columns:minmax(0,.9fr) minmax(0,.8fr) minmax(0,.8fr) minmax(0,1.6fr);
        gap:6px;
        padding:9px 6px;
        font-size:11px;
    }

    .activity-row-head{
        font-size:11px;
        padding:8px 6px;
    }

    .data-table th,
    .data-table td,
    .inventory-table th,
    .inventory-table td{
        padding:8px 6px;
        font-size:11px;
    }

    .lens-stock-table th,
    .lens-stock-table td{
        padding:6px 3px;
        font-size:10px;
    }

    .orders-table th,
    .orders-table td,
    .edit-nota-table th,
    .edit-nota-table td,
    .bk-sheet th,
    .bk-sheet td,
    .finance-report-table th,
    .finance-report-table td,
    .sales-report-table th,
    .sales-report-table td,
    .stock-report-table th,
    .stock-report-table td,
    .sales-table th,
    .sales-table td,
    .credit-table th,
    .credit-table td{
        padding:7px 4px;
        font-size:10.5px;
    }

    .inventory-table-wrap,
    .table-wrapper,
    .activity-list{
        overflow-x:hidden !important;
    }
}

@media (max-width: 600px){
    html,
    body{
        font-size:13px;
    }

    .app-content{
        padding:12px;
    }

    .content-body{
        padding:12px;
    }

    .page-header{
        flex-wrap:wrap;
        align-items:flex-start;
        margin-bottom:16px;
    }

    .page-title{
        font-size:21px;
        line-height:1.2;
    }

    .page-subtitle{
        font-size:12px;
        line-height:1.4;
    }

    .app-header{
        height:62px;
        padding:0 10px;
    }

    .header-left{
        gap:6px;
    }

    .header-left h2{
        font-size:18px;
    }

    .menu-toggle{
        width:36px;
        height:36px;
        font-size:23px;
    }

    .header-right{
        gap:6px;
    }

    .user-info{
        gap:6px;
    }

    .user-avatar{
        width:34px;
        height:34px;
        font-size:14px;
    }

    .user-detail strong{
        font-size:11px;
    }

    .user-detail small{
        font-size:10px;
    }

    .logout-btn{
        padding:8px 9px;
        font-size:11px;
    }

    /* Jangan ubah menjadi 1 kolom: tetap seperti desktop,
       hanya diperkecil agar seluruh kartu tetap terlihat. */
    .dashboard-branch-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:6px;
        margin:14px 0;
    }

    .dashboard-branch-card{
        padding:9px 7px;
        border-radius:10px;
    }

    .dashboard-branch-name{
        font-size:13px;
        margin-bottom:7px;
    }

    .dashboard-branch-label{
        font-size:9px;
        margin-bottom:3px;
    }

    .dashboard-branch-value{
        font-size:15px;
    }

    .dashboard-grid{
        gap:10px;
    }

    .card{
        padding:11px;
        gap:9px;
    }

    .card-icon{
        width:40px;
        height:40px;
        font-size:20px;
        flex:0 0 40px;
    }

    .card-info h3{
        font-size:11px;
    }

    .card-info span{
        font-size:18px;
    }

    /* Semua tabel tetap satu tabel penuh */
    .data-table th,
    .data-table td,
    .inventory-table th,
    .inventory-table td,
    .category-table th,
    .category-table td{
        padding:6px 3px;
        font-size:9px;
        line-height:1.25;
    }

    .lens-stock-table th,
    .lens-stock-table td{
        padding:5px 2px;
        font-size:8px;
        line-height:1.2;
    }

    .orders-table th,
    .orders-table td,
    .edit-nota-table th,
    .edit-nota-table td,
    .bk-sheet th,
    .bk-sheet td,
    .finance-report-table th,
    .finance-report-table td,
    .sales-report-table th,
    .sales-report-table td,
    .stock-report-table th,
    .stock-report-table td,
    .sales-table th,
    .sales-table td,
    .credit-table th,
    .credit-table td{
        padding:5px 2px;
        font-size:8.5px;
        line-height:1.2;
    }

    .activity-row{
        grid-template-columns:minmax(0,.8fr) minmax(0,.75fr) minmax(0,.75fr) minmax(0,1.4fr);
        gap:3px;
        padding:7px 3px;
        font-size:8.5px;
    }

    .activity-row-head{
        padding:6px 3px;
        font-size:8.5px;
    }

    .activity-head{
        gap:7px;
    }

    .dashboard-activity-full .activity-head h2{
        font-size:18px;
    }

    .dashboard-activity-full .activity-head .btn{
        min-width:75px;
        height:34px;
        padding:0 8px;
        font-size:11px;
    }

    .inventory-table-wrap,
    .table-wrapper,
    .activity-list{
        width:100%;
        overflow-x:hidden !important;
    }

    /* Form dua/lebih kolom mengecil, bukan membuat halaman melebar */
    .form-row,
    .form-grid,
    .filter-grid{
        gap:7px;
    }

    .form-control,
    input,
    select,
    textarea{
        font-size:12px;
    }

    .btn{
        font-size:12px;
    }

    
}

/* ============================================================
   HP SANGAT KECIL
   ============================================================ */
@media (max-width: 380px){
    .app-content{
        padding:8px;
    }

    .content-body{
        padding:9px;
    }

    .app-header{
        padding:0 7px;
    }

    .header-left h2{
        font-size:16px;
    }

    .user-detail{
        display:none;
    }

    .logout-btn{
        padding:7px 8px;
        font-size:10px;
    }

    .dashboard-branch-grid{
        gap:4px;
    }

    .dashboard-branch-card{
        padding:7px 4px;
    }

    .dashboard-branch-name{
        font-size:11px;
    }

    .dashboard-branch-label{
        font-size:8px;
    }

    .dashboard-branch-value{
        font-size:13px;
    }

    .data-table th,
    .data-table td,
    .inventory-table th,
    .inventory-table td,
    .category-table th,
    .category-table td{
        padding:4px 2px;
        font-size:8px;
    }

    .lens-stock-table th,
    .lens-stock-table td{
        padding:4px 1px;
        font-size:7px;
    }

    .orders-table th,
    .orders-table td,
    .edit-nota-table th,
    .edit-nota-table td,
    .bk-sheet th,
    .bk-sheet td,
    .finance-report-table th,
    .finance-report-table td,
    .sales-report-table th,
    .sales-report-table td,
    .stock-report-table th,
    .stock-report-table td,
    .sales-table th,
    .sales-table td,
    .credit-table th,
    .credit-table td{
        padding:4px 1px;
        font-size:7.5px;
    }

    .activity-row,
    .activity-row-head{
        font-size:7.5px;
    }
}

/* ============================================================
   HP LANDSCAPE
   Lebar tetap penuh; tidak ada horizontal scroll.
   ============================================================ */
@media (max-width: 900px) and (orientation: landscape){
    .app-content{
        padding:10px 14px;
    }

    .content-body{
        padding:12px;
    }

    .app-header{
        height:58px;
        padding:0 12px;
    }

    .dashboard-branch-grid{
        grid-template-columns:repeat(3,minmax(0,1fr));
        gap:9px;
    }

    .dashboard-branch-card{
        padding:10px;
    }

    .dashboard-grid{
        grid-template-columns:repeat(2,minmax(0,1fr));
        gap:10px;
    }

    .data-table th,
    .data-table td,
    .inventory-table th,
    .inventory-table td,
    .category-table th,
    .category-table td{
        padding:6px 4px;
        font-size:9px;
    }

    .lens-stock-table th,
    .lens-stock-table td{
        padding:5px 2px;
        font-size:8px;
    }

    .orders-table th,
    .orders-table td,
    .edit-nota-table th,
    .edit-nota-table td,
    .bk-sheet th,
    .bk-sheet td,
    .finance-report-table th,
    .finance-report-table td,
    .sales-report-table th,
    .sales-report-table td,
    .stock-report-table th,
    .stock-report-table td,
    .sales-table th,
    .sales-table td,
    .credit-table th,
    .credit-table td{
        padding:5px 3px;
        font-size:8.5px;
    }

    .activity-row{
        grid-template-columns:minmax(0,.9fr) minmax(0,.8fr) minmax(0,.8fr) minmax(0,1.7fr);
        font-size:8.5px;
    }
}

/* =====================================================
   AUTH + GLOBAL TEXT POLISH
   Visual only: no application logic changes.
===================================================== */

/* Blue text is intentionally removed from textual elements.
   Blue backgrounds/buttons remain unchanged. */
.logo h1{
    color:#20242b;
}

.auth-links{
    margin-top:14px;
    text-align:center;
}

.auth-links a,
.auth-footer a{
    color:#20242b !important;
}

.auth-links a:hover,
.auth-footer a:hover{
    color:#000 !important;
}

/* Google sign-in button: clean standard white Google style. */
.btn-google{
    display:flex !important;
    align-items:center;
    justify-content:center;
    gap:10px;
    width:100%;
    height:48px;
    margin-top:10px;
    padding:0 16px;
    background:#fff !important;
    color:#202124 !important;
    border:1px solid #dadce0 !important;
    border-radius:6px;
    box-shadow:0 1px 2px rgba(60,64,67,.18);
    text-decoration:none !important;
    font-family:Arial,Helvetica,sans-serif;
    font-size:15px;
    font-weight:600;
    line-height:1;
    transition:background .15s ease, box-shadow .15s ease;
}

.btn-google:hover{
    background:#fff !important;
    color:#202124 !important;
    box-shadow:0 1px 3px rgba(60,64,67,.28);
}

.btn-google:focus{
    outline:none;
    color:#202124 !important;
    box-shadow:0 0 0 3px rgba(32,33,36,.12);
}

.btn-google .google-logo{
    display:block;
    width:20px;
    height:20px;
    flex:0 0 20px;
}

/* Google/reset sections use the exact same typography rhythm
   as the other Pengaturan Umum fields. */
.general-settings-auth-section{
    margin-top:28px !important;
    padding-top:24px !important;
    border-top:1px solid #e3e7ee !important;
}

.general-settings-auth-section h3{
    margin:0 0 6px !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:20px !important;
    line-height:1.3 !important;
    font-weight:700 !important;
    color:#1e293b !important;
}

.general-settings-auth-section p{
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:14px !important;
    line-height:1.5 !important;
    color:#64748b !important;
}

.general-settings-auth-section .general-settings-label{
    display:block;
    margin:0 0 8px !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:14px !important;
    line-height:1.4 !important;
    font-weight:600 !important;
    color:#334155 !important;
}

.general-settings-auth-section .general-settings-file{
    width:100%;
    min-height:46px;
    padding:9px 12px;
    border:1px solid #dbe2ea;
    border-radius:10px;
    background:#fff;
    font-family:Arial,Helvetica,sans-serif;
    font-size:14px;
    line-height:1.4;
    color:#334155;
    box-sizing:border-box;
}

.general-settings-auth-section .general-settings-file:focus{
    outline:none;
    border-color:#94a3b8;
    box-shadow:0 0 0 3px rgba(71,85,105,.10);
}

.general-settings-auth-section input[type="checkbox"]{
    accent-color:#20242b;
}

.general-settings-auth-section > div[style*="display:grid"]{
    grid-template-columns:2fr 1fr !important;
    gap:16px !important;
}

@media(max-width:700px){
    .general-settings-auth-section{
        margin-top:22px !important;
        padding-top:20px !important;
    }

    .general-settings-auth-section h3{
        font-size:20px !important;
    }

    .general-settings-auth-section p,
    .general-settings-auth-section .general-settings-label,
    .general-settings-auth-section .general-settings-file{
        font-size:14px !important;
    }

    .general-settings-auth-section > div[style*="display:grid"]{
        grid-template-columns:1fr !important;
        gap:0 !important;
    }
}

/* Existing textual blue declarations are neutralized while
   blue action backgrounds/buttons remain blue. */
.auth-footer,
.auth-links,
.auth-footer *,
.auth-links *{
    color:#20242b !important;
}

.customer-form-actions .btn-secondary{
    color:#20242b !important;
}



.editable-stock-cell:hover,
.lens-editable-cell:hover,
.category-edit-link,
.category-edit-link:hover{
    color:#20242b !important;
}

/* Inline blue text used by older views. */
[style*="color:#2563eb"],
[style*="color: #2563eb"],
[style*="color:#1d4ed8"],
[style*="color: #1d4ed8"]{
    color:#20242b !important;
}



/* =====================================================
   FINAL VISUAL POLISH — GOOGLE LOGIN & GENERAL SETTINGS
   Display-only changes. No application logic/database changes.
===================================================== */

/* Keep Google sign-in compact and close to Google's standard button. */
.login-box .btn-google{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:10px !important;
    width:100% !important;
    height:48px !important;
    min-height:48px !important;
    max-height:48px !important;
    margin:10px 0 0 !important;
    padding:0 16px !important;
    box-sizing:border-box !important;
    background:#fff !important;
    color:#202124 !important;
    border:1px solid #dadce0 !important;
    border-radius:6px !important;
    text-decoration:none !important;
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:15px !important;
    font-weight:600 !important;
    line-height:1 !important;
    box-shadow:0 1px 2px rgba(60,64,67,.18) !important;
}

.login-box .btn-google .google-logo,
.login-box .btn-google img.google-logo{
    display:block !important;
    width:20px !important;
    height:20px !important;
    min-width:20px !important;
    max-width:20px !important;
    min-height:20px !important;
    max-height:20px !important;
    flex:0 0 20px !important;
    object-fit:contain !important;
}

.login-box .btn-google span{
    color:#202124 !important;
    font-size:15px !important;
    font-weight:600 !important;
    line-height:1 !important;
}

.login-box .auth-links{
    margin-top:14px !important;
    text-align:center !important;
}

.login-box .auth-links a,
.login-box .auth-links a:visited,
.login-box .auth-links a:hover,
.login-box .auth-links a:active{
    color:#202124 !important;
    font-size:14px !important;
    font-weight:400 !important;
    text-decoration:underline !important;
}

.login-box .auth-footer,
.login-box .auth-footer *{
    color:#666 !important;
    font-size:14px !important;
}

.login-box .auth-footer a,
.login-box .auth-footer a:visited,
.login-box .auth-footer a:hover,
.login-box .auth-footer a:active{
    color:#202124 !important;
    font-weight:600 !important;
}

/* Match Google/Forgot Password settings typography to the existing
   normal General Settings field typography. Only the auth section is affected. */
.general-settings-auth-section p{
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:13px !important;
    line-height:1.5 !important;
    color:#697386 !important;
    margin-bottom:18px !important;
}

.general-settings-auth-section .general-settings-label{
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:14px !important;
    line-height:1.4 !important;
    font-weight:600 !important;
    color:#334155 !important;
}

.general-settings-auth-section label:not(.general-settings-label){
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:14px !important;
    line-height:1.4 !important;
    color:#333 !important;
}

.general-settings-auth-section .general-settings-file{
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:14px !important;
    line-height:1.4 !important;
    color:#334155 !important;
}

.general-settings-auth-section h3{
    font-family:Arial,Helvetica,sans-serif !important;
    font-size:20px !important;
    line-height:1.3 !important;
    font-weight:700 !important;
    color:#1e293b !important;
}

.general-settings-auth-section input[type="checkbox"]{
    width:13px !important;
    height:13px !important;
    margin:0 !important;
    accent-color:#2563eb !important;
}



/* ============================================================
   RESPONSIVE TABLE / MOBILE POLISH — MATCH DESKTOP DESIGN
   Goal:
   - PC keeps the existing layout.
   - Mobile portrait keeps the same columns and information,
     but scales typography, padding and column proportions so
     the complete table fits the viewport.
   - NO horizontal scrolling.
   - NEVER break words into individual letters.
   - Category hides only the desktop-only Description column
     because the reference mobile design has 4 columns.
   ============================================================ */

html, body{
    overflow-x:hidden !important;
}

.app-content{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-x:hidden !important;
    box-sizing:border-box !important;
}

/* All table wrappers must fit the page. */
.table-wrapper,
.inventory-table-wrap,
.category-table-wrap,
.report-table-wrap,
.finance-report-table-wrap,
.sales-report-table-wrap,
.stock-report-table-wrap,
.edit-nota-table-wrap,
.credit-table-wrap,
.sales-table-wrap,
.orders-table-wrap,
.bk-sheet-wrap,
.lens-inventory-table-wrap{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    overflow-x:hidden !important;
    overflow-y:visible !important;
    box-sizing:border-box !important;
}

/* Base: tables occupy the available card width. */
.data-table,
.inventory-table,
.lens-stock-table,
.category-table,
.orders-table,
.edit-nota-table,
.bk-sheet,
.finance-report-table,
.sales-report-table,
.stock-report-table,
.sales-table,
.credit-table,
.lens-table{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    table-layout:fixed !important;
    border-collapse:collapse !important;
    box-sizing:border-box !important;
}

/* Never force a table to scroll. Text wraps by words only. */
.data-table th,
.data-table td,
.inventory-table th,
.inventory-table td,
.lens-stock-table th,
.lens-stock-table td,
.category-table th,
.category-table td,
.orders-table th,
.orders-table td,
.edit-nota-table th,
.edit-nota-table td,
.bk-sheet th,
.bk-sheet td,
.finance-report-table th,
.finance-report-table td,
.sales-report-table th,
.sales-report-table td,
.stock-report-table th,
.stock-report-table td,
.sales-table th,
.sales-table td,
.credit-table th,
.credit-table td,
.lens-table th,
.lens-table td{
    min-width:0 !important;
    max-width:none !important;
    box-sizing:border-box !important;
    white-space:normal !important;
    word-break:normal !important;
    overflow-wrap:break-word !important;
    hyphens:none !important;
}

/* Desktop remains essentially unchanged. */
.category-table th,
.category-table td{
    padding:11px 8px !important;
    font-size:13px !important;
    line-height:1.35 !important;
}

.category-table td:first-child,
.category-table td:nth-child(4),
.category-table td:nth-child(5){
    white-space:nowrap !important;
}

.stock-report-table th,
.stock-report-table td,
.finance-report-table th,
.finance-report-table td,
.sales-report-table th,
.sales-report-table td,
.orders-table th,
.orders-table td,
.edit-nota-table th,
.edit-nota-table td,
.bk-sheet th,
.bk-sheet td,
.sales-table th,
.sales-table td,
.credit-table th,
.credit-table td{
    padding:9px 7px !important;
    font-size:13px !important;
    line-height:1.3 !important;
}

.stock-report-table .number,
.finance-report-table .number,
.sales-report-table .number,
.sales-table .number,
.credit-table .number{
    white-space:nowrap !important;
    overflow-wrap:normal !important;
}

/* ============================================================
   MOBILE PORTRAIT
   ============================================================ */
@media (max-width:700px){

    .app-content{
        padding:12px !important;
    }

    .content-box{
        width:100% !important;
        max-width:100% !important;
        box-sizing:border-box !important;
    }

    .content-body{
        width:100% !important;
        max-width:100% !important;
        box-sizing:border-box !important;
    }

    /* Header stays proportional to the reference. */
    .app-header{
        width:100% !important;
        box-sizing:border-box !important;
    }

    .page-title,
    .stock-report-header h1,
    .reports-page-header h1{
        font-size:21px !important;
        line-height:1.2 !important;
    }

    .page-subtitle,
    .stock-report-header p,
    .reports-page-header p{
        font-size:12px !important;
        line-height:1.4 !important;
    }

    /* ========================================================
       CATEGORY — reference mobile: No | Nama | Status | Aksi
       Description is omitted because it is not useful in the
       compact mobile presentation.
       ======================================================== */
    .category-table th,
    .category-table td{
        padding:9px 5px !important;
        font-size:11px !important;
        line-height:1.25 !important;
        vertical-align:middle !important;
    }

    .category-table th:nth-child(3),
    .category-table td:nth-child(3){
        display:none !important;
    }

    .category-table th:first-child,
    .category-table td:first-child{ width:10% !important; }

    .category-table th:nth-child(2),
    .category-table td:nth-child(2){ width:54% !important; }

    .category-table th:nth-child(4),
    .category-table td:nth-child(4){ width:18% !important; }

    .category-table th:nth-child(5),
    .category-table td:nth-child(5){ width:18% !important; }

    .category-table td:nth-child(2){
        font-size:11px !important;
        font-weight:600;
    }

    .category-table td:nth-child(4){
        text-align:center !important;
    }

    .category-table td:nth-child(5){
        text-align:center !important;
    }

    /* Keep category action compact instead of full-width. */
    .category-table td:nth-child(5) a{
        font-size:10px !important;
        white-space:nowrap !important;
    }

    .category-table td:nth-child(5) form{
        display:inline !important;
    }

    .category-table td:nth-child(5) svg{
        width:15px !important;
        height:15px !important;
    }

    .category-add-btn{
        max-width:100% !important;
    }

    /* ========================================================
       STANDARD TABLES
       ======================================================== */
    .data-table th,
    .data-table td,
    .inventory-table th,
    .inventory-table td{
        padding:7px 4px !important;
        font-size:10px !important;
        line-height:1.25 !important;
    }

    .orders-table th,
    .orders-table td,
    .edit-nota-table th,
    .edit-nota-table td,
    .bk-sheet th,
    .bk-sheet td,
    .finance-report-table th,
    .finance-report-table td,
    .sales-report-table th,
    .sales-report-table td,
    .stock-report-table th,
    .stock-report-table td,
    .sales-table th,
    .sales-table td,
    .credit-table th,
    .credit-table td{
        padding:6px 3px !important;
        font-size:9px !important;
        line-height:1.22 !important;
    }

    /* ========================================================
       LAPORAN BARANG — all 8 columns remain visible.
       Proportions are deliberately compact like the reference.
       ======================================================== */
    .stock-report-table:not(.lens-table) th:first-child,
    .stock-report-table:not(.lens-table) td:first-child{
        width:6% !important;
    }

    .stock-report-table:not(.lens-table) th:nth-child(2),
    .stock-report-table:not(.lens-table) td:nth-child(2){
        width:24% !important;
        text-align:left !important;
    }

    .stock-report-table:not(.lens-table) th:nth-child(n/**/+3),
    .stock-report-table:not(.lens-table) td:nth-child(n/**/+3){
        width:11.666% !important;
        text-align:center !important;
    }

    .stock-report-table:not(.lens-table) th{
        font-size:8.5px !important;
        line-height:1.15 !important;
        white-space:normal !important;
        padding:7px 2px !important;
    }

    .stock-report-table:not(.lens-table) td{
        font-size:9px !important;
        padding:8px 2px !important;
    }

    /* Summary line matches the compact mobile reference. */
    .stock-report-summary{
        gap:5px !important;
        margin-bottom:10px !important;
    }

    .stock-report-summary h2{
        font-size:16px !important;
    }

    .stock-report-summary span{
        font-size:9px !important;
        line-height:1.25 !important;
    }

    .stock-report-card-title{
        padding:11px 12px !important;
        font-size:13px !important;
    }

    /* Report filters stack exactly like the supplied mobile sketch. */
    .stock-report-filter-grid{
        grid-template-columns:1fr !important;
        gap:9px !important;
    }

    .stock-report-filter{
        padding:10px !important;
    }

    .stock-report-field label{
        font-size:10px !important;
        margin-bottom:4px !important;
    }

    .stock-report-field input,
    .stock-report-field select,
    .stock-report-button{
        min-height:36px !important;
        height:36px !important;
        font-size:11px !important;
        box-sizing:border-box !important;
    }

    .stock-report-button{
        width:100% !important;
    }

    /* ========================================================
       LENS / WIDE TABLES
       These have more columns, so use smaller but still readable
       typography rather than introducing horizontal scrolling.
       ======================================================== */
    .lens-table th,
    .lens-table td,
    .lens-stock-table th,
    .lens-stock-table td{
        padding:4px 2px !important;
        font-size:7.5px !important;
        line-height:1.12 !important;
    }

    .lens-table .lens-product-name{
        padding:5px 3px !important;
        font-size:7.5px !important;
        line-height:1.15 !important;
        overflow-wrap:break-word !important;
    }

    /* Numeric columns stay compact and centered. */
    .lens-table td:not(.lens-product-name),
    .lens-table th{
        text-align:center !important;
    }

    /* ========================================================
       ACTIVITY / GRID LISTS
       Same responsive philosophy: fit, don't scroll.
       ======================================================== */
    .activity-list{
        width:100% !important;
        max-width:100% !important;
        overflow-x:hidden !important;
    }

    .activity-row,
    .activity-row-head{
        width:100% !important;
        min-width:0 !important;
        max-width:100% !important;
        box-sizing:border-box !important;
    }

    /* ========================================================
       REPORT CARDS / GENERAL SPACING
       ======================================================== */
    .finance-report-card,
    .sales-report-card,
    .stock-report-card,
    .bk-report-card{
        max-width:100% !important;
        overflow:hidden !important;
        box-sizing:border-box !important;
    }
}

/* Extra compact portrait widths (small phones). */
@media (max-width:380px){

    .app-content{
        padding:9px !important;
    }

    .content-body{
        padding:9px !important;
    }

    .category-table th,
    .category-table td{
        padding:7px 3px !important;
        font-size:10px !important;
    }

    .category-table td:nth-child(5) a{
        font-size:9px !important;
    }

    .category-table td:nth-child(5) svg{
        width:14px !important;
        height:14px !important;
    }

    .data-table th,
    .data-table td,
    .inventory-table th,
    .inventory-table td{
        padding:6px 2px !important;
        font-size:9px !important;
    }

    .orders-table th,
    .orders-table td,
    .edit-nota-table th,
    .edit-nota-table td,
    .bk-sheet th,
    .bk-sheet td,
    .finance-report-table th,
    .finance-report-table td,
    .sales-report-table th,
    .sales-report-table td,
    .stock-report-table th,
    .stock-report-table td,
    .sales-table th,
    .sales-table td,
    .credit-table th,
    .credit-table td{
        padding:5px 2px !important;
        font-size:8px !important;
    }

    .stock-report-table:not(.lens-table) th{
        font-size:7.8px !important;
    }

    .stock-report-table:not(.lens-table) td{
        font-size:8.2px !important;
    }
}

/* HP landscape uses the same fit-to-width principle. */
@media (max-width:900px) and (orientation:landscape){

    .table-wrapper,
    .inventory-table-wrap,
    .category-table-wrap,
    .report-table-wrap,
    .finance-report-table-wrap,
    .sales-report-table-wrap,
    .stock-report-table-wrap,
    .edit-nota-table-wrap,
    .credit-table-wrap,
    .sales-table-wrap,
    .orders-table-wrap,
    .bk-sheet-wrap,
    .lens-inventory-table-wrap{
        overflow-x:hidden !important;
    }

    .category-table th,
    .category-table td{
        padding:7px 4px !important;
        font-size:10px !important;
    }

    .stock-report-table th,
    .stock-report-table td,
    .finance-report-table th,
    .finance-report-table td,
    .sales-report-table th,
    .sales-report-table td,
    .orders-table th,
    .orders-table td,
    .edit-nota-table th,
    .edit-nota-table td,
    .bk-sheet th,
    .bk-sheet td,
    .sales-table th,
    .sales-table td,
    .credit-table th,
    .credit-table td{
        padding:6px 3px !important;
        font-size:9px !important;
    }
}



/* ============================================================
   FINAL MOBILE/RESPONSIVE POLISH - OPTIK MITRA
   Fokus: fit-to-width tanpa horizontal scroll, tetap terbaca.
   ============================================================ */

/* Sidebar HP: panel tetap bisa digeser sampai menu paling bawah. */
.app-sidebar{
    max-height:100vh;
    max-height:100dvh;
    overflow-y:auto;
    overflow-x:hidden;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
}
.sidebar-menu{
    flex:0 0 auto;
    padding-bottom:28px;
}

/* TRANSAKSI: semua kolom terlihat, nomor tidak menempel ke tepi. */
.sales-table-card{overflow:hidden !important;}
.sales-table{
    min-width:0 !important;
    width:100% !important;
    table-layout:fixed !important;
}
.sales-table th:first-child,
.sales-table td:first-child{width:11% !important;text-align:left !important;padding-left:12px !important;padding-right:8px !important;}
.sales-table th:nth-child(2),
.sales-table td:nth-child(2){width:57% !important;padding-left:10px !important;padding-right:14px !important;}
.sales-table th:nth-child(3),
.sales-table td:nth-child(3){width:32% !important;padding-left:12px !important;padding-right:12px !important;}
.sales-product-name{padding-right:8px;}
.sales-product-category{margin-top:4px;}

/* PRODUK: versi HP mengikuti sketsa: No | Nama+Kategori | Harga. */
.products-name-category{display:none;}
@media(max-width:700px){
    .sales-table thead th,
    .sales-table tbody td{padding-top:8px !important;padding-bottom:8px !important;}

    .data-table:not(.category-table) th,
    .data-table:not(.category-table) td{overflow-wrap:break-word;}

    .product-table{} /* hook bila diperlukan oleh tema */

    /* Produk index memakai .data-table. */
    .products-page .data-table th:nth-child(2),
    .products-page .data-table td:nth-child(2){display:none !important;}
    .products-page .data-table th:nth-child(5),
    .products-page .data-table td:nth-child(5),
    .products-page .data-table th:nth-child(6),
    .products-page .data-table td:nth-child(6){display:none !important;}
    .products-page .data-table th:first-child,
    .products-page .data-table td:first-child{width:11% !important;padding-left:10px !important;padding-right:6px !important;}
    .products-page .data-table th:nth-child(3),
    .products-page .data-table td:nth-child(3){width:57% !important;padding-left:10px !important;padding-right:10px !important;}
    .products-page .data-table th:nth-child(4),
    .products-page .data-table td:nth-child(4){width:32% !important;padding-left:10px !important;padding-right:10px !important;}
    .products-page .products-name-main{display:block;font-weight:600;color:#1e293b;line-height:1.25;}
    .products-page .products-name-category{display:block;margin-top:3px;font-size:9px;color:#64748b;font-weight:400;line-height:1.2;}
    .products-page .data-table td:nth-child(4){white-space:nowrap !important;}

    /* PELANGGAN: No | Nama + nomor HP | Transaksi | Poin | Aksi. */
    .customers-page .data-table th:nth-child(1),
    .customers-page .data-table td:nth-child(1){width:8% !important;padding-left:9px !important;padding-right:5px !important;}
    .customers-page .data-table th:nth-child(2),
    .customers-page .data-table td:nth-child(2){width:34% !important;}
    .customers-page .data-table th:nth-child(3),
    .customers-page .data-table td:nth-child(3){display:table-cell !important;width:20% !important;text-align:center !important;}
    .customers-page .data-table th:nth-child(4),
    .customers-page .data-table td:nth-child(4){width:12% !important;text-align:center !important;}
    .customers-page .data-table th:nth-child(5),
    .customers-page .data-table td:nth-child(5){display:table-cell !important;width:26% !important;}

    .customer-name-cell{vertical-align:middle !important;}
    .customer-name-main{display:block;font-weight:600;color:#1e293b;line-height:1.25;}
    .customer-name-phone{display:block;margin-top:3px;font-size:9px;color:#64748b;font-weight:400;line-height:1.2;white-space:nowrap;}
    .customer-phone-cell{display:none !important;}
    .customer-actions{justify-content:center !important;gap:5px !important;flex-wrap:nowrap !important;}
    .customer-actions .btn{width:30px !important;min-width:30px !important;height:30px !important;padding:0 !important;font-size:0 !important;border-radius:7px !important;}
    .customer-actions .btn::before{font-size:15px;line-height:1;}
    .customer-actions .customer-edit-button::before{content:"";}
    .customer-actions .customer-save-button::before{content:"✓" !important;font-weight:700;}
    .customer-actions .customer-delete-button::before{content:"🗑";font-size:13px;}

    /* EDIT NOTA: tombol tidak lagi raksasa di HP. */
    .edit-nota-page .edit-nota-card{padding:10px !important;border-radius:12px !important;}
    .edit-nota-page .edit-nota-table-wrap{overflow:hidden !important;}
    .edit-nota-page .edit-nota-table{min-width:0 !important;width:100% !important;table-layout:fixed !important;}
    .edit-nota-page .edit-nota-table th,
    .edit-nota-page .edit-nota-table td{padding:8px 5px !important;font-size:9px !important;line-height:1.2 !important;}
    .edit-nota-page .edit-nota-table th:nth-child(1),
    .edit-nota-page .edit-nota-table td:nth-child(1){width:18% !important;}
    .edit-nota-page .edit-nota-table th:nth-child(2),
    .edit-nota-page .edit-nota-table td:nth-child(2){width:24% !important;}
    .edit-nota-page .edit-nota-table th:nth-child(3),
    .edit-nota-page .edit-nota-table td:nth-child(3){width:32% !important;}
    .edit-nota-page .edit-nota-table th:nth-child(4),
    .edit-nota-page .edit-nota-table td:nth-child(4){width:26% !important;}
    .edit-nota-page .edit-nota-view,
    .edit-nota-page .edit-nota-action{height:34px !important;width:42px !important;min-width:42px !important;padding:0 !important;border-radius:8px !important;font-size:0 !important;}
    .edit-nota-page .edit-nota-header h1{font-size:22px !important;}
    .edit-nota-page .edit-nota-header p{font-size:11px !important;}

    /* PESANAN: tabel tetap 6 kolom dan sejajar di HP. */
    .orders-table-wrap{overflow:hidden !important;}
    .orders-table{
        display:table !important;
        width:100% !important;
        min-width:0 !important;
        table-layout:fixed !important;
        border-collapse:collapse !important;
    }
    .orders-table thead{display:table-header-group !important;}
    .orders-table thead tr{display:table-row !important;}
    .orders-table thead th{
        display:table-cell !important;
        padding:7px 2px !important;
        font-size:7.5px !important;
        line-height:1.15 !important;
        text-align:center !important;
        white-space:normal !important;
        vertical-align:middle !important;
    }
    .orders-table tbody{display:table-row-group !important;width:100% !important;}
    .orders-table tbody tr{
        display:table-row !important;
        width:100% !important;
        margin:0 !important;
        padding:0 !important;
        border:0 !important;
        border-radius:0 !important;
        background:#fff !important;
    }
    .orders-table tbody td{
        display:table-cell !important;
        width:auto !important;
        min-width:0 !important;
        padding:9px 2px !important;
        border:0 !important;
        border-bottom:1px solid #e6edf4 !important;
        font-size:7.8px !important;
        line-height:1.3 !important;
        vertical-align:top !important;
        overflow:visible !important;
        word-break:normal !important;
        overflow-wrap:normal !important;
        white-space:normal !important;
    }
    .orders-table tbody tr:last-child td{border-bottom:0 !important;}
    .orders-table-admin-branch th:nth-child(1),
    .orders-table-admin-branch td:nth-child(1){width:16% !important;}
    .orders-table-admin-branch th:nth-child(2),
    .orders-table-admin-branch td:nth-child(2){width:16% !important;}
    .orders-table-admin-branch th:nth-child(3),
    .orders-table-admin-branch td:nth-child(3){width:35% !important;}
    .orders-table-admin-branch th:nth-child(4),
    .orders-table-admin-branch td:nth-child(4){width:10% !important;}
    .orders-table-admin-branch th:nth-child(5),
    .orders-table-admin-branch td:nth-child(5){width:10% !important;}
    .orders-table-admin-branch th:nth-child(6),
    .orders-table-admin-branch td:nth-child(6){width:13% !important;}
    .orders-table-admin th:nth-child(1),
    .orders-table-admin td:nth-child(1){width:17% !important;}
    .orders-table-admin th:nth-child(2),
    .orders-table-admin td:nth-child(2){width:17% !important;}
    .orders-table-admin th:nth-child(3),
    .orders-table-admin td:nth-child(3){width:39% !important;}
    .orders-table-admin th:nth-child(4),
    .orders-table-admin td:nth-child(4){width:12% !important;}
    .orders-table-admin th:nth-child(5),
    .orders-table-admin td:nth-child(5){width:15% !important;}
    .orders-table-user th:nth-child(1),
    .orders-table-user td:nth-child(1){width:18% !important;}
    .orders-table-user th:nth-child(2),
    .orders-table-user td:nth-child(2){width:18% !important;}
    .orders-table-user th:nth-child(3),
    .orders-table-user td:nth-child(3){width:44% !important;}
    .orders-table-user th:nth-child(4),
    .orders-table-user td:nth-child(4){width:20% !important;}
    .orders-table .orders-date-cell{white-space:normal !important;word-break:normal !important;overflow-wrap:normal !important;text-align:left !important;}
    .orders-table .orders-product-cell{text-align:left !important;}
    .orders-table .orders-product-cell strong{display:block !important;font-size:8px !important;line-height:1.25 !important;white-space:normal !important;word-break:normal !important;overflow-wrap:normal !important;}
    .orders-table .orders-lens-power{margin-top:3px !important;font-size:7.6px !important;line-height:1.42 !important;white-space:normal !important;word-break:normal !important;overflow-wrap:normal !important;}
    .orders-table .orders-admin-note-cell,.orders-table .orders-branch-cell,.orders-table .orders-status-cell{text-align:center !important;}
    .orders-table .orders-admin-note-display{min-height:0 !important;padding:0 !important;border:0 !important;background:transparent !important;display:block !important;font-size:7.5px !important;line-height:1.25 !important;white-space:normal !important;}
    .orders-table .orders-status{font-size:7.5px !important;padding:5px 5px !important;border-radius:7px !important;white-space:nowrap !important;}
    .orders-table .order-complete-form{margin:0 !important;}

    /* Sidebar touch scroll lebih nyaman. */
    .app-sidebar{touch-action:pan-y;}
}

/* Produk/customer desktop tetap mengikuti desktop, hanya dirapikan spacing. */
@media(min-width:701px){
    .customer-phone-cell{display:none !important;}
    .customer-name-cell{padding-right:22px !important;}
    .customer-name-main{display:block;font-weight:600;color:#1e293b;}
    .customer-name-phone{display:block;margin-top:3px;font-size:12px;color:#64748b;font-weight:400;}
    .customer-actions{justify-content:center !important;gap:8px !important;}
    .customer-actions .btn{font-size:0 !important;width:36px !important;min-width:36px !important;height:34px !important;padding:0 !important;border-radius:8px !important;}
    .customer-actions .customer-edit-button::before{content:"";font-size:16px;}
    .customer-actions .customer-save-button::before{content:"✓" !important;font-size:16px;font-weight:700;}
    .customer-actions .customer-delete-button::before{content:"🗑";font-size:14px;}
}


/* FINAL BACK BUTTON: thick, compact, bright-blue block arrow on every page. */

.branch-access-back-button{
    background:transparent !important;
    border:0 !important;
    border-radius:0 !important;
    box-shadow:none !important;
    padding:0 !important;
    font-size:0 !important;
    line-height:0 !important;
    text-decoration:none !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    width:42px !important;
    height:32px !important;
    min-width:42px !important;
    min-height:32px !important;
}

.branch-access-back-button:hover{
    transform:none !important;
    filter:none !important;
    background:transparent !important;
}
@media(max-width:600px){
    .branch-access-back-button{
        width:42px !important;
        height:32px !important;
        min-width:42px !important;
        min-height:32px !important;
    }
    
}


/* =====================================================
   PELANGGAN - FINAL EDIT INLINE
   ===================================================== */
.customer-inline-edit-fields{
    display:flex;
    align-items:center;
    gap:6px;
    width:100%;
}
.customer-inline-edit-fields .customer-inline-input{
    box-sizing:border-box;
    height:34px;
    min-width:0;
    padding:6px 9px;
    border:1px solid #cbd5e1;
    border-radius:7px;
    background:#fff;
    color:#1e293b;
    font:inherit;
    font-size:13px;
    outline:none;
}
.customer-inline-edit-fields .customer-inline-name{flex:1 1 auto;}
.customer-inline-edit-fields .customer-inline-phone-visible{flex:0 1 150px;}
.customer-inline-edit-fields .customer-inline-input:focus{
    border-color:#2563eb;
    box-shadow:0 0 0 2px rgba(37,99,235,.12);
}
.customer-actions .customer-save-button::before{
    content:"✓" !important;
    font-size:18px !important;
    font-weight:700;
    line-height:1;
    display:inline-block;
    transform:none !important;
}
.customer-actions .customer-edit-button::before{
    content:"" !important;
    display:inline-block;
    width:16px;
    height:16px;
    background:url("../images/pencil-edit.svg") center/contain no-repeat;
    filter:brightness(0) invert(1);
    transform:none !important;
}

@media(max-width:700px){
    .customer-inline-edit-fields{gap:4px;}
    .customer-inline-edit-fields .customer-inline-input{
        height:30px;
        padding:5px 6px;
        font-size:9px;
        border-radius:6px;
    }
    .customer-inline-edit-fields .customer-inline-phone-visible{flex-basis:90px;}
    .customer-actions .customer-save-button::before{content:"✓" !important;font-size:15px !important;font-weight:700;}
    .customer-actions .customer-edit-button::before{font-size:15px !important;}
}

/* PELANGGAN - FINAL ICON FIX */
.customer-actions .customer-edit-button::before{
    content:"" !important;
    display:inline-block !important;
    width:16px !important;
    height:16px !important;
    background:url("../images/pencil-edit.svg") center/contain no-repeat !important;
    filter:brightness(0) invert(1);
    transform:none !important;
}
.customer-actions .customer-save-button::before{
    content:"✓" !important;
    display:inline-block !important;
    font-size:17px !important;
    font-weight:700 !important;
    line-height:1 !important;
    transform:none !important;
}

/* FINAL BACK ARROW VISIBILITY FIX - icon only, no duplicate element */




@media (max-width: 600px) {
    
}


/* =========================================================
   BACK BUTTON - FINAL CANONICAL STYLE
   Satu bentuk untuk seluruh halaman.
   ========================================================= */






.branch-access-back-button{
    width:42px !important;
    height:34px !important;
    min-width:42px !important;
    min-height:34px !important;
    padding:0 !important;
    margin:0 !important;
    border:0 !important;
    border-radius:0 !important;
    background:transparent !important;
    box-shadow:none !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:flex-start !important;
    font-size:0 !important;
    line-height:0 !important;
    text-decoration:none !important;
    overflow:visible !important;
    transform:none !important;
}

.branch-access-back-button:hover{
    background:transparent !important;
    box-shadow:none !important;
    transform:none !important;
    filter:none !important;
}

@media(max-width:600px){
    
    .branch-access-back-button{
        width:42px !important;
        height:34px !important;
        min-width:42px !important;
        min-height:34px !important;
    }
}



/* PELANGGAN: seluruh kolom tampil tanpa geser horizontal di PC maupun HP. */
.customers-page,
.customers-page .content-box,
.customers-page .content-body,
.customers-page .table-wrapper{min-width:0!important;max-width:100%!important;width:100%!important;}
.customers-page .table-wrapper{overflow-x:hidden!important;}
.customers-page table.data-table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important;border-collapse:collapse!important;}
.customers-page table.data-table th,
.customers-page table.data-table td{box-sizing:border-box!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;}
.customers-page table.data-table th:nth-child(1),
.customers-page table.data-table td:nth-child(1){width:7%!important;padding-left:3px!important;padding-right:3px!important;text-align:center!important;}
.customers-page table.data-table th:nth-child(2),
.customers-page table.data-table td:nth-child(2){width:34%!important;padding-left:5px!important;padding-right:5px!important;}
.customers-page table.data-table th:nth-child(3),
.customers-page table.data-table td:nth-child(3){display:table-cell!important;width:20%!important;text-align:center!important;padding-left:3px!important;padding-right:3px!important;}
.customers-page table.data-table th:nth-child(4),
.customers-page table.data-table td:nth-child(4){width:11%!important;text-align:center!important;padding-left:2px!important;padding-right:2px!important;}
.customers-page table.data-table th:nth-child(5),
.customers-page table.data-table td:nth-child(5){display:table-cell!important;width:28%!important;text-align:center!important;padding-left:2px!important;padding-right:2px!important;}
.customers-page .customer-name-cell{min-width:0!important;}
.customers-page .customer-name-main,
.customers-page .customer-name-phone{white-space:normal!important;overflow-wrap:anywhere!important;}
.customers-page .customer-transaction-link{display:inline-block!important;white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.2!important;}
.customers-page .customer-actions{display:flex!important;flex-flow:row nowrap!important;justify-content:center!important;align-items:center!important;gap:clamp(2px,.5vw,6px)!important;min-width:0!important;width:100%!important;}
.customers-page .customer-icon-button{flex:0 1 28px!important;width:28px!important;min-width:18px!important;max-width:28px!important;height:30px!important;min-height:28px!important;padding:0!important;}
.customers-page .customer-icon-button svg{width:18px!important;height:18px!important;max-width:100%!important;}
@media(max-width:700px){
 .customers-page .table-wrapper{overflow-x:hidden!important;}
 .customers-page table.data-table{width:100%!important;min-width:0!important;}
 .customers-page table.data-table th,.customers-page table.data-table td{padding:6px 2px!important;font-size:10px!important;}
 .customers-page table.data-table th:nth-child(1),.customers-page table.data-table td:nth-child(1){width:7%!important;padding-left:1px!important;padding-right:1px!important;}
 .customers-page table.data-table th:nth-child(2),.customers-page table.data-table td:nth-child(2){width:34%!important;padding-left:3px!important;padding-right:3px!important;}
 .customers-page table.data-table th:nth-child(3),.customers-page table.data-table td:nth-child(3){width:20%!important;padding-left:1px!important;padding-right:1px!important;}
 .customers-page table.data-table th:nth-child(4),.customers-page table.data-table td:nth-child(4){width:11%!important;padding-left:1px!important;padding-right:1px!important;}
 .customers-page table.data-table th:nth-child(5),.customers-page table.data-table td:nth-child(5){width:28%!important;padding-left:1px!important;padding-right:1px!important;}
 .customers-page .customer-name-main{font-size:10px!important;line-height:1.25!important;}
 .customers-page .customer-name-phone{font-size:8px!important;line-height:1.2!important;margin-top:2px!important;}
 .customers-page .customer-actions{gap:1px!important;}
 .customers-page .customer-icon-button{flex:0 1 20px!important;width:20px!important;min-width:16px!important;max-width:20px!important;height:26px!important;min-height:26px!important;}
 .customers-page .customer-icon-button svg{width:15px!important;height:15px!important;}
}
@media(max-width:360px){
 .customers-page table.data-table th,.customers-page table.data-table td{font-size:9px!important;padding-left:1px!important;padding-right:1px!important;}
 .customers-page .customer-name-main{font-size:9px!important;}
 .customers-page .customer-name-phone{font-size:7px!important;}
 .customers-page .customer-icon-button{min-width:14px!important;width:17px!important;max-width:17px!important;flex-basis:17px!important;}
 .customers-page .customer-icon-button svg{width:14px!important;height:14px!important;}
}


/* Pelanggan: nama dapat diklik untuk membuka WhatsApp dan input poin saat edit. */
.customers-page .customer-whatsapp-link{display:block;color:inherit;text-decoration:none;min-width:0;}
.customers-page .customer-whatsapp-link:hover .customer-name-main{text-decoration:underline;text-decoration-color:#16a34a;text-underline-offset:2px;}
.customers-page .customer-inline-edit-fields .customer-inline-points{flex:0 0 72px;width:72px;}
@media(max-width:700px){
  .customers-page .customer-inline-edit-fields .customer-inline-points{flex:0 0 42px;width:42px;padding-left:3px;padding-right:3px;font-size:9px;}
}


/* =====================================================
   DASHBOARD CABANG: SATU KARTU PENUH LEBAR
   Admin tetap menggunakan tiga kolom seperti sebelumnya.
===================================================== */
.dashboard-branch-grid-branch{
    display:grid;
    width:100%;
    grid-template-columns:minmax(0,1fr) !important;
    gap:20px;
    align-items:stretch;
}
.dashboard-branch-grid-branch > .dashboard-branch-card{
    display:block;
    width:100%;
    max-width:none;
    min-width:0;
    box-sizing:border-box;
    padding:28px;
    border-radius:18px;
}
.dashboard-branch-grid-branch .dashboard-branch-name{
    font-size:24px;
    line-height:1.25;
    margin-bottom:16px;
}
.dashboard-branch-grid-branch .dashboard-branch-label{
    font-size:16px;
    margin-bottom:6px;
}
.dashboard-branch-grid-branch .dashboard-branch-value{
    font-size:30px;
}
.dashboard-branch-grid-branch .dashboard-stock-warning{
    margin-top:24px;
    padding-top:20px;
}
.dashboard-branch-grid-branch .dashboard-stock-warning-title{
    font-size:20px;
    margin-bottom:12px;
}
.dashboard-branch-grid-branch .dashboard-stock-warning-empty{
    font-size:18px;
}
.dashboard-branch-grid-branch .dashboard-stock-warning-list{
    display:grid;
    grid-template-columns:minmax(0,1fr);
    gap:8px;
}
.dashboard-branch-grid-branch .dashboard-stock-warning-item{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:10px 12px;
    font-size:14px;
}
.dashboard-branch-grid-branch .dashboard-stock-warning-item strong{
    font-size:14px;
}
.dashboard-branch-grid-branch .dashboard-stock-warning-item b{
    font-size:14px;
}
.dashboard-branch-grid-branch .dashboard-stock-warning-item small{
    font-size:12px;
}
@media(max-width:600px){
    .dashboard-branch-grid-branch{
        grid-template-columns:minmax(0,1fr) !important;
        width:100%;
        margin:18px 0;
        gap:16px;
    }
    .dashboard-branch-grid-branch > .dashboard-branch-card{
        width:100%;
        padding:22px 20px;
        border-radius:16px;
    }
    .dashboard-branch-grid-branch .dashboard-branch-name{
        font-size:23px;
    }
    .dashboard-branch-grid-branch .dashboard-branch-label{
        font-size:15px;
    }
    .dashboard-branch-grid-branch .dashboard-branch-value{
        font-size:28px;
    }
    .dashboard-branch-grid-branch .dashboard-stock-warning-title{
        font-size:19px;
    }
    .dashboard-branch-grid-branch .dashboard-stock-warning-empty{
        font-size:17px;
    }
}


/* FIX EDIT NOTA: cegah ikon pseudo-element CSS global bertumpuk dengan SVG dari PHP. */
.edit-nota-page .edit-nota-view::before,
.edit-nota-page .edit-nota-view::after,
.edit-nota-page .edit-nota-icon::before,
.edit-nota-page .edit-nota-icon::after,
.edit-nota-page .edit-nota-action::before,
.edit-nota-page .edit-nota-action::after{content:none !important;display:none !important;}
.edit-nota-page .edit-nota-view{font-size:0 !important;}
.edit-nota-page .edit-nota-view svg{display:block !important;width:25px !important;height:25px !important;}
.edit-nota-page .edit-nota-actions{display:flex !important;align-items:center !important;justify-content:center !important;gap:0 !important;}
.edit-nota-page .edit-nota-icon{width:34px !important;min-width:34px !important;height:38px !important;padding:0 !important;background:transparent !important;border:0 !important;}
.edit-nota-page .edit-nota-icon svg{display:block !important;width:23px !important;height:23px !important;}
@media(max-width:700px){
 .edit-nota-page .edit-nota-view{width:48px !important;min-width:48px !important;height:44px !important;border-radius:13px !important;}
 .edit-nota-page .edit-nota-view svg{width:23px !important;height:23px !important;}
 .edit-nota-page .edit-nota-icon{width:32px !important;min-width:32px !important;height:36px !important;}
 .edit-nota-page .edit-nota-icon svg{width:22px !important;height:22px !important;}
}


/* Edit Nota final correction: scoped rules only; compact rows and align Aksi column. */
.edit-nota-page .edit-nota-table th:last-child{ text-align:center !important; }
.edit-nota-page .edit-nota-table td:last-child{ text-align:center !important; }
.edit-nota-page .edit-nota-table th,.edit-nota-page .edit-nota-table td{ padding-top:6px !important; padding-bottom:6px !important; }
.edit-nota-page .edit-nota-actions{ width:100% !important; justify-content:center !important; }
.edit-nota-page .edit-nota-view{ width:36px !important; min-width:36px !important; height:36px !important; min-height:36px !important; border-radius:10px !important; }
.edit-nota-page .edit-nota-view svg{ width:21px !important; height:21px !important; }
.edit-nota-page .edit-nota-icon{ width:30px !important; min-width:30px !important; height:32px !important; }
.edit-nota-page .edit-nota-icon svg{ width:21px !important; height:21px !important; }
@media(max-width:700px){
 .edit-nota-page .edit-nota-table th,.edit-nota-page .edit-nota-table td{padding:6px 5px !important;font-size:13px !important;line-height:1.2 !important;}
 .edit-nota-page .edit-nota-view{width:36px !important;min-width:36px !important;height:36px !important;min-height:36px !important;}
 .edit-nota-page .edit-nota-view svg{width:21px !important;height:21px !important;}
 .edit-nota-page .edit-nota-icon{width:28px !important;min-width:28px !important;height:30px !important;}
 .edit-nota-page .edit-nota-icon svg{width:20px !important;height:20px !important;}
}

/* FINAL, scoped fixes for Reports > Bookkeeping. Keep unrelated tables unchanged. */
.bookkeeping-report-page .bk-sheet-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box !important;
}
.bookkeeping-report-page .bk-sheet {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
}
.bookkeeping-report-page .bk-pencil {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 24px;
    width: 24px !important;
    height: 24px !important;
    padding: 3px !important;
    border: 0 !important;
    background: transparent !important;
    cursor: pointer;
}
.bookkeeping-report-page .bk-pencil-icon {
    display: block !important;
    width: 17px !important;
    height: 17px !important;
    fill: none !important;
    stroke: #111827 !important;
    stroke-width: 2 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}
.bookkeeping-report-page .bk-money-edit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 4px !important;
    min-width: 0 !important;
    max-width: 100% !important;
}
.bookkeeping-report-page .bk-edit-form.is-editing {
    display: inline-flex !important;
    min-width: 0 !important;
    max-width: 100% !important;
}
@media (max-width: 700px) {
    .bookkeeping-report-page .bk-sheet-wrap { overflow-x: auto !important; }
    .bookkeeping-report-page .bk-sheet {
        width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
    }
    .bookkeeping-report-page .bk-sheet th,
    .bookkeeping-report-page .bk-sheet td {
        min-width: 0 !important;
        max-width: none !important;
        box-sizing: border-box !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
    }
    .bookkeeping-report-page .bk-sheet th:nth-child(1),
    .bookkeeping-report-page .bk-sheet td:nth-child(1),
    .bookkeeping-report-page .bk-sheet th:nth-child(2),
    .bookkeeping-report-page .bk-sheet td:nth-child(2),
    .bookkeeping-report-page .bk-sheet th:nth-child(3),
    .bookkeeping-report-page .bk-sheet td:nth-child(3),
    .bookkeeping-report-page .bk-sheet th:nth-child(4),
    .bookkeeping-report-page .bk-sheet td:nth-child(4),
    .bookkeeping-report-page .bk-sheet th:nth-child(5),
    .bookkeeping-report-page .bk-sheet td:nth-child(5) { width: 20% !important; }
}


/* =========================================================
   OPTIK MITRA - SATU PUSAT PENGATURAN PANAH KEMBALI BIRU
   Ubah variabel di :root untuk mengatur semua halaman sekaligus.
   ========================================================= */
:root {
    --back-arrow-width: 42px;
    --back-arrow-height: 34px;
    --back-arrow-wrap-bottom: 12px;
    --back-arrow-inline-gap: 12px;
    --back-arrow-color: #2563eb;
    --back-arrow-hover-color: #1d4ed8;
}

/* Pembungkus panah di halaman yang memakai baris tersendiri */
.universal-back-wrap,
.branch-back-wrap,
.orders-back-wrap,
.inventory-back-wrap,
.credit-back-wrap,
.credit-receipt-back {
    width: 100%;
    margin: 0 0 var(--back-arrow-wrap-bottom) 0;
    padding: 0;
    display: flex;
    align-items: center;
}

/* Semua tombol/link panah kembali biru */
.universal-back-button,
.universal-inline-back,
.branch-back-button,
.branch-access-back-button,
.orders-back-button,
.inventory-back-button,
.settings-back-button,
.credit-back-icon,
.payment-back,
.cart-back,
.customer-back,
.edit-form-back,
.credit-receipt-back a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    flex: 0 0 var(--back-arrow-width) !important;
    width: var(--back-arrow-width) !important;
    min-width: var(--back-arrow-width) !important;
    max-width: var(--back-arrow-width) !important;
    height: var(--back-arrow-height) !important;
    min-height: var(--back-arrow-height) !important;
    max-height: var(--back-arrow-height) !important;
    margin: 0 var(--back-arrow-inline-gap) 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
    line-height: 0 !important;
    overflow: visible !important;
    cursor: pointer;
    transform: none !important;
}

/* Bentuk panah biru yang sama pada seluruh halaman */
.back-arrow-icon {
    display: block !important;
    position: relative !important;
    flex: 0 0 var(--back-arrow-width) !important;
    width: var(--back-arrow-width) !important;
    min-width: var(--back-arrow-width) !important;
    max-width: var(--back-arrow-width) !important;
    height: var(--back-arrow-height) !important;
    min-height: var(--back-arrow-height) !important;
    max-height: var(--back-arrow-height) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--back-arrow-color) !important;
    color: transparent !important;
    font-size: 0 !important;
    line-height: 0 !important;
    box-shadow: none !important;
    clip-path: polygon(0 50%, 28% 0, 28% 24%, 100% 24%, 100% 76%, 28% 76%, 28% 100%) !important;
    -webkit-clip-path: polygon(0 50%, 28% 0, 28% 24%, 100% 24%, 100% 76%, 28% 76%, 28% 100%) !important;
    visibility: visible !important;
    opacity: 1 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.back-arrow-icon::before,
.back-arrow-icon::after {
    content: none !important;
    display: none !important;
}

/* Ikon panah dibuat dengan span.back-arrow-icon, bukan gambar lama */
.universal-back-button img,
.universal-inline-back img,
.branch-back-button img,
.orders-back-button img,
.inventory-back-button img,
.settings-back-button img,
.credit-back-image,
.cart-back img,
.payment-back img {
    display: none !important;
}

/* Pertahankan perilaku khusus nota yang ditampilkan dalam mode sematan */
.receipt-embed-only .credit-receipt-back {
    display: none !important;
}

.universal-back-button:hover,
.universal-inline-back:hover,
.branch-back-button:hover,
.branch-access-back-button:hover,
.orders-back-button:hover,
.inventory-back-button:hover,
.settings-back-button:hover,
.credit-back-icon:hover,
.payment-back:hover,
.cart-back:hover,
.customer-back:hover,
.edit-form-back:hover,
.credit-receipt-back a:hover {
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

.universal-back-button:hover .back-arrow-icon,
.universal-inline-back:hover .back-arrow-icon,
.branch-back-button:hover .back-arrow-icon,
.branch-access-back-button:hover .back-arrow-icon,
.orders-back-button:hover .back-arrow-icon,
.inventory-back-button:hover .back-arrow-icon,
.settings-back-button:hover .back-arrow-icon,
.credit-back-icon:hover .back-arrow-icon,
.payment-back:hover .back-arrow-icon,
.cart-back:hover .back-arrow-icon,
.customer-back:hover .back-arrow-icon,
.edit-form-back:hover .back-arrow-icon,
.credit-receipt-back a:hover .back-arrow-icon {
    background: var(--back-arrow-hover-color) !important;
}

/* Pengaturan ukuran khusus HP dipusatkan di sini saja */
@media (max-width: 600px) {
    :root {
        --back-arrow-width:20px;
        --back-arrow-height: 15px;
        --back-arrow-wrap-bottom: 5px;
        --back-arrow-inline-gap: 10px;
    }
}


/* Header admin: rapikan nama, jabatan, dan tombol Daftar/Logout */
.app-header .header-right{
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    flex:0 0 auto !important;
    flex-wrap:nowrap !important;
    gap:10px !important;
    min-width:0 !important;
}

.app-header .user-info{
    display:flex !important;
    align-items:center !important;
    flex:0 0 auto !important;
    gap:10px !important;
    min-width:0 !important;
}

.app-header .user-avatar{
    width:44px !important;
    height:44px !important;
    min-width:44px !important;
    flex:0 0 44px !important;
    border-radius:50% !important;
}

.app-header .user-detail{
    display:flex !important;
    flex:0 1 auto !important;
    flex-direction:column !important;
    justify-content:center !important;
    min-width:0 !important;
    max-width:150px !important;
    line-height:1.2 !important;
}

.app-header .user-detail strong{
    display:block !important;
    font-size:14px !important;
    line-height:1.2 !important;
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
}

.app-header .user-detail small{
    display:block !important;
    font-size:12px !important;
    line-height:1.2 !important;
    white-space:nowrap !important;
}

.app-header .header-right > a.btn-primary,
.app-header .header-right > a.logout-btn{
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    box-sizing:border-box !important;
    width:82px !important;
    min-width:82px !important;
    height:40px !important;
    padding:0 10px !important;
    margin:0 !important;
    border-radius:8px !important;
    white-space:nowrap !important;
    font-size:14px !important;
    line-height:1 !important;
    font-weight:600 !important;
    flex:0 0 82px !important;
}

.app-header .header-right > a.btn-primary{
    background:#2563eb !important;
    color:#fff !important;
    text-decoration:none !important;
}

.app-header .header-right > a.logout-btn{
    background:#ef4444 !important;
    color:#fff !important;
    text-decoration:none !important;
}

@media(max-width:700px){
    .app-header{
        padding-left:12px !important;
        padding-right:12px !important;
    }
    .app-header .header-right{
        gap:6px !important;
    }
    .app-header .user-info{
        gap:6px !important;
    }
    .app-header .user-avatar{
        width:34px !important;
        height:34px !important;
        min-width:34px !important;
        flex-basis:34px !important;
        font-size:14px !important;
    }
    .app-header .user-detail{
        max-width:100px !important;
    }
    .app-header .user-detail strong{
        font-size:11px !important;
    }
    .app-header .user-detail small{
        font-size:10px !important;
    }
    .app-header .header-right > a.btn-primary,
    .app-header .header-right > a.logout-btn{
        width:62px !important;
        min-width:62px !important;
        height:34px !important;
        flex-basis:62px !important;
        padding:0 5px !important;
        font-size:11px !important;
    }
}

/* =====================================================
   OPTIMASI UKURAN HURUF TABEL KELOLA BARANG
   Berlaku untuk tabel barang biasa dan tabel ukuran lensa.
   Diletakkan di akhir agar mengalahkan override CSS lama.
===================================================== */
.inventory-page .inventory-table th,
.inventory-page .inventory-table td,
.inventory-page .lens-stock-table th,
.inventory-page .lens-stock-table td,
.inventory-page .inventory-lens-table th,
.inventory-page .inventory-lens-table td,
.inventory-table th,
.inventory-table td,
.lens-stock-table th,
.lens-stock-table td,
.inventory-lens-table th,
.inventory-lens-table td {
    font-size: 16px !important;
    line-height: 1.4 !important;
}

@media (max-width: 900px) {
    .inventory-page .inventory-table th,
    .inventory-page .inventory-table td,
    .inventory-page .lens-stock-table th,
    .inventory-page .lens-stock-table td,
    .inventory-page .inventory-lens-table th,
    .inventory-page .inventory-lens-table td,
    .inventory-table th,
    .inventory-table td,
    .lens-stock-table th,
    .lens-stock-table td,
    .inventory-lens-table th,
    .inventory-lens-table td {
        font-size: 13px !important;
        line-height: 1.35 !important;
        padding: 9px 7px !important;
    }
}

/* Perbaikan halaman Semua Aktivitas di HP: tabel mengikuti susunan
   empat kolom seperti Aktivitas Terbaru pada dasbor, tanpa ruang kosong
   besar dan tanpa tabel melebar keluar layar. Desktop tidak berubah. */
@media (max-width: 700px) {
    .activity-page .table-wrapper {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
    }

    .activity-page .table-wrapper > .data-table {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
    }

    .activity-page .table-wrapper > .data-table thead,
    .activity-page .table-wrapper > .data-table tbody {
        display: block !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    .activity-page .table-wrapper > .data-table tr {
        display: grid !important;
        grid-template-columns: minmax(0, .9fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.6fr) !important;
        gap: 6px !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        align-items: center !important;
    }

    .activity-page .table-wrapper > .data-table th,
    .activity-page .table-wrapper > .data-table td {
        display: block !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 10px 4px !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        word-break: normal !important;
        vertical-align: middle !important;
    }

    .activity-page .table-wrapper > .data-table thead tr {
        min-height: 46px !important;
        background: #f8fafc !important;
        border-bottom: 1px solid #e5eaf0 !important;
    }

    .activity-page .table-wrapper > .data-table tbody tr {
        min-height: 0 !important;
        border-bottom: 1px solid #edf0f4 !important;
    }

    .activity-page .table-wrapper > .data-table .empty-data {
        grid-column: 1 / -1 !important;
        text-align: left !important;
    }
}

@media (max-width: 380px) {
    .activity-page .table-wrapper > .data-table tr {
        gap: 3px !important;
        grid-template-columns: minmax(0, .9fr) minmax(0, .8fr) minmax(0, .8fr) minmax(0, 1.5fr) !important;
    }
    .activity-page .table-wrapper > .data-table th,
    .activity-page .table-wrapper > .data-table td {
        padding: 8px 2px !important;
        font-size: 9px !important;
        line-height: 1.25 !important;
    }
}

/* Pengaturan kasir: satu sumber style untuk desktop dan mobile. */
.cashier-back-wrap{margin:0 0 12px}
.cashier-page{width:100%;max-width:1200px}
.cashier-header{margin-bottom:20px}
.cashier-header h1{margin:0;font-size:28px;color:#20242b}
.cashier-header p{margin:6px 0 0;color:#697386;font-size:14px}
.cashier-card{background:#fff;border:1px solid #e3e7ee;border-radius:14px;padding:20px;margin-bottom:18px;box-sizing:border-box}
.cashier-add-btn{min-height:42px;padding:0 16px;border:0;border-radius:9px;background:#2864e8;color:#fff;font-weight:700;cursor:pointer}
.cashier-form{display:none;margin-top:16px}
.cashier-form.is-open{display:block}
.cashier-form label,.cashier-field label{display:block;margin-bottom:6px;font-size:12px;font-weight:700;color:#536071}
.cashier-form input,.cashier-field input,.cashier-role-select{width:100%;min-width:0;height:38px;box-sizing:border-box;border:1px solid #d9dee8;border-radius:8px;padding:0 9px;font-size:13px;color:#20242b;background:#fff}
.cashier-form-actions{display:flex;gap:10px;margin-top:12px}
.cashier-save,.cashier-role-save{min-height:38px;padding:0 14px;border:0;border-radius:8px;background:#2864e8;color:#fff;font-weight:700;cursor:pointer;white-space:nowrap}
.cashier-cancel{min-height:38px;padding:0 14px;border:1px solid #d9dee8;border-radius:8px;background:#fff;color:#20242b;font-weight:700;cursor:pointer}
.cashier-section-title{margin:0 0 12px;font-size:18px;color:#20242b}
.cashier-list{margin:0;padding:0}
.cashier-payroll-row{display:grid;grid-template-columns:minmax(100px,1.15fr) repeat(3,minmax(95px,1fr)) minmax(125px,1fr) minmax(135px,1fr) auto;align-items:end;gap:10px;padding:14px 0;border-bottom:1px solid #eef1f5}
.cashier-payroll-row:last-child{border-bottom:0}
.cashier-field{min-width:0}
.cashier-field-name{align-self:center}
.cashier-name{display:block;min-width:0;overflow-wrap:anywhere;font-size:14px;color:#20242b}
.cashier-label-spacer{visibility:hidden}
.cashier-empty{color:#697386;padding:8px 0}
.cashier-bonus-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:16px}
.cashier-bonus-description{margin:0;color:#697386;font-size:13px;line-height:1.5}
.cashier-bonus-list{display:grid;gap:10px}
.cashier-bonus-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto;align-items:end;gap:12px;padding:12px;background:#f7f9fc;border:1px solid #e8edf4;border-radius:10px}
.cashier-bonus-remove{height:38px;padding:0 12px;border:1px solid #fecaca;border-radius:8px;background:#fff1f2;color:#b91c1c;font-weight:700;cursor:pointer}
.cashier-bonus-actions{display:flex;justify-content:flex-end;margin-top:14px}
@media(max-width:900px){.cashier-payroll-row{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.cashier-field-name{grid-column:span 3}.cashier-field-save{display:flex;align-items:end;gap:8px}.cashier-field-save .cashier-label-spacer{display:none}}
@media(max-width:520px){.cashier-card{padding:14px}.cashier-header h1{font-size:23px}.cashier-payroll-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:14px 0}.cashier-field-name{grid-column:span 2}.cashier-field-save{grid-column:span 2;display:block}.cashier-field-save .cashier-role-save{width:100%}.cashier-role-select{font-size:13px}.cashier-bonus-heading{display:block}.cashier-bonus-add{margin-top:12px;width:100%}.cashier-bonus-row{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.cashier-bonus-remove{grid-column:span 2;width:100%}.cashier-bonus-actions .cashier-save{width:100%}}


/* Pemilih kode negara nomor telepon, dipakai bersama di web dan APK WebView. */
.phone-country-widget{display:flex;gap:10px;align-items:stretch;width:100%;min-width:0}
.phone-country-button{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-width:118px;padding:0 12px;border:1px solid #d6deea;border-radius:12px;background:#fff;color:#17243a;font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}
.phone-country-button .phone-country-flag{font-size:22px;line-height:1}.phone-country-chevron{font-size:20px;margin-left:4px}
.phone-country-widget .phone-local-input{flex:1;min-width:0;width:100%;box-sizing:border-box}
.phone-country-modal{display:none;position:fixed;inset:0;z-index:100000;background:rgba(15,23,42,.58);align-items:center;justify-content:center;padding:16px;box-sizing:border-box}
.phone-country-modal.open{display:flex}.phone-country-dialog{display:flex;flex-direction:column;width:min(100%,520px);max-height:min(78vh,720px);background:#fff;border-radius:16px;padding:18px;box-shadow:0 18px 50px rgba(0,0,0,.25);box-sizing:border-box}
.phone-country-title{font-size:20px;font-weight:700;margin-bottom:12px;color:#17243a}.phone-country-search{height:46px;border:0;border-bottom:2px solid #10a37f;border-radius:0;padding:0 4px;font:inherit;font-size:16px;outline:none;box-sizing:border-box;width:100%}
.phone-country-results{overflow-y:auto;min-height:0;margin-top:8px}.phone-country-option{display:flex;align-items:center;gap:12px;width:100%;min-height:48px;padding:8px 4px;border:0;border-bottom:1px solid #edf0f4;background:#fff;text-align:left;font:inherit;cursor:pointer;color:#222}.phone-country-option:hover,.phone-country-option:focus{background:#f1f6ff;outline:none}.phone-country-flag{font-size:23px;width:32px;flex:0 0 32px}.phone-country-name{flex:1}.phone-country-code{color:#475569;font-variant-numeric:tabular-nums}.phone-country-empty{padding:18px;text-align:center;color:#64748b}.phone-country-cancel{margin-top:12px;min-height:42px;border:1px solid #d6deea;border-radius:10px;background:#fff;font:inherit;font-weight:600}
@media(max-width:600px){.phone-country-button{min-width:98px;padding:0 8px;gap:6px}.phone-country-dialog{padding:14px}.phone-country-modal{padding:10px}}
