/* =========================
   HAPPY PENS CORE
   ACCOUNT SETTINGS
========================= */

.hpc-account-settings-page,
.hpc-account-settings-page *{
  box-sizing:border-box;
}

.hpc-account-settings-page{
  margin:24px 0;
  color:#171411;
}

/* =========================
   NOTICES
========================= */

.hpc-account-settings-notice,
.hpc-account-settings-error,
.hpc-account-settings-empty{
  margin:0 0 18px;
  padding:14px 16px;
  border-radius:10px;
  font-family:Arial,sans-serif;
  font-size:14px;
  line-height:1.45;
}

.hpc-account-settings-notice{
  background:#F1F7EF;
  border:1px solid rgba(80,130,70,.25);
  color:#31572C;
  animation:hpcAccountNoticeFade 3.5s ease forwards;
}

.hpc-account-settings-error{
  background:#FFF3F0;
  border:1px solid rgba(170,60,40,.25);
  color:#8A2E21;
}

.hpc-account-settings-empty{
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.28);
  color:#5E5A55;
  text-align:center;
}

@keyframes hpcAccountNoticeFade{
  0%{opacity:1;transform:translateY(0);}
  75%{opacity:1;transform:translateY(0);}
  100%{opacity:0;transform:translateY(-6px);}
}

/* =========================
   FORM / HERO
========================= */

.hpc-account-settings-form{
  margin:0;
}

.hpc-account-settings-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  margin:0 0 22px;
  padding:28px;
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.28);
  border-radius:16px;
  box-shadow:0 14px 34px rgba(0,0,0,.04);
}

.hpc-account-settings-kicker{
  margin:0 0 8px;
  color:#B08A52;
  font-family:Arial,sans-serif;
  font-size:11px;
  font-weight:700;
  letter-spacing:.14em;
  line-height:1;
  text-transform:uppercase;
}

.hpc-account-settings-hero h1{
  margin:0 0 10px;
  color:#171411;
  font-family:"Libre Baskerville", Georgia, serif;
  font-size:38px;
  font-weight:400;
  line-height:1.12;
}

.hpc-account-settings-hero p{
  max-width:720px;
  margin:0;
  color:#5E5A55;
  font-family:Arial,sans-serif;
  font-size:15px;
  line-height:1.6;
}

.hpc-account-settings-save-top{
  min-height:40px;
  padding:0 20px;
  background:#B08A52;
  border:1px solid #B08A52;
  border-radius:6px;
  color:#FDFBF8;
  font-family:Arial,sans-serif;
  font-size:12px;
  font-weight:700;
  letter-spacing:.07em;
  line-height:1;
  text-transform:uppercase;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,transform .18s ease;
}

.hpc-account-settings-save-top:hover{
  background:#171411;
  border-color:#171411;
  transform:translateY(-1px);
}

/* =========================
   LAYOUT
========================= */

.hpc-account-settings-layout{
  display:grid;
  grid-template-columns:320px minmax(0,1fr);
  gap:20px;
  align-items:start;
}

.hpc-account-settings-main,
.hpc-account-settings-side{
  min-width:0;
}

/* =========================
   CARDS
========================= */

.hpc-account-card{
  margin:0 0 20px;
  padding:22px;
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.26);
  border-radius:14px;
  box-shadow:0 10px 26px rgba(0,0,0,.035);
}

.hpc-account-card h2{
  margin:0 0 8px;
  color:#171411;
  font-family:"Libre Baskerville", Georgia, serif;
  font-size:24px;
  font-weight:400;
  line-height:1.22;
}

.hpc-account-card p{
  margin:0 0 18px;
  color:#5E5A55;
  font-family:Arial,sans-serif;
  font-size:14px;
  line-height:1.55;
}

/* =========================
   ACCOUNT IDENTITY
========================= */

.hpc-account-card-identity{
  padding:22px;
}

.hpc-account-identity-row-one{
  display:grid;
  grid-template-columns:120px minmax(0,1fr) minmax(0,220px);
  gap:18px;
  align-items:start;
  margin-top:18px;
}

.hpc-account-identity-row-two{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  margin-top:18px;
}

.hpc-account-identity-side-fields{
  display:grid;
  gap:14px;
}

