html,body.piiwii-bs-shell{margin:0;padding:0;background:#f5f7fb}
body.piiwii-bs-shell{font-family:Inter,Arial,sans-serif;overflow:auto}
body.piiwii-bs-shell .site,body.piiwii-bs-shell #page{margin:0;padding:0}
.piiwii-bs-app{position:fixed;inset:0;display:flex;min-height:100vh;width:100vw;background:#f5f7fb;font-family:Inter,Arial,sans-serif;overflow:hidden}
.piiwii-bs-sidebar{position:fixed;top:0;left:0;bottom:0;z-index:1000;width:270px;background:#111827;color:#fff;display:flex;flex-direction:column;transition:width .2s ease;box-shadow:8px 0 30px rgba(15,23,42,.12)}
.piiwii-bs-sidebar.is-collapsed{width:88px}
.piiwii-bs-sidebar-top{display:flex;align-items:center;gap:12px;padding:18px 16px;border-bottom:1px solid rgba(255,255,255,.08)}
.piiwii-bs-toggle{width:44px;height:44px;border:none;border-radius:14px;background:rgba(255,255,255,.08);display:flex;flex-direction:column;justify-content:center;gap:4px;cursor:pointer}
.piiwii-bs-toggle span{display:block;height:2px;background:#fff;border-radius:20px;margin:0 10px}
.piiwii-bs-brand{display:flex;flex-direction:column;line-height:1.1}
.piiwii-bs-brand strong{font-size:18px}
.piiwii-bs-brand span{font-size:12px;color:#cbd5e1}
.piiwii-bs-nav{padding:14px 12px;display:flex;flex-direction:column;gap:8px}
.piiwii-bs-link{display:flex;align-items:center;gap:12px;color:#e5e7eb;text-decoration:none;padding:12px 14px;border-radius:14px;transition:all .2s ease}
.piiwii-bs-link:hover,.piiwii-bs-link.is-active{background:#fff;color:#111827}
.piiwii-bs-link-icon{width:24px;text-align:center;font-size:18px}
.piiwii-bs-sidebar.is-collapsed .piiwii-bs-link-text,.piiwii-bs-sidebar.is-collapsed .piiwii-bs-brand span,.piiwii-bs-sidebar.is-collapsed .piiwii-bs-brand strong{display:none}
.piiwii-bs-main{flex:1;display:flex;flex-direction:column;min-width:0;margin-left:270px;transition:margin-left .2s ease;min-height:100vh}
.piiwii-bs-app.is-collapsed .piiwii-bs-main{margin-left:88px}
.piiwii-bs-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;padding:24px 28px 18px;border-bottom:1px solid #e6eaf2;background:#fff}
.piiwii-bs-header h1{margin:0 0 6px;font-size:28px;line-height:1.1}
.piiwii-bs-header p{margin:0;color:#64748b}
.piiwii-bs-header-link{display:inline-flex;align-items:center;padding:10px 14px;border-radius:12px;background:#111827;color:#fff;text-decoration:none}
.piiwii-bs-content{flex:1;min-height:calc(100vh - 110px);overflow:auto}
.piiwii-bs-login-wrap{display:flex;justify-content:center;align-items:center;min-height:100vh;padding:20px;background:#f5f7fb;font-family:Inter,Arial,sans-serif}
.piiwii-bs-login-card{width:min(460px,100%);background:#fff;padding:32px;border-radius:24px;box-shadow:0 20px 40px rgba(15,23,42,.08);border:1px solid #e6eaf2}
.piiwii-bs-login-card h2{margin:8px 0 10px;font-size:28px}
.piiwii-bs-login-card p{margin:0 0 20px;color:#64748b}
.piiwii-bs-login-badge{display:inline-block;padding:8px 12px;border-radius:999px;background:#eef2ff;color:#3730a3;font-size:12px;font-weight:700}
.piiwii-bs-login-form label{display:block;margin-bottom:6px;font-weight:600}
.piiwii-bs-login-form input[type=text],.piiwii-bs-login-form input[type=password]{width:100%;padding:12px 14px;border:1px solid #dbe3ef;border-radius:12px;margin-bottom:14px}
.piiwii-bs-login-form .login-submit input{width:100%;padding:13px 16px;border:none;border-radius:12px;background:#111827;color:#fff;font-weight:700;cursor:pointer}
.piiwii-bs-home{padding:28px}
.piiwii-bs-home-kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}
.piiwii-bs-kpi-card{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid #e6eaf2;border-radius:18px;padding:22px;min-height:112px;box-shadow:0 8px 20px rgba(15,23,42,.04)}
.piiwii-bs-kpi-icon{width:52px;height:52px;border-radius:16px;display:flex;align-items:center;justify-content:center;font-size:24px;background:#f8fafc}
.piiwii-bs-kpi-body{min-width:0}
.piiwii-bs-kpi-value{font-size:28px;line-height:1.1;font-weight:800;color:#0f172a;word-break:break-word}
.piiwii-bs-kpi-label{margin-top:6px;color:#64748b;font-size:14px;font-weight:600}
.piiwii-bs-kpi-card.is-ca .piiwii-bs-kpi-icon{background:#ecfdf5}
.piiwii-bs-kpi-card.is-pending .piiwii-bs-kpi-icon{background:#fff7ed}
.piiwii-bs-kpi-card.is-quotes .piiwii-bs-kpi-icon{background:#eff6ff}
.piiwii-bs-kpi-card.is-stock .piiwii-bs-kpi-icon{background:#fef2f2}
.piiwii-bs-embed{background:#f5f7fb}
@media (max-width:960px){body.piiwii-bs-shell{overflow:auto}.piiwii-bs-app{display:block;position:relative;inset:auto;width:100%;max-width:100%}.piiwii-bs-sidebar{position:sticky;top:0;width:100%;bottom:auto}.piiwii-bs-sidebar.is-collapsed,.piiwii-bs-app.is-collapsed .piiwii-bs-main{width:100%;margin-left:0}.piiwii-bs-main{margin-left:0;min-height:auto}.piiwii-bs-sidebar.is-collapsed .piiwii-bs-brand span,.piiwii-bs-sidebar.is-collapsed .piiwii-bs-brand strong,.piiwii-bs-sidebar.is-collapsed .piiwii-bs-link-text{display:block}.piiwii-bs-content iframe{height:80vh}.piiwii-bs-header{flex-direction:column}}

body.piiwii-bs-legacy-page{background:#f5f7fb!important;overflow:auto!important}
body.piiwii-bs-legacy-page > *{box-sizing:border-box}

body.piiwii-bs-embed,body.piiwii-bs-legacy-page{overflow:auto!important;background:#f5f7fb!important}
body.piiwii-bs-embed .cdjm-front,body.piiwii-bs-legacy-page .cdjm-front{min-height:100vh}


.piiwii-bs-sidebar{justify-content:space-between}
.piiwii-bs-sidebar-bottom{margin-top:auto;padding:14px 12px 18px;border-top:1px solid rgba(255,255,255,.08)}
.piiwii-bs-userbox{padding:12px 14px;border-radius:14px;background:rgba(255,255,255,.06);margin-bottom:10px}
.piiwii-bs-userbox-title{font-size:12px;color:#cbd5e1;margin-bottom:4px}
.piiwii-bs-userbox-name{font-size:14px;font-weight:700;word-break:break-word}
.piiwii-bs-logout{display:flex;align-items:center;justify-content:center;padding:12px 14px;border-radius:14px;background:#fff;color:#111827;text-decoration:none;font-weight:700}
.piiwii-bs-sidebar.is-collapsed .piiwii-bs-sidebar-bottom{padding:10px 8px 14px}
.piiwii-bs-sidebar.is-collapsed .piiwii-bs-userbox-title,.piiwii-bs-sidebar.is-collapsed .piiwii-bs-userbox-name,.piiwii-bs-sidebar.is-collapsed .piiwii-bs-logout{font-size:0}
.piiwii-bs-sidebar.is-collapsed .piiwii-bs-userbox{padding:10px;min-height:44px}
.piiwii-bs-sidebar.is-collapsed .piiwii-bs-logout::before{content:"⎋";font-size:18px}
.piiwii-bs-content-inline{padding:24px;overflow:auto;min-height:calc(100vh - 92px)}
.piiwii-bs-content-inline.is-flush{padding:0;min-height:100vh}
.piiwii-bs-main.is-module .piiwii-bs-content{min-height:100vh}
.piiwii-bs-main.is-module .piiwii-bs-content-inline > *:first-child{margin-top:0!important}
.piiwii-bs-header{min-height:92px}

.piiwii-bs-main.is-module{background:#f5f7fb}
.piiwii-bs-main.is-module .piiwii-bs-content{flex:1;min-height:100vh}
.piiwii-bs-main.is-module .piiwii-bs-content-inline{padding-top:0!important}
.piiwii-bs-main.is-module .navbar,.piiwii-bs-main.is-module .topbar,.piiwii-bs-main.is-module .banner{margin-top:0!important}
.piiwii-bs-link-text{font-weight:600}

.piiwii-bs-header h1{display:flex;align-items:center;gap:10px}
.piiwii-bs-header-icon{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;font-size:24px}
.piiwii-bs-section-clients #soundrent-app .page-header h1{display:none!important}


/* v1.3.0 scrolling fixes */
.piiwii-bs-main{height:100vh;overflow:hidden}
.piiwii-bs-content{flex:1;min-height:0;height:100%;overflow:auto;padding-bottom:48px;-webkit-overflow-scrolling:touch}
.piiwii-bs-content-inline{min-height:calc(100% - 1px);padding-bottom:64px}
.piiwii-bs-content-inline.is-flush{padding-bottom:72px;min-height:100%}
.piiwii-bs-section{min-height:100%;padding-bottom:48px}
.piiwii-bs-section iframe,.piiwii-bs-section table{max-width:100%}
.piiwii-bs-section-inventaire,.piiwii-bs-section-compta,.piiwii-bs-section-clients,.piiwii-bs-section-facture,.piiwii-bs-section-devis{padding-bottom:72px}
.piiwii-bs-section .table-responsive,.piiwii-bs-section .inventory-table-wrapper,.piiwii-bs-section .summary-table-wrapper{padding-bottom:36px}
@media (max-width:960px){.piiwii-bs-main{height:auto;overflow:visible}.piiwii-bs-content{height:auto;overflow:visible;padding-bottom:24px}}


/* v1.3.1 targeted fixes */
.piiwii-bs-header{align-items:center}
.piiwii-bs-header-tools{margin-left:auto;display:flex;align-items:center;gap:12px;flex-wrap:wrap;justify-content:flex-end}
.piiwii-bs-header-tools .sr-search-container{margin:0!important;min-width:min(420px,48vw)}
.piiwii-bs-header-tools .sr-search-bar{width:100%!important;margin:0!important}
.piiwii-bs-section-inventaire .sr-main-content{padding-top:0!important}
.piiwii-bs-section-inventaire .sr-main-content > h1.hide-on-print{display:none!important}
.piiwii-bs-section-inventaire .sr-search-container{margin-bottom:0!important}
.piiwii-bs-section-compta .cdjm-topbar .cdjm-actions-top a.cdjm-btn.primary-blue{display:none!important}
@media (max-width:960px){.piiwii-bs-header-tools{width:100%;margin-left:0;justify-content:stretch}.piiwii-bs-header-tools .sr-search-container{min-width:0;width:100%}}


/* v1.3.2 inventory/client targeted fixes */
.piiwii-bs-section-inventaire .sr-main-content > h1.hide-on-print{display:none!important}
.piiwii-bs-header-tools .sr-search-container{display:flex;align-items:center}
.piiwii-bs-header-tools .piiwii-bs-export-csv{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border:0;border-radius:12px;background:#111827;color:#fff;font-weight:700;cursor:pointer;white-space:nowrap}
.piiwii-bs-header-tools .piiwii-bs-export-csv:hover{opacity:.92}
.piiwii-bs-section-clients #editModal form,
.piiwii-bs-section-clients #editModal input{autocomplete:off}


/* v1.3.3 inventory header/search refinement */
.piiwii-bs-header{position:sticky;top:0;z-index:40}
.piiwii-bs-header-tools{margin-left:auto;display:flex;align-items:center;justify-content:flex-end;gap:10px;flex:1 1 auto}
.piiwii-bs-header-tools .sr-search-container{margin:0 0 0 auto!important;min-width:220px;max-width:260px;width:260px;display:flex;justify-content:flex-end}
.piiwii-bs-header-tools .sr-search-bar{height:38px!important;padding:8px 12px!important;font-size:13px!important;border-radius:10px!important}
.piiwii-bs-header-tools .piiwii-bs-export-csv{height:38px;padding:8px 12px;font-size:13px;border-radius:10px}
.piiwii-bs-section-inventaire .sr-search-container:not(.piiwii-bs-header-tools .sr-search-container){display:none!important}
@media (max-width:960px){.piiwii-bs-header{position:static}.piiwii-bs-header-tools .sr-search-container{width:100%;max-width:none}}
