/* ===================================================
   Profile Page — Modern Card-Based Design
   =================================================== */

:root {
  --primary-blue: #2983fd;
  --secondary-blue: #063464;
  --dark-blue: #01244a;
  --accent-blue: #178adc;
  --light-bg: #f8faff;
  --border-color: #e4e8f0;
  --text-primary: #1f2b46;
  --text-secondary: #6c757d;
  --success-color: #4CAF50;
  --yellow-accent: #fee023;
}

/* ========== PROFILE SECTION CONTAINER ========== */
.profile-section {
  position: relative;
  padding: 70px 0 90px 0;
  background: linear-gradient(135deg, #f8faff 0%, #ffffff 100%);
  min-height: calc(100vh - 200px);
}

.profile-section::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(41, 131, 253, 0.08) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* ========== PAGE HEADER ========== */
.profile-page-header {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 50px;
  animation: slideInDown 0.6s ease-out;
}

.page-header-title {
  flex: 1;
}

.page-header-title h1 {
  font-size: 42px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px 0;
  letter-spacing: -0.8px;
}

.page-header-title p {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

@media (max-width: 768px) {
  .profile-page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 35px;
  }

  .page-header-title h1 {
    font-size: 32px;
  }

  .page-header-title p {
    font-size: 14px;
  }
}

/* ========== SIDEBAR PROFILE CARD ========== */
.profile-sidebar-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
  border: 2px solid var(--border-color);
  border-radius: 20px;
  padding: 36px 28px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: fit-content;
  position: sticky;
  top: 120px;
  animation: slideInLeft 0.6s ease-out 0.1s both;
}

.profile-sidebar-card:hover {
  box-shadow: 0 12px 40px rgba(41, 131, 253, 0.15);
  border-color: var(--primary-blue);
}

/* Profile Avatar Section */
.profile-avatar-section {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.avatar-wrapper {
  position: relative;
  width: 160px;
  height: 160px;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 5px solid var(--primary-blue);
  box-shadow: 0 12px 32px rgba(41, 131, 253, 0.35);
  transition: all 0.3s ease;
}

.profile-avatar:hover {
  transform: scale(1.08);
  box-shadow: 0 16px 40px rgba(41, 131, 253, 0.45);
}

.avatar-edit-badge {
  position: absolute;
  bottom: -8px;
  right: -8px;
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary-blue), #1e6bd8);
  border: 4px solid #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 22px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(41, 131, 253, 0.5);
}

.avatar-edit-badge:hover {
  background: linear-gradient(135deg, #1e6bd8, var(--secondary-blue));
  transform: scale(1.15) rotate(10deg);
  box-shadow: 0 8px 28px rgba(41, 131, 253, 0.6);
}

/* Profile Info Summary */
.profile-info-summary {
  text-align: center;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.profile-info-summary h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px 0;
  letter-spacing: -0.3px;
}

.profile-info-summary p {
  font-size: 14px;
  color: var(--text-secondary);
  margin: 0 0 16px 0;
  word-break: break-all;
}

.info-meta {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.meta-badge {
  display: inline-block;
  padding: 8px 18px;
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.12), rgba(76, 175, 80, 0.08));
  border: 1.5px solid rgba(76, 175, 80, 0.35);
  border-radius: 24px;
  font-size: 13px;
  font-weight: 600;
  color: var(--success-color);
}

/* Quick Actions */
.profile-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, #f8faff 0%, #f3f7ff 100%);
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.action-link:hover {
  background: linear-gradient(135deg, var(--primary-blue), #1e6bd8);
  color: #ffffff;
  border-color: var(--primary-blue);
  box-shadow: 0 6px 20px rgba(41, 131, 253, 0.3);
  transform: translateY(-2px);
}

.action-link i {
  font-size: 16px;
}

/* ========== FORM CARDS ========== */
.profile-form {
  animation: slideInRight 0.6s ease-out 0.2s both;
}

.profile-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fbff 100%);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 24px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.profile-card:hover {
  box-shadow: 0 12px 35px rgba(41, 131, 253, 0.12);
  border-color: var(--primary-blue);
  transform: translateY(-4px);
}

/* Card Header */
.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 24px;
  background: linear-gradient(135deg, #f8faff 0%, #ffffff 100%);
  border-bottom: 1.5px solid var(--border-color);
}

.card-header i {
  font-size: 26px;
  color: var(--primary-blue);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(41, 131, 253, 0.1);
  border-radius: 10px;
}

.card-header h2 {
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Card Body */
.card-body {
  padding: 28px 24px;
}

.form-note {
  font-size: 13px;
  color: var(--text-secondary);
  background: linear-gradient(135deg, rgba(41, 131, 253, 0.07), rgba(41, 131, 253, 0.03));
  padding: 14px 16px;
  border-left: 4px solid var(--primary-blue);
  border-radius: 6px;
  margin-bottom: 20px;
}

/* ========== FORM ELEMENTS ========== */
.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  cursor: pointer;
  letter-spacing: 0.2px;
}

