/* =========================
PROFILE PAGE
========================= */

.profile-dashboard-page {
  width: 100%;
  color: #111827;
}

.profile-page-header {
  margin-bottom: 16px;
}

.profile-page-header h1 {
  margin: 0 0 8px;
  color: #161b22;
  font-size: 25px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.profile-page-header p {
  margin: 0;
  color: #4d5565;
  font-size: 14px;
  line-height: 1.35;
}

.profile-dashboard-top-card,
.profile-dashboard-section-card {
  background: #fff;
  border: 1px solid #cfd7e6;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(31, 56, 102, 0.05);
}

.profile-dashboard-top-card {
  padding: 28px 26px 27px;
}

.profile-dashboard-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.profile-dashboard-user-left {
  display: flex;
  align-items: center;
  gap: 25px;
  min-width: 0;
}

.profile-dashboard-avatar {
  position: relative;
  width: 86px;
  height: 86px;
  border: 4px solid #fff;
  border-radius: 50%;
  box-shadow: 0 7px 18px rgba(15, 23, 42, 0.18);
  overflow: hidden;
  flex: 0 0 auto;
}

.profile-dashboard-avatar::after {
  content: "";
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #079c8d;
  box-shadow: inset 0 0 0 2px #079c8d;
}

.profile-dashboard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.profile-dashboard-user-content {
  min-width: 0;
}

.profile-dashboard-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 11px;
  min-width: 0;
}

.profile-dashboard-user-content h2 {
  margin: 0;
  color: #1a1b22;
  font-size: 16px;
  line-height: 1;
  font-weight: 600;
}

.profile-dashboard-partner-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid #a9c5fb;
  border-radius: 999px;
  color: #0052d6;
  background: #eaf2ff;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.profile-dashboard-user-content p {
  margin: 0 0 11px;
  color: #273142;
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
}

.profile-dashboard-meta {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
}

.profile-dashboard-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #6f7786;
  font-size: 13px;
  line-height: 1;
}

.profile-dashboard-meta svg {
  width: 13px;
  height: 13px;
  color: #7c8493;
  stroke-width: 1.8;
}

.profile-dashboard-main-btn,
.profile-dashboard-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  color: #fff;
  background: #0755d8;
  font-weight: 700;
  box-shadow: 0 12px 22px rgba(7, 85, 216, 0.16);
  white-space: nowrap;
}

.profile-dashboard-main-btn {
  min-width: 177px;
  height: 42px;
  padding: 0 26px;
  font-size: 13px;
}

.profile-dashboard-main-btn svg,
.profile-dashboard-edit-btn svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}

.profile-dashboard-divider {
  width: 100%;
  height: 1px;
  margin: 27px 0 28px;
  background: #dce2ec;
}

.profile-dashboard-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.profile-dashboard-stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 15px 16px;
  border-radius: 11px;
}

.profile-dashboard-stat-card.bookings {
  background: #f0f1fb;
}

.profile-dashboard-stat-card.wallet {
  background: #f1f6e9;
}

.profile-dashboard-stat-card.credit {
  background: #f8eeee;
}

.profile-dashboard-stat-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.bookings .profile-dashboard-stat-icon {
  color: #0755d8;
  background: #dfe9ff;
}

.wallet .profile-dashboard-stat-icon {
  color: #078675;
  background: #d9f0e4;
}

.credit .profile-dashboard-stat-icon {
  color: #964120;
  background: #f4dcd4;
}

.profile-dashboard-stat-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.2;
}

.profile-dashboard-stat-card strong,
.profile-dashboard-stat-card span {
  display: block;
  color: #101622;
}

.profile-dashboard-stat-card strong {
  margin-bottom: 5px;
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
}

.profile-dashboard-stat-card span {
  font-size: 13px;
  line-height: 1;
  font-weight: 500;
}

.profile-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.profile-dashboard-section-card {
  min-height: 319px;
  padding: 27px 27px 18px;
}

.profile-dashboard-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 31px;
}

.profile-dashboard-card-head h3 {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: #0e131b;
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
}

.profile-dashboard-card-head h3 svg {
  width: 15px;
  height: 15px;
  color: #0755d8;
  stroke-width: 2.3;
}

.profile-dashboard-edit-btn {
  min-width: 138px;
  height: 42px;
  padding: 0 17px;
  font-size: 13px;
}

.profile-dashboard-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 44px;
  row-gap: 24px;
}

.profile-dashboard-field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.profile-dashboard-field.full-width {
  grid-column: 1 / -1;
}

.profile-dashboard-field label {
  display: block;
  margin: 0 0 7px;
  color: #777f90;
  font-size: 14px;
  line-height: 1;
  font-weight: 400;
}

