/* =========================================================
   TAJRIVO - PROFILE
========================================================= */


/* =========================================================
   PAGE
========================================================= */

.profile-page {
  width: 100%;
  max-width: 1450px;
  margin: 0 auto;
  padding-bottom: 50px;
}


/* =========================================================
   PAGE HEADING
========================================================= */

.profile-page-heading {
  margin-bottom: 22px;
}

.profile-page-heading h1 {
  margin: 5px 0 7px;

  color: #0f172a;

  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  font-weight: 800;

  letter-spacing: -0.04em;
}

.profile-page-heading p {
  max-width: 650px;
  margin: 0;

  color: #64748b;

  font-size: 14px;
  line-height: 1.7;
}


/* =========================================================
   TOPBAR POINTS MINI
========================================================= */

.profile-points-mini {
  min-height: 46px;

  padding: 6px 13px;

  border: 1px solid #e2e8f0;
  border-radius: 14px;

  background: #ffffff;

  display: flex;
  align-items: center;
  gap: 10px;

  box-shadow:
    0 4px 15px rgba(15, 23, 42, 0.035);
}

.profile-points-mini-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;

  border-radius: 10px;

  background: #fff8e8;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
}

.profile-points-mini > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.profile-points-mini span {
  color: #94a3b8;

  font-size: 10px;
  font-weight: 700;
}

.profile-points-mini strong {
  color: #0f172a;

  font-size: 12px;
  font-weight: 800;
}


/* =========================================================
   MAIN GRID
========================================================= */

.profile-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    340px;
  gap: 20px;

  align-items: start;
}

