/* AVENSCI ACCOUNT UI — consolidated final stylesheet */

/* =========================================================
   Layout
   ========================================================= */

.account-grid,
.account-grid.account-grid-unified{
  display:grid;
  grid-template-columns:258px minmax(0,1fr);
  gap:32px;
  max-width:1460px;
  margin:0 auto;
  padding:32px 40px 60px;
}

.account-shell{
  width:100%;
  max-width:1460px;
  margin-left:auto;
  margin-right:auto;
  padding-left:40px;
  padding-right:40px;
  box-sizing:border-box;
}

.xp-pagehead .account-shell{
  padding-top:0;
  padding-bottom:0;
}

.account-shell.account-grid{
  display:grid;
  grid-template-columns:258px minmax(0,1fr);
  gap:38px;
  padding-top:32px;
  padding-bottom:60px;
}

.account-main,
.account-shell.account-grid > section,
.account-shell.account-grid .account-main{
  min-width:0;
}

/* =========================================================
   Sidebar
   ========================================================= */

.account-menu,
.account-menu-unified{
  width:258px;
  align-self:start;
  background:#fff;
  border:1px solid #d9e2ee;
  border-radius:10px;
  overflow:hidden;
}

.account-menu a,
.account-menu-unified a{
  min-height:56px;
  padding:0 18px;
  display:flex;
  align-items:center;
  gap:14px;
  border-bottom:1px solid #e4eaf2;
  color:#102d50;
  text-decoration:none;
  font-size:14px;
  font-weight:500;
  line-height:1.3;
  transition:.15s ease;
  box-shadow:none;
  border-radius:0;
}

.account-menu a:last-child,
.account-menu-unified a:last-child{
  border-bottom:0;
}

.account-menu a:hover,
.account-menu-unified a:hover{
  background:#f3f7fc;
  color:#1260c4;
}

.account-menu a.active,
.account-menu-unified a.active{
  color:#fff;
  background:#1260c4;
  font-weight:700;
  box-shadow:none;
}

.account-menu svg,
.account-menu-unified svg{
  width:20px;
  height:20px;
  flex:0 0 20px;
}

/* =========================================================
   Orders / tables
   ========================================================= */

.orders-table,
.order-table{
  background:#fff;
  border:1px solid #d9e2ee;
  border-radius:10px;
  overflow:hidden;
}

.orders-table .order-row,
.order-table .order-row{
  text-decoration:none;
  color:inherit;
  font-size:14px;
}

.orders-table .order-row:hover{
  background:#f8fbff;
}

.order-detail-unified{
  display:grid;
  grid-template-columns:minmax(0,1fr) 320px;
  gap:28px;
}

.account-grid table{
  width:100%;
  border-collapse:collapse;
}

.account-grid th,
.account-grid td{
  text-align:left;
  vertical-align:middle;
}

/* =========================================================
   Typography
   ========================================================= */

.xp-pagehead h1{
  margin:0 0 6px;
  font-size:32px;
  line-height:1.15;
  font-weight:700;
  letter-spacing:-.02em;
}

.xp-pagehead p{
  margin:0;
  font-size:15px;
  line-height:1.5;
  color:#5e728a;
}

.account-grid,
.account-main,
.orders-table,
.order-table,
.profile-form{
  font-size:14px;
  line-height:1.45;
}

.account-main h2,
.account-grid h2{
  font-size:22px;
  line-height:1.25;
}

/* =========================================================
   Interaction
   ========================================================= */

.account-grid .fmp-btn,
.account-grid button,
.account-grid a{
  cursor:pointer;
}

/* =========================================================
   Responsive
   ========================================================= */

