/* /var/www/b2b/template/b2b.css
   Rossopepe B2B - iOS Sonoma (flat) - mobile first
*/

/* ---------------------------------------
   RESET + BASE
--------------------------------------- */
* { box-sizing: border-box; }
html, body { height: 100%; }

body{
  margin: 0;
  background: #F5F5F7;
  color: #111111;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------------------------------------
   TOKENS
--------------------------------------- */
:root{
  --rp-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
             "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --rp-text: #111111;
  --rp-sub:  rgba(17,17,17,.72);
  --rp-muted: rgba(17,17,17,.56);

  --rp-bg: #F5F5F7;
  --rp-surface: #FFFFFF;
  --rp-line: rgba(0,0,0,.10);

  /* Pastel accents */
  --rp-red:    #E35D6A;
  --rp-black:  #111111;
  --rp-orange: #F1A35C;
  --rp-sage:   #9FB29A;

  --rp-on-dark: #FFFFFF;

  --rp-r-md: 14px;
  --rp-r-lg: 18px;

  --rp-header-h: 66px;
  --rp-drawer-w: 280px;
}

/* ---------------------------------------
   TYPOGRAPHY
--------------------------------------- */
.rpH1{
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}
.rpH2{
  font-size: 18px;
  line-height: 1.25;
  font-weight: 750;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.rpH3{
  font-size: 15px;
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 6px;
}
.rpP{
  font-size: 15px;
  line-height: 1.45;
  margin: 0 0 10px;
  color: var(--rp-text);
}
.rpSmall{
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--rp-muted);
}
.rpStrong{ font-weight: 750; }
.rpMuted{ color: var(--rp-muted); }
.rpSub{ color: var(--rp-sub); }

/* ---------------------------------------
   LAYOUT
--------------------------------------- */
.rpApp{
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.rpMain{
  padding: 14px 14px 20px;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 768px){
  .rpMain{ padding: 18px 18px 26px; }
}
@media (min-width: 1100px){
  .rpMain{ padding: 22px 22px 32px; }
}

/* ---------------------------------------
   TOPBAR (header)
--------------------------------------- */
.rpTopbar{
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--rp-header-h);
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 0 12px;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--rp-line);
}

.rpBrandHead{
  display:flex;
  align-items:center;
  gap:40px;
  min-width: 0;
  flex: 1 1 auto;
}
.rpBrandIcon{
  width: 60px;
  height:  60px;
  flex: 0 0 30px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.rpBrandIcon svg{
  width: 30px;
  height: 30px;
  display:block;
}
.rpBrandTitle{
  font-size: 22px;
  font-weight: 850;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
}

.rpHamburger{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--rp-line);
  background: #FFFFFF;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex: 0 0 40px;
}
.rpHamburger:active{ transform: scale(.98); }
.rpHamburger svg{ width: 18px; height: 18px; }

@media (max-width: 420px){
  .rpTopbar{ padding: 0 10px; }
  .rpBrandTitle{ font-size: 13.5px; }
}

/* ---------------------------------------
   DRAWER
--------------------------------------- */
.rpOverlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.28);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.rpOverlay.isOpen{
  opacity: 1;
  pointer-events: auto;
}

.rpDrawer{
  position: fixed;
  top: 0;
  right: 0;                 /* ✅ da destra */
  left: auto;
  height: 100%;
  width: var(--rp-drawer-w);
  background: #FFFFFF;
  border-left: 1px solid var(--rp-line);  /* ✅ bordo sul lato giusto */
  z-index: 70;
  transform: translateX(102%);            /* ✅ parte fuori a destra */
  transition: transform .20s ease;
  display: flex;
  flex-direction: column;
}
.rpDrawer.isOpen{ transform: translateX(0); }