.hpc-account-avatar{
  width:108px;
  height:108px;
  border-radius:50%;
  overflow:hidden;
  background:#F3F0EB;
  border:1px solid rgba(176,138,82,.35);
  box-shadow:0 10px 20px rgba(0,0,0,.05);
}

.hpc-account-avatar img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.hpc-account-avatar-controls{
  min-width:0;
}

.hpc-account-avatar-controls label,
.hpc-account-field label{
  display:block;
  margin:0 0 7px;
  color:#8A6A3F;
  font-family:Arial,sans-serif;
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  line-height:1.2;
  text-transform:uppercase;
}

.hpc-account-avatar-controls input[type="file"]{
  width:100%;
  max-width:420px;
  padding:9px;
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.24);
  border-radius:8px;
  color:#171411;
  font-family:Arial,sans-serif;
  font-size:13px;
}

.hpc-account-avatar-controls small{
  display:block;
  margin-top:8px;
  color:#7A7066;
  font-family:Arial,sans-serif;
  font-size:12px;
  line-height:1.45;
}

.hpc-account-checkbox{
  display:flex !important;
  align-items:center;
  gap:8px;
  margin-top:12px !important;
  color:#5E5A55 !important;
  font-size:13px !important;
  font-weight:600 !important;
  letter-spacing:0 !important;
  text-transform:none !important;
}

.hpc-account-checkbox input{
  width:16px;
  height:16px;
  accent-color:#B08A52;
}

/* =========================
   FIELDS
========================= */

.hpc-account-field{
  min-width:0;
}

.hpc-account-field select,
.hpc-account-field input{
  width:100%;
  min-height:40px;
  padding:8px 11px;
  background:#FFFDF9;
  border:1px solid rgba(176,138,82,.24);
  border-radius:8px;
  color:#171411;
  font-family:Arial,sans-serif;
  font-size:14px;
  line-height:1.35;
}

.hpc-account-field select:focus,
.hpc-account-field input:focus{
  outline:none;
  border-color:rgba(176,138,82,.58);
  box-shadow:0 0 0 3px rgba(176,138,82,.10);
}

.hpc-account-readonly{
  min-height:40px;
  display:flex;
  align-items:center;
  padding:8px 11px;
  background:#FFFDF9;
  border:1px solid rgba(176,138,82,.16);
  border-radius:8px;
  color:#5E5A55;
  font-family:Arial,sans-serif;
  font-size:14px;
  line-height:1.35;
}

/* =========================
   ARCHIVE PREFERENCES
========================= */

.hpc-account-preferences-grid{
  display:grid;
  grid-template-columns:minmax(0,260px) minmax(0,1fr);
  gap:18px;
  align-items:start;
}

.hpc-account-money-settings{
  margin-top:0;
  padding:16px;
  background:#FFFDF9;
  border:1px solid rgba(176,138,82,.18);
  border-radius:12px;
}

.hpc-account-money-settings > *:first-child{
  margin-top:0 !important;
}

.hpc-account-money-settings > *:last-child{
  margin-bottom:0 !important;
}

.hpc-account-money-settings button,
.hpc-account-money-settings a{
  max-width:100%;
}

/* =========================
   COLLECTION MONEY SETTINGS
   Used inside Account Settings
========================= */

.hpc-collection-money-settings{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin:0;
}

.hpc-collection-money-setting-row{
  flex:1 1 180px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  padding:0;
  border:none;
}

.hpc-collection-money-setting-row span{
  color:#171411;
  font-family:Arial,sans-serif;
  font-size:12px;
  font-weight:700;
  line-height:1;
  letter-spacing:.07em;
  text-transform:uppercase;
}

.hpc-collection-money-setting-toggle{
  min-width:48px;
  height:26px;
  padding:0 10px;
  background:transparent;
  border:1px solid #B08A52;
  border-radius:4px;
  color:#B08A52;
  font-family:Arial,sans-serif;
  font-size:11px;
  font-weight:700;
  line-height:1;
  letter-spacing:.06em;
  text-transform:uppercase;
  cursor:pointer;
  transition:background .18s ease,border-color .18s ease,color .18s ease;
}

.hpc-collection-money-setting-toggle:hover,
.hpc-collection-money-setting-toggle[data-enabled="1"]{
  background:#B08A52;
  border-color:#B08A52;
  color:#FDFBF8;
}