@media(max-width:900px){

  .account-grid,
  .account-grid.account-grid-unified{
    grid-template-columns:1fr;
    padding:26px 24px 50px;
  }

  .account-menu,
  .account-menu-unified{
    width:100%;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .order-detail-unified{
    grid-template-columns:1fr;
  }
}

@media(max-width:840px){

  .account-shell{
    padding-left:20px;
    padding-right:20px;
  }

  .account-shell.account-grid{
    grid-template-columns:1fr;
  }
}

@media(max-width:640px){

  .account-grid,
  .account-grid.account-grid-unified{
    padding:22px 16px 42px;
  }

  .account-menu,
  .account-menu-unified{
    grid-template-columns:1fr;
  }
}

/* =========================================================
   Profile / account messages
   ========================================================= */

.profile-form{
  border:1px solid var(--fmp-line);
  border-radius:7px;
  padding:24px;
  max-width:850px;
}

.profile-form .fmp-btn{
  margin-top:20px;
}

.xp-success{
  background:#e7f7ef;
  border:1px solid #b9e5cf;
  color:#0b6c50;
  padding:12px 15px;
  border-radius:5px;
  margin-bottom:18px;
}

/* =========================================================
   Orders / invoices — canonical customer UI
   ========================================================= */

.orders-table{
  margin:32px 0;
}

.orders-table .order-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) 160px 160px;
  gap:20px;
  align-items:center;
  padding:18px;
  border-bottom:1px solid #e5e7eb;
}

.order-table .order-row{
  display:grid;
  grid-template-columns:1.25fr 1fr 1.25fr 1fr auto;
  gap:15px;
  align-items:center;
  padding:14px 17px;
  border-top:1px solid #edf0f3;
}

.order-table .order-head{
  background:#f3f7fa;
  border-top:0;
  font-weight:800;
}

.order-line{
  display:grid;
  grid-template-columns:minmax(0,1fr) 150px 100px;
  gap:15px;
  padding:14px 0;
  border-bottom:1px solid #e5e7eb;
}

.order-line:last-child{
  border-bottom:0;
}

@media(max-width:800px){
  .orders-table .order-row,
  .order-table .order-row,
  .order-line{
    grid-template-columns:1fr;
  }

  .order-table .order-head{
    display:none;
  }
}

/* AvenSci CSP hardening — inline style migration lot 1 */
.avensci-mt-18 { margin-top: 18px; }
.avensci-mt-20 { margin-top: 20px; }
.avensci-m-0 { margin: 0; }
.avensci-account-links-spaced {
    margin-top: 18px;
    line-height: 1.9;
}

.account-menu form,
.account-menu-unified form{
  margin:0;
  padding:10px;
  border-top:1px solid #e4eaf2;
}

.account-menu-logout{
  width:100%;
  min-height:46px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:0 16px;
  border:0;
  border-radius:6px;
  background:#1260c4;
  color:#fff;
  font-size:14px;
  font-weight:700;
  cursor:pointer;
  transition:.15s ease;
}

.account-menu-logout:hover{
  background:#0f52a8;
}

.account-menu-logout svg{
  width:18px;
  height:18px;
  flex:0 0 18px;
}

/* =========================================================
   Account buttons — canonical sizing and alignment
   ========================================================= */

.account-grid .fmp-btn,
.account-shell .fmp-btn,
.profile-form .fmp-btn{
  min-height:46px;
  padding:0 16px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:6px;
  font-size:14px;
  line-height:1.2;
  font-weight:700;
  text-decoration:none;
}

.account-grid .fmp-btn--primary,
.account-shell .fmp-btn--primary,
.profile-form .fmp-btn--primary{
  background:#1260c4;
  border-color:#1260c4;
  color:#fff;
}

.account-grid .fmp-btn--primary:hover,
.account-shell .fmp-btn--primary:hover,
.profile-form .fmp-btn--primary:hover{
  background:#0f52a8;
  border-color:#0f52a8;
}

.account-grid .fmp-btn--outline,
.account-shell .fmp-btn--outline,
.profile-form .fmp-btn--outline{
  background:#fff;
  border-color:#1260c4;
  color:#1260c4;
}

.account-grid .fmp-btn--outline:hover,
.account-shell .fmp-btn--outline:hover,
.profile-form .fmp-btn--outline:hover{
  background:#f5f9ff;
}
