/* Sunlight — Account / profile */

.t1-profile {
  width: min(100% - 2rem, var(--sl-max));
  margin: 1.75rem auto 3.5rem;
}

.t1-profile__layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.35rem;
  align-items: start;
}

.t1-profile__sidebar,
.t1-profile__main {
  background: var(--sl-surface);
  border: 1px solid var(--sl-border);
  border-radius: 18px;
  box-shadow: var(--sl-shadow);
}

/* Sidebar */
.t1-profile__sidebar {
  padding: 1.25rem;
  display: grid;
  gap: 1rem;
}

.t1-profile__user {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--sl-border);
}

.t1-profile__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--sl-accent);
  color: var(--sl-ink);
  display: grid;
  place-items: center;
  font-family: var(--sl-display);
  font-weight: 700;
  font-size: 1.15rem;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(240, 162, 2, 0.28);
}

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

.t1-profile__user-name {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.t1-profile__user-email {
  margin: 0.15rem 0 0;
  color: var(--sl-muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.t1-profile__menu {
  display: grid;
  gap: 0.3rem;
}

.t1-profile__menu-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--sl-ink-soft);
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background 0.2s ease, color 0.2s ease;
}

.t1-profile__menu-link:hover {
  background: var(--sl-sky);
  color: var(--sl-ink);
}

.t1-profile__menu-link.is-active {
  background: var(--sl-accent-soft);
  color: var(--sl-ink);
}

.t1-profile__menu-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--sl-sky);
  color: var(--sl-ink-soft);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.t1-profile__menu-link.is-active .t1-profile__menu-icon {
  background: rgba(240, 162, 2, 0.22);
  color: #b87a00;
}

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

.t1-profile__sidebar-foot {
  padding-top: 0.35rem;
  border-top: 1px solid var(--sl-border);
}

.t1-profile__logout {
  color: var(--sl-danger);
}

.t1-profile__logout:hover {
  background: #fdecea;
  color: var(--sl-danger);
}

.t1-profile__logout .t1-profile__menu-icon {
  background: #fdecea;
  color: var(--sl-danger);
}

/* Main panel */
.t1-profile__main {
  padding: 1.6rem 1.7rem 1.8rem;
  min-width: 0;
}

.t1-profile__main-head {
  margin-bottom: 1.35rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--sl-border);
}

.t1-profile__main-title {
  margin: 0;
  font-family: var(--sl-display);
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--sl-ink);
}

.t1-profile__main-lede {
  margin: 0.35rem 0 0;
  color: var(--sl-muted);
  font-size: 0.95rem;
}

/* Form */
.t1-profile__form,
section.t1-profile .t1-profile__form {
  display: grid;
  gap: 1.15rem;
  max-width: 540px;
  width: 100%;
}

.t1-profile__field,
section.t1-profile .t1-profile__field {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0.45rem;
  width: 100%;
  margin: 0;
}

