:root {
  --ac-blue: #1769e0;
  --ac-navy: #0c1838;
  --ac-bg: #f4f7fb;
  --ac-line: #e1e8f1;
  --ac-muted: #68758b;
  --ac-green: #07875f;
  --ac-red: #c93636;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--ac-bg);
  color: #172033;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
.account-site-header {
  height: 70px;
  background: #fff;
  border-bottom: 1px solid var(--ac-line);
  display: flex;
  align-items: center;
  padding: 0 max(20px, calc((100vw - 1320px) / 2));
  gap: 35px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.account-site-header img {
  width: 132px;
  max-height: 48px;
  object-fit: contain;
}
.account-site-header nav {
  display: flex;
  gap: 23px;
  margin-left: auto;
}
.account-site-header a {
  text-decoration: none;
  color: #27344a;
  font-weight: 700;
}
.account-logout {
  border: 1px solid var(--ac-line);
  background: #fff;
  border-radius: 9px;
  padding: 9px 14px;
  font-weight: 750;
  cursor: pointer;
}
.account-shell {
  max-width: 1320px;
  margin: 24px auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 20px;
}
.account-sidebar,
.account-panel {
  background: #fff;
  border: 1px solid var(--ac-line);
  border-radius: 14px;
  box-shadow: 0 5px 20px rgba(15, 23, 42, 0.05);
}
.account-sidebar {
  position: sticky;
  top: 94px;
  align-self: start;
  overflow: hidden;
}
.account-user {
  padding: 20px;
  border-bottom: 1px solid var(--ac-line);
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 3px 11px;
  align-items: center;
}
.account-user > div {
  grid-row: 1/3;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--ac-navy);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 850;
}
.account-user small {
  color: var(--ac-muted);
}
#accountNav {
  display: grid;
  padding: 9px;
}
#accountNav button {
  border: 0;
  background: transparent;
  text-align: left;
  padding: 11px 12px;
  border-radius: 8px;
  color: #536178;
  font-weight: 700;
  cursor: pointer;
}
#accountNav button:hover,
#accountNav button.active {
  background: #eaf2ff;
  color: var(--ac-blue);
}
.account-content {
  min-width: 0;
}
.account-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}
.account-head h1 {
  margin: 0;
  font-size: 1.65rem;
}
.account-head p {
  margin: 4px 0 0;
  color: var(--ac-muted);
}
.account-btn {
  border: 1px solid var(--ac-line);
  background: #fff;
  border-radius: 9px;
  padding: 9px 13px;
  font-weight: 750;
  cursor: pointer;
}
.account-btn.primary {
  background: var(--ac-blue);
  border-color: var(--ac-blue);
  color: #fff;
}
.account-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 15px;
}
.account-kpi {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--ac-line);
  border-radius: 12px;
}
.account-kpi small {
  color: var(--ac-muted);
  font-weight: 700;
}
.account-kpi strong {
  display: block;
  font-size: 1.45rem;
  margin-top: 6px;
}
.account-panel {
  margin-bottom: 15px;
  overflow: hidden;
}
.account-panel h2 {
  font-size: 1rem;
  margin: 0;
  padding: 15px 17px;
  border-bottom: 1px solid var(--ac-line);
}
.account-panel-body {
  padding: 17px;
}
.account-table-wrap {
  overflow-x: auto;
}
.account-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
.account-table th,
.account-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f6;
  text-align: left;
  font-size: 0.78rem;
}
.account-table th {
  background: #f8fafc;
  color: var(--ac-muted);
  text-transform: uppercase;
  font-size: 0.65rem;
}
.account-table tr[data-open] {
  cursor: pointer;
}
.account-table tr[data-open]:hover {
  background: #f7faff;
}
.account-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 99px;
  background: #eaf2ff;
  color: #1d59b7;
  font-size: 0.68rem;
  font-weight: 800;
}
.account-badge.green {
  background: #e6f8f1;
  color: #047857;
}
.account-badge.orange {
  background: #fff4df;
  color: #a85c08;
}
.account-empty {
  text-align: center;
  padding: 45px 20px;
  color: var(--ac-muted);
}
.account-empty strong {
  display: block;
  color: #172033;
  font-size: 1.05rem;
  margin-bottom: 7px;
}
.account-empty .account-btn {
  display: inline-block;
  text-decoration: none;
  margin-top: 13px;
}
.account-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 13px;
}
.account-form label {
  display: grid;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 750;
}
.account-form input,
.account-form select,
.account-form textarea {
  width: 100%;
  border: 1px solid var(--ac-line);
  border-radius: 8px;
  padding: 10px;
}
.account-form .full {
  grid-column: 1/-1;
}
.account-addresses {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.account-address {
  border: 1px solid var(--ac-line);
  border-radius: 11px;
  padding: 14px;
  position: relative;
}
.account-address p {
  color: var(--ac-muted);
  font-size: 0.76rem;
  line-height: 1.55;
}
.account-address-actions {
  display: flex;
  gap: 6px;
}
.account-timeline {
  display: grid;
  gap: 0;
}
.account-timeline > div {
  padding: 12px 0 12px 22px;
  border-left: 2px solid #dce8fa;
  position: relative;
}
.account-timeline > div:before {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ac-blue);
  left: -6px;
  top: 17px;
}
.account-timeline small {
  display: block;
  color: var(--ac-muted);
}
#accountMessage .ok,
#accountMessage .error {
  padding: 11px 13px;
  border-radius: 9px;
  margin-bottom: 12px;
}
.ok {
  background: #e8f8f1;
  color: #047857;
}
.error {
  background: #feecec;
  color: #a91e1e;
}
.account-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 12, 28, 0.6);
  z-index: 100;
  padding: 20px;
  place-items: center;
}
.account-modal.show {
  display: grid;
}
.account-modal-card {
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  padding: 20px;
  position: relative;
}
.account-modal-close {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
}
.account-loading {
  padding: 50px;
  text-align: center;
  color: var(--ac-muted);
}
.verified {
  color: var(--ac-green);
  font-size: 0.7rem;
  font-weight: 800;
}
@media (max-width: 900px) {
  .account-shell {
    grid-template-columns: 1fr;
  }
  .account-sidebar {
    position: static;
  }
  .account-user {
    display: none;
  }
  #accountNav {
    display: flex;
    overflow-x: auto;
  }
  #accountNav button {
    white-space: nowrap;
  }
  .account-kpis {
    grid-template-columns: repeat(2, 1fr);
  }
  .account-site-header nav {
    display: none;
  }
}
@media (max-width: 600px) {
  .account-site-header {
    padding: 0 14px;
  }
  .account-shell {
    padding: 0 12px;
    margin: 14px auto;
  }
  .account-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .account-kpis,
  .account-addresses,
  .account-form {
    grid-template-columns: 1fr;
  }
  .account-form .full {
    grid-column: auto;
  }
  .account-table th,
  .account-table td {
    padding: 10px;
  }
  .account-site-header img {
    width: 110px;
  }
}
.account-login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  background: #eef2f7;
  border-radius: 10px;
  margin: 14px 0;
}
.account-login-tabs button {
  border: 0;
  background: transparent;
  padding: 9px 7px;
  border-radius: 7px;
  color: var(--ac-muted);
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}
.account-login-tabs button.active {
  background: #fff;
  color: var(--ac-blue);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.account-login-message {
  min-height: 20px;
  font-size: 0.75rem;
  color: var(--ac-muted);
}
.account-login-message.error {
  color: var(--ac-red);
}

/* Account dashboard phone safeguards */
@media (max-width: 640px) {
  .account-site-header {
    height: 64px;
    padding: 0 12px;
  }
  .account-site-header nav {
    display: none;
  }
  .account-shell {
    display: block;
    margin: 14px auto;
    padding: 0 12px;
  }
  .account-sidebar {
    position: static;
    margin-bottom: 14px;
  }
  .account-kpis,
  .account-addresses,
  .account-form {
    grid-template-columns: 1fr;
  }
  .account-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .account-table-wrap {
    overflow-x: auto;
  }
  .account-modal {
    padding: 10px;
  }
  .account-modal-card {
    padding: 16px;
    max-height: 92vh;
  }
}