.profile-left-column {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.profile-right-column {
  display: flex;
  flex-direction: column;
  gap: 14px;
}


/* =========================================================
   COMMON CARD
========================================================= */

.profile-card,
.profile-side-card {
  border: 1px solid #e8edf5;

  background: #ffffff;

  box-shadow:
    0 10px 34px rgba(15, 23, 42, 0.05);
}

.profile-card {
  padding: 22px;

  border-radius: 22px;
}

.profile-side-card {
  padding: 20px;

  border-radius: 20px;
}


/* =========================================================
   CARD HEADER
========================================================= */

.profile-card-header {
  margin-bottom: 18px;
}

.profile-card-header h2 {
  margin: 5px 0 0;

  color: #0f172a;

  font-size: 20px;
  font-weight: 800;

  letter-spacing: -0.02em;
}


/* =========================================================
   PROFILE OVERVIEW
========================================================= */

.profile-overview-card {
  position: relative;
  overflow: hidden;

  min-height: 155px;

  display: flex;
  align-items: center;
  gap: 18px;

  background:
    radial-gradient(
      circle at top right,
      rgba(22, 119, 255, 0.12),
      transparent 32%
    ),
    radial-gradient(
      circle at bottom left,
      rgba(22, 119, 255, 0.05),
      transparent 28%
    ),
    #ffffff;
}

.profile-avatar-large {
  width: 84px;
  height: 84px;
  flex: 0 0 84px;

  border-radius: 24px;

  background:
    linear-gradient(
      135deg,
      #0c5fd5,
      #1677ff
    );

  color: #ffffff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 31px;
  font-weight: 900;

  box-shadow:
    0 14px 30px rgba(22, 119, 255, 0.2);
}

.profile-overview-info {
  min-width: 0;
}

.profile-overview-info h2 {
  margin: 0;

  overflow: hidden;

  color: #0f172a;

  font-size: 22px;
  font-weight: 800;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.profile-overview-info p {
  margin: 5px 0 0;

  color: #64748b;

  font-size: 12px;

  word-break: break-word;
}

.profile-account-badge {
  min-height: 27px;

  margin-top: 11px;
  padding: 0 10px;

  border-radius: 999px;

  background: #eef5ff;
  color: var(--primary);

  display: inline-flex;
  align-items: center;

  font-size: 10px;
  font-weight: 800;
}


/* =========================================================
   FORM
========================================================= */

.profile-form {
  display: grid;
  gap: 15px;
}

.profile-field label {
  display: block;

  margin-bottom: 7px;

  color: #475569;

  font-size: 12px;
  font-weight: 700;
}

.profile-field input {
  width: 100%;
  min-height: 52px;

  padding: 0 14px;

  border: 1px solid #dfe6ef;
  border-radius: 14px;
  outline: none;

  background: #f8fafc;
  color: #0f172a;

  font-family: inherit;
  font-size: 13px;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.profile-field input:focus {
  border-color: var(--primary);

  background: #ffffff;

  box-shadow:
    0 0 0 4px rgba(22, 119, 255, 0.08);
}

.profile-field input:disabled {
  background: #f1f5f9;
  color: #64748b;

  cursor: not-allowed;
}

.profile-field-note {
  display: block;

  margin-top: 5px;

  color: #94a3b8;

  font-size: 10px;
  line-height: 1.5;
}


/* =========================================================
   MESSAGE
========================================================= */

.profile-message {
  padding: 11px 13px;

  border-radius: 12px;

  font-size: 11px;
  line-height: 1.5;
}

.profile-message.success {
  border: 1px solid #bbf7d0;

  background: #ecfdf3;
  color: #15803d;
}

.profile-message.error {
  border: 1px solid #fecaca;

  background: #fef2f2;
  color: #b91c1c;
}


/* =========================================================
   SAVE BUTTON
========================================================= */

.profile-save-button {
  width: fit-content;
  min-width: 150px;

  min-height: 44px;

  border-radius: 12px;

  font-size: 11px;
  font-weight: 800;

  cursor: pointer;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.profile-save-button:hover:not(:disabled) {
  transform: translateY(-1px);

  box-shadow:
    0 9px 22px rgba(37, 99, 235, 0.2);
}

.profile-save-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* =========================================================
   SECURITY
========================================================= */

.profile-security-list {
  display: flex;
  flex-direction: column;
}

.profile-security-item {
  padding: 15px 0;

  display: grid;
  grid-template-columns:
    auto
    minmax(0, 1fr)
    auto;

  align-items: center;
  gap: 13px;
}

.profile-security-item +
.profile-security-item {
  border-top: 1px solid #eef2f7;
}

.profile-security-icon {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;

  border-radius: 13px;

  background: #eef5ff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
}

.profile-security-item strong {
  display: block;

  color: #0f172a;

  font-size: 13px;
  font-weight: 800;
}

.profile-security-item span {
  display: block;

  margin-top: 3px;

  color: #64748b;

  font-size: 10px;
  line-height: 1.5;
}


/* =========================================================
   SECONDARY BUTTON
========================================================= */

.profile-secondary-button {
  min-height: 38px;

  padding: 0 13px;

  border: 1px solid #e8edf5;
  border-radius: 11px;

  background: #f8fafc;
  color: #475569;

  font-family: inherit;
  font-size: 11px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.profile-secondary-button:hover:not(:disabled) {
  border-color: #d7e3f3;

  background: #eef5ff;
  color: var(--primary);

  transform: translateY(-1px);
}

.profile-secondary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}


/* =========================================================
   SIDE CARD ICON
========================================================= */

.profile-side-icon {
  width: 46px;
  height: 46px;

  margin-bottom: 14px;

  border-radius: 14px;

  background: #eef5ff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 20px;
}

.profile-side-card:nth-child(1)
.profile-side-icon {
  background: #fff8e8;
}

.profile-side-card:nth-child(2)
.profile-side-icon {
  background: #f5f3ff;
}

.profile-side-card:nth-child(4)
.profile-side-icon {
  background: #effcf6;
}


/* =========================================================
   SIDE CARD CONTENT
========================================================= */

.profile-side-card > span {
  display: block;

  color: #64748b;

  font-size: 11px;
}

.profile-side-card > strong {
  display: block;

  margin-top: 5px;

  color: #0f172a;

  font-size: 22px;
  line-height: 1.2;
  font-weight: 800;
}

.profile-side-link {
  display: inline-block;

  margin-top: 13px;

  color: var(--primary);

  font-size: 11px;
  font-weight: 700;

  text-decoration: none;
}

.profile-side-link:hover {
  text-decoration: underline;
}


/* =========================================================
   REFERRAL CODE
========================================================= */

.profile-referral-code {
  padding: 9px 10px;

  border: 1px dashed #bfdbfe;
  border-radius: 10px;

  background: #f8fafc;
  color: var(--primary) !important;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;

  letter-spacing: 1px;

  font-size: 16px !important;

  overflow-wrap: anywhere;
}


/* =========================================================
   COPY BUTTON
========================================================= */

.profile-copy-button {
  width: 100%;
  min-height: 40px;

  margin-top: 12px;

  border: 1px solid #dbeafe;
  border-radius: 11px;

  background: #eef5ff;
  color: var(--primary);

  font-family: inherit;
  font-size: 11px;
  font-weight: 800;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.profile-copy-button:hover {
  border-color: #bfdbfe;

  background: #dbeafe;

  transform: translateY(-1px);
}


/* =========================================================
   USER ID
========================================================= */

.profile-user-id {
  max-width: 100%;

  font-family:
    ui-monospace,
    SFMono-Regular,
    Menlo,
    Monaco,
    Consolas,
    monospace;

  font-size: 11px !important;
  line-height: 1.5;

  word-break: break-all;
}


/* =========================================================
   ACCOUNT STATUS
========================================================= */

.profile-status-value {
  color: #15803d !important;

  font-size: 18px !important;
}

.profile-status-note {
  display: block;

  margin-top: 8px;

  color: #64748b;

  font-size: 10px;
  line-height: 1.5;
}


/* =========================================================
   LOGOUT CARD
========================================================= */

.profile-logout-card {
  width: 100%;

  padding: 17px;

  border: 1px solid #fecaca;
  border-radius: 18px;

  background: #fffafa;

  display: flex;
  align-items: center;
  gap: 12px;

  text-align: left;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.profile-logout-card:hover {
  border-color: #fca5a5;

  background: #fef2f2;

  transform: translateY(-1px);
}

.profile-logout-card > span {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;

  border-radius: 12px;

  background: #fee2e2;
  color: #b91c1c;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 18px;
}

.profile-logout-card strong {
  display: block;

  color: #b91c1c;

  font-size: 12px;
  font-weight: 800;
}

.profile-logout-card small {
  display: block;

  margin-top: 2px;

  color: #7f1d1d;

  font-size: 9px;
}

.profile-logout-card:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) {

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .profile-right-column {
    display: grid;

    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

  .profile-logout-card {
    grid-column:
      1 / -1;
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

  .profile-page {
    padding-bottom: 30px;
  }

  .profile-page-heading h1 {
    font-size: 27px;
  }

  .profile-page-heading p {
    font-size: 12px;
  }

  .profile-points-mini {
    display: none;
  }

  .profile-card,
  .profile-side-card {
    padding: 17px;

    border-radius: 18px;
  }

  .profile-overview-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-avatar-large {
    width: 72px;
    height: 72px;
    flex-basis: 72px;

    border-radius: 20px;

    font-size: 27px;
  }

  .profile-right-column {
    grid-template-columns: 1fr;
  }

  .profile-logout-card {
    grid-column: auto;
  }

  .profile-security-item {
    grid-template-columns:
      auto
      minmax(0, 1fr);
  }

  .profile-secondary-button {
    grid-column:
      1 / -1;

    width: 100%;
  }

  .profile-save-button {
    width: 100%;
  }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

  .profile-page-heading {
    margin-bottom: 18px;
  }

  .profile-overview-info h2 {
    font-size: 20px;
  }

  .profile-card-header h2 {
    font-size: 18px;
  }

}


/* =========================================================
   HIDDEN
========================================================= */

[hidden] {
  display: none !important;
}