/* =====================================================
   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;
}
.customer-back{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:42px;
    height:42px;
    margin-bottom:10px;
    border:1px solid #dbe2ea;
    border-radius:10px;
    background:#fff;
    color:#1e293b;
    text-decoration:none;
    font-size:22px;
    line-height:1;
    transition:.2s;
}

.customer-back:hover{
    background:#f8fafc;
    border-color:#2563eb;
    color:#2563eb;
}
/* =====================================================
   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-back-button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:48px;
    height:48px;
    margin-bottom:14px;
    border-radius:50%;
    background:#2563eb;
    color:#fff;
    text-decoration:none !important;
    font-size:34px;
    font-weight:400;
    line-height:1;
    box-shadow:0 4px 10px rgba(37,99,235,.22);
    transition:.2s;
}

.branch-back-button:hover{
    background:#1d4ed8;
    color:#fff;
    transform:translateY(-1px);
}

.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;
    }

    .branch-back-button{
        width:44px;
        height:44px;
        font-size:30px;
    }
}

/* Tombol kembali global menggunakan gambar yang sama dengan halaman Pelunasan Kredit. */
.universal-back-wrap{width:100%;margin:0 0 12px 0;display:flex;align-items:center}
.universal-back-button{width:58px;height:58px;padding:0;margin:0;border:0;border-radius:50%;background:transparent;display:block;line-height:0;overflow:visible;cursor:pointer;transition:transform .15s ease,filter .15s ease}
.universal-back-button img{display:block;width:58px;height:58px;object-fit:contain;object-position:center;border:0;border-radius:50%;user-select:none;-webkit-user-drag:none;filter:drop-shadow(0 3px 5px rgba(0,0,0,.20))}
.universal-back-button:hover{transform:translateX(-2px) scale(1.03);filter:brightness(1.03)}
@media(max-width:600px){.universal-back-button,.universal-back-button img{width:52px;height:52px}}

.universal-inline-back{width:58px;height:58px;padding:0;border:0;border-radius:50%;background:transparent;display:inline-flex;align-items:center;justify-content:center;line-height:0;cursor:pointer;text-decoration:none;vertical-align:middle;transition:transform .15s ease,filter .15s ease}
.universal-inline-back img{width:58px;height:58px;object-fit:contain;border:0;border-radius:50%;filter:drop-shadow(0 3px 5px rgba(0,0,0,.20))}
.universal-inline-back:hover{transform:translateX(-2px) scale(1.03);filter:brightness(1.03)}

.dashboard-branch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:24px 0}.dashboard-branch-card{display:block;background:#fff;border:1px solid #e3e7ee;border-radius:14px;padding:20px;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:19px;font-weight:800;color:#14213d;margin-bottom:18px}.dashboard-branch-label{font-size:13px;color:#697386;font-weight:600;margin-bottom:6px}.dashboard-branch-value{font-size:27px;font-weight:800;color:#0E78C8}.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}.settings-back-button{display:inline-flex;text-decoration:none}.settings-back-button img{display:block}.settings-back-button:hover{transform:translateX(-2px)}
@media(max-width:900px){.dashboard-branch-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.activity-row{grid-template-columns:150px 130px 130px minmax(220px,1fr)}}@media(max-width:600px){.dashboard-branch-grid{grid-template-columns:1fr}.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:20px;padding-top:16px;border-top:1px solid #edf0f4}.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:7px}.dashboard-stock-warning-item{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:7px 9px;border-radius:8px;background:#fff7ed;color:#7c2d12;font-size:12px}.dashboard-stock-warning-item span{min-width:0}.dashboard-stock-warning-item strong{display:block;color:#14213d;font-size:12px}.dashboard-stock-warning-item small{display:block;color:#697386;margin-top:2px;font-size:11px}.dashboard-stock-warning-item b{white-space:nowrap;color:#c2410c;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;
    }

    .universal-back-button,
    .universal-back-button img{
        width:46px;
        height:46px;
    }
}

/* ============================================================
   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;
}

.customer-back:hover{
    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;
}