/* =========================
   MEMBERSHIP
========================= */

.hpc-account-level{
  margin:12px 0 14px;
  padding:18px 16px;
  background:#171411;
  border-radius:10px;
  color:#FDFBF8;
  font-family:"Libre Baskerville", Georgia, serif;
  font-size:28px;
  font-weight:400;
  line-height:1.15;
  text-align:center;
}

.hpc-account-upgrade{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:38px;
  padding:0 14px;
  background:#B08A52;
  border:1px solid #B08A52;
  border-radius:6px;
  color:#FDFBF8 !important;
  font-family:Arial,sans-serif;
  font-size:11px;
  font-weight:700;
  letter-spacing:.07em;
  text-decoration:none !important;
  text-transform:uppercase;
}

.hpc-account-upgrade:hover{
  background:#171411;
  border-color:#171411;
}

/* =========================
   MEMBERSHIP LIMITS CARD
========================= */

.hpc-account-limits-card p{
  margin-bottom:16px;
}

.hpc-account-limits-v2{
  display:grid;
  gap:13px;
}

.hpc-account-limit-group{
  margin-top:18px;
  padding-top:16px;
  border-top:1px solid rgba(176,138,82,.18);
}

.hpc-account-limit-group:first-child{
  margin-top:0;
  padding-top:0;
  border-top:none;
}

.hpc-account-limit-group h3{
  margin:0 0 10px;
  color:#8A6A3F;
  font-family:Arial,sans-serif;
  font-size:11px;
  font-weight:700;
  letter-spacing:.09em;
  line-height:1.2;
  text-transform:uppercase;
}

.hpc-account-limit-row{
  padding:10px 0 0;
  border-top:1px solid rgba(176,138,82,.14);
}

.hpc-account-limit-row:first-child{
  border-top:none;
  padding-top:0;
}

.hpc-account-limit-row-view,
.hpc-account-limit-row-rule,
.hpc-account-limit-row-access{
  padding:8px 0;
}

.hpc-account-limit-top{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin-bottom:7px;
}

.hpc-account-limit-top span{
  color:#5E5A55;
  font-family:Arial,sans-serif;
  font-size:13px;
  line-height:1.25;
}

.hpc-account-limit-top strong{
  color:#171411;
  font-family:Arial,sans-serif;
  font-size:12px;
  font-weight:700;
  line-height:1.25;
  text-align:right;
  white-space:nowrap;
}

.hpc-account-limit-row-view .hpc-account-limit-top strong,
.hpc-account-limit-row-rule .hpc-account-limit-top strong,
.hpc-account-limit-row-access .hpc-account-limit-top strong{
  color:#8A6A3F;
}

.hpc-account-limit-bar{
  height:6px;
  overflow:hidden;
  background:rgba(176,138,82,.14);
  border-radius:999px;
}

.hpc-account-limit-bar span{
  display:block;
  height:100%;
  max-width:100%;
  background:#B08A52;
  border-radius:999px;
}

.hpc-account-view-limits{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:34px;
  margin-top:16px;
  padding:0 14px;
  border:1px solid rgba(176,138,82,.34);
  border-radius:6px;
  background:#FFFDF9;
  color:#8A6A3F !important;
  font-family:Arial,sans-serif;
  font-size:11px;
  font-weight:700;
  letter-spacing:.07em;
  text-decoration:none !important;
  text-transform:uppercase;
}

.hpc-account-view-limits:hover{
  background:#B08A52;
  border-color:#B08A52;
  color:#FDFBF8 !important;
}

/* =========================
   SECURITY — PASSWORD V2
========================= */

.hpc-account-password-box{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:14px;
  padding:16px;
  background:#FFFDF9;
  border:1px solid rgba(176,138,82,.18);
  border-radius:12px;
}

.hpc-account-password-box .hpc-account-field:first-child{
  grid-column:1 / -1;
}

.hpc-password-input-wrap{
  position:relative;
}

.hpc-password-input-wrap input{
  padding-right:64px;
}

.hpc-password-toggle{
  position:absolute;
  top:50%;
  right:7px;
  transform:translateY(-50%);
  min-height:26px;
  padding:0 9px;
  background:transparent;
  border:1px solid rgba(176,138,82,.32);
  border-radius:5px;
  color:#8A6A3F;
  font-size:10px;
  font-weight:700;
  text-transform:uppercase;
  cursor:pointer;
}