.t1-profile__field > label,
section.t1-profile .t1-profile__field > label {
  display: block;
  width: 100%;
  margin: 0;
  font-weight: 650;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  color: var(--sl-ink, #12161A);
}

.t1-profile__field .sf-auth__muted {
  color: var(--sl-muted, #6B7780);
  font-weight: 500;
  font-size: 0.82rem;
}

.t1-profile__field > input,
.t1-profile__field > select,
.t1-profile__field > textarea,
.t1-profile__field .sf-auth__password-wrap > input,
section.t1-profile .t1-profile__field input,
section.t1-profile .t1-profile__field select,
section.t1-profile .t1-profile__field textarea {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 48px;
  box-sizing: border-box !important;
  margin: 0;
  border: 1.5px solid var(--sl-border, #E4E9EC) !important;
  border-radius: 12px !important;
  padding: 0.85rem 1rem !important;
  font-family: inherit !important;
  font-size: 0.98rem !important;
  line-height: 1.4 !important;
  color: var(--sl-ink, #12161A) !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(18, 22, 26, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.t1-profile__field > input::placeholder,
section.t1-profile .t1-profile__field input::placeholder {
  color: #9AA6AE;
  opacity: 1;
}

.t1-profile__field > input:hover:not([readonly]):not(:disabled),
.t1-profile__field .sf-auth__password-wrap > input:hover,
section.t1-profile .t1-profile__field input:hover:not([readonly]) {
  border-color: #c9d4d9 !important;
}

.t1-profile__field > input:focus,
.t1-profile__field > select:focus,
.t1-profile__field > textarea:focus,
.t1-profile__field .sf-auth__password-wrap > input:focus,
section.t1-profile .t1-profile__field input:focus,
section.t1-profile .t1-profile__field select:focus,
section.t1-profile .t1-profile__field textarea:focus {
  outline: none !important;
  border-color: var(--sl-accent, #F0A202) !important;
  box-shadow: 0 0 0 4px rgba(240, 162, 2, 0.22) !important;
  background: #fff !important;
}

.t1-profile__field > input[readonly],
section.t1-profile .t1-profile__field input[readonly] {
  background: var(--sl-sky, #F1F5F7) !important;
  color: var(--sl-ink-soft, #3D4A52) !important;
  cursor: default;
  border-style: dashed !important;
}

.t1-profile__field--password .sf-auth__password-wrap {
  position: relative;
  display: block;
  width: 100%;
}

.t1-profile__field--password .sf-auth__password-wrap input {
  padding-right: 2.85rem !important;
}

.t1-profile__field--password .sf-auth__password-toggle {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--sl-muted, #6B7780);
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
}

.t1-profile__field--password .sf-auth__password-toggle:hover {
  background: var(--sl-sky, #F1F5F7);
  color: var(--sl-ink, #12161A);
}

.t1-profile__actions {
  margin-top: 0.55rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.t1-profile__btn,
section.t1-profile .t1-profile__btn,
section.t1-profile button.t1-profile__btn[type="submit"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0 !important;
  border-radius: 999px !important;
  padding: 0.9rem 1.7rem !important;
  min-height: 48px;
  font-family: inherit !important;
  font-weight: 700 !important;
  font-size: 0.98rem !important;
  letter-spacing: -0.01em;
  cursor: pointer;
  background: var(--sl-accent, #F0A202) !important;
  color: var(--sl-ink, #12161A) !important;
  box-shadow: 0 10px 24px rgba(240, 162, 2, 0.34);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.t1-profile__btn:hover,
section.t1-profile .t1-profile__btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 14px 30px rgba(240, 162, 2, 0.42);
  color: var(--sl-ink, #12161A) !important;
}

.t1-profile__btn:active {
  transform: translateY(0);
  filter: brightness(0.98);
}

.t1-profile__btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.t1-profile__form .sf-auth__alert {
  margin: 0;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
}

.t1-profile__form .sf-auth__alert:empty {
  display: none;
}

.t1-profile__form .sf-auth__alert.is-success,
.t1-profile__form .sf-auth__alert[data-type="success"] {
  background: #e8f7ef;
  color: #1b7a45;
}

.sf-auth__field-error {
  margin: 0;
  color: var(--sl-danger, #D64545);
  font-size: 0.84rem;
}

.sf-auth__field-error[hidden] {
  display: none !important;
}

.sf-auth__strength {
  margin-top: 0.35rem;
}

.sf-auth__strength-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--sl-sky, #F1F5F7);
  overflow: hidden;
}

.sf-auth__strength-bar > span,
.sf-auth__strength-bar [data-password-strength-fill] {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--sl-accent, #F0A202);
  transition: width 0.25s ease, background 0.25s ease;
}

.sf-auth__strength-label,
.sf-auth__match {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: var(--sl-muted, #6B7780);
}

/* Orders */
.t1-profile__orders-panel {
  display: grid;
  gap: 0.65rem;
}

.t1-profile__orders-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 1fr 1fr;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sl-muted);
  border-bottom: 1px solid var(--sl-border);
}

.t1-profile__orders-body {
  display: grid;
  gap: 0.55rem;
}

.t1-profile__order-row,
[data-order-row] {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr 1fr 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.9rem 0.85rem;
  border: 1px solid var(--sl-border);
  border-radius: 12px;
  background: #fff;
  font-size: 0.92rem;
}

.t1-profile__order-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--sl-sky);
  color: var(--sl-ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.t1-profile__orders-empty {
  text-align: center;
  padding: 2.5rem 1.25rem;
  color: var(--sl-muted);
  border: 1px dashed var(--sl-border);
  border-radius: 14px;
  background: var(--sl-sky);
}

.t1-profile__orders-empty p {
  margin: 0 0 0.85rem;
  font-size: 1rem;
}

.t1-profile__orders-empty a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  background: var(--sl-accent);
  color: var(--sl-ink);
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(240, 162, 2, 0.28);
}

.t1-profile__orders-empty a:hover {
  color: var(--sl-ink);
}

/* Loader */
.t1-profile__loader {
  width: min(100% - 2rem, var(--sl-max));
  margin: 1.5rem auto;
}

.t1-skel {
  display: block;
  background: linear-gradient(90deg, #eef2f4, #e4eaee, #eef2f4);
  background-size: 200% 100%;
  animation: sl-skel 1.2s linear infinite;
  border-radius: 8px;
}

@keyframes sl-skel {
  to { background-position: -200% 0; }
}

.t1-skel--avatar { width: 48px; height: 48px; border-radius: 50%; }
.t1-skel--line { height: 12px; width: 100%; margin: 0.35rem 0; }
.t1-skel--w60 { width: 60%; }
.t1-skel--w90 { width: 90%; }
.t1-skel--w40 { width: 40%; }
.t1-skel--w50 { width: 50%; }
.t1-skel--sm { height: 10px; }
.t1-skel--title { height: 22px; width: 40%; margin-bottom: 0.75rem; }
.t1-skel--nav { height: 40px; margin: 0.35rem 0; border-radius: 12px; }
.t1-skel--input { height: 46px; margin-bottom: 0.75rem; border-radius: 12px; }
.t1-skel--label { height: 12px; width: 30%; margin: 0.5rem 0; }
.t1-skel--btn { height: 44px; width: 160px; border-radius: 999px; margin-top: 0.5rem; }
.t1-skel--table-head,
.t1-skel--table-row { height: 42px; margin: 0.4rem 0; border-radius: 10px; }

.t1-profile__loader-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.35rem;
}

.t1-profile__loader-card {
  background: #fff;
  border: 1px solid var(--sl-border);
  border-radius: 18px;
  padding: 1.25rem;
}

.t1-profile__loader-user {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
}

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

.t1-profile.is-loading [data-profile-content] {
  display: none;
}

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

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

  .t1-profile__orders-head {
    display: none;
  }

  .t1-profile__order-row,
  [data-order-row] {
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem 0.75rem;
  }
}

@media (max-width: 560px) {
  .t1-profile__main {
    padding: 1.25rem 1.15rem 1.4rem;
  }

  .t1-profile__btn {
    width: 100%;
  }

  .t1-profile__order-row,
  [data-order-row] {
    grid-template-columns: 1fr;
  }
}