.rpDrawerHd{
  height: var(--rp-header-h);
  display:flex;
  align-items:center;
  justify-content: space-between;
  padding: 0 12px;
  border-bottom: 1px solid var(--rp-line);
}
.rpBrand{
  display:flex;
  align-items:center;
  gap:10px;
}
.rpBrandMark{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: var(--rp-black);
  color: var(--rp-on-dark);
  display:flex;
  align-items:center;
  justify-content:center;
  font-weight: 850;
  letter-spacing: -0.02em;
  font-size: 13px;
}
.rpBrandText{
  display:flex;
  flex-direction: column;
  line-height: 1.1;
}
.rpBrandText .b1{ font-weight: 850; font-size: 14px; }
.rpBrandText .b2{ font-size: 12px; color: var(--rp-muted); }

.rpDrawerClose{
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--rp-line);
  background: #FFFFFF;
  cursor: pointer;
  display:flex;
  align-items:center;
  justify-content:center;
}
.rpDrawerClose:active{ transform: scale(.98); }

.rpDrawerBd{
  padding: 12px;
  overflow: auto;
}
.rpDrawerMeta{
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--rp-muted);
}

.rpNav{
  display:flex;
  flex-direction: column;
  gap: 8px;
}
.rpNav a{
  text-decoration: none;
  color: var(--rp-text);
  border: 1px solid var(--rp-line);
  background: #FFFFFF;
  border-radius: 14px;
  padding: 10px 12px;
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.rpNav a .l{
  display:flex;
  flex-direction: column;
  min-width: 0;
}
.rpNav a .l .t{
  font-weight: 780;
  font-size: 14px;
}
.rpNav a .l .s{
  font-size: 12px;
  color: var(--rp-muted);
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rpNav a .chev{
  color: rgba(0,0,0,.30);
  font-weight: 900;
}
.rpNav a.isActive{
  border-color: rgba(0,0,0,.18);
  background: rgba(0,0,0,.03);
}

/* ---------------------------------------
   CARDS
--------------------------------------- */
.rpCard{
  background: var(--rp-surface);
  border: 1px solid var(--rp-line);
  border-radius: var(--rp-r-lg);
  overflow: hidden;
}
.rpCardHd{
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--rp-line);
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
}
.rpCardBd{ padding: 12px; }
.rpCardFt{
  padding: 12px;
  border-top: 1px solid var(--rp-line);
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}

.rpStack{ display:flex; flex-direction: column; gap: 12px; }

.rpGrid2{
  display:grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 900px){
  .rpGrid2{ grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------
   BUTTONS
--------------------------------------- */
.rpBtn{
  appearance: none;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 10px 12px;
  font-family: var(--rp-font);
  font-size: 14px;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  user-select:none;
  white-space: nowrap;
}
.rpBtn:active{ transform: scale(.99); }

.rpBtnRed{ background: var(--rp-red); color: var(--rp-on-dark); }
.rpBtnBlack{ background: var(--rp-black); color: var(--rp-on-dark); }
.rpBtnOrange{ background: var(--rp-orange); color: var(--rp-on-dark); }
.rpBtnSage{ background: var(--rp-sage); color: var(--rp-on-dark); }

.rpBtnGhost{
  background: #FFFFFF;
  border-color: var(--rp-line);
  color: var(--rp-text);
}

.rpBtnSm{ padding: 8px 10px; border-radius: 12px; font-size: 13px; }
.rpBtnBlock{ width: 100%; }

/* ---------------------------------------
   INPUTS
--------------------------------------- */
.rpInput, .rpSelect{
  width: 100%;
  border: 1px solid var(--rp-line);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: var(--rp-font);
  background: #FFFFFF;
  color: var(--rp-text);
  outline: none;
}
.rpInput:focus, .rpSelect:focus{ border-color: rgba(0,0,0,.22); }

/* ---------------------------------------
   TABLE
--------------------------------------- */
.rpTableWrap{ overflow:auto; }
.rpTable{
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}
.rpTable th{
  text-align: left;
  font-size: 12px;
  color: var(--rp-muted);
  font-weight: 800;
  padding: 10px;
  border-bottom: 1px solid var(--rp-line);
}
.rpTable td{
  padding: 10px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  font-size: 14px;
}
.rpTable tr:hover td{ background: rgba(0,0,0,.02); }

/* ---------------------------------------
   BADGES
--------------------------------------- */
.rpBadge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid var(--rp-line);
  background: #FFFFFF;
}
.rpBadgeOn{ background: rgba(159,178,154,.18); border-color: rgba(159,178,154,.35); }
.rpBadgeOff{ background: rgba(227,93,106,.14); border-color: rgba(227,93,106,.28); }

/* ---------------------------------------
   UTIL
--------------------------------------- */
.rpRow{
  display:flex;
  align-items:center;
  justify-content: space-between;
  gap: 10px;
}
.rpGap8{ gap: 8px; }
.rpRight{ margin-left: auto; }

/* Logout button inside drawer */
.rpNavLogout{
  width:100%;
  text-align:left;
  border:1px solid var(--rp-line);
  background:#FFFFFF;
  border-radius:14px;
  padding:10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  cursor:pointer;
  font-family: var(--rp-font);
}
.rpNavLogout .l{
  display:flex;
  flex-direction:column;
}
.rpNavLogout .t{
  font-weight:780;
  font-size:14px;
}
.rpNavLogout .s{
  font-size:12px;
  color:var(--rp-muted);
}
.rpNavLogout:hover{
  background:rgba(227,93,106,.08);
  border-color:rgba(227,93,106,.25);
}

/* ---------------------------------------
   AUTH (Login) — stile Cloud-like
--------------------------------------- */
.rpAuthBody{
  margin:0;
  min-height:100vh;
  background: linear-gradient(180deg, #F5F5F7 0%, #ECECF0 100%);
  font-family: var(--rp-font);
  color: var(--rp-text);
}

.rpAuthWrap{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 28px 16px;
}

.rpAuthCard{
  width: 100%;
  max-width: 520px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 28px;
  padding: 26px 22px;
  box-shadow: 0 22px 50px rgba(0,0,0,.12);
  backdrop-filter: saturate(180%) blur(12px);
  text-align:center;
}

.rpAuthLogo{
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom: 12px;
}

.rpAuthLogoImg{
  width: 140px;   /* regola se vuoi più grande */
  height: auto;
  display:block;
}

.rpAuthTitle{
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin: 6px 0 4px;
}

.rpAuthSub{
  font-size: 16px;
  color: var(--rp-sub);
  margin: 0 0 18px;
}

.rpAuthForm{
  text-align:left;
  margin-top: 6px;
}

.rpAuthLabel{
  display:block;
  font-size: 16px;
  font-weight: 800;
  margin: 0 0 6px;
}

.rpAuthInput{
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 16px;
}

.rpAuthBtn{
  margin-top: 14px;
  width:100%;
  border:0;
  border-radius: 22px;
  padding: 14px 16px;
  font-size: 18px;
  font-weight: 900;
  cursor:pointer;
  background: #0F172A; /* blu scuro tipo Cloud */
  color:#fff;
}
.rpAuthBtn:active{ transform: scale(.99); }

.rpAuthBottom{
  margin-top: 14px;
  font-size: 16px;
  color: var(--rp-sub);
  text-align:center;
}
.rpAuthLink{
  color: var(--rp-text);
  font-weight: 900;
  text-decoration:none;
}
.rpAuthLink:active{ opacity:.7; }

.rpAuthFoot{
  margin-top: 14px;
  font-size: 14px;
  color: rgba(17,17,17,.45);
  text-align:center;
}

.rpAuthAlert{
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(227,93,106,.30);
  background: rgba(227,93,106,.10);
  color: #8A1F2A;
  font-weight: 800;
  text-align:left;
}

.rpBrandIcon{
  display:flex;
  align-items:center;
}

.rpBrandLogoImg{
  height: 60px;   /* dimensione header */
  width: auto;
  display:block;
}

/* Topbar centrata come rpMain */
.rpTopbarInner{
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  padding: 0 14px;
  display:flex;
  align-items:center;
  justify-content: space-between;
}

@media (min-width:768px){
  .rpTopbarInner{ padding: 0 18px; }
}

@media (min-width:1100px){
  .rpTopbarInner{ padding: 0 22px; }
}