.hpc-password-toggle:hover{
  background:#B08A52;
  color:#FDFBF8;
}

.hpc-password-strength{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
}

.hpc-password-strength span{
  display:block;
  height:6px;
  width:100%;
  background:rgba(176,138,82,.16);
  border-radius:999px;
  overflow:hidden;
}

.hpc-password-strength span::before{
  content:"";
  display:block;
  width:0%;
  height:100%;
  background:#9A4A3A;
  border-radius:999px;
  transition:width .18s ease, background .18s ease;
}

.hpc-password-strength[data-strength="weak"] span::before{
  width:33%;
  background:#9A4A3A;
}

.hpc-password-strength[data-strength="medium"] span::before{
  width:66%;
  background:#B08A52;
}

.hpc-password-strength[data-strength="strong"] span::before{
  width:100%;
  background:#3F7A4D;
}

.hpc-password-strength strong{
  color:#7A7066;
  font-size:11px;
  font-weight:700;
  letter-spacing:.07em;
  text-transform:uppercase;
  white-space:nowrap;
}

.hpc-password-rules{
  grid-column:1 / -1;
  margin:0 !important;
  color:#7A7066 !important;
  font-size:12px !important;
  line-height:1.45 !important;
}

.hpc-account-password-save{
  grid-column:1 / -1;
  justify-self:start;
  min-height:38px;
  padding:0 18px;
  background:#B08A52;
  border:1px solid #B08A52;
  border-radius:6px;
  color:#FDFBF8;
  font-family:Arial,sans-serif;
  font-size:11px;
  font-weight:700;
  letter-spacing:.07em;
  text-transform:uppercase;
  cursor:pointer;
}

.hpc-account-password-save:hover{
  background:#171411;
  border-color:#171411;
}

/* =========================
   DELETE ACCOUNT + BOTTOM SAVE
========================= */

.hpc-account-bottom-row{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:16px;
  align-items:center;
  margin:0 0 20px;
}

.hpc-account-delete-quiet{
  max-width:360px;
  margin:0;
  padding:14px 16px;
  background:#FFFDF9;
  border:1px solid rgba(176,138,82,.18);
  border-radius:10px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:14px;
  align-items:center;
}

.hpc-account-delete-quiet strong{
  display:block;
  margin-bottom:3px;
  color:#5E2D27;
  font-family:Arial,sans-serif;
  font-size:13px;
  font-weight:700;
  line-height:1.25;
}

.hpc-account-delete-quiet span{
  display:block;
  color:#7A7066;
  font-family:Arial,sans-serif;
  font-size:12px;
  line-height:1.4;
}

.hpc-account-delete-open{
  min-height:30px;
  padding:0 12px;
  background:transparent;
  border:1px solid rgba(122,33,24,.35);
  border-radius:5px;
  color:#7A2118;
  font-family:Arial,sans-serif;
  font-size:10px;
  font-weight:700;
  letter-spacing:.07em;
  line-height:1;
  text-transform:uppercase;
  cursor:pointer;
}

.hpc-account-delete-open:hover{
  background:#7A2118;
  border-color:#7A2118;
  color:#fff;
}

.hpc-account-delete-panel{
  grid-column:1 / -1;
  margin-top:4px;
  padding:16px;
  background:#fff;
  border:1px solid rgba(150,40,30,.24);
  border-radius:10px;
}

.hpc-account-delete-panel p{
  margin:0 0 12px;
  color:#5E2D27;
}

.hpc-account-delete-panel input{
  width:100%;
  min-height:40px;
  margin-bottom:10px;
  padding:8px 11px;
  background:#FFF8F6;
  border:1px solid rgba(150,40,30,.28);
  border-radius:8px;
  color:#171411;
  font-family:Arial,sans-serif;
  font-size:14px;
}

.hpc-account-delete-panel button{
  width:100%;
  min-height:38px;
  background:#7A2118;
  border:1px solid #7A2118;
  border-radius:6px;
  color:#fff;
  font-family:Arial,sans-serif;
  font-size:11px;
  font-weight:700;
  letter-spacing:.07em;
  text-transform:uppercase;
  cursor:pointer;
}