.profile-dashboard-field span {
  display: block;
  color: #0c111a;
  font-size: 14px;
  line-height: 1.15;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.profile-dashboard-doc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.profile-dashboard-doc-card {
  min-height: 178px;
  padding: 18px 16px 15px;
  border: 1px solid #cfd7e6;
  border-radius: 12px;
  background: #fff;
}

.profile-doc-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  margin-bottom: 16px;
  border-radius: 50%;
  color: #687182;
  background: #eeeef8;
}

.profile-doc-icon svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

.profile-dashboard-doc-card h4 {
  margin: 0 0 7px;
  color: #101622;
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
}

.profile-dashboard-doc-card p {
  min-height: 36px;
  margin: 0 0 13px;
  color: #757e90;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 400;
}

.profile-dashboard-doc-card button {
  width: 100%;
  height: 29px;
  border-radius: 999px;
  color: #111827;
  background: #eeeef8;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.profile-edit-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 23, 42, 0.34);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.22s ease,
    visibility 0.22s ease;
}

.profile-edit-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 95;
  display: flex;
  flex-direction: column;
  width: min(100%, 383px);
  height: 100vh;
  background: #fff;
  box-shadow: -18px 0 42px rgba(20, 31, 54, 0.18);
  transform: translateX(100%);
  transition: transform 0.24s ease;
}

body.profile-edit-open {
  overflow: hidden;
}

body.profile-edit-open .profile-edit-backdrop {
  opacity: 1;
  visibility: visible;
}

body.profile-edit-open .profile-edit-drawer {
  transform: translateX(0);
}

.profile-edit-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 27px 30px 25px;
  border-bottom: 1px solid #eef0f5;
}

.profile-edit-head h2 {
  margin: 0 0 6px;
  color: #1b2230;
  font-size: 21px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.profile-edit-head p {
  margin: 0;
  color: #4f5868;
  font-size: 11px;
  line-height: 1.25;
  font-weight: 600;
}

.profile-edit-head button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: -4px;
  color: #111827;
  background: transparent;
  flex: 0 0 auto;
}

.profile-edit-head svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.3;
}

.profile-edit-form {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
}

.profile-edit-fields {
  display: grid;
  gap: 22px;
  padding: 26px 30px 24px;
  overflow-y: auto;
}

.profile-edit-field {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.profile-edit-field span {
  color: #4d5565;
  font-size: 12px;
  line-height: 1;
  font-weight: 800;
}

.profile-edit-field input,
.profile-edit-field select {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: 15px;
  outline: none;
  color: #222938;
  background: #f0f1fb;
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
}

.profile-edit-field input {
  padding: 0 16px;
}

.profile-edit-field input::placeholder {
  color: #8b93a4;
}

.profile-edit-field select {
  padding: 0 44px 0 16px;
  appearance: none;
  background:
    linear-gradient(45deg, transparent 50%, #747d8d 50%) calc(100% - 25px) 50% /
      6px 6px no-repeat,
    linear-gradient(135deg, #747d8d 50%, transparent 50%) calc(100% - 20px)
      50% / 6px 6px no-repeat,
    #f0f1fb;
}

.profile-edit-footer {
  padding: 24px 30px 29px;
  border-top: 1px solid #f0f2f7;
  box-shadow: 0 -14px 24px rgba(33, 47, 77, 0.03);
}

.profile-edit-footer button {
  width: 100%;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: #0755d8;
  box-shadow: 0 10px 20px rgba(7, 85, 216, 0.24);
  font-size: 12px;
  line-height: 1;
  font-weight: 600;
}

@media (max-width: 1100px) {
  .profile-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991px) {
  .profile-dashboard-user-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-dashboard-main-btn {
    width: 100%;
  }

  .profile-dashboard-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .profile-dashboard-top-card,
  .profile-dashboard-section-card {
    padding: 18px;
  }

  .profile-dashboard-user-left {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .profile-dashboard-name-row,
  .profile-dashboard-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-dashboard-edit-btn {
    width: 100%;
  }

  .profile-dashboard-info-grid,
  .profile-dashboard-doc-grid {
    grid-template-columns: 1fr;
  }

  .profile-dashboard-section-card {
    min-height: auto;
  }

  .profile-edit-drawer {
    top: auto;
    bottom: 0;
    width: 100%;
    height: min(88vh, 720px);
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 42px rgba(20, 31, 54, 0.2);
    transform: translateY(100%);
  }

  body.profile-edit-open .profile-edit-drawer {
    transform: translateY(0);
  }

  .profile-edit-head {
    padding: 22px 22px 20px;
  }

  .profile-edit-fields {
    gap: 18px;
    padding: 22px;
  }

  .profile-edit-footer {
    padding: 18px 22px 22px;
  }
}

@media (max-width: 576px) {
  .profile-page-header h1 {
    font-size: 24px;
  }

  .profile-dashboard-avatar {
    width: 78px;
    height: 78px;
  }
}
