/* e-man Front Custom — Account pages v1.5.0 */
[id^="account-"].container,
#common-success.container,
#account-affiliate.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 46px 0 84px;
}

[id^="account-"] > .row,
#common-success > .row { margin: 0; }
[id^="account-"] #content,
#common-success #content { width: 100%; padding: 0; }

[id^="account-"] .page-title,
#common-success .page-title {
  margin: 0 0 28px;
  color: #f7f8fa;
  font-size: clamp(28px, 3vw, 42px);
  font-weight: 800;
  letter-spacing: -.035em;
  text-align: left;
}

[id^="account-"] h2.title,
[id^="account-"] legend,
#common-success h2.title {
  margin: 0 0 18px;
  padding: 0 0 13px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #f4f7fa;
  font-size: 18px;
  font-weight: 800;
}

[id^="account-"] p,
[id^="account-"] .help-block,
#common-success p { color: #aeb8c2; line-height: 1.7; }
[id^="account-"] a,
#common-success a { color: #9bb6ff; }

/* Cards and common surfaces */
[id^="account-"] .well,
[id^="account-"] fieldset,
[id^="account-"] .table-responsive,
[id^="account-"] .panel,
[id^="account-"] .account-page > div,
#common-success #content {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 15px;
  background: #20272e;
  box-shadow: 0 18px 50px rgba(0,0,0,.12);
}

[id^="account-"] .well,
[id^="account-"] fieldset,
#common-success #content { padding: 25px; }

[id^="account-"] fieldset + fieldset { margin-top: 18px; }
[id^="account-"] .well { min-height: 100%; margin: 0; }

/* Login */
#account-login .login-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
}
#account-login .login-box > [class*="col-"] { width: auto; padding: 0; }
#account-login .well { display: flex; flex-direction: column; }
#account-login .well .buttons { margin-top: auto; padding-top: 22px; }
#account-login .forgot-password { display: inline-block; margin: 2px 0 4px; font-size: 12px; }

/* Forms */
[id^="account-"] .form-horizontal {
  max-width: 980px;
  margin: 0 auto;
}
[id^="account-"] .form-group { margin: 0 0 16px; }
[id^="account-"] .control-label,
[id^="account-"] label {
  color: #cbd4dc;
  font-size: 12px;
  font-weight: 700;
}
[id^="account-"] .form-control,
[id^="account-"] select.form-control,
[id^="account-"] textarea.form-control {
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  background: #181f25;
  color: #f4f7f9;
  box-shadow: none;
}
[id^="account-"] textarea.form-control { min-height: 120px; resize: vertical; }
[id^="account-"] .form-control:focus {
  border-color: #84a7ff;
  box-shadow: 0 0 0 3px rgba(132,167,255,.12);
}
[id^="account-"] .form-control::placeholder { color: #74818c; }
[id^="account-"] input[type="checkbox"],
[id^="account-"] input[type="radio"] { accent-color: #84a7ff; }
[id^="account-"] .text-danger { margin-top: 5px; color: #ff9191; font-size: 11px; }
[id^="account-"] .required .control-label::before,
[id^="account-"] .required > label::before { color: #ff8383; }

/* Buttons */
[id^="account-"] .buttons,
#common-success .buttons {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}
[id^="account-"] .buttons::before,
[id^="account-"] .buttons::after { display: none; }
[id^="account-"] .buttons .pull-left,
[id^="account-"] .buttons .pull-right,
#common-success .buttons .pull-left,
#common-success .buttons .pull-right { float: none !important; }
[id^="account-"] .btn,
#common-success .btn {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 800;
}
[id^="account-"] .btn-primary,
#common-success .btn-primary {
  border-color: #84a7ff;
  background: #84a7ff;
  color: #111820;
}
[id^="account-"] .btn-default,
#common-success .btn-default {
  border-color: rgba(255,255,255,.17);
  background: transparent;
  color: #eef2f5;
}
[id^="account-"] .btn-danger { border-color: #704247; background: #704247; color: #fff; }
[id^="account-"] .btn-info { border-color: rgba(132,167,255,.35); background: rgba(132,167,255,.12); color: #b7c9ff; }

/* Dashboard */
#account-account .account-page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
#account-account .account-page > .page-title,
#account-account .account-page > .alert,
#account-account .account-page > script,
#account-account .account-page > #content-top,
#account-account .account-page > #content-bottom { grid-column: 1 / -1; }
#account-account .account-page > div { padding: 23px; }
#account-account .account-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
#account-account .account-list li { margin: 0; }
#account-account .account-list a {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 36px 12px 14px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: #1a2127;
  color: #dce3e9;
  text-decoration: none;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}
#account-account .account-list a::after {
  content: '→';
  position: absolute;
  right: 14px;
  color: #84a7ff;
}
#account-account .account-list a:hover {
  border-color: rgba(132,167,255,.38);
  background: #1d252c;
  transform: translateY(-1px);
}

