/* ============================================================
   Fröccs Apartman – Profile Page Styles
   File: css/profile.css
============================================================ */

/* ===== PROFILE HERO ===== */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  background: var(--light);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.profile-avatar-lg {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), var(--teal-dk));
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: -1px;
  box-shadow: 0 4px 16px rgba(74,124,89,.35);
}

.profile-hero-info h1 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--dark);
  margin-bottom: .2rem;
}

.profile-hero-info p {
  color: var(--mid);
  font-size: .95rem;
}

.profile-company {
  margin-top: .3rem;
  font-size: .9rem;
  color: var(--teal-dk);
  font-weight: 600;
}

/* ===== ALERT ===== */
.profile-alert {
  padding: 1rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: 1.5rem;
}

.profile-alert--success {
  background: rgba(34,197,94,.12);
  color: #16a34a;
  border-left: 4px solid #22c55e;
}

.profile-alert--error {
  background: rgba(220,38,38,.1);
  color: #dc2626;
  border-left: 4px solid #dc2626;
}

/* ===== TABS ===== */
.profile-tabs {
  display: flex;
  gap: .5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 0;
}

.profile-tab {
  background: none;
  border: none;
  padding: .75rem 1.4rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--mid);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: color .2s, border-color .2s;
}

.profile-tab:hover {
  color: var(--teal);
}

.profile-tab.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

/* ===== PANELS ===== */
.profile-panel {
  display: none;
  background: var(--light);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  padding: 2rem 2.5rem;
  box-shadow: var(--shadow);
  animation: panelIn .25s ease;
}

.profile-panel.active {
  display: block;
}

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

/* ===== FORM ===== */
.profile-form .form-group {
  margin-bottom: 1.2rem;
}

.profile-form-actions {
  margin-top: 1.8rem;
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* ===== NAV DROPDOWN ===== */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + .6rem);
  right: 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.15);
  min-width: 200px;
  overflow: hidden;
  z-index: 2000;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-menu a {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem 1.2rem;
  font-size: .92rem;
  font-weight: 500;
  color: var(--dark) !important;
  text-decoration: none;
  transition: background .15s;
  border-bottom: 1px solid #f0f0f0;
}

.nav-dropdown-menu a:last-child {
  border-bottom: none;
}

.nav-dropdown-menu a:hover {
  background: var(--sand);
}

.nav-dropdown-menu a.nav-dd-logout {
  color: #c4793a !important;
}

.nav-dropdown-menu a.nav-dd-logout:hover {
  background: rgba(196,121,58,.08);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

  /* ---- Profil hero ---- */
  .profile-hero {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.2rem 1rem;
    gap: 1rem;
  }

  .profile-avatar-lg {
    width: 70px;
    height: 70px;
    font-size: 1.6rem;
  }

  .profile-hero-info h1 {
    font-size: 1.3rem;
  }

  .profile-hero-info p {
    font-size: .88rem;
    word-break: break-all;
  }

  /* ---- Stat kártyák 2 oszlopban, kisebb min-szélességgel ---- */
  .stats-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: .7rem;
  }

  .stat-card {
    padding: .9rem .8rem;
    gap: .6rem;
  }

  .stat-card-icon {
    width: 38px;
    height: 38px;
    font-size: 1.3rem;
    flex-shrink: 0;
  }

  .stat-card-info strong {
    font-size: 1.3rem;
  }

  .stat-card-info span {
    font-size: .75rem;
  }

  /* ---- Panelek kisebb paddinggal ---- */
  .profile-panel {
    padding: 1.2rem 1rem;
  }

  /* ---- Form sorok egyoszloposak legyenek ---- */
  .profile-panel .form-row {
    grid-template-columns: 1fr !important;
  }

  /* ---- Gombok egymás alá mobilon ---- */
  .profile-form-actions {
    flex-direction: column;
    align-items: stretch;
    gap: .7rem;
  }

  .profile-form-actions .btn {
    width: 100%;
    text-align: center;
  }

  /* ---- Tabok ---- */
  .profile-tabs {
    flex-direction: row;
    flex-wrap: wrap;
    border-bottom: 2px solid #e5e7eb;
    gap: 0;
  }

  .profile-tab {
    flex: 1 1 auto;
    border-bottom: 3px solid transparent;
    border-left: none;
    border-radius: 0;
    margin-bottom: -2px;
    text-align: center;
    font-size: .88rem;
    padding: .6rem .8rem;
  }

  .profile-tab.active {
    border-bottom-color: var(--teal);
    border-left-color: transparent;
    background: transparent;
    color: var(--teal);
  }
}
