/* ==========================================================
   JPRO — Account pages (Profile / Orders / Change password)
   Width matches header (1280px + 24px padding)
   ========================================================== */

.t1-profile {
  --p-navy: #091654;
  --p-deep: #03318f;
  --p-blue: #1a56c4;
  --p-accent: #3d5bbf;
  --p-muted: #64748b;
  --p-line: #e6ebf4;
  --p-soft: #f3f5f9;
  --p-active-bg: rgba(61, 91, 191, 0.12);
  --p-card-shadow: 0 8px 28px rgba(9, 22, 84, 0.07);

  width: 100%;
  min-height: calc(100vh - 120px);
  padding: 36px 0 56px;
  background: var(--p-soft);
  box-sizing: border-box;
}

/* Same width as .header-inner / .t1-header-nav-inner */
.t1-profile__layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.t1-profile__sidebar,
.t1-profile__main {
  background: #fff;
  border: 1px solid rgba(9, 22, 84, 0.05);
  border-radius: 16px;
  box-shadow: var(--p-card-shadow);
  box-sizing: border-box;
}

.t1-profile__sidebar {
  padding: 22px 18px;
  position: sticky;
  top: 112px;
}

.t1-profile__user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--p-line);
}

.t1-profile__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #03318f, #3d5bbf);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(3, 49, 143, 0.28);
}

.t1-profile__user-meta {
  min-width: 0;
}

.t1-profile__user-name {
  margin: 0 0 2px;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t1-profile__user-email {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t1-profile__menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.t1-profile__menu-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #4b5563;
  font-family: "Montserrat", sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
  transition: background 0.18s ease, color 0.18s ease;
}

.t1-profile__menu-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #94a3b8;
}

.t1-profile__menu-icon svg {
  width: 18px;
  height: 18px;
  display: block;
}

.t1-profile__menu-link:hover {
  background: rgba(61, 91, 191, 0.06);
  color: var(--p-navy);
}

.t1-profile__menu-link:hover .t1-profile__menu-icon {
  color: var(--p-accent);
}

.t1-profile__menu-link.is-active {
  background: var(--p-active-bg);
  color: var(--p-deep);
  box-shadow: 0 1px 4px rgba(3, 49, 143, 0.06);
}

.t1-profile__menu-link.is-active .t1-profile__menu-icon {
  color: var(--p-accent);
}

.t1-profile__sidebar-foot {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--p-line);
}

.t1-profile__logout:hover {
  background: rgba(239, 68, 68, 0.06);
  color: #dc2626;
}

.t1-profile__logout:hover .t1-profile__menu-icon {
  color: #dc2626;
}

/* Main card */
.t1-profile__main {
  padding: 32px 34px;
  min-width: 0;
}

.t1-profile__main-head {
  margin-bottom: 22px;
}

.t1-profile__main-title {
  margin: 0 0 6px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--p-navy);
  line-height: 1.2;
}

.t1-profile__main-lede {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  color: var(--p-muted);
}

.t1-profile__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 770px;
}

.t1-profile__field {
  display: grid;
  gap: 7px;
}

.t1-profile__field label {
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

.t1-profile__field input,
.t1-profile__field select {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid #dde3ee;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  font-family: "Open Sans", sans-serif;
  font-size: 14.5px;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
}

.t1-profile__field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M1.4.6L6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px 7px;
  padding-right: 36px;
  cursor: pointer;
}

.t1-profile__field input::placeholder {
  color: #9aa8c2;
}

.t1-profile__field input:focus,
.t1-profile__field select:focus {
  border-color: var(--p-accent);
  box-shadow: 0 0 0 3px rgba(61, 91, 191, 0.14);
}

.t1-profile__field .sf-auth__field-error {
  margin: 0;
  font-family: "Open Sans", sans-serif;
  font-size: 12.5px;
  color: #dc2626;
}

.t1-profile__field.is-invalid input,
.t1-profile__field input.is-invalid {
  border-color: #f87171 !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.18) !important;
}

.t1-profile__field--password .sf-auth__password-wrap input {
  padding-right: 52px;
}

.t1-profile__actions {
  margin-top: 6px;
}

.t1-profile__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 28px;
  border: 0;
  border-radius: 6px;
  background: var(--p-accent);
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(61, 91, 191, 0.28);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.t1-profile__btn:hover {
  background: var(--p-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(3, 49, 143, 0.32);
}

/* Orders table panel */
.t1-profile__orders-panel {
  border: 1px solid var(--p-line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.t1-profile__orders-head {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr 1fr;
  gap: 12px;
  padding: 14px 18px;
  background: #eef2fb;
  font-family: "Montserrat", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--p-navy);
}

.t1-profile__orders-body {
  min-height: 120px;
}

.t1-profile__order-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr 1fr 1fr;
  gap: 12px;
  padding: 16px 18px;
  border-top: 1px solid var(--p-line);
  font-family: "Open Sans", sans-serif;
  font-size: 14px;
  color: #334155;
  align-items: center;
}

.t1-profile__order-row strong {
  color: var(--p-navy);
  font-weight: 700;
}

.t1-profile__order-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(61, 91, 191, 0.1);
  color: var(--p-deep);
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
}

