/* V38: rich customer account dashboard. */
.woocommerce-account .eps-page {
  width: min(1500px, 96vw) !important;
  max-width: 1500px !important;
  padding-top: 18px !important;
  padding-bottom: 28px !important;
}

.woocommerce-account .eps-article {
  max-width: none !important;
  background: transparent !important;
}

.woocommerce-account .eps-article > h1 {
  display: none !important;
}

.woocommerce-account .woocommerce {
  width: min(1500px, 96vw) !important;
  max-width: 1500px !important;
  display: grid !important;
  grid-template-columns: 240px minmax(0, 1fr) !important;
  gap: 18px !important;
  align-items: start !important;
  direction: rtl;
}

.woocommerce-MyAccount-navigation {
  order: 1;
  position: sticky !important;
  top: 96px !important;
  min-height: 0;
  background: #fff !important;
  border: 1px solid #e5edf6 !important;
  border-radius: 8px !important;
  padding: 12px !important;
  box-shadow: 0 12px 28px rgba(15,23,42,.055) !important;
}

.eps-v38-nav-brand {
  padding: 14px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: linear-gradient(180deg, #0d2b5c 0%, #0b3774 100%);
  color: #fff;
}

.eps-v38-nav-logo {
  min-height: 42px;
  display: grid;
  align-items: center;
}

.eps-v38-nav-logo img {
  max-width: 150px !important;
  max-height: 46px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
}

.eps-v38-nav-logo strong {
  font-size: 18px;
  line-height: 1.2;
}

.eps-v38-nav-brand span {
  display: block;
  margin-top: 4px;
  color: #dbeafe;
  font-weight: 800;
  font-size: 12px;
}

.woocommerce-MyAccount-content {
  order: 2;
  min-width: 0;
}

.woocommerce-MyAccount-navigation ul {
  display: grid;
  gap: 4px;
}

.woocommerce-MyAccount-navigation li a {
  min-height: 38px;
  align-items: center;
  justify-content: space-between;
  color: #43536b !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid transparent;
}

.woocommerce-MyAccount-navigation li a:after {
  content: "";
  width: 16px;
  height: 16px;
  border: 1px solid #d9e4f2;
  border-radius: 5px;
  opacity: 1;
  background: #f8fbff;
}

.woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-MyAccount-navigation li a:hover {
  background: #fff8e8 !important;
  color: #0d2b5c !important;
  border-color: #f3d899;
}

.woocommerce-MyAccount-navigation li.is-active a:after,
.woocommerce-MyAccount-navigation li a:hover:after {
  background: #d9a21b;
  border-color: #d9a21b;
}

.woocommerce-MyAccount-navigation-link--customer-logout a {
  margin-top: 10px;
  border: 1px solid #fee2e2 !important;
  color: #b42318 !important;
  background: #fff7f7 !important;
}

.eps-v38-nav-status {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  display: grid;
  gap: 8px;
  color: #0d2b5c;
  background: #fbfdff;
}

.eps-v38-nav-status span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
}

.eps-v38-nav-status i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.16);
}

.eps-v38-nav-status a {
  min-height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: #0d2b5c;
  text-decoration: none;
  font-weight: 900;
  background: #fff;
}

.eps-v38-account {
  display: grid;
  gap: 12px;
}

.eps-v38-hero,
.eps-v38-panel,
.eps-v38-stat,
.eps-v38-stage-row article {
  background: #fff;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(15,23,42,.035);
}

.eps-v38-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
}

.eps-v38-hero span {
  color: #d49a12;
  font-weight: 900;
}

.eps-v38-hero h1 {
  color: #0d2b5c;
  margin: 3px 0;
  font-size: 24px;
  line-height: 1.25;
}

.eps-v38-hero p {
  margin: 0;
  color: #64748b;
}

.eps-v38-hero-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.eps-v38-primary,
.eps-v38-account .button {
  border-radius: 7px !important;
  font-weight: 900 !important;
  min-height: 34px !important;
  padding: 7px 12px !important;
  line-height: 1.2 !important;
}

.eps-v38-primary {
  background: #0d2b5c !important;
  color: #fff !important;
  border-color: #0d2b5c !important;
}

.eps-v38-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.eps-v38-stat {
  min-height: 96px;
  padding: 12px 14px;
  display: grid;
  align-content: center;
  gap: 5px;
  position: relative;
  overflow: hidden;
}

.eps-v38-stat:after {
  content: "";
  position: absolute;
  top: 12px;
  left: 12px;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #f2f6ff;
  border: 1px solid #dbeafe;
}

.eps-v38-stat span {
  color: #475569;
  font-weight: 800;
}

.eps-v38-stat strong {
  color: #0d2b5c;
  font-size: 22px;
  line-height: 1;
}