.hpc-account-delete-panel button:hover{
  background:#171411;
  border-color:#171411;
}

.hpc-account-bottom-save{
  justify-self:end;
  min-height:38px;
  padding:0 20px;
  background:#B08A52;
  border:1px solid #B08A52;
  border-radius:6px;
  color:#FDFBF8;
  font-family:Arial,sans-serif;
  font-size:12px;
  font-weight:700;
  letter-spacing:.07em;
  line-height:1;
  text-transform:uppercase;
  cursor:pointer;
}

.hpc-account-bottom-save:hover{
  background:#171411;
  border-color:#171411;
}

/* =========================
   MEMBERSHIP LIMITS PAGE
========================= */

.hpc-membership-limits-page{
  margin:24px 0;
  color:#171411;
}

.hpc-membership-limits-hero{
  margin:0 0 22px;
  padding:28px;
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.28);
  border-radius:16px;
  box-shadow:0 14px 34px rgba(0,0,0,.04);
}

.hpc-membership-limits-hero h1{
  margin:0 0 10px;
  color:#171411;
  font-family:"Libre Baskerville", Georgia, serif;
  font-size:38px;
  font-weight:400;
  line-height:1.12;
}

.hpc-membership-limits-hero p{
  max-width:720px;
  margin:0;
  color:#5E5A55;
  font-family:Arial,sans-serif;
  font-size:15px;
  line-height:1.6;
}

.hpc-membership-limits-table-wrap{
  overflow-x:auto;
  background:#FDFBF8;
  border:1px solid rgba(176,138,82,.26);
  border-radius:14px;
  box-shadow:0 10px 26px rgba(0,0,0,.035);
}

.hpc-membership-limits-table{
  width:100%;
  min-width:760px;
  border-collapse:collapse;
  font-family:Arial,sans-serif;
}

.hpc-membership-limits-table th,
.hpc-membership-limits-table td{
  padding:13px 14px;
  border-bottom:1px solid rgba(176,138,82,.14);
  color:#171411;
  font-size:13px;
  line-height:1.35;
  text-align:center;
}

.hpc-membership-limits-table th:first-child,
.hpc-membership-limits-table td:first-child{
  text-align:left;
  font-weight:700;
}

.hpc-membership-limits-table th{
  background:#FFFAF3;
  color:#8A6A3F;
  font-size:11px;
  font-weight:700;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.hpc-membership-limits-table tr:last-child td{
  border-bottom:none;
}

/* =========================
   RESPONSIVE
========================= */

@media(max-width:1100px){

  .hpc-account-settings-layout{
    grid-template-columns:1fr;
  }

  .hpc-account-settings-side{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;
  }

  .hpc-account-settings-side .hpc-account-card{
    margin-bottom:0;
  }
}

@media(max-width:760px){

  .hpc-account-settings-hero{
    align-items:stretch;
    flex-direction:column;
    padding:22px;
  }

  .hpc-account-settings-save-top{
    width:100%;
  }

  .hpc-account-settings-hero h1{
    font-size:30px;
  }

  .hpc-account-settings-side,
  .hpc-account-identity-row-one,
  .hpc-account-identity-row-two,
  .hpc-account-preferences-grid,
  .hpc-account-password-box,
  .hpc-account-delete-quiet{
    grid-template-columns:1fr;
  }

  .hpc-account-avatar{
    margin:0 auto;
  }

  .hpc-account-avatar-controls input[type="file"]{
    max-width:100%;
  }

  .hpc-account-checkbox{
    justify-content:center;
  }

  .hpc-account-password-save,
  .hpc-account-bottom-save,
  .hpc-account-delete-open{
    width:100%;
  }

  .hpc-account-bottom-row{
    grid-template-columns:1fr;
  }

  .hpc-account-delete-quiet{
    max-width:none;
  }
}

@media(max-width:520px){

  .hpc-account-settings-page{
    margin:18px 0;
  }

  .hpc-account-card{
    padding:18px;
  }

  .hpc-account-settings-hero{
    border-radius:12px;
  }

  .hpc-password-strength{
    grid-template-columns:1fr;
  }

  .hpc-password-strength strong{
    white-space:normal;
  }
}