.t1-profile__orders-empty {
  padding: 48px 20px;
  text-align: center;
}

.t1-profile__orders-empty[hidden] {
  display: none !important;
}

.t1-profile__orders-empty p {
  margin: 0 0 10px;
  font-family: "Open Sans", sans-serif;
  font-size: 15px;
  color: var(--p-muted);
}

.t1-profile__orders-empty a {
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--p-accent);
  text-decoration: none;
}

.t1-profile__orders-empty a:hover {
  color: var(--p-deep);
  text-decoration: underline;
}

.t1-profile .sf-auth__alert {
  margin: 0 0 14px;
}

/* ── Skeleton loader ── */
.t1-profile.is-loading [data-profile-content] {
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.t1-profile:not(.is-loading) [data-profile-loader] {
  display: none !important;
}

.t1-profile__loader {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.t1-profile__loader-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.t1-profile__loader-card {
  background: #fff;
  border: 1px solid rgba(9, 22, 84, 0.05);
  border-radius: 16px;
  box-shadow: var(--p-card-shadow);
  box-sizing: border-box;
}

.t1-profile__loader-sidebar {
  padding: 22px 18px;
}

.t1-profile__loader-main {
  padding: 32px 34px;
  min-height: 320px;
}

.t1-profile__loader-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--p-line);
}

.t1-profile__loader-user-meta {
  flex: 1;
  display: grid;
  gap: 8px;
}

.t1-profile__loader-menu {
  display: grid;
  gap: 8px;
}

.t1-profile__loader-fields {
  display: grid;
  gap: 10px;
  max-width: 520px;
}

.t1-profile__loader-table {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.t1-profile__loader-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.t1-skel {
  display: block;
  background: linear-gradient(
    90deg,
    #e8eef8 0%,
    #f5f8fd 40%,
    #e8eef8 80%
  );
  background-size: 200% 100%;
  animation: t1-skel-shimmer 1.25s ease-in-out infinite;
  border-radius: 10px;
}

.t1-skel--avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  flex-shrink: 0;
}

.t1-skel--line {
  height: 12px;
  width: 100%;
  border-radius: 6px;
}

.t1-skel--sm {
  height: 10px;
}

.t1-skel--w40 { width: 40%; }
.t1-skel--w50 { width: 50%; }
.t1-skel--w60 { width: 60%; }
.t1-skel--w90 { width: 90%; }

.t1-skel--nav {
  height: 42px;
  border-radius: 10px;
}

.t1-skel--nav-foot {
  margin-top: 10px;
}

.t1-skel--title {
  height: 28px;
  width: 42%;
  margin-bottom: 10px;
  border-radius: 8px;
}

.t1-skel--label {
  height: 12px;
  width: 28%;
  margin-top: 8px;
  border-radius: 6px;
}

.t1-skel--input {
  height: 46px;
  width: 100%;
  border-radius: 10px;
}

.t1-skel--btn {
  height: 46px;
  width: 160px;
  margin-top: 12px;
  border-radius: 10px;
  background: linear-gradient(
    90deg,
    rgba(61, 91, 191, 0.18) 0%,
    rgba(61, 91, 191, 0.28) 40%,
    rgba(61, 91, 191, 0.18) 80%
  );
  background-size: 200% 100%;
  animation: t1-skel-shimmer 1.25s ease-in-out infinite;
}

.t1-skel--table-head {
  height: 44px;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(
    90deg,
    #e0e8f8 0%,
    #eef3fb 40%,
    #e0e8f8 80%
  );
  background-size: 200% 100%;
  animation: t1-skel-shimmer 1.25s ease-in-out infinite;
}

.t1-skel--table-row {
  height: 52px;
}

@keyframes t1-skel-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (max-width: 900px) {
  .t1-profile__layout {
    grid-template-columns: 1fr;
  }

  .t1-profile__sidebar {
    position: static;
  }

  .t1-profile__loader-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .t1-profile {
    padding: 20px 0 40px;
  }

  .t1-profile__layout,
  .t1-profile__loader {
    padding: 0 16px;
  }

  .t1-profile__main,
  .t1-profile__loader-main {
    padding: 22px 18px;
  }

  .t1-profile__orders-head,
  .t1-profile__order-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
  }

  .t1-profile__btn {
    width: 100%;
  }

  .t1-skel--btn {
    width: 100%;
  }
}