/* Tables */
[id^="account-"] .table-responsive {
  overflow: hidden;
  margin: 0 0 20px;
  padding: 0;
}
[id^="account-"] .table { margin: 0; background: transparent; }
[id^="account-"] .table > thead > tr > td,
[id^="account-"] .table > thead > tr > th {
  padding: 13px 14px;
  border-color: rgba(255,255,255,.07);
  background: #171e24;
  color: #9ba7b2;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
}
[id^="account-"] .table > tbody > tr > td,
[id^="account-"] .table > tfoot > tr > td {
  padding: 14px;
  border-color: rgba(255,255,255,.07);
  background: transparent;
  color: #d8dfe5;
  vertical-align: middle;
}
[id^="account-"] .table-hover > tbody > tr:hover > td { background: rgba(255,255,255,.025); }
[id^="account-"] .img-thumbnail { border: 0; border-radius: 8px; background: #f5f5f2; }

/* Wishlist */
#account-wishlist .table .btn { min-width: 42px; padding: 0 12px; }
#account-wishlist .table td:nth-last-child(1) { white-space: nowrap; }

/* Pagination */
[id^="account-"] .pagination-results { display: flex; align-items: center; justify-content: space-between; margin: 20px 0 0; }
[id^="account-"] .pagination-results > [class*="col-"] { width: auto; padding: 0; }
[id^="account-"] .pagination > li > a,
[id^="account-"] .pagination > li > span { border-color: rgba(255,255,255,.09); background: #20272e; color: #cfd7de; }
[id^="account-"] .pagination > .active > span { border-color: #84a7ff; background: #84a7ff; color: #111820; }

/* Alerts and success screens */
[id^="account-"] .alert,
#common-success .alert {
  border: 0;
  border-radius: 10px;
  color: #eaf0f5;
}
[id^="account-"] .alert-success { background: rgba(79,162,112,.18); }
[id^="account-"] .alert-danger { background: rgba(202,80,80,.18); }
#common-success #content { max-width: 760px; margin: 0 auto; text-align: center; }
#common-success #content::before {
  content: '✓';
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  margin: 0 auto 22px;
  border: 1px solid rgba(132,167,255,.42);
  border-radius: 50%;
  background: rgba(132,167,255,.10);
  color: #9bb6ff;
  font-size: 30px;
}
#common-success .buttons { justify-content: center; }

@media (max-width: 900px) {
  #account-account .account-page { grid-template-columns: 1fr; }
  #account-account .account-list { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767px) {
  [id^="account-"].container,
  #common-success.container { width: min(100% - 24px, 680px); padding: 30px 0 62px; }
  [id^="account-"] .page-title,
  #common-success .page-title { margin-bottom: 20px; font-size: 29px; }
  #account-login .login-box { grid-template-columns: 1fr; }
  [id^="account-"] .well,
  [id^="account-"] fieldset,
  #account-account .account-page > div,
  #common-success #content { padding: 19px 16px; }
  [id^="account-"] .form-horizontal { max-width: none; }
  [id^="account-"] .form-horizontal .control-label,
  [id^="account-"] .form-horizontal [class*="col-sm-"] { width: 100%; float: none; padding-left: 0; padding-right: 0; }
  [id^="account-"] .form-horizontal .control-label { margin-bottom: 7px; text-align: left; }
  [id^="account-"] .buttons { flex-direction: column-reverse; }
  [id^="account-"] .buttons > div,
  [id^="account-"] .buttons .btn,
  #common-success .buttons .btn { width: 100%; }
  #account-account .account-list { grid-template-columns: 1fr; }
  [id^="account-"] .pagination-results { align-items: flex-start; flex-direction: column; gap: 12px; }

  /* Convert data tables into readable cards on mobile. */
  [id^="account-"] .table-responsive { overflow: visible; border: 0; background: transparent; box-shadow: none; }
  [id^="account-"] .table-responsive table,
  [id^="account-"] .table-responsive thead,
  [id^="account-"] .table-responsive tbody,
  [id^="account-"] .table-responsive tr,
  [id^="account-"] .table-responsive td { display: block; width: 100%; }
  [id^="account-"] .table-responsive thead { display: none; }
  [id^="account-"] .table-responsive tbody tr {
    margin: 0 0 12px;
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;
    background: #20272e;
  }
  [id^="account-"] .table-responsive tbody td {
    display: grid;
    grid-template-columns: minmax(105px, 42%) minmax(0, 1fr);
    gap: 12px;
    padding: 9px 0;
    border: 0;
    border-bottom: 1px solid rgba(255,255,255,.06);
    text-align: right !important;
  }
  [id^="account-"] .table-responsive tbody td:last-child { border-bottom: 0; }
  [id^="account-"] .table-responsive tbody td::before {
    content: attr(data-label);
    color: #8f9ca7;
    font-size: 11px;
    font-weight: 800;
    text-align: left;
  }
}
