.profile-page {
  background-color: var(--bg);
  min-height: 100vh;
}

.profile-content {
  padding: 16px;
  padding-bottom: 50px;
}

/* User Profile Card */
.profile-card-section {
  padding: 16px 0;
}

.profile-card {
  background: var(--surface);
  border-radius: 20px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(35, 22, 81, 0.08);
  border: 1px solid var(--border);
  position: relative;
}

.profile-avatar-wrapper {
  flex-shrink: 0;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  border: 3px solid var(--primary-light);
}

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-dark);
}

.user-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.contact-item {
  font-size: 0.85rem;
  color: var(--text-mid);
  display: flex;
  align-items: center;
  gap: 6px;
}

.edit-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 6px 12px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Stats Section */
.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-box {
  background: var(--surface);
  padding: 16px;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.2s ease;
}

.stat-box:active {
  transform: scale(0.95);
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
}

/* Menu Section */
.profile-menu {
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 16px;
  gap: 16px;
  cursor: pointer;
  transition: background-color 0.2s;
  border-bottom: 1px solid var(--border);
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:active {
  background-color: var(--primary-light);
}

.menu-icon-bg {
  width: 40px;
  height: 40px;
  background-color: var(--primary-light);
  color: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-text {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.menu-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
}

.menu-sub {
  font-size: 0.75rem;
  color: var(--text-mid);
}

.menu-chevron {
  color: var(--text-light);
}

/* Logout Section */
.logout-section {
  padding: 16px;
}

.logout-button {
  width: 100%;
  padding: 16px;
  background-color: rgba(255, 77, 79, 0.1);
  color: #ff4d4f;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 77, 79, 0.2);
}

.app-version {
  text-align: center;
  margin-top: 16px;
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
}

.modal-container {
  background: var(--surface);
  width: 100%;
  max-width: 400px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  animation: modalIn 0.3s ease-out;
}

@keyframes modalIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-header {
  padding: 24px 24px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-dark);
}

.close-btn {
  background: var(--bg);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
  cursor: pointer;
}

.modal-body {
  padding: 12px 24px 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-mid);
  margin-bottom: 8px;
  margin-left: 4px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--primary);
}

.form-group input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  transition: all 0.2s;
}

.form-group input:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--primary-light);
  outline: none;
}

.modal-footer {
  padding: 0 24px 24px;
  display: flex;
  gap: 12px;
}

.btn-cancel {
  flex: 1;
  padding: 16px;
  background: var(--bg);
  color: var(--text-mid);
  border-radius: 16px;
  font-weight: 700;
  border: 1px solid var(--border);
}

.btn-save {
  flex: 2;
  padding: 16px;
  background: var(--primary);
  color: white;
  border-radius: 16px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(35, 22, 81, 0.2);
}

.btn-save:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.membership-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.membership-tag.guest {
  background: rgba(239, 108, 55, 0.1);
  color: #ef6c37;
}

.membership-tag.regular {
  background: rgba(8, 168, 80, 0.1);
  color: #08a850;
}