.eps-v38-stat a {
  font-size: 12px;
}

.eps-v38-stat a,
.eps-v38-panel-head a {
  color: #0d2b5c;
  font-weight: 900;
  text-decoration: none;
}

.eps-v38-panel {
  padding: 14px;
}

.eps-v38-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.eps-v38-panel-head h2 {
  margin: 0;
  color: #0d2b5c;
  font-size: 17px;
}

.eps-v38-panel-head span {
  color: #64748b;
  font-weight: 800;
}

.eps-v38-stage-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: center;
}

.eps-v38-stage-row article {
  min-height: 90px;
  padding: 12px 10px;
  text-align: center;
  display: grid;
  align-content: center;
  gap: 6px;
  position: relative;
}

.eps-v38-stage-row article + article:before {
  content: "";
  position: absolute;
  top: 50%;
  right: -10px;
  width: 10px;
  border-top: 1px dashed #0d2b5c;
}

.eps-v38-stage-row strong {
  color: #0d2b5c;
}

.eps-v38-stage-row b {
  color: #0d2b5c;
  font-size: 22px;
}

.eps-v38-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, .9fr);
  gap: 12px;
}

.eps-v38-dashboard-grid--bottom {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.eps-v38-table {
  overflow-x: auto;
}

.eps-v38-table table {
  width: 100%;
  border-collapse: collapse;
}

.eps-v38-table th,
.eps-v38-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #edf2f7;
  text-align: right;
  white-space: nowrap;
  font-size: 13px;
}

.eps-v38-table th {
  color: #64748b;
  font-weight: 900;
  background: #f8fbff;
}

.eps-v38-table mark {
  background: #eef6ff;
  color: #0d2b5c;
  border-radius: 7px;
  padding: 4px 9px;
  font-weight: 900;
}

.eps-v38-action-list,
.eps-v38-support,
.eps-v38-notifications {
  display: grid;
  gap: 8px;
}

.eps-v38-action,
.eps-v38-support a {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #e5edf6;
  border-radius: 8px;
  color: #0d2b5c;
  text-decoration: none;
  background: #fbfdff;
}

.eps-v38-action strong,
.eps-v38-support strong {
  font-weight: 900;
}

.eps-v38-action span,
.eps-v38-support span {
  color: #64748b;
}

.eps-v38-files,
.eps-v38-products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.eps-v38-files article,
.eps-v38-products article {
  border: 1px solid #e5edf6;
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 5px;
  min-width: 0;
}

.eps-v38-file-thumb {
  height: 58px;
  display: grid;
  place-items: center;
  background: #f8fbff;
  border: 1px dashed #dbeafe;
  border-radius: 8px;
  font-size: 28px;
}

.eps-v38-files strong,
.eps-v38-products strong {
  color: #0d2b5c;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eps-v38-products img {
  width: 100% !important;
  height: 78px !important;
  object-fit: contain !important;
  border-radius: 8px !important;
  background: #f8fbff;
}

.eps-v38-current {
  display: grid;
  gap: 10px;
}

.eps-v38-progress {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 5px;
}

.eps-v38-progress span {
  min-height: 36px;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 8px;
  border: 1px solid #e5edf6;
  color: #64748b;
  font-weight: 900;
  font-size: 11px;
}

.eps-v38-progress span.is-done {
  background: #0d2b5c;
  color: #fff;
  border-color: #0d2b5c;
}

.eps-v38-progress span.is-current {
  background: #d9a21b;
  border-color: #d9a21b;
}

.eps-v38-profile {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 10px 14px;
  margin: 0;
}

.eps-v38-profile dt {
  color: #64748b;
  font-weight: 900;
}

.eps-v38-profile dd {
  margin: 0;
  color: #0d2b5c;
  font-weight: 800;
}

.eps-v38-notifications label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid #edf2f7;
  font-weight: 900;
  color: #0d2b5c;
}

.eps-v38-notifications input[type="checkbox"] {
  width: 42px;
  height: 22px;
  accent-color: #0d2b5c;
}

@media (max-width: 1180px) {
  .woocommerce-account .woocommerce {
    grid-template-columns: 1fr !important;
  }
  .woocommerce-MyAccount-navigation {
    position: static !important;
    min-height: 0;
  }
  .woocommerce-MyAccount-navigation ul {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .eps-v38-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .eps-v38-stage-row,
  .eps-v38-dashboard-grid,
  .eps-v38-dashboard-grid--bottom {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .eps-v38-hero,
  .eps-v38-panel-head {
    align-items: stretch;
    flex-direction: column;
  }
  .eps-v38-stat-grid,
  .eps-v38-files,
  .eps-v38-products,
  .eps-v38-progress,
  .woocommerce-MyAccount-navigation ul {
    grid-template-columns: 1fr;
  }
}