.form-control {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 10px;
  font-size: 14px;
  font-family: 'Fira Sans', sans-serif;
  color: var(--text-primary);
  background: #ffffff;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(41, 131, 253, 0.12);
  background: #ffffff;
}

.form-control::placeholder {
  color: #bbb;
}

textarea.form-control {
  resize: none;
  min-height: 90px;
}

/* Form Row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-row.full {
  grid-template-columns: 1fr;
}

/* ========== PASSWORD INPUT WITH TOGGLE ========== */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper .form-control {
  padding-right: 48px;
}

.toggle-password {
  position: absolute;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 17px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  transition: all 0.3s ease;
}

.toggle-password:hover {
  color: var(--primary-blue);
  transform: scale(1.1);
}

/* ========== ACTION BUTTONS ========== */
.profile-actions {
  display: flex;
  gap: 16px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1.5px solid var(--border-color);
}

.btn-save {
  flex: 1;
  min-width: 160px;
  height: 50px;
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
}

.btn-cancel {
  flex: 1;
  min-width: 160px;
  height: 50px;
  font-size: 15px;
  font-weight: 700;
  gap: 8px;
}

.btn-save i,
.btn-cancel i {
  font-size: 16px;
}

@media (max-width: 576px) {

  .btn-save,
  .btn-cancel {
    width: 100%;
  }
}

/* ========== ALERT MESSAGES ========== */
#alerts {
  margin-bottom: 28px;
}

.alert {
  padding: 18px 20px;
  border-radius: 10px;
  border-left: 5px solid;
  font-size: 14px;
  font-weight: 500;
  animation: slideInDown 0.4s ease-out;
}

.alert-success {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.12), rgba(76, 175, 80, 0.08));
  border-color: var(--success-color);
  color: var(--success-color);
}

.alert-danger {
  background: linear-gradient(135deg, rgba(192, 57, 43, 0.12), rgba(192, 57, 43, 0.08));
  border-color: #c0392b;
  color: #c0392b;
}

.alert-warning {
  background: linear-gradient(135deg, rgba(254, 224, 35, 0.15), rgba(254, 224, 35, 0.08));
  border-color: var(--yellow-accent);
  color: #856404;
}

/* ========== ANIMATIONS ========== */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 991px) {
  .profile-sidebar-card {
    position: static;
    margin-bottom: 30px;
  }

  .page-header-title h1 {
    font-size: 36px;
  }

  .profile-section {
    padding: 50px 0 70px 0;
  }
}

@media (max-width: 768px) {
  .profile-section {
    padding: 45px 0 60px 0;
  }

  .profile-sidebar-card {
    padding: 28px 22px;
  }

  .card-header {
    padding: 22px 20px;
  }

  .card-body {
    padding: 22px 20px;
  }

  .profile-card {
    margin-bottom: 20px;
  }

  .btn-save,
  .btn-cancel {
    min-width: 100%;
  }

  .profile-avatar {
    width: 140px;
    height: 140px;
  }

  .avatar-wrapper {
    width: 140px;
    height: 140px;
  }

  .profile-page-header {
    margin-bottom: 40px;
  }

  .page-header-title h1 {
    font-size: 36px;
  }
}

@media (max-width: 576px) {
  .profile-section {
    padding: 40px 0 55px 0;
  }

  .profile-page-header {
    margin-bottom: 35px;
  }

  .page-header-title h1 {
    font-size: 28px;
  }

  .page-header-title p {
    font-size: 13px;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 18px;
  }

  .card-header i {
    width: 36px;
    height: 36px;
    font-size: 22px;
  }

  .card-body {
    padding: 20px 18px;
  }

  .profile-avatar {
    width: 120px;
    height: 120px;
  }

  .avatar-wrapper {
    width: 120px;
    height: 120px;
  }

  .avatar-edit-badge {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .profile-sidebar-card {
    padding: 24px 20px;
  }

  .profile-info-summary {
    padding-bottom: 18px;
    margin-bottom: 18px;
  }

  .profile-info-summary h3 {
    font-size: 20px;
  }

  .btn-save,
  .btn-cancel {
    width: 100%;
    height: 50px;
  }

  .form-group {
    margin-bottom: 18px;
  }

  .form-group label {
    font-size: 13px;
    margin-bottom: 8px;
  }

  .form-control {
    padding: 12px 14px;
    font-size: 13px;
  }

  textarea.form-control {
    min-height: 80px;
  }
}

/* ========== ACCESSIBILITY & UTILITIES ========== */
.d-none {
  display: none !important;
}

input[type="file"].d-none {
  display: none;
}

form#profileForm{
  margin-top: -3.3%